Message ID | 20230529114835.372140-7-idosch@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 0b9cd74b8d1e07111a048e8eeb15f54f2ed9cbe2 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Add layer 2 miss indication and filtering | expand |
Context | Check | Description |
---|---|---|
netdev/series_format | success | Posting correctly formatted |
netdev/tree_selection | success | Clearly marked for net-next, async |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 8 this patch: 8 |
netdev/cc_maintainers | success | CCed 7 of 7 maintainers |
netdev/build_clang | success | Errors and warnings before: 8 this patch: 8 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/deprecated_api | success | None detected |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 8 this patch: 8 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 9 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
On 29/05/2023 14:48, Ido Schimmel wrote: > Currently, mlxsw only supports the 'ingress_ifindex' field in the > 'FLOW_DISSECTOR_KEY_META' key, but subsequent patches are going to add > support for the 'l2_miss' field as well. It is valid to only match on > 'l2_miss' without 'ingress_ifindex', so do not force matching on it. > > Signed-off-by: Ido Schimmel <idosch@nvidia.com> > --- > > Notes: > v2: > * New patch. > > drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c > index 2b0bae847eb9..9c62c12e410b 100644 > --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c > +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c > @@ -290,6 +290,9 @@ mlxsw_sp_flower_parse_meta_iif(struct mlxsw_sp_acl_rule_info *rulei, > struct mlxsw_sp_port *mlxsw_sp_port; > struct net_device *ingress_dev; > > + if (!match->mask->ingress_ifindex) > + return 0; > + > if (match->mask->ingress_ifindex != 0xFFFFFFFF) { > NL_SET_ERR_MSG_MOD(extack, "Unsupported ingress ifindex mask"); > return -EINVAL; Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c index 2b0bae847eb9..9c62c12e410b 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c @@ -290,6 +290,9 @@ mlxsw_sp_flower_parse_meta_iif(struct mlxsw_sp_acl_rule_info *rulei, struct mlxsw_sp_port *mlxsw_sp_port; struct net_device *ingress_dev; + if (!match->mask->ingress_ifindex) + return 0; + if (match->mask->ingress_ifindex != 0xFFFFFFFF) { NL_SET_ERR_MSG_MOD(extack, "Unsupported ingress ifindex mask"); return -EINVAL;
Currently, mlxsw only supports the 'ingress_ifindex' field in the 'FLOW_DISSECTOR_KEY_META' key, but subsequent patches are going to add support for the 'l2_miss' field as well. It is valid to only match on 'l2_miss' without 'ingress_ifindex', so do not force matching on it. Signed-off-by: Ido Schimmel <idosch@nvidia.com> --- Notes: v2: * New patch. drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 3 +++ 1 file changed, 3 insertions(+)