[dpdk-dev] [PATCH v2 0/5] distributor library performance enhancements

David Hunt david.hunt at intel.com
Thu Dec 22 05:37:03 CET 2016


This patch aims to improve the throughput of the distributor library.

It adds a series of API calls similar to the original API, but with
"_burst" in the function names. Usage is similar (but not identical), in that
there are now bursts of mbufs sent to each worker at a time instead of a
single mbuf pointer. See the header file rte_distributor_burst.h for more
details on API usage.

It uses a similar handshake mechanism to the previous version of
the library, in that bits are used to indicate when packets are ready
to be sent to a worker and ready to be returned from a worker. One main
difference is that instead of sending one packet in a cache line, it makes
use of the 7 free spaces in the same cache line in order to send up to
8 packets at a time to/from a worker.

The flow matching algorithm has had significant re-work, and now keeps an
array of inflight flows and an array of backlog flows, and matches incoming
flows to the inflight/backlog flows of all workers so that flow pinning to
workers can be maintained.

The Flow Match algorithm has both scalar and a vector versions, and a
function pointer is used to select the post appropriate function at run time,
depending on the presence of the SSE2 cpu flag. On non-x86 platforms, the
the scalar match function is selected, which should still gives a good boost
in performance over the non-burst API.

v2 changes:
  * Created a common distributor_priv.h header file with common
    definitions and structures.
  * Added a scalar version so it can be built and used on machines without
    sse2 instruction set
  * Added unit autotests
  * Added perf autotest
  * Added doc updates

Notes:
   Apps using the birst API must now work in bursts, as up to 8 are given
   to a worker at a time
   For performance in matching, Flow ID's are 15-bits (non-zero)
   Original API (and code) is kept for backward compatibility

Performance Gains
   2.2GHz Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
   2 x XL710 40GbE NICS to 2 x 40Gbps traffic generator channels 64b packets
   separate cores for rx, tx, distributor
    1 worker  - 4.8x
    4 workers - 2.9x
    8 workers - 1.8x
   12 workers - 2.1x
   16 workers - 1.8x

[PATCH v2 1/5] lib: distributor performance enhancements
[PATCH v2 2/5] test: unit tests for new distributor burst api
[PATCH v2 3/5] test: add distributor_perf autotest
[PATCH v2 4/5] example: distributor app showing burst api
[PATCH v2 5/5] doc: distributor library changes for new burst api



More information about the dev mailing list