From owner-freebsd-net@freebsd.org Mon May 10 11:08:53 2021 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFF8B634360 for ; Mon, 10 May 2021 11:08:53 +0000 (UTC) (envelope-from ftk@nanoteq.com) Received: from mailguard.liquidtelecom.co.za (mailguard.liquidtelecom.co.za [41.168.2.25]) by mx1.freebsd.org (Postfix) with ESMTP id 4Fdywh0HZsz3GR4 for ; Mon, 10 May 2021 11:08:51 +0000 (UTC) (envelope-from ftk@nanoteq.com) Received: from SEC-NGP-AG09 ([192.168.202.39]) by mailguard.liquidtelecom.co.za with Microsoft SMTPSVC(7.0.6002.18264); Mon, 10 May 2021 13:08:12 +0200 Received: from sec-ngp-spt03.e-purifier.com ([192.168.201.1]) by SEC-NGP-AG09.neotel.e-purifier.co.za with Microsoft SMTPSVC(7.5.7601.17514); Mon, 10 May 2021 13:07:59 +0200 Received: from localhost (localhost [127.0.0.1]) by sec-ngp-spt03.e-purifier.com (Postfix) with ESMTP id 0B7903C03DE for ; Mon, 10 May 2021 13:08:26 +0200 (SAST) X-Virus-Scanned: by SpamTitan at e-purifier.com Received: from sec-ngp-spt03.e-purifier.com (localhost [127.0.0.1]) by sec-ngp-spt03.e-purifier.com (Postfix) with ESMTP id 008653C03DD for ; Mon, 10 May 2021 13:08:19 +0200 (SAST) Received: from NTQ-EXC.nanoteq.co.za (unknown [41.170.5.18]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sec-ngp-spt03.e-purifier.com (Postfix) with ESMTPS id E4FC93C03D3 for ; Mon, 10 May 2021 13:08:19 +0200 (SAST) Received: from NTQ-EXC.nanoteq.co.za ([fe80::a5b3:4700:5af3:78b2]) by NTQ-EXC.nanoteq.co.za ([fe80::a5b3:4700:5af3:78b2%12]) with mapi id 14.03.0513.000; Mon, 10 May 2021 13:08:19 +0200 From: Francois ten Krooden To: "freebsd-net@freebsd.org" Subject: Vector Packet Processing (VPP) portability on FreeBSD Thread-Topic: Vector Packet Processing (VPP) portability on FreeBSD Thread-Index: AddFjL3Ir+/SBI2sQ5eAJwBDuuNlFQ== Date: Mon, 10 May 2021 11:08:18 +0000 Message-ID: Accept-Language: en-US, en-ZA Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 10 May 2021 11:07:59.0643 (UTC) FILETIME=[BCD36EB0:01D7458C] x-archived: yes x-dbused: RGF0YSBTb3VyY2U9MTkyLjE2OC4yMDEuMjc= X-Rspamd-Queue-Id: 4Fdywh0HZsz3GR4 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of ftk@nanoteq.com has no SPF policy when checking 41.168.2.25) smtp.mailfrom=ftk@nanoteq.com X-Spamd-Result: default: False [-1.59 / 15.00]; ARC_NA(0.00)[]; SUBJECT_ENDS_SPACES(0.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[41.168.2.25:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.988]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; DMARC_NA(0.00)[Nanoteq.com]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[41.168.2.25:from:127.0.2.255]; NEURAL_HAM_SHORT(-1.00)[-1.000]; TO_DN_EQ_ADDR_ALL(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:36937, ipnet:41.168.0.0/17, country:ZA]; RCVD_COUNT_SEVEN(0.00)[7]; MAILMAN_DEST(0.00)[freebsd-net]; RCVD_IN_DNSWL_LOW(-0.10)[41.168.2.25:from] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2021 11:08:54 -0000 Greetings We have a vested interest in high-speed IPsec VPN on FreeBSD. We have start= ed with the porting of VPP (https://fd.io/) to FreeBSD. Currently we have VPP compiled and running with netmap. The speeds we measu= re are nowhere near the performance of a 10Gbps link, at around 350kpps for= 1500 byte IPv4 packets. We suspect the biggest issue is related to how VPP= implements huge pages (Linux) and our modifications to support super pages= on FreeBSD. Apart from the above, there are remaining issues we need to sort out and "L= inuxisms" that need porting to FreeBSD, but this is going reasonably well. = We are working in a public Github repository and have started listing our i= ssues there alongside the code. Our main working branch is "freebsd" (https= ://github.com/ftk-ntq/vpp/tree/freebsd). Our aim with this mail is to get the discussion started on porting VPP to F= reeBSD and to invite interested parties to help with the effort. We intend = to upstream the work hoping that the original authors will adopt our ported= code and continue maintaining future compatibility with FreeBSD. Some of our questions or comments to start the conversation: 1. netmap vs. DPDK (VPP relies on DPDK by default with the netmap integrati= on deprecated). Which will be the best to choose? 2. How to correctly implement using super pages / huge pages in FreeBSD in = order to allow VPP to allocate contiguous memory blocks for packet buffers = to process packets from the packet handling framework (netmap/DPDK)? 3. What are suitable alternatives for reading information from procfs and s= ysfs on FreeBSD? 4. Functionality relying on Linux epoll is currently supported using epoll-= shim. Is this the correct approach? Any help and input to aid in the effort will be greatly appreciated. Regards Francois ten Krooden Important Notice: This e-mail and its contents are subject to the Nanoteq (Pty) Ltd e-mail le= gal notice available at: http://www.nanoteq.com/AboutUs/EmailDisclaimer.aspx