]> git.baikalelectronics.ru Git - kernel.git/commit
net_sch: red: Add offload ability to RED qdisc
authorNogah Frankel <nogahf@mellanox.com>
Mon, 6 Nov 2017 06:23:41 +0000 (07:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Nov 2017 03:23:37 +0000 (12:23 +0900)
commit0bb7006cca84538ebef06b142e5f5a8fe7e7a459
treef8cffb1dc6ee8f0cb6695cf886daacab55463707
parentf48c698728734c44db69745c7774e0c9b65a2f18
net_sch: red: Add offload ability to RED qdisc

Add the ability to offload RED qdisc by using ndo_setup_tc.
There are four commands for RED offloading:
* TC_RED_SET: handles set and change.
* TC_RED_DESTROY: handle qdisc destroy.
* TC_RED_STATS: update the qdiscs counters (given as reference)
* TC_RED_XSTAT: returns red xstats.

Whether RED is being offloaded is being determined every time dump action
is being called because parent change of this qdisc could change its
offload state but doesn't require any RED function to be called.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/net/pkt_cls.h
include/uapi/linux/pkt_sched.h
net/sched/sch_red.c