]> git.baikalelectronics.ru Git - kernel.git/commit
taprio: Fix using wrong queues in gate mask
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Tue, 25 Aug 2020 17:44:04 +0000 (10:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2020 22:45:11 +0000 (15:45 -0700)
commitc37075311d32dc971ed1830a08fb43b7280d24c1
treefdc55133fa5af831114bf70c861cbac5bdeb53e7
parent5ad9f58b50fadb685c23413a6b4a95acf4f379c0
taprio: Fix using wrong queues in gate mask

Since commit 6f3f73366f14 ("taprio: Add support for hardware
offloading") there's a bit of inconsistency when offloading schedules
to the hardware:

In software mode, the gate masks are specified in terms of traffic
classes, so if say "sched-entry S 03 20000", it means that the traffic
classes 0 and 1 are open for 20us; when taprio is offloaded to
hardware, the gate masks are specified in terms of hardware queues.

The idea here is to fix hardware offloading, so schedules in hardware
and software mode have the same behavior. What's needed to do is to
map traffic classes to queues when applying the offload to the driver.

Fixes: 6f3f73366f14 ("taprio: Add support for hardware offloading")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_taprio.c