[ovs-dev] [PATCH v4 0/2] DPDK performance improvement: exact match cache

Daniele Di Proietto ddiproietto at vmware.com
Wed Aug 20 00:11:56 UTC 2014


This series introduces in dpif-netdev an exact match cache for frequently
used flows. It uses the RSS hash (currently implemented only for netdev-dpdk)
to search the miniflow in an hash table.

While there might be still some tuning left to do, these patch provides
significant performance improvements for the following simple testcase:

CPU: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
NIC: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
     dual port (dpdk0, dpdk1)

    Bridge "br0"
        Port "dpdk1"
            Interface "dpdk1"
                type: dpdk
        Port "br0"
            Interface "br0"
                type: internal
        Port "dpdk0"
            Interface "dpdk0"
                type: dpdk

Source connected to dpdk0, sink to dpdk1

1 flow 64 bytes UDP packets going from source to sink

zero drop throughput:

   master: ~ 5.6 Mpps
new patch: ~13.0 Mpps

v4:
    - Pravin suggestions:
      + merged dpif_packet->dp_hash with dpdk rss (removed dp_netdev_rss and
        moved ofpbuf_rss() to dpif_packet_rss())
      + initialize and free exact match cache out of the mutex
      + Added EMC_FOR_EACH_POS_WITH_HASH() and better conditions in iteration
      + Freeing exact match cache on pmd_thread reload to delete old flows
      + Small changes to batching and swapping code
    - Suppressed sparse warnings about variable length array
v3:
    - Ben suggestions:
      + fixed several coding style issues
v2:
    - Implemented Pravin suggestions:
        + dp_netdev_rss()
        + reverse order of batch lookup in dp_netdev_queue_batches()
    - Split dp_netdev_input() in two functions to save memory in exact match
      cache processing
    - Use variable length arrays to reduce cache footprint
    - Rebased


Daniele Di Proietto (2):
  packet-dpif: Add dpif_packet_{get,set}_hash()
  dpif-netdev: Exact match cache

 lib/dpif-netdev.c  | 433 ++++++++++++++++++++++++++++++++++++++++++++---------
 lib/netdev-bsd.c   |   1 +
 lib/netdev-dpdk.c  |   3 +-
 lib/netdev-dummy.c |   1 +
 lib/netdev-linux.c |   1 +
 lib/odp-execute.c  |   5 +-
 lib/packet-dpif.c  |   2 +-
 lib/packet-dpif.h  |  21 +++
 8 files changed, 389 insertions(+), 78 deletions(-)

-- 
2.1.0.rc1




More information about the dev mailing list