net: sched: avoid ndo_setup_tc calls for TC_SETUP_CLS*
All drivers are converted to use block callbacks for TC_SETUP_CLS*. So it is now safe to remove the calls to ndo_setup_tc from cls_* Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
6b3eb752b4
commit
8d26d5636d
@@ -54,7 +54,6 @@ static void mall_destroy_hw_filter(struct tcf_proto *tp,
|
||||
struct cls_mall_head *head,
|
||||
unsigned long cookie)
|
||||
{
|
||||
struct net_device *dev = tp->q->dev_queue->dev;
|
||||
struct tc_cls_matchall_offload cls_mall = {};
|
||||
struct tcf_block *block = tp->chain->block;
|
||||
|
||||
@@ -62,9 +61,6 @@ static void mall_destroy_hw_filter(struct tcf_proto *tp,
|
||||
cls_mall.command = TC_CLSMATCHALL_DESTROY;
|
||||
cls_mall.cookie = cookie;
|
||||
|
||||
if (tc_can_offload(dev))
|
||||
dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSMATCHALL,
|
||||
&cls_mall);
|
||||
tc_setup_cb_call(block, NULL, TC_SETUP_CLSMATCHALL, &cls_mall, false);
|
||||
}
|
||||
|
||||
@@ -72,7 +68,6 @@ static int mall_replace_hw_filter(struct tcf_proto *tp,
|
||||
struct cls_mall_head *head,
|
||||
unsigned long cookie)
|
||||
{
|
||||
struct net_device *dev = tp->q->dev_queue->dev;
|
||||
struct tc_cls_matchall_offload cls_mall = {};
|
||||
struct tcf_block *block = tp->chain->block;
|
||||
bool skip_sw = tc_skip_sw(head->flags);
|
||||
@@ -83,17 +78,6 @@ static int mall_replace_hw_filter(struct tcf_proto *tp,
|
||||
cls_mall.exts = &head->exts;
|
||||
cls_mall.cookie = cookie;
|
||||
|
||||
if (tc_can_offload(dev)) {
|
||||
err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSMATCHALL,
|
||||
&cls_mall);
|
||||
if (err) {
|
||||
if (skip_sw)
|
||||
return err;
|
||||
} else {
|
||||
head->flags |= TCA_CLS_FLAGS_IN_HW;
|
||||
}
|
||||
}
|
||||
|
||||
err = tc_setup_cb_call(block, NULL, TC_SETUP_CLSMATCHALL,
|
||||
&cls_mall, skip_sw);
|
||||
if (err < 0) {
|
||||
|
Reference in New Issue
Block a user