Message ID | 1617946428-10944-1-git-send-email-wenxu@ucloud.cn (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | fail | 2 blamed authors not CCed: saeedm@nvidia.com roid@mellanox.com; 4 maintainers not CCed: saeedm@nvidia.com leon@kernel.org linux-rdma@vger.kernel.org roid@mellanox.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 9 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
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 >
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!
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;