
8.1.4.3.1 Closing basic gates
Use the set of commands below for basic gate closing.
echo “t0 00000000b 20000” > qbv0.txt
#Explaination:
# 'NUMBER' : t0
# 'GATE_VALUE' : 00000000b
# 'TIME_LONG' : 20000 ns
./tsntool
tsntool> verbose
tsntool> qbvset --device swp1 --entryfile ./qbv0.txt
#Send one broadcast frame to swp0 from TestCenter.
ethtool -S swp1
#Should not get any frame from swp1 on TestCenter.
echo “t0 11111111b 20000” > qbv0.txt
tsntool> qbvset --device swp1 --entryfile ./qbv0.txt
#Send one broadcast frame to swp0 on TestCenter.
ethtool -S swp1
#Should get one frame from swp1 on TestCenter.
Using taprio Qdisc Setup Qbv.
LS1028ardb support the tarprio qdisc to setup Qbv either. Below is an example Setup.
1. Enable the Qbv for swp1 port, set queue 1 gate open, set circle time to be 300um.
tc qdisc replace dev swp1 parent root handle 100 taprio num_tc 8 map 0 1 2 3 4 5 6 7 \
queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 sched-entry S 02 300000 flags 0x2
2. Send one frame with PCP=1 in vlan tag to swp0 from TestCenter, we will capture the frame from swp1.
3. Send one frame with PCP=2 in vlan tag to swp0 from TestCenter, gate is closed and we couldn't capture the frame from swp1.
4. Disable the Qbv for swp1 port as below
tc qdisc del dev swp1 parent root handle 100 taprio
8.1.4.3.2 Basetime test
For the basetime test, first get the current second time:
#Get current time:
tsntool> ptptool -g -d /dev/ptp1
#add some seconds, for example you get 200.666 time clock, then set 260.666 as result
tsntool> qbvset --device swp1 --entryfile ./qbv0.txt --basetime 260.666
#Send one broadcast frame to swp0 on the Test Center.
#Frame could not pass swp1 until time offset.
NXP Semiconductors
TSN
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
118 / 199