summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_bpf.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_bpf.c
parent6b3eb752b4b9481868b3393f06a236a1aedfa43f (diff)
downloadlinux-8d26d5636dff9fca30816579910aaa9a55b4d96d.tar.bz2
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_bpf.c')
-rw-r--r--net/sched/cls_bpf.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index e379fdf928bd..0f8b51061c39 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -148,7 +148,6 @@ static int cls_bpf_offload_cmd(struct tcf_proto *tp, struct cls_bpf_prog *prog,
enum tc_clsbpf_command cmd)
{
bool addorrep = cmd == TC_CLSBPF_ADD || cmd == TC_CLSBPF_REPLACE;
- struct net_device *dev = tp->q->dev_queue->dev;
struct tcf_block *block = tp->chain->block;
bool skip_sw = tc_skip_sw(prog->gen_flags);
struct tc_cls_bpf_offload cls_bpf = {};
@@ -162,19 +161,6 @@ static int cls_bpf_offload_cmd(struct tcf_proto *tp, struct cls_bpf_prog *prog,
cls_bpf.exts_integrated = prog->exts_integrated;
cls_bpf.gen_flags = prog->gen_flags;
- if (tc_can_offload(dev)) {
- err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSBPF,
- &cls_bpf);
- if (addorrep) {
- if (err) {
- if (skip_sw)
- return err;
- } else {
- prog->gen_flags |= TCA_CLS_FLAGS_IN_HW;
- }
- }
- }
-
err = tc_setup_cb_call(block, NULL, TC_SETUP_CLSBPF, &cls_bpf, skip_sw);
if (addorrep) {
if (err < 0) {