net: sched: red: inform offloads about harddrop setting
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 9 Nov 2018 03:50:38 +0000 (19:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 04:48:01 +0000 (20:48 -0800)
To mirror software behaviour on offload more precisely inform
the drivers about the state of the harddrop flag.

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

index 72ffb3120cedfd596d25dece88ca35ed61da4e86..00f71644fbcd20a291edaddaf682a6c9826a0955 100644 (file)
@@ -807,6 +807,7 @@ struct tc_red_qopt_offload_params {
        u32 max;
        u32 probability;
        bool is_ecn;
+       bool is_harddrop;
        struct gnet_stats_queue *qstats;
 };
 
index 7682f7a618a1a343c8eb467d058d54a29ef5b5f2..a1d08bdd9357f59decfaa29381f170c4351d195d 100644 (file)
@@ -167,6 +167,7 @@ static int red_offload(struct Qdisc *sch, bool enable)
                opt.set.max = q->parms.qth_max >> q->parms.Wlog;
                opt.set.probability = q->parms.max_P;
                opt.set.is_ecn = red_use_ecn(q);
+               opt.set.is_harddrop = red_use_harddrop(q);
                opt.set.qstats = &sch->qstats;
        } else {
                opt.command = TC_RED_DESTROY;