]> git.baikalelectronics.ru Git - kernel.git/commit
net: sch: prio: Add offload ability to PRIO qdisc
authorNogah Frankel <nogahf@mellanox.com>
Sun, 14 Jan 2018 11:33:15 +0000 (12:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Jan 2018 17:21:11 +0000 (12:21 -0500)
commit911e48e34ec9166ff45b574348df6af5a0912a16
tree1ba0edfd18a405ae1e3c3be4f58fc54fc93cbe8f
parent435890dab16e29edc26d03b64b02c0c8dd6b579e
net: sch: prio: Add offload ability to PRIO qdisc

Add the ability to offload PRIO qdisc by using ndo_setup_tc.
There are three commands for PRIO offloading:
* TC_PRIO_REPLACE: handles set and tune
* TC_PRIO_DESTROY: handles qdisc destroy
* TC_PRIO_STATS: updates the qdiscs counters (given as reference)

Like RED qdisc, the indication of whether PRIO is being offloaded is being
set and updated as part of the dump function. It is so because the driver
could decide to offload or not based on the qdisc parent, which could
change without notifying the qdisc.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Reviewed-by: Yuval Mintz <yuvalm@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/net/pkt_cls.h
net/sched/sch_prio.c