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>
This commit is contained in:
Jiri Pirko
2017-11-01 11:47:39 +01:00
committed by David S. Miller
parent 0b5a89caee
commit 44ae12a768
11 changed files with 27 additions and 3 deletions

View File

@@ -256,7 +256,7 @@ static void tcf_block_offload_cmd(struct tcf_block *block, struct Qdisc *q,
struct net_device *dev = q->dev_queue->dev;
struct tc_block_offload bo = {};
if (!tc_can_offload(dev))
if (!dev->netdev_ops->ndo_setup_tc)
return;
bo.command = command;
bo.binder_type = ei->binder_type;