net/mlx5: fix L3 encapsulation flow validation
authorMatan Azrad <matan@mellanox.com>
Tue, 19 Nov 2019 15:32:28 +0000 (15:32 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:06 +0000 (17:36 +0100)
commit36e5527573a52d7e762d7ee0829541475f382e08
tree495371c58ff73ae1e3c98696b6818e22bf65971a
parentfb4921ab4cb7238a22160ac61280ad647a3dcc6c
net/mlx5: fix L3 encapsulation flow validation

In order to configure L3 encapsulation\decapsulation flow to mlx5
devices, 2 actions should be added to the flow actions list:
RTE_FLOW_ACTION_TYPE_RAW_DECAP and RTE_FLOW_ACTION_TYPE_RAW_ENCAP.

One of the validations for this scenario is to check that modify actions
is not done before the L3 decapsulation, because it doesn't make sense
to decapsulate a modified data.

Wrongly, this check was done for the case of L3 encapsulation what
causes a validation failure in modify + L3 encapsulation flow.

Ignore this check in case of L3 encapsulation.

Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_flow_dv.c