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:
committed by
Pravin B Shelar
parent
9230662a87
commit
61a2647e15
@@ -2221,7 +2221,7 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, int cnt,
|
||||
recirc_md.recirc_id = nl_attr_get_u32(a);
|
||||
|
||||
/* Hash is private to each packet */
|
||||
recirc_md.dp_hash = packets[i]->dp_hash;
|
||||
recirc_md.dp_hash = dpif_packet_get_dp_hash(packets[i]);
|
||||
|
||||
dp_netdev_input(dp, &recirc_pkt, 1, &recirc_md);
|
||||
}
|
||||
|
Reference in New Issue
Block a user