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

Pravin Shelar pshelar at nicira.com
Fri Aug 29 23:33:48 UTC 2014


On Fri, Aug 29, 2014 at 4:06 PM, Daniele Di Proietto
<ddiproietto at vmware.com> wrote:
> 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
>
> v5:
>     - Pravin suggestions:
>       + cosmetic changes
>       + reorder struct emc_entry for performance
>       + correct order of mutex in comment
>       + introduced dpif_netdev_packet_get_dp_hash()
>       + emc replacement policy based on the hash value
>       + define EM_BATCH_SIZE
>       + added OVS_UNLIKELY annotation
>     - Jarno suggestions:
>       + improved comment on exact match cache hash table
>       + added missing braces
> 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
>

I pushed this series to master.

Thanks,
Pravin.
>  lib/dpif-netdev.c  | 449 ++++++++++++++++++++++++++++++++++++++++++++---------
>  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, 405 insertions(+), 78 deletions(-)
>
> --
> 2.1.0.rc1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list