diff options
author | Jiri Pirko <jiri@mellanox.com> | 2017-12-06 09:41:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-06 15:11:17 -0500 |
commit | 9454d9307e05989bc5dd50c023acd51d632fe6f9 (patch) | |
tree | 760e31e40fe9626e80c2b8df7b1ca8cb3aaaceff /drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | |
parent | cc166427dcdab39a96140fded18ac23be5f0a1ed (diff) | |
download | linux-stable-9454d9307e05989bc5dd50c023acd51d632fe6f9.tar.gz linux-stable-9454d9307e05989bc5dd50c023acd51d632fe6f9.tar.bz2 linux-stable-9454d9307e05989bc5dd50c023acd51d632fe6f9.zip |
mlxsw: spectrum: handle NETIF_F_HW_TC changes correctly
Currently, whenever the NETIF_F_HW_TC feature changes, we silently
always allow it, but we actually do not disable the flows in HW
on disable. That breaks user's expectations. So just forbid
the feature disable in case there are any filters offloaded.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c index 347e96461273..42e8a36b9b95 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c @@ -423,6 +423,7 @@ int mlxsw_sp_flower_replace(struct mlxsw_sp_port *mlxsw_sp_port, bool ingress, goto err_rule_add; mlxsw_sp_acl_ruleset_put(mlxsw_sp, ruleset); + mlxsw_sp_port->acl_rule_count++; return 0; err_rule_add: @@ -454,6 +455,7 @@ void mlxsw_sp_flower_destroy(struct mlxsw_sp_port *mlxsw_sp_port, bool ingress, } mlxsw_sp_acl_ruleset_put(mlxsw_sp, ruleset); + mlxsw_sp_port->acl_rule_count--; } int mlxsw_sp_flower_stats(struct mlxsw_sp_port *mlxsw_sp_port, bool ingress, |