net/mlx5: fix mirror flow split with L3 encapsulation
authorJiawei Wang <jiaweiw@nvidia.com>
Mon, 26 Jul 2021 06:22:33 +0000 (09:22 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 29 Jul 2021 16:01:20 +0000 (18:01 +0200)
commit7356aec64c48e30585a15659b4ee491d11d4339a
tree021b140f7b2a39bd790191fe5f7ed5b0510c0ebe
parent75f166c20ffca1dd28184f8196fbfe90ebafb6ac
net/mlx5: fix mirror flow split with L3 encapsulation

Due to hardware limitations, the decap action (such as
VXLAN/NVGRE/RAW decap) can't follow the sample action in the
same flow, to keep the original action order of sample and decap
actions the flow was internally split into two subflows by PMD,
the sample action was moved into prefix subflow in the original table,
and decap action was moved into suffix subflow in the new table.

There is a specific combination of raw decap and raw encap actions
to specify "L3 encapsulation" packet transformation - raw decap action
to remove L2 header and raw encap to add the tunnel header.
This specific L3 encapsulation is encoded as a single packet reformat
hardware transaction and is supported by hardware after sample
action (no hardware limitations for packet reformat).

The "L3 encapsulation" with mirror actions in the same flow was not handled
correctly in the previous commit.
The patch checks whether the decap action is part of "L3 encapsulation"
and does not move the decap action into suffix subflow for the case.

Fixes: cafd87f62a06 ("net/mlx5: fix VLAN push/pop and decap actions with mirror")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow.c