No description
Find a file
Vladimir Oltean a306a90c8f net/sched: taprio: calculate tc gate durations
Current taprio code operates on a very simplistic (and incorrect)
assumption: that egress scheduling for a traffic class can only take
place for the duration of the current interval, or i.o.w., it assumes
that at the end of each schedule entry, there is a "gate close" event
for all traffic classes.

As an example, traffic sent with the schedule below will be jumpy, even
though all 8 TC gates are open, so there is absolutely no "gate close"
event (effectively a transition from BIT(tc)==1 to BIT(tc)==0 in
consecutive schedule entries):

tc qdisc replace dev veth0 parent root taprio \
	num_tc 2 \
	map 0 1 \
	queues 1@0 1@1 \
	base-time 0 \
	sched-entry S 0xff 4000000000 \
	clockid CLOCK_TAI \
	flags 0x0

This qdisc simply does not have what it takes in terms of logic to
*actually* compute the durations of traffic classes. Also, it does not
recognize the need to use this information on a per-traffic-class basis:
it always looks at entry->interval and entry->close_time.

This change proposes that each schedule entry has an array called
tc_gate_duration[tc]. This holds the information: "for how long will
this traffic class gate remain open, starting from *this* schedule
entry". If the traffic class gate is always open, that value is equal to
the cycle time of the schedule.

We'll also need to keep track, for the purpose of queueMaxSDU[tc]
calculation, what is the maximum time duration for a traffic class
having an open gate. This gives us directly what is the maximum sized
packet that this traffic class will have to accept. For everything else
it has to qdisc_drop() it in qdisc_enqueue().

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-08 09:48:52 +00:00
arch Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-02 14:49:55 -08:00
block
certs
crypto
Documentation dt-bindings: net: micrel-ksz90x1.txt: Update for lan8841 2023-02-08 09:16:07 +00:00
drivers net/sched: taprio: give higher priority to higher TCs in software dequeue mode 2023-02-08 09:48:52 +00:00
fs Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-02 14:49:55 -08:00
include net/sched: taprio: give higher priority to higher TCs in software dequeue mode 2023-02-08 09:48:52 +00:00
init
io_uring
ipc
kernel sched/topology: Introduce sched_numa_hop_mask() 2023-02-07 18:20:00 -08:00
lib lib/cpumask: update comment for cpumask_local_spread() 2023-02-07 18:20:00 -08:00
LICENSES
mm
net net/sched: taprio: calculate tc gate durations 2023-02-08 09:48:52 +00:00
rust
samples Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-02 14:49:55 -08:00
scripts Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-02 14:49:55 -08:00
security
sound
tools selftests: forwarding: bridge_mdb_max: Add a new selftest 2023-02-06 08:48:27 +00:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: add John Crispin's entry 2023-02-02 11:35:33 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: update SCTP maintainers 2023-02-02 11:35:33 -08:00
Kbuild
Kconfig
MAINTAINERS dt-bindings: net: Add Motorcomm yt8xxx ethernet phy 2023-02-03 09:34:50 +00:00
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.