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

dpif-netdev: Check for PKT_RX_RSS_HASH flag.

DPDK mbufs contain a valid RSS hash only if PKT_RX_RSS_HASH is
set in 'ol_flags'.  Otherwise the hash is garbage and doesn't
relate to the packet.

This fixes an issue with vhost, which, being a virtual NIC, doesn't
compute the hash.

Reported-by: Dongjun <dongj@dtdream.com>
Suggested-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Kevin Traynor <kevin.traynor@intel.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
This commit is contained in:
Daniele Di Proietto
2015-06-16 19:16:24 +01:00
parent 8f96455dda
commit f2f44f5da0
6 changed files with 32 additions and 6 deletions

View File

@@ -3100,8 +3100,9 @@ dpif_netdev_packet_get_rss_hash(struct dp_packet *packet,
{
uint32_t hash, recirc_depth;
hash = dp_packet_get_rss_hash(packet);
if (OVS_UNLIKELY(!hash)) {
if (OVS_LIKELY(dp_packet_rss_valid(packet))) {
hash = dp_packet_get_rss_hash(packet);
} else {
hash = miniflow_hash_5tuple(mf, 0);
dp_packet_set_rss_hash(packet, hash);
}