summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_matchall.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-08-07 10:15:17 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-07 09:42:35 -0700
commit2572ac53c46f58e500b9d8d0f99785666038c590 (patch)
treead615f1fdda541358540a2d1dd5a385fc39332bc /net/sched/cls_matchall.c
parent1afec92be0d7b516a79f4c548a81d17460c8ba73 (diff)
downloadlinux-2572ac53c46f58e500b9d8d0f99785666038c590.tar.bz2
net: sched: make type an argument for ndo_setup_tc
Since the type is always present, push it to be a separate argument to ndo_setup_tc. On the way, name the type enum and use it for arg type. 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_matchall.c')
-rw-r--r--net/sched/cls_matchall.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index f35177b48373..6ffe0b82ab83 100644
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -58,14 +58,13 @@ static int mall_replace_hw_filter(struct tcf_proto *tp,
struct tc_cls_matchall_offload mall_offload = {0};
int err;
- offload.type = TC_SETUP_MATCHALL;
offload.cls_mall = &mall_offload;
offload.cls_mall->command = TC_CLSMATCHALL_REPLACE;
offload.cls_mall->exts = &head->exts;
offload.cls_mall->cookie = cookie;
- err = dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle,
- tp->chain->index,
+ err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_MATCHALL,
+ tp->q->handle, tp->chain->index,
tp->protocol, &offload);
if (!err)
head->flags |= TCA_CLS_FLAGS_IN_HW;
@@ -81,14 +80,13 @@ static void mall_destroy_hw_filter(struct tcf_proto *tp,
struct tc_to_netdev offload;
struct tc_cls_matchall_offload mall_offload = {0};
- offload.type = TC_SETUP_MATCHALL;
offload.cls_mall = &mall_offload;
offload.cls_mall->command = TC_CLSMATCHALL_DESTROY;
offload.cls_mall->exts = NULL;
offload.cls_mall->cookie = cookie;
- dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle, tp->chain->index,
- tp->protocol, &offload);
+ dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_MATCHALL, tp->q->handle,
+ tp->chain->index, tp->protocol, &offload);
}
static void mall_destroy(struct tcf_proto *tp)