From: Jakub Kicinski Date: Fri, 9 Nov 2018 03:50:38 +0000 (-0800) Subject: net: sched: red: inform offloads about harddrop setting X-Git-Tag: v5.4-rc1~1957^2~347^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=190852a55edbe138503259ea1bb40c08be221d75;p=platform%2Fkernel%2Flinux-rpi.git net: sched: red: inform offloads about harddrop setting To mirror software behaviour on offload more precisely inform the drivers about the state of the harddrop flag. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller --- diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 72ffb31..00f7164 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -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; }; diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index 7682f7a..a1d08bd 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c @@ -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;