net/mlx5: fix RSS expansion for explicit graph node
authorLior Margalit <lmargalit@nvidia.com>
Sun, 5 Sep 2021 09:35:57 +0000 (12:35 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 13 Sep 2021 19:56:09 +0000 (21:56 +0200)
commit69d268b4fff3791c3fea772a43abca1660982005
treee47f7518b66c05e1f22f2b0b3c0561c6e0ee8672
parent580f3af31c99824bdd1cc331035096e34de5ca01
net/mlx5: fix RSS expansion for explicit graph node

The RSS expansion algorithm is using a graph to find the possible
expansion paths. A graph node with the 'explicit' flag will be skipped,
if it is not found in the flow pattern.

The current implementation misses the case where the node with the
explicit flag is in the middle of the expanded path.
For example:
testpmd> flow create 0 ingress pattern eth / ipv6 / udp / vxlan / end
actions rss level 2 types tcp end / end
The VLAN node has the explicit flag, so it is currently included in the
expanded flow:
ETH IPV6 UDP VXLAN END
ETH IPV6 UDP VXLAN ETH VLAN IPV4 TCP END
ETH IPV6 UDP VXLAN ETH VLAN IPV6 TCP END

The fix is to skip the nodes with the explicit flag while iterating over
the possible expansion paths. Using the above example, the flows will be:
ETH IPV6 UDP VXLAN END
ETH IPV6 UDP VXLAN ETH IPV4 TCP END
ETH IPV6 UDP VXLAN ETH IPV6 TCP END

Fixes: 3f02c7ff6815 ("net/mlx5: fix RSS expansion for inner tunnel VLAN")
Cc: stable@dpdk.org
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.c