dev_flow->hash_fields = 0;
#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
- if (rss_desc->level >= 2) {
- dev_flow->hash_fields |= IBV_RX_HASH_INNER;
+ if (rss_desc->level >= 2)
rss_inner = 1;
- }
#endif
if ((rss_inner && (items & MLX5_FLOW_LAYER_INNER_L3_IPV4)) ||
(!rss_inner && (items & MLX5_FLOW_LAYER_OUTER_L3_IPV4))) {
dev_flow->hash_fields |= MLX5_IPV6_IBV_RX_HASH;
}
}
+ if (dev_flow->hash_fields == 0)
+ /*
+ * There is no match between the RSS types and the
+ * L3 protocol (IPv4/IPv6) defined in the flow rule.
+ */
+ return;
if ((rss_inner && (items & MLX5_FLOW_LAYER_INNER_L4_UDP)) ||
(!rss_inner && (items & MLX5_FLOW_LAYER_OUTER_L4_UDP))) {
if (rss_types & ETH_RSS_UDP) {
dev_flow->hash_fields |= MLX5_TCP_IBV_RX_HASH;
}
}
+ if (rss_inner)
+ dev_flow->hash_fields |= IBV_RX_HASH_INNER;
}
/**
flow_verbs_translate_item_tcp(dev_flow, items,
item_flags);
subpriority = MLX5_PRIORITY_MAP_L4;
- dev_flow->hash_fields |=
- mlx5_flow_hashfields_adjust
+ if (dev_flow->hash_fields != 0)
+ dev_flow->hash_fields |=
+ mlx5_flow_hashfields_adjust
(rss_desc, tunnel, ETH_RSS_TCP,
(IBV_RX_HASH_SRC_PORT_TCP |
IBV_RX_HASH_DST_PORT_TCP));
flow_verbs_translate_item_udp(dev_flow, items,
item_flags);
subpriority = MLX5_PRIORITY_MAP_L4;
- dev_flow->hash_fields |=
- mlx5_flow_hashfields_adjust
+ if (dev_flow->hash_fields != 0)
+ dev_flow->hash_fields |=
+ mlx5_flow_hashfields_adjust
(rss_desc, tunnel, ETH_RSS_UDP,
(IBV_RX_HASH_SRC_PORT_UDP |
IBV_RX_HASH_DST_PORT_UDP));