• Petr Machata's avatar
    mlxsw: spectrum_buffers: Support two headroom modes · 69e408a2
    Petr Machata authored
    There are two interfaces to configure ETS: qdiscs and DCB. Historically,
    DCB ETS configuration was projected to ingress as well, and configured port
    buffers. Qdisc was not.
    
    So as not to break clients that today use DCB ETS and PFC and rely on
    getting a reasonable ingress buffer priomap, keep the ETS mirroring in
    effect.
    
    Since qdiscs have not done this mirroring historically, it is reasonable
    not to introduce it, but rather permit manual ingress configuration through
    dcbnl_setbuffer only in the qdisc mode.
    
    This will require a toggle to indicate whether buffer sizes should be
    autocomputed or taken from dcbnl_setbuffer, and likewise for priomaps.
    Introduce such and initialize it, and guard port buffer size configuration
    as appropriate. The toggle is currently left in the DCB position. In a
    following patch, qdisc code will switch it.
    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>
    69e408a2
spectrum.h 44.3 KB