net: sched: cls_u32: add res to offload information
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 19 Nov 2018 23:21:46 +0000 (15:21 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Nov 2018 02:53:46 +0000 (18:53 -0800)
In case of egress offloads the class/flowid assigned by the filter
may be very important for offloaded Qdisc selection.  Provide this
info to drivers.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_cls.h
net/sched/cls_u32.c

index d0e9a80..ea191d8 100644 (file)
@@ -643,6 +643,7 @@ struct tc_cls_common_offload {
 
 struct tc_cls_u32_knode {
        struct tcf_exts *exts;
+       struct tcf_result *res;
        struct tc_u32_sel *sel;
        u32 handle;
        u32 val;
index 4b28fd4..4c54bc4 100644 (file)
@@ -558,6 +558,7 @@ static int u32_replace_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n,
        cls_u32.knode.mask = 0;
 #endif
        cls_u32.knode.sel = &n->sel;
+       cls_u32.knode.res = &n->res;
        cls_u32.knode.exts = &n->exts;
        if (n->ht_down)
                cls_u32.knode.link_handle = ht->handle;
@@ -1206,6 +1207,7 @@ static int u32_reoffload_knode(struct tcf_proto *tp, struct tc_u_knode *n,
                cls_u32.knode.mask = 0;
 #endif
                cls_u32.knode.sel = &n->sel;
+               cls_u32.knode.res = &n->res;
                cls_u32.knode.exts = &n->exts;
                if (n->ht_down)
                        cls_u32.knode.link_handle = ht->handle;