diff options
author | Ido Schimmel <idosch@nvidia.com> | 2023-05-29 14:48:33 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-05-30 23:37:00 -0700 |
commit | 0b9cd74b8d1e07111a048e8eeb15f54f2ed9cbe2 (patch) | |
tree | 6ede67196d9ca8b02c06101afe87279643965ee5 /drivers/net/ethernet/mellanox/mlxsw | |
parent | d04e265096784b4cebeb627b21f0f27410d20dc4 (diff) | |
download | linux-stable-0b9cd74b8d1e07111a048e8eeb15f54f2ed9cbe2.tar.gz linux-stable-0b9cd74b8d1e07111a048e8eeb15f54f2ed9cbe2.tar.bz2 linux-stable-0b9cd74b8d1e07111a048e8eeb15f54f2ed9cbe2.zip |
mlxsw: spectrum_flower: Do not force matching on iif
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>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |