summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2018-10-30 07:53:07 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-11-05 15:01:25 +0100
commit3bcc6d6a832b67fd02776d95fe991640256a786f (patch)
treea121156692acb7307e4eeb4f927c74d536073547 /drivers
parent2720f833d4616fe3084604cb35f028c3e61bf996 (diff)
downloaddpdk-3bcc6d6a832b67fd02776d95fe991640256a786f.zip
dpdk-3bcc6d6a832b67fd02776d95fe991640256a786f.tar.gz
dpdk-3bcc6d6a832b67fd02776d95fe991640256a786f.tar.xz
net/mlx5: fix validation of MLPS-in-GRE
Multiple tunnel isn't allowed but MPLS over GRE should be accepted. Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mlx5/mlx5_flow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 370cf77..107a4f0 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1619,7 +1619,9 @@ mlx5_flow_validate_item_mpls(const struct rte_flow_item *item __rte_unused,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"protocol filtering not compatible"
" with MPLS layer");
- if (item_flags & MLX5_FLOW_LAYER_TUNNEL)
+ /* Multi-tunnel isn't allowed but MPLS over GRE is an exception. */
+ if ((item_flags & MLX5_FLOW_LAYER_TUNNEL) &&
+ !(item_flags & MLX5_FLOW_LAYER_GRE))
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"multiple tunnel layers not"