OSDN Git Service

mlxsw: spectrum_qdisc: Support offloading of FIFO Qdisc
authorPetr Machata <petrm@mellanox.com>
Thu, 5 Mar 2020 07:16:43 +0000 (09:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Mar 2020 22:03:32 +0000 (14:03 -0800)
commit7bec1a45d5708a19154b94758802d7c599b99119
tree716a635159e1c2c93130d264b4db6634a43ea80e
parentc4e372e2ac7c9752ded23f24d718cad4a8234077
mlxsw: spectrum_qdisc: Support offloading of FIFO Qdisc

There are two peculiarities about offloading FIFO:

- sometimes the qdisc has an unspecified handle (it is "invisible")
- it may be created before the qdisc that it will be a child of

These features make the offload a bit more tricky. The approach chosen in
this patch is to make note of all the FIFOs that needed to be rejected
because their parents were not known. Later when the parent is created,
they are offloaded

FIFO is only offloaded for its counters, queue length is ignored.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c