aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_matchall.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-10-19 15:50:46 +0200
committerDavid S. Miller <davem@davemloft.net>2017-10-21 03:04:08 +0100
commit8d26d5636dff9fca30816579910aaa9a55b4d96d (patch)
tree3c82ff1aa167e07b81296a2d41cf6cfa3d2f7edd /net/sched/cls_matchall.c
parentdsa: Convert ndo_setup_tc offloads to block callbacks (diff)
downloadlinux-dev-8d26d5636dff9fca30816579910aaa9a55b4d96d.tar.xz
linux-dev-8d26d5636dff9fca30816579910aaa9a55b4d96d.zip
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>
Diffstat (limited to 'net/sched/cls_matchall.c')
-rw-r--r--net/sched/cls_matchall.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index 5278534c7e87..70e78d74f6d3 100644
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -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) {