diff options
author | Jiri Pirko <jiri@mellanox.com> | 2017-11-01 11:47:39 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-02 16:10:39 +0900 |
commit | 44ae12a768b7212976a362c590075716a77e8f28 (patch) | |
tree | 02eeee68258d3f0b1c03c260852f51c4fadb2a24 /drivers/net/ethernet/mellanox/mlxsw/spectrum.c | |
parent | 0b5a89caee5c9958c18cd933c7f8891e35b21781 (diff) | |
download | lwn-44ae12a768b7212976a362c590075716a77e8f28.tar.gz lwn-44ae12a768b7212976a362c590075716a77e8f28.zip |
net: sched: move the can_offload check from binding phase to rule insertion phase
This restores the original behaviour before the block callbacks were
introduced. Allow the drivers to do binding of block always, no matter
if the NETIF_F_HW_TC feature is on or off. Move the check to the block
callback which is called for rule insertion.
Reported-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index 021926974da6..3f4be9556e56 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -1738,6 +1738,9 @@ static int mlxsw_sp_setup_tc_block_cb(enum tc_setup_type type, void *type_data, { struct mlxsw_sp_port *mlxsw_sp_port = cb_priv; + if (!tc_can_offload(mlxsw_sp_port->dev)) + return -EOPNOTSUPP; + switch (type) { case TC_SETUP_CLSMATCHALL: return mlxsw_sp_setup_tc_cls_matchall(mlxsw_sp_port, type_data, |