From owner-freebsd-net@freebsd.org Mon May 10 12:42:00 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 18F4A6366AA for ; Mon, 10 May 2021 12:42:00 +0000 (UTC) (envelope-from rainer@ultra-secure.de) Received: from connect.ultra-secure.de (connect.ultra-secure.de [88.198.71.201]) by mx1.freebsd.org (Postfix) with ESMTP id 4Ff10700Ssz3LW3 for ; Mon, 10 May 2021 12:41:58 +0000 (UTC) (envelope-from rainer@ultra-secure.de) Received: (Haraka outbound); Mon, 10 May 2021 14:43:54 +0200 Received-SPF: SoftFail (connect.ultra-secure.de: domain of ultra-secure.de does not designate 217.71.83.52 as permitted sender) receiver=connect.ultra-secure.de; identity=mailfrom; client-ip=217.71.83.52; helo=smtpclient.apple; envelope-from= Received-SPF: None (connect.ultra-secure.de: domain of smtpclient.apple does not designate 217.71.83.52 as permitted sender) receiver=connect.ultra-secure.de; identity=helo; client-ip=217.71.83.52; helo=smtpclient.apple; envelope-from= Received: from smtpclient.apple (217-071-083-052.ip-tech.ch [217.71.83.52]) by connect.ultra-secure.de (Haraka/2.6.2-toaster) with ESMTPSA id AF16819E-3374-49AA-B7F7-9C4BDADC17B0.1 envelope-from (authenticated bits=0); Mon, 10 May 2021 14:43:51 +0200 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Subject: Re: Vector Packet Processing (VPP) portability on FreeBSD From: Rainer Duffner In-Reply-To: Date: Mon, 10 May 2021 14:41:47 +0200 Cc: "freebsd-net@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Francois ten Krooden X-Mailer: Apple Mail (2.3654.80.0.2.43) X-Haraka-GeoIP: EU, CH, 451km X-Haraka-ASN: 24951 X-Haraka-GeoIP-Received: 217.71.83.52:CH X-Haraka-ASN: 24951 217.71.80.0/20 X-Haraka-ASN-CYMRU: asn=24951 net=217.71.80.0/20 country=CH assignor=ripencc date=2003-08-07 X-Haraka-FCrDNS: 217-071-083-052.ip-tech.ch X-Haraka-p0f: os="Mac OS X " link_type="DSL" distance=16 total_conn=4 shared_ip=N X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on spamassassin X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, SPF_HELO_NONE,SPF_SOFTFAIL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.1 X-Haraka-Karma: score: 6, good: 17641, bad: 615, connections: 19971, history: 17026, asn_score: 1621, asn_connections: 1811, asn_good: 1661, asn_bad: 40, pass:asn, relaying X-Rspamd-Queue-Id: 4Ff10700Ssz3LW3 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rainer@ultra-secure.de designates 88.198.71.201 as permitted sender) smtp.mailfrom=rainer@ultra-secure.de X-Spamd-Result: default: False [-0.91 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; SUBJECT_ENDS_SPACES(0.50)[]; NEURAL_SPAM_SHORT(0.29)[0.290]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; ARC_NA(0.00)[]; DMARC_NA(0.00)[ultra-secure.de]; SPAMHAUS_ZRD(0.00)[88.198.71.201:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.198.71.201:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; 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:24940, ipnet:88.198.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-net] 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 12:42:00 -0000 > Am 10.05.2021 um 13:08 schrieb Francois ten Krooden : >=20 > Greetings >=20 > We have a vested interest in high-speed IPsec VPN on FreeBSD. We have = started with the porting of VPP (https://fd.io/) to FreeBSD. >=20 > Currently we have VPP compiled and running with netmap. The speeds we = measure 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. >=20 > Apart from the above, there are remaining issues we need to sort out = and "Linuxisms" that need porting to FreeBSD, but this is going = reasonably well. We are working in a public Github repository and have = started listing our issues there alongside the code. Our main working = branch is "freebsd" (https://github.com/ftk-ntq/vpp/tree/freebsd). >=20 > Our aim with this mail is to get the discussion started on porting VPP = to FreeBSD 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. >=20 > Some of our questions or comments to start the conversation: > 1. netmap vs. DPDK (VPP relies on DPDK by default with the netmap = integration 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 sysfs on FreeBSD? > 4. Functionality relying on Linux epoll is currently supported using = epoll-shim. Is this the correct approach? >=20 > Any help and input to aid in the effort will be greatly appreciated. IIRC, somebody from Netgate (pfSense) had porting this and/or DPDK as a = =E2=80=9Espare time project=E2=80=9C. Not sure how far that actually proceeded. Maybe somebody else knows = more? Thanks for your efforts, in any case.