• Petr Machata's avatar
    mlxsw: spectrum_qdisc: Query tclass / priomap instead of caching it · 76ff72a7
    Petr Machata authored
    Currently when keeping track of qdiscs, mlxsw notes the TC and priomap
    corresponding to each qdisc. That is fine currently, as there only ever is
    one level of qdiscs to update: the direct children of ETS / PRIO. However
    as deeper structures are made offloadable, ETS would need to update these
    values for the complete subtree, and interim qdiscs would need to remember
    to propagate the value.
    
    Instead, reverse the responsibility: child qdiscs can ask their parent what
    their TC and priomap are. ETS / PRIO know the answer right away, or there
    are defaults for when the root qdisc does not assign them (e.g. when RED is
    used as root qdisc). When RED and TBF become classful, they will simply
    forward the request up to their parent.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    76ff72a7
spectrum_qdisc.c 60.9 KB