PROPHET/OS
NAME
tsn: the transmit schedule
SYNOPSIS
tsn [--tui]
DESCRIPTION
The transmit schedule: which queue may send when, and what it held back.
Ordinary Ethernet gives no timing promise. A frame goes when the line is free, and a second sender turns a microsecond into a millisecond. TSN gives the promise instead (IEEE 802.1Qbv): the cycle is divided into windows, each window names the traffic classes whose gate is open in it, and a frame of a class whose gate is shut waits for its window.
Three things make a schedule, and this tool shows all three under the table: the **cycle**, the **base time** its cycles count from, and the **gate control list** of windows inside it. A class that stands in no window at all sends in what the list leaves over; a class that was promised a window is promised that window and nothing besides.
**schedule: is the line to read first.** kept in the card means the card holds the list in its own registers and keeps the windows to the nanosecond, which is what the whole standard is for. kept above the driver means the card holds nothing and the windows are kept here, by the clock of this machine and by the thread that drains the queues: the order of the gates holds exactly, and their timing holds to the tick of the timer and no closer. The two are not the same promise.
card: is the other half of that answer. holds no schedule names the register that did not answer and says how many of the shaper registers answered anything at all, so the line reads "this card has no QBVCYCLET" and not "no TSN". The registers of the time aware shaper first exist in the I225 family; no card this driver knows by name carries them, and under a hypervisor they read zero and drop a write.
In the table, Gate is the gate of that class **right now**, Windows the windows that open it, Held how many of its frames met a shut gate and had to wait, and Dropped how many were turned away because its own queue was full. A queue with drops has a window too narrow for what it carries, and that is the number to act on.
The schedule is set in the control tree, because that is where values a person sets belong:
control set net.tsn 1000/200:80,300:0f control set net.tsn off
The cycle and the windows are microseconds, the gates of a window are two hex digits with bit k for class k. The line above is a cycle of a millisecond with 200 us for class 7 alone, 300 us for the classes 0 to 3 and the remaining 500 us for every class no window names. The base time is the moment the schedule was set: two machines share no clock until one of them is steered, and no servo is built (see ptp).
The class of a frame comes out of the frame: the priority code point of its 802.1Q tag. A frame without a tag is class 0.
The rows come out of /state/tsn, which the net service writes. Without the net there is no page, and then this says one line and ends with 1 instead of showing a table of no rows.
--tui takes the whole screen and keeps the rows live; the arrows and the two page keys move, q leaves.
EXAMPLE
$ tsn --help tsn [--tui] the transmit schedule: the gate of every queue, what it sent and what it held back --tui live on the whole screen, q leaves