[dpdk-dev] SIMD checksum

Luke Gorrie luke at snabb.co
Thu Mar 12 08:54:46 CET 2015


Howdy,

I am writing to share some SIMD (SSE2 and AVX2) IP checksum routines. The
commit log for rte_ip.h said that this was an area of future interest for
DPDK.

Code:
https://github.com/lukego/snabbswitch/blob/ipchecksum-simd/src/lib/checksum.c

Feedback welcome. We are currently reviewing and integrating this
ourselves. Great if it is of use to other people too. The performance seems
to be better and I see this as very valuable for reducing variance between
offloaded and non-offloaded configurations. (I would like to replace NIC
offload with SIMD offload completely to simplify the end-user's mental
model but it remains to be seen if I will get away with this.)

Sorry that this is not sent as a pull request. We use DPDK as a reference
implementation but not as a software dependency. The rest of our
implementation (tests, runtime CPU feature dispatching) would not fit into
the DPDK code base and would have to be ported.

In the perfect universe I would love to see useful routines like this
living in a small repository of their own that everyboy could share. "Small
and stand-alone subroutines for userspace networking." Perhaps we will
collectively break up our big libraries like this over time.

(I do really appreciate the fact that many DPDK library routines are easy
to excerpt. You can see that we are using DPDK's IP checksum as the
non-SIMD fallback, albeit we forked it to fit it into our project.)

Cheers,
-Luke


More information about the dev mailing list