netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta
@ 2021-04-09  5:33 wenxu
  2021-04-10 19:19 ` Pablo Neira Ayuso
  2021-04-14 23:08 ` Saeed Mahameed
  0 siblings, 2 replies; 3+ messages in thread
From: wenxu @ 2021-04-09  5:33 UTC (permalink / raw)
  To: saeed; +Cc: davem, kuba, netdev, netfilter-devel

From: wenxu <wenxu@ucloud.cn>

In the nft_offload there is the mate flow_dissector with no
ingress_ifindex but with ingress_iftype that only be used
in the software. So if the mask of ingress_ifindex in meta is
0, this meta check should be bypass.

Fixes: 6d65bc64e232 ("net/mlx5e: Add mlx5e_flower_parse_meta support")
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index df2a0af..d675107d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1895,6 +1895,9 @@ static int mlx5e_flower_parse_meta(struct net_device *filter_dev,
 		return 0;
 
 	flow_rule_match_meta(rule, &match);
+	if (!match.mask->ingress_ifindex)
+		return 0;
+
 	if (match.mask->ingress_ifindex != 0xFFFFFFFF) {
 		NL_SET_ERR_MSG_MOD(extack, "Unsupported ingress ifindex mask");
 		return -EOPNOTSUPP;
-- 
1.8.3.1


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

* Re: [PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta
  2021-04-09  5:33 [PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta wenxu
@ 2021-04-10 19:19 ` Pablo Neira Ayuso
  2021-04-14 23:08 ` Saeed Mahameed
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2021-04-10 19:19 UTC (permalink / raw)
  To: wenxu; +Cc: saeed, davem, kuba, netdev, netfilter-devel

On Fri, Apr 09, 2021 at 01:33:48PM +0800, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
> 
> In the nft_offload there is the mate flow_dissector with no
> ingress_ifindex but with ingress_iftype that only be used
> in the software. So if the mask of ingress_ifindex in meta is
> 0, this meta check should be bypass.
> 
> Fixes: 6d65bc64e232 ("net/mlx5e: Add mlx5e_flower_parse_meta support")
> Signed-off-by: wenxu <wenxu@ucloud.cn>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> index df2a0af..d675107d 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> @@ -1895,6 +1895,9 @@ static int mlx5e_flower_parse_meta(struct net_device *filter_dev,
>  		return 0;
>  
>  	flow_rule_match_meta(rule, &match);
> +	if (!match.mask->ingress_ifindex)
> +		return 0;
> +
>  	if (match.mask->ingress_ifindex != 0xFFFFFFFF) {
>  		NL_SET_ERR_MSG_MOD(extack, "Unsupported ingress ifindex mask");
>  		return -EOPNOTSUPP;
> -- 
> 1.8.3.1
> 

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

* Re: [PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta
  2021-04-09  5:33 [PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta wenxu
  2021-04-10 19:19 ` Pablo Neira Ayuso
@ 2021-04-14 23:08 ` Saeed Mahameed
  1 sibling, 0 replies; 3+ messages in thread
From: Saeed Mahameed @ 2021-04-14 23:08 UTC (permalink / raw)
  To: wenxu; +Cc: davem, kuba, netdev, netfilter-devel

On Fri, 2021-04-09 at 13:33 +0800, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
> 
> In the nft_offload there is the mate flow_dissector with no
> ingress_ifindex but with ingress_iftype that only be used
> in the software. So if the mask of ingress_ifindex in meta is
> 0, this meta check should be bypass.
> 
> Fixes: 6d65bc64e232 ("net/mlx5e: Add mlx5e_flower_parse_meta
> support")
> Signed-off-by: wenxu <wenxu@ucloud.cn>

applied to net-mlx5,
Thanks!


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

end of thread, other threads:[~2021-04-14 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09  5:33 [PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta wenxu
2021-04-10 19:19 ` Pablo Neira Ayuso
2021-04-14 23:08 ` Saeed Mahameed

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).