Skip to content

Commit 69ca05c

Browse files
jpirkodavem330
authored andcommitted
sched: cls_flower: expose priority to offloading netdevice
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 <[email protected]> Acked-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 22a6776 commit 69ca05c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

include/net/pkt_cls.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ enum tc_fl_command {
481481

482482
struct tc_cls_flower_offload {
483483
enum tc_fl_command command;
484+
u32 prio;
484485
unsigned long cookie;
485486
struct flow_dissector *dissector;
486487
struct fl_flow_key *mask;

net/sched/cls_flower.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f)
229229
return;
230230

231231
offload.command = TC_CLSFLOWER_DESTROY;
232+
offload.prio = tp->prio;
232233
offload.cookie = (unsigned long)f;
233234

234235
tc->type = TC_SETUP_CLSFLOWER;
@@ -260,6 +261,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
260261
}
261262

262263
offload.command = TC_CLSFLOWER_REPLACE;
264+
offload.prio = tp->prio;
263265
offload.cookie = (unsigned long)f;
264266
offload.dissector = dissector;
265267
offload.mask = mask;
@@ -287,6 +289,7 @@ static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f)
287289
return;
288290

289291
offload.command = TC_CLSFLOWER_STATS;
292+
offload.prio = tp->prio;
290293
offload.cookie = (unsigned long)f;
291294
offload.exts = &f->exts;
292295

0 commit comments

Comments
 (0)