From owner-freebsd-net@freebsd.org Thu Jun 16 06:41:40 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55FA9A69577 for ; Thu, 16 Jun 2016 06:41:40 +0000 (UTC) (envelope-from schoeffm@in.tum.de) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 308B71A6F for ; Thu, 16 Jun 2016 06:41:40 +0000 (UTC) (envelope-from schoeffm@in.tum.de) Received: by mailman.ysv.freebsd.org (Postfix) id 2FE7BA69576; Thu, 16 Jun 2016 06:41:40 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F960A69575 for ; Thu, 16 Jun 2016 06:41:40 +0000 (UTC) (envelope-from schoeffm@in.tum.de) Received: from mail-out1.informatik.tu-muenchen.de (mail-out1.informatik.tu-muenchen.de [131.159.0.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD9B41A6B; Thu, 16 Jun 2016 06:41:38 +0000 (UTC) (envelope-from schoeffm@in.tum.de) Received: (Authenticated sender: schoeffm) by mail.in.tum.de (Postfix) with ESMTPSA id 20B311C114E; Thu, 16 Jun 2016 08:41:30 +0200 (CEST) Subject: Re: Netmap Checksum Offloading To: Jim Thompson , Navdeep Parhar References: <57601DFA.2040008@in.tum.de> <470941466032510@web23o.yandex.ru> Cc: Andrey Yakovlev , "net@freebsd.org" From: Dominik Schoeffmann Message-ID: <576249FA.2050809@in.tum.de> Date: Thu, 16 Jun 2016 08:40:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Rp2hROBL0nIX7gVAa8o2At7qCNNanGtim" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 06:41:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Rp2hROBL0nIX7gVAa8o2At7qCNNanGtim Content-Type: multipart/mixed; boundary="o52g7rCliRbO2helNQB4tL0uESVrn2nBu" From: Dominik Schoeffmann To: Jim Thompson , Navdeep Parhar Cc: Andrey Yakovlev , "net@freebsd.org" Message-ID: <576249FA.2050809@in.tum.de> Subject: Re: Netmap Checksum Offloading References: <57601DFA.2040008@in.tum.de> <470941466032510@web23o.yandex.ru> In-Reply-To: --o52g7rCliRbO2helNQB4tL0uESVrn2nBu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Is the checksum offloading patch for the igb(4) driver available online? (I could not find it) I would really like to take a look at it, espacially the context descriptor part of it. Best regards, Dominik On 16.06.2016 02:04, Jim Thompson wrote: >=20 > Luiz Otavio O Souza (loos@) developed these for igb(4) and, by extensio= n, em(4) for use in netmap-fwd. >=20 > He=E2=80=99s just gone back to Brazil with 82599 ixgb(4) hardware. I=E2= =80=99m sure he=E2=80=99ll develop similar patches for ixgb(4) in the nea= r future. >=20 > Chelsio is also =E2=80=9Con the list=E2=80=9D, but I figured I=E2=80=99= d speak to np@ about it first. ;-) =20 > We might do ixl(4) as well. =20 >=20 > Before Luiz retired to Brazil, we discussed upstreaming these to FreeBS= D. We=E2=80=99re committed to make it happen, but I doubt they make 11. >=20 > Jim >=20 >> On Jun 15, 2016, at 6:50 PM, Navdeep Parhar wrote: >> >> On 06/15/2016 16:15, Andrey Yakovlev wrote: >>> ive heard on bsdcan this year that some patches exist to add hwcsum o= ffloading to netmap, hope to see it chelsio at least >> >> cxgbe/cxl is a bit sneaky and will let you override netmap (on tx only= ). >> The ncxl interfaces declare themselves capable of checksumming but all= >> such capabilities are disabled by default. Just enable txcsum on the >> interface and the hardware will do checksum insertion on tx. No way t= o >> solve the rx part entirely within the driver -- netmap has to be willi= ng >> to accept checksum related flags from the driver. >> >> Regards, >> Navdeep >> >>> >>> --=20 >>> ./andy >>> >>> >>> 14.06.2016, 12:15, "Dominik Schoeffmann" : >>>> Dear Netmap Developers, >>>> >>>> during the course of my bachelor's thesis, I modified a packet gener= ator >>>> called MoonGen [1] in order to utilize netmap. >>>> One key component was to flexibly offload checksums for different ki= nds >>>> of packets (IPv4, UDP, TCP). >>>> The ixgbe netmap patch was modified [2] in order to construct contex= t >>>> descriptors and suitable data descriptors. This is implemented in le= ss >>>> than 250 LoC (including pseudo-header calculations). >>>> The man page states, that checksum offloading is available via ethto= ol, >>>> although a solution inside the netmap API might be a cleaner way for= >>>> applications to actually use these features. >>>> Attached is a graph showing the performance implication of using >>>> offloading in the current implementation. >>>> As can be seen, offloading has only a minor impact. >>>> When regarding this data (and comparing it to other frameworks), ple= ase >>>> keep in mind, that internally a lot of per-packet effort is needed d= ue >>>> to the software architecture of the packet generator. >>>> >>>> The question being: >>>> Would it not make sense to include checksum offloading inside of net= map >>>> in order to accomodate applications operating on layer 3 and above? >>>> As these programs need to calculate the checksums in software, it wo= uld >>>> be just as fast to move these calculations to the kernel for NICs >>>> without checksum offloading support (and the kernel would act as a l= ibrary). >>>> The problem which currently is imposed by the fact, that netmap expo= rts >>>> the complete ring, is that context descriptors disrupt the data >>>> descriptors, which is unpleasant for the application. >>>> But you may find the data interesting nevertheless. >>>> >>>> Best Regards, >>>> Dominik Schoeffmann >>>> >>>> [1] https://github.com/dschoeffm/MoonGen/tree/netmap >>>> [2] https://github.com/dschoeffm/netmap/tree/mg-chksum-offloading >>> _______________________________________________ >>> freebsd-net@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-net >>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org= " >>> >> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"= >=20 --o52g7rCliRbO2helNQB4tL0uESVrn2nBu-- --Rp2hROBL0nIX7gVAa8o2At7qCNNanGtim Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXYkoYAAoJEJiuUT5oYfeaANwQAKwExI//FOoLJ2VEsNlSO3E9 PyvdHPZhNjZWuwztiQGGN7KTF2uHbKtgnL5+dlks7XB4DvwOcU50UtbaNlP7bMtK EOG9QqJRjJ1DkRKm+ZgYS0Uu3pqevQFu7QmfeH2j4+NH89Yav86azwtvuGMlUEBh v+v5SJK0D3aZRupZ9nla5cClugIm4eKJdlGzRsypM1OG+FeE//kir1y6YHfSw00R 4La852QXZyFCmIzPy4b1hKKnVKYpYmP6+3J6lTBGE1OVfF3LyHT1RtNWetv+BGGp 7tRZLohNpK9EwwHLV1WkJbzXFkQsPf4o4y/GnVwPaah0ACT2WSMo324cQCSPq31F nBFrxyydD6LP0GGN4kp/T2T4DdmdSUXVYHX+Mo1e/C5hK/IflqdOm8q/Iy7lwmk/ qoJMg733SEAKrpZQsc2ACGn0/EEuxm9tM2q0BHbDvu9KMgbKpVz/ACsNY2iVIPh6 atQXO5rfDFRfGqPMbOamqNaw0x54S2fpyVKyCZVPghOZJZgsl/df3Kdq+EMIcDSZ qVd1h7Dq5UtmWtTgVqpyT+kJK6kOHDCyoY5oPg7glwFuNKLpEERpQl4jgpklUqTG xjkHGTA/TFmBYkgiu+RMlDk2/OhaPVRJ9KxuWEKJYm77lY5R/APuhpRPZ5S/pW3v 4mJy/6YNrWt10aibGLrP =ekw+ -----END PGP SIGNATURE----- --Rp2hROBL0nIX7gVAa8o2At7qCNNanGtim--