summaryrefslogtreecommitdiff
path: root/net/sched/cls_flower.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-08-07 10:15:29 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-07 09:42:37 -0700
commit5fd9fc4e207dba0c05cafe78417952b4c4ca02dc (patch)
tree5e6aba80c4d3ec11e2e58983748b497e7f80f2fa /net/sched/cls_flower.c
parent74897ef0a553c8376aba53d818af10afcd12d945 (diff)
net: sched: push cls related args into cls_common structure
As ndo_setup_tc is generic offload op for whole tc subsystem, does not really make sense to have cls-specific args. So move them under cls_common structurure which is embedded in all cls structs. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_flower.c')
-rw-r--r--net/sched/cls_flower.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index 52deeed2b7f5..1fdf2889ba9f 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -232,14 +232,14 @@ static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f)
if (!tc_can_offload(dev, tp))
return;
+ tc_cls_common_offload_init(&offload.common, tp);
offload.command = TC_CLSFLOWER_DESTROY;
offload.prio = tp->prio;
offload.cookie = (unsigned long)f;
tc->cls_flower = &offload;
- dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSFLOWER, tp->q->handle,
- tp->chain->index, tp->protocol, tc);
+ dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSFLOWER, tc);
}
static int fl_hw_replace_filter(struct tcf_proto *tp,
@@ -264,6 +264,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
f->hw_dev = dev;
}
+ tc_cls_common_offload_init(&offload.common, tp);
offload.command = TC_CLSFLOWER_REPLACE;
offload.prio = tp->prio;
offload.cookie = (unsigned long)f;
@@ -274,9 +275,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
tc->cls_flower = &offload;
- err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSFLOWER,
- tp->q->handle, tp->chain->index,
- tp->protocol, tc);
+ err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSFLOWER, tc);
if (!err)
f->flags |= TCA_CLS_FLAGS_IN_HW;
@@ -294,6 +293,7 @@ static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f)
if (!tc_can_offload(dev, tp))
return;
+ tc_cls_common_offload_init(&offload.common, tp);
offload.command = TC_CLSFLOWER_STATS;
offload.prio = tp->prio;
offload.cookie = (unsigned long)f;
@@ -301,8 +301,7 @@ static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f)
tc->cls_flower = &offload;
- dev->netdev_ops->ndo_setup_tc(dev, TC_CLSFLOWER_STATS, tp->q->handle,
- tp->chain->index, tp->protocol, tc);
+ dev->netdev_ops->ndo_setup_tc(dev, TC_CLSFLOWER_STATS, tc);
}
static void __fl_delete(struct tcf_proto *tp, struct cls_fl_filter *f)