Time-Sensitive Networking (TSN) is a set of standards under development by the Time-Sensitive Networking task group of the IEEE 802.1 working group.
...
https://github.com/Xilinx/tsn-talker-listener
Kernel Configuration
The following config options should be enabled in order to build the TSN Subsystem:
CONFIG_XILINX_TSN
CONFIG_AXIENET_HAS_TADMA
...
Please refer to PL Ethernet and DMA documentation for additional information: Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
For more details on phy bindings please refer "Documentation/devicetree/bindings/net/ethernet-phy.yaml"
Note:
- TSN devicetree from DTG flow is automatically generated for an RGMII PHY at address 0. For custom boards or design, please update your own device tree node as per the the devicetree documentation mentioned above.
- Please note that xlnx, packet-switch DT property is now used instead of packet-switch; the latter will be deprecated shortly. This DT property is used to identify packet switch feature enablement in TSN IP subsystem.
...
You would observe that every second 12 ST packets are sent of which 8 packets are sent in the 100us of 10 ms cycle and the rest 4 packets are sent in the next cycle.
As we can see in the above picture, from 4th packet until 11th packet (8 packets) are received sequentially and the next packet starts after 10ms delay (packet no. 12).
2) qdisc frame work
Configuring Qbv using qdisc framework(taprio):
The qdisc framework allows us to configure all QBV (Time-Aware Shaper) settings.
Kernel configuration
CONFIG_NET_SCH_NETEM=y
CONFIG_NET_SCH_TAPRIO=y
For example
./tc qdisc add dev ep parent root handle 100 taprio flags 2 num_tc 3 map 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 queues 1@0 1@1 1@2 sched-entry S 01 300000 sched-entry S 02 300000 sched-entry S 04 400000 base-time 1732523070165770012 cycle-time 1000000
...
→ 2024.2 Qbv implementation with qdisc has a known issue w.r.t. interpretation of gate mask. Please see Answer Record 37315 (Direct link to patch:AR000037315-xilinx-tsn-Enhance-TAPRIO-configuration-validation-a.patch). This issue is solved in the subsequent release.
MAC address filtering and broadcast storm management in TSN bridged endpoint systems:
A bridge endpoint HW system contains two MAC ports. When connected in a ring network, it is possible for a packet originating from an AMD TSN system to be sent back to one of its MAC ports.
Such broadcast packets should be dropped as forwarding further will cause a packet flood on the system. To avoid such scenarios, a MAC Frame filter register is used to filter out known source MAC addresses.
Please refer to the following registers in the IP product guide for further information:
1) Frame Filter MAC Address LSB
2) Frame Filter Mask and Frame Filter MAC Address MSB
The SW driver enabled this provision by default.
NOTE: The above MAC filter provision in HW has a limitation. Since there is only one set of registers for the MAC filter address, this works on the assumption that the MAC addresses of EP, TEMAC0 and TEMAC1 have the same MSB 44 bits.
This has to be take care of in the system. Standard MAC address setting methods in Linux can be used for the same.
Known issues in SDT
→ Automatic device tree property generation via System Devicetree flow is not yet supported for TSN. This will be updated in a future release.
...