• Petr Machata's avatar
    mlxsw: spectrum_buffers: Add struct mlxsw_sp_hdroom · 3a77f5a2
    Petr Machata authored
    The port headroom handling is currently strewn across several modules and
    tricky to follow: MTU, DCB PFC, DCB ETS and ethtool pause all influence the
    settings, and then there is the completely separate initial configuraion in
    spectrum_buffers. A following patch will implement the dcbnl_setbuffer
    callback, which is going to further complicate the landscape.
    
    In order to simplify work with port buffers, the following patches are
    going to centralize all port-buffer handling in spectrum_buffers. As a
    first step, introduce a (currently empty) struct mlxsw_sp_hdroom that will
    keep the configuration parameters, and allocate and free it in appropriate
    places.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3a77f5a2
spectrum.c 128 KB