git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e455a9
)
net/mlx5: reject inner ethernet matching in GTP
author
Lior Margalit
<lmargalit@nvidia.com>
Tue, 20 Jul 2021 15:17:18 +0000
(18:17 +0300)
committer
Thomas Monjalon
<thomas@monjalon.net>
Thu, 22 Jul 2021 15:13:09 +0000
(17:13 +0200)
The user is able to create a flow rule pattern with ETH after GTP
although it is not supported by the flex-parser configuration.
Failed the rule validation in such case with proper error message.
Fixes:
23c1d42c7138
("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.c
patch
|
blob
|
history
diff --git
a/drivers/net/mlx5/mlx5_flow.c
b/drivers/net/mlx5/mlx5_flow.c
index
2059f29
..
a3fdce6
100644
(file)
--- a/
drivers/net/mlx5/mlx5_flow.c
+++ b/
drivers/net/mlx5/mlx5_flow.c
@@
-1999,6
+1999,10
@@
mlx5_flow_validate_item_eth(const struct rte_flow_item *item,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"L2 layer should not follow VLAN");
+ if (item_flags & MLX5_FLOW_LAYER_GTP)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM, item,
+ "L2 layer should not follow GTP");
if (!mask)
mask = &rte_flow_item_eth_mask;
ret = mlx5_flow_item_acceptable(item, (const uint8_t *)mask,