]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: add ops for devlink-sb
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 15 Jan 2021 02:11:13 +0000 (04:11 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 16 Jan 2021 04:02:34 +0000 (20:02 -0800)
commite8a0e5078f7b88e944b6628d77cfa9343a09c2d0
tree8be66927ee9649d2136330eccbb507306ba069d3
parent063f23b7c24ff4475894bb539ca0897843179673
net: dsa: add ops for devlink-sb

Switches that care about QoS might have hardware support for reserving
buffer pools for individual ports or traffic classes, and configuring
their sizes and thresholds. Through devlink-sb (shared buffers), this is
all configurable, as well as their occupancy being viewable.

Add the plumbing in DSA for these operations.

Individual drivers still need to call devlink_sb_register() with the
shared buffers they want to expose. A helper was not created in DSA for
this purpose (unlike, say, dsa_devlink_params_register), since in my
opinion it does not bring any benefit over plainly calling
devlink_sb_register() directly.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/dsa.h
net/dsa/dsa2.c