summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMatan Azrad <matan@mellanox.com>2019-11-19 15:32:28 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-20 17:36:06 +0100
commit36e5527573a52d7e762d7ee0829541475f382e08 (patch)
tree495371c58ff73ae1e3c98696b6818e22bf65971a /drivers
parentfb4921ab4cb7238a22160ac61280ad647a3dcc6c (diff)
downloaddpdk-36e5527573a52d7e762d7ee0829541475f382e08.zip
dpdk-36e5527573a52d7e762d7ee0829541475f382e08.tar.gz
dpdk-36e5527573a52d7e762d7ee0829541475f382e08.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mlx5/mlx5_flow_dv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 4dcd640..c402a8d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2185,11 +2185,6 @@ flow_dv_validate_action_raw_decap(uint64_t action_flags,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"can only have a single decap"
" action in a flow");
- if (action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS)
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION, NULL,
- "can't have decap action after"
- " modify action");
/* decap action is valid on egress only if it is followed by encap */
if (attr->egress) {
for (; action->type != RTE_FLOW_ACTION_TYPE_END &&
@@ -2202,6 +2197,11 @@ flow_dv_validate_action_raw_decap(uint64_t action_flags,
RTE_FLOW_ERROR_TYPE_ATTR_EGRESS,
NULL, "decap action not supported"
" for egress");
+ } else if (action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS) {
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+ "can't have decap action after"
+ " modify action");
}
return 0;
}