From: Pablo Neira Ayuso <pablo@netfilter.org>
To: wenxu@ucloud.cn
Cc: saeed@kernel.org, davem@davemloft.net, kuba@kernel.org,
netdev@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta
Date: Sat, 10 Apr 2021 21:19:51 +0200 [thread overview]
Message-ID: <20210410191951.GC17033@salvia> (raw)
In-Reply-To: <1617946428-10944-1-git-send-email-wenxu@ucloud.cn>
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
>
next prev parent reply other threads:[~2021-04-10 19:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2021-04-14 23:08 ` Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210410191951.GC17033@salvia \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=saeed@kernel.org \
--cc=wenxu@ucloud.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).