netdev-dpdk: Reset RSS hash on transmit
authorMark D. Gray <mark.d.gray@intel.com>
Mon, 13 Apr 2015 13:36:56 +0000 (06:36 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Thu, 23 Apr 2015 03:09:52 +0000 (20:09 -0700)
commit1b99bb055218e56603cff764df6dd2f1d166a48d
tree846f1b848098a1ba8f6a4eb5720b90f7e61ee3c6
parent5e65e080ad4d57eb3fcb7b53980cf6a4d1e8ae19
netdev-dpdk: Reset RSS hash on transmit

When using DPDK rings (dpdkr port type), packet buffers get shared
to consumers of the rings (e.g. Virtual Machines). The packet buffers
also include the RSS hash. This is a hash of a number of fields
in the packet and is used in order to do a fast lookup in the EMC.

However, if a consumer of the packet modifies the packet without
regenerating the RSS hash, the EMC will use the same hash for lookup
even though the packet may belong to a different flow. This would
cause unnecessary collisions in the EMC reducing performance in the
presence of multiple flows.

To avoid receiving an incorrect RSS hash on reception from a DPDK
ring, the RSS hash needs to be reset on transmission. This will reduce
performance of the forwarding path as the RSS hash will need to
calculated for every packet received from an dpdkr but will behave
correctly in the presence of a large number of flows that get
modified by the consumer of a DPDK ring

Signed-off-by: Mark D. Gray <mark.d.gray@intel.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
lib/netdev-dpdk.c