DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix validate MPLSoGRE with GRE key
@ 2020-11-10 11:59 Xiaoyu Min
  2020-11-13 19:07 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaoyu Min @ 2020-11-10 11:59 UTC (permalink / raw)
  To: Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko; +Cc: dev, Xiaoyu Min, stable

From: Xiaoyu Min <jackmin@nvidia.com>

Currently PMD only accept flow which item_mpls directly follow item_gre,
means to match the GRE header without GRE optional field key in MPLSoGRE
encapsulation.

However, for the MPLSoGRE, the GRE header could have the optional field
(i.e, key) according to the RFC. So PMD need to accept this.

Add MLX5_FLOW_LAYER_GRE_KEY into allowed prev_layer to fix

Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 92adfcacca..50d2bbb617 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2746,7 +2746,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
 	/* MPLS over IP, UDP, GRE is allowed */
 	if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L3 |
 			    MLX5_FLOW_LAYER_OUTER_L4_UDP |
-			    MLX5_FLOW_LAYER_GRE)))
+			    MLX5_FLOW_LAYER_GRE |
+			    MLX5_FLOW_LAYER_GRE_KEY)))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
 					  "protocol filtering not compatible"
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix validate MPLSoGRE with GRE key
  2020-11-10 11:59 [dpdk-dev] [PATCH] net/mlx5: fix validate MPLSoGRE with GRE key Xiaoyu Min
@ 2020-11-13 19:07 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2020-11-13 19:07 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, dev, stable

10/11/2020 12:59, Xiaoyu Min:
> From: Xiaoyu Min <jackmin@nvidia.com>
> 
> Currently PMD only accept flow which item_mpls directly follow item_gre,
> means to match the GRE header without GRE optional field key in MPLSoGRE
> encapsulation.
> 
> However, for the MPLSoGRE, the GRE header could have the optional field
> (i.e, key) according to the RFC. So PMD need to accept this.
> 
> Add MLX5_FLOW_LAYER_GRE_KEY into allowed prev_layer to fix
> 
> Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>

Applied in next-net-mlx, thanks.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-13 19:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 11:59 [dpdk-dev] [PATCH] net/mlx5: fix validate MPLSoGRE with GRE key Xiaoyu Min
2020-11-13 19:07 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).