sched: cls_flower: expose priority to offloading netdevice
authorJiri Pirko <jiri@mellanox.com>
Fri, 3 Feb 2017 09:29:08 +0000 (10:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Feb 2017 21:35:43 +0000 (16:35 -0500)
The driver that offloads flower rules needs to know with which priority
user inserted the rules. So add this information into offload struct.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_cls.h
net/sched/cls_flower.c

index b43077e47d35ababe97c7e2aea4a226b7a803776..dabb00af46a0d31e36c45235aa742a124d78df89 100644 (file)
@@ -481,6 +481,7 @@ enum tc_fl_command {
 
 struct tc_cls_flower_offload {
        enum tc_fl_command command;
+       u32 prio;
        unsigned long cookie;
        struct flow_dissector *dissector;
        struct fl_flow_key *mask;
index 23c4d224dcb102f78d815de7951bd706e09d553d..0826c8ec3a768ed1ea1ea313b2a00b8be6b1bd88 100644 (file)
@@ -229,6 +229,7 @@ static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f)
                return;
 
        offload.command = TC_CLSFLOWER_DESTROY;
+       offload.prio = tp->prio;
        offload.cookie = (unsigned long)f;
 
        tc->type = TC_SETUP_CLSFLOWER;
@@ -260,6 +261,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
        }
 
        offload.command = TC_CLSFLOWER_REPLACE;
+       offload.prio = tp->prio;
        offload.cookie = (unsigned long)f;
        offload.dissector = dissector;
        offload.mask = mask;
@@ -287,6 +289,7 @@ static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f)
                return;
 
        offload.command = TC_CLSFLOWER_STATS;
+       offload.prio = tp->prio;
        offload.cookie = (unsigned long)f;
        offload.exts = &f->exts;