Date: Wed, 15 Jun 2016 22:51:21 -0500 From: Jim Thompson <jim@netgate.com> To: Dominik Schoeffmann <schoeffm@in.tum.de> Cc: "freebsd-net@freebsd.org" <net@freebsd.org> Subject: Re: Netmap Checksum Offloading Message-ID: <CAKAfi7z%2BP%2BoW=XXSf8hoqMSrzdd6agPjeBDqdN_9mLM1gCf80g@mail.gmail.com> In-Reply-To: <57601DFA.2040008@in.tum.de> References: <57601DFA.2040008@in.tum.de>
next in thread | previous in thread | raw e-mail | index | archive | help
We've focused on just the IP header checksum, but it's possible to add L4 checksum offload as well. I asked Luigi why he hadn't included checksum offload (with a library in software for devices that don't offer a hw offload), and his answer was that when he wrote netmap, he wanted a fast path to the wire. On Tue, Jun 14, 2016 at 10:08 AM, Dominik Schoeffmann <schoeffm@in.tum.de> wrote: > Dear Netmap Developers, > > during the course of my bachelor's thesis, I modified a packet generator > called MoonGen [1] in order to utilize netmap. > One key component was to flexibly offload checksums for different kinds > of packets (IPv4, UDP, TCP). > The ixgbe netmap patch was modified [2] in order to construct context > descriptors and suitable data descriptors. This is implemented in less > than 250 LoC (including pseudo-header calculations). > The man page states, that checksum offloading is available via ethtool, > 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), please > keep in mind, that internally a lot of per-packet effort is needed due > to the software architecture of the packet generator. > > The question being: > Would it not make sense to include checksum offloading inside of netmap > in order to accomodate applications operating on layer 3 and above? > As these programs need to calculate the checksums in software, it would > be just as fast to move these calculations to the kernel for NICs > without checksum offloading support (and the kernel would act as a library). > The problem which currently is imposed by the fact, that netmap exports > 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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKAfi7z%2BP%2BoW=XXSf8hoqMSrzdd6agPjeBDqdN_9mLM1gCf80g>