• Vladimir Oltean's avatar
    net/sched: make stab available before ops->init() call · 1f62879e
    Vladimir Oltean authored
    Some qdiscs like taprio turn out to be actually pretty reliant on a well
    configured stab, to not underestimate the skb transmission time (by
    properly accounting for L1 overhead).
    
    In a future change, taprio will need the stab, if configured by the
    user, to be available at ops->init() time. It will become even more
    important in upcoming work, when the overhead will be used for the
    queueMaxSDU calculation that is passed to an offloading driver.
    
    However, rcu_assign_pointer(sch->stab, stab) is called right after
    ops->init(), making it unavailable, and I don't really see a good reason
    for that.
    
    Move it earlier, which nicely seems to simplify the error handling path
    as well.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: Kurt Kanzenbach's avatarKurt Kanzenbach <kurt@linutronix.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1f62879e
sch_api.c 55.3 KB