* [dpdk-dev] [PATCH] net/mlx5: fix match MPLS over GRE with key
@ 2021-07-01 5:54 Xiaoyu Min
2021-07-01 7:46 ` Matan Azrad
2021-07-06 11:42 ` Raslan Darawsheh
0 siblings, 2 replies; 3+ messages in thread
From: Xiaoyu Min @ 2021-07-01 5:54 UTC (permalink / raw)
To: Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Xiaoyu Min; +Cc: dev, stable
Currently PMD needs previous layer information in order to set
corresponding match field for MPLSoGRE or MPLSoUDP.
GRE_KEY item is missing as supported previous layer when translate
item MPLS, which causes flow[1] cannot match MPLS over GRE traffic.
According to RFC4023, MPLS over GRE tunnel with optional key
field needs to be supported too.
By adding missing GRE_KEY as supported previous layer fix problem.
[1]:
flow create 0 ingress pattern eth / ipv6 / gre k_bit is 1 / gre_key /
mpls label is 966138 / end actions queue index 1 / mark id 0xa / end
Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index a04a3c2bb8..feeeaf6a1d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9027,6 +9027,8 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
MLX5_UDP_PORT_MPLS);
break;
case MLX5_FLOW_LAYER_GRE:
+ /* Fall-through. */
+ case MLX5_FLOW_LAYER_GRE_KEY:
MLX5_SET(fte_match_set_misc, misc_m, gre_protocol, 0xffff);
MLX5_SET(fte_match_set_misc, misc_v, gre_protocol,
RTE_ETHER_TYPE_MPLS);
--
2.32.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix match MPLS over GRE with key
2021-07-01 5:54 [dpdk-dev] [PATCH] net/mlx5: fix match MPLS over GRE with key Xiaoyu Min
@ 2021-07-01 7:46 ` Matan Azrad
2021-07-06 11:42 ` Raslan Darawsheh
1 sibling, 0 replies; 3+ messages in thread
From: Matan Azrad @ 2021-07-01 7:46 UTC (permalink / raw)
To: Jack Min, Shahaf Shuler, Slava Ovsiienko; +Cc: dev, stable
From: Jack Min
> Currently PMD needs previous layer information in order to set
> corresponding match field for MPLSoGRE or MPLSoUDP.
>
> GRE_KEY item is missing as supported previous layer when translate item
> MPLS, which causes flow[1] cannot match MPLS over GRE traffic.
>
> According to RFC4023, MPLS over GRE tunnel with optional key field needs to
> be supported too.
>
> By adding missing GRE_KEY as supported previous layer fix problem.
>
> [1]:
> flow create 0 ingress pattern eth / ipv6 / gre k_bit is 1 / gre_key / mpls label is
> 966138 / end actions queue index 1 / mark id 0xa / end
>
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix match MPLS over GRE with key
2021-07-01 5:54 [dpdk-dev] [PATCH] net/mlx5: fix match MPLS over GRE with key Xiaoyu Min
2021-07-01 7:46 ` Matan Azrad
@ 2021-07-06 11:42 ` Raslan Darawsheh
1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2021-07-06 11:42 UTC (permalink / raw)
To: Jack Min, Matan Azrad, Shahaf Shuler, Slava Ovsiienko, Jack Min
Cc: dev, stable
Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiaoyu Min
> Sent: Thursday, July 1, 2021 8:55 AM
> To: Matan Azrad <matan@nvidia.com>; Shahaf Shuler
> <shahafs@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Jack Min
> <jackmin@nvidia.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix match MPLS over GRE with key
>
> Currently PMD needs previous layer information in order to set
> corresponding match field for MPLSoGRE or MPLSoUDP.
>
> GRE_KEY item is missing as supported previous layer when translate
> item MPLS, which causes flow[1] cannot match MPLS over GRE traffic.
>
> According to RFC4023, MPLS over GRE tunnel with optional key
> field needs to be supported too.
>
> By adding missing GRE_KEY as supported previous layer fix problem.
>
> [1]:
> flow create 0 ingress pattern eth / ipv6 / gre k_bit is 1 / gre_key /
> mpls label is 966138 / end actions queue index 1 / mark id 0xa / end
>
> Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
> Cc: stable@dpdk.org
>
> Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-06 11:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 5:54 [dpdk-dev] [PATCH] net/mlx5: fix match MPLS over GRE with key Xiaoyu Min
2021-07-01 7:46 ` Matan Azrad
2021-07-06 11:42 ` Raslan Darawsheh
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).