• Vladimir Oltean's avatar
    net/sched: taprio: automatically calculate queueMaxSDU based on TC gate durations · fed87cc6
    Vladimir Oltean authored
    taprio today has a huge problem with small TC gate durations, because it
    might accept packets in taprio_enqueue() which will never be sent by
    taprio_dequeue().
    
    Since not much infrastructure was available, a kludge was added in
    commit 497cc002 ("taprio: Handle short intervals and large
    packets"), which segmented large TCP segments, but the fact of the
    matter is that the issue isn't specific to large TCP segments (and even
    worse, the performance penalty in segmenting those is absolutely huge).
    
    In commit a54fc09e ("net/sched: taprio: allow user input of per-tc
    max SDU"), taprio gained support for queueMaxSDU, which is precisely the
    mechanism through which packets should be dropped at qdisc_enqueue() if
    they cannot be sent.
    
    After that patch, it was necessary for the user to manually limit the
    maximum MTU per TC. This change adds the necessary logic for taprio to
    further limit the values specified (or not specified) by the user to
    some minimum values which never allow oversized packets to be sent.
    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>
    fed87cc6
sch_taprio.c 61.1 KB