]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: handle NETIF_F_HW_TC changes correctly
authorJiri Pirko <jiri@mellanox.com>
Wed, 6 Dec 2017 08:41:12 +0000 (09:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Dec 2017 20:11:17 +0000 (15:11 -0500)
commit35f8e3af44a44231d1e01819d0fd0b0aae84023d
tree760e31e40fe9626e80c2b8df7b1ca8cb3aaaceff
parent0b41691f6a9d34eb75b020295d7456f58fac8640
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>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c