2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

packet-dpif: Add dpif_packet_{get, set}_hash()

These function are used to stored the packet hash. 'netdev-dpdk'
automatically set this value to the RSS hash returned by the
NIC. Other 'netdev's set it to 0 (which is an invalid hash
value), so that callers can compute the hash on their own.

If DPDK support is enabled, struct dpif_packet's member
'dp_hash' is removed and 'pkt.hash.rss' from DPDK mbuf is used

This commit also configure DPDK devices to compute RSS hash
for UDP and IPv6 packets

Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
Daniele Di Proietto
2014-08-29 16:06:42 -07:00
committed by Pravin B Shelar
parent 9230662a87
commit 61a2647e15
8 changed files with 31 additions and 5 deletions

View File

@@ -647,6 +647,7 @@ netdev_bsd_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets,
dpif_packet_delete(packet);
} else {
dp_packet_pad(buffer);
dpif_packet_set_dp_hash(packet, 0);
packets[0] = packet;
*c = 1;
}