• Vladimir Oltean's avatar
    net: dsa: add ops for devlink-sb · 2a6ef763
    Vladimir Oltean authored
    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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    2a6ef763
dsa2.c 26.6 KB