mlxsw: spectrum: qdiscs: Support PRIO qdisc offload
authorNogah Frankel <nogahf@mellanox.com>
Sun, 14 Jan 2018 11:33:16 +0000 (12:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Jan 2018 17:21:12 +0000 (12:21 -0500)
commit46a3615be43631fc804b179cbfeabded8c3a7a5d
treee98bb2718d68221bd75fc8efcb4896c185ae6b0d
parent7fdb61b44c0c95d00f6c856d9fb61a9f647bc85f
mlxsw: spectrum: qdiscs: Support PRIO qdisc offload

Add support for offloading PRIO qdisc as root qdisc.
The support is for up to 8 bands.
Routed packets priority is determined by the DSCP field with the default
translations. Bridged packets priority is determined by the PCP field, if
exist, otherwise it is set to 0.
Since both options have only priorities 0-7, higher priorities mapping are
being ignored.

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>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c