net/mlx5: fix NIC egress flow mismatch in switchdev mode
authorJiawei Wang <jiaweiw@nvidia.com>
Wed, 2 Mar 2022 15:30:51 +0000 (17:30 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 7 Mar 2022 10:43:08 +0000 (11:43 +0100)
commit6d4f1066be6cd60a95f21ef07a16a3c3676c5cd9
tree7718013d2cce11c7165d8e856d6b47d0474b4280
parente1786fd53d7e5631c9ffb9b2fba0fd402bc8cf74
net/mlx5: fix NIC egress flow mismatch in switchdev mode

When E-Switch mode was enabled, the NIC egress flows was implicitly
appended with source vport to match on. If the metadata register C0
was used to maintain the source vport, it was initialized to zero
on packet steering engine entry, the flow could be hit only
if source vport was zero, the register C0 of the packet was not correct
to match in the TX side, this caused egress flow misses.

This patch:
 - removes the implicit source vport match for NIC egress flow.
 - rejects the NIC egress flows on the representor ports at validation.
 - allows the internal NIC egress flows containing the TX_QUEUE items in
   order to not impact hairpins.

Fixes: ce777b147bf8 ("net/mlx5: fix E-Switch flow without port item")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
doc/guides/nics/mlx5.rst
drivers/net/mlx5/mlx5_flow_dv.c