]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
taprio: Fix dropping packets when using taprio + ETF offloading
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Thu, 6 Feb 2020 21:46:10 +0000 (13:46 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 17 Feb 2020 11:07:07 +0000 (12:07 +0100)
commitf92e72b2f6d09751582c5762cefcade80e24fa2b
treea2a7c657d48dca42bb0174d2337b2a70bf4ffcc3
parent5f5bb7f8787305e1437e7fc607a8b8f5829adebe
taprio: Fix dropping packets when using taprio + ETF offloading

BugLink: https://bugs.launchpad.net/bugs/1863588
[ Upstream commit bfabd41da34180d05382312533a3adc2e012dee0 ]

When using taprio offloading together with ETF offloading, configured
like this, for example:

$ tc qdisc replace dev $IFACE parent root handle 100 taprio \
   num_tc 4 \
        map 2 2 1 0 3 2 2 2 2 2 2 2 2 2 2 2 \
queues 1@0 1@1 1@2 1@3 \
base-time $BASE_TIME \
sched-entry S 01 1000000 \
sched-entry S 0e 1000000 \
flags 0x2

$ tc qdisc replace dev $IFACE parent 100:1 etf \
      offload delta 300000 clockid CLOCK_TAI

During enqueue, it works out that the verification added for the
"txtime" assisted mode is run when using taprio + ETF offloading, the
only thing missing is initializing the 'next_txtime' of all the cycle
entries. (if we don't set 'next_txtime' all packets from SO_TXTIME
sockets are dropped)

Fixes: 4cfd5779bd6e ("taprio: Add support for txtime-assist mode")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/sched/sch_taprio.c