diff options
author | Nir Dotan <nird@mellanox.com> | 2018-08-09 11:59:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-09 20:36:10 +0300 |
commit | 903fcf734f468afb5a3f153f870f58e4c1d5e525 (patch) | |
tree | a03797ce9fd5546ef90c77d339767df3134d8940 /drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | |
parent | 82b94f5d6891a8e58efdb9b054bdadbbdddec9d9 (diff) | |
download | linux-903fcf734f468afb5a3f153f870f58e4c1d5e525.tar.xz |
mlxsw: spectrum_flower: Disallow usage of vlan_id key on egress
As recent spectrum FW imposes a limitation on using vlan_id key for
egress ACL, disallow the usage of that key accordingly and return a
proper extack message.
Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c index 8213cb7190fa..8f3e0066dd53 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c @@ -386,6 +386,11 @@ static int mlxsw_sp_flower_parse(struct mlxsw_sp *mlxsw_sp, skb_flow_dissector_target(f->dissector, FLOW_DISSECTOR_KEY_VLAN, f->mask); + + if (mlxsw_sp_acl_block_is_egress_bound(block)) { + NL_SET_ERR_MSG_MOD(f->common.extack, "vlan_id key is not supported on egress"); + return -EOPNOTSUPP; + } if (mask->vlan_id != 0) mlxsw_sp_acl_rulei_keymask_u32(rulei, MLXSW_AFK_ELEMENT_VID, |