numam-dpdk/drivers
Dariusz Sosnowski 5615d27b7a net/mlx5: fix hairpin split with set VLAN VID action
Before this patch any flow rule which works on hairpin queues
and which has OF_SET_VLAN_VID action was split into 2 flow rules:

- one subflow for Rx,
- one subflow for Tx.

OF_SET_VLAN_VID action was always placed in the Tx subflow.

Assuming a flow rule which matches VLAN traffic and has both
OF_SET_VLAN_VID action, and MODIFY_FIELD action on VLAN VID,
but no OF_PUSH_VLAN action, the following happened:

- MODIFY_FIELD action was placed in Rx subflow,
- OF_SET_VLAN_VID action was placed in Tx subflow,
- OF_SET_VLAN_VID action is internally compiled to a header modify
  command.

This caused the following issues:

1. Since OF_SET_VLAN_VID was placed in Tx subflow, 2 header modify
   actions were allocated. One for Rx and one for Tx.
2. If OF_SET_VLAN_VID action was placed before MODIFY_FIELD on VLAN VID,
   the flow rule executed header modifications in reverse order.
   MODIFY_FIELD actions were executed first in the Rx subflow and
   OF_SET_VLAN_VID was executed second in Tx subflow.

This patch fixes this behavior by not splitting hairpin flow rules
if OF_SET_VLAN_VID action is used without OF_PUSH_VLAN.
On top of that, if flow rule is split, the OF_SET_VLAN_VID action
is not moved to Tx subflow (for flow rules mentioned above).

Fixes: 210008309b ("net/mlx5: fix VLAN push action on hairpin queue")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-11-10 18:15:51 +01:00
..
baseband drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
bus bus/auxiliary: prevent device from being probed again 2022-11-14 11:15:44 +01:00
common common/mlx5: fix shared mempool subscription 2022-11-10 18:15:47 +01:00
compress drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
crypto drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
dma drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
event drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
gpu drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
mempool drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
net net/mlx5: fix hairpin split with set VLAN VID action 2022-11-10 18:15:51 +01:00
raw drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
regex drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
vdpa drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
meson.build drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00