0. Don't forget to enabling the priority for each traffic class:
tc qdisc add dev eno0 root handle 1: mqprio num_tc 8 map 0 1 2 3 4 5 6 7 hw 1
1. Run the following commands:
cbsset --device eno0 --tc 7 --percentage 60
cbsset --device eno0 --tc 6 --percentage 20
2. Check each queue bandwidth (pktgen require enabling NET_PKTGEN in kernel)
./pktgen/pktgen_sample01_simple.sh -i eno0 -q 7 -s 500 -n 30000
wait seconds later to check result. It should get about 60% percentage line rate.
./pktgen/pktgen_sample01_simple.sh -i eno0 -q 6 -s 500 -n 30000
Wait seconds later to check result. It should get about 20% percentage line rate.
8.1.3.5.2 Using CBS Qdisc Setup Qav
LS1028a support the CBS qdisc to setup Credit-based Shaper. Below commands set CBS with 100Mbit/s for queue 7 and
300Mbit/s for queue 6.
tc qdisc add dev eno0 root handle 1: mqprio num_tc 8 map 0 1 2 3 4 5 6 7 hw 1
tc qdisc replace dev eno0 parent 1:8 cbs locredit -1470 hicredit 30 sendslope -900000 idleslope 100000
offload 1
tc qdisc replace dev eno0 parent 1:7 cbs locredit -1470 hicredit 30 sendslope -700000 idleslope 300000
offload 1
# Try to flood stream here (require kernel enable NET_PKTGEN)
./pktgen/pktgen_sample01_simple.sh -i eno0 -q 7 -s 500 -n 20000
./pktgen/pktgen_sample01_simple.sh -i eno0 -q 6 -s 500 -n 20000
tc qdisc del dev eno0 parent 1:7 cbs
tc qdisc del dev eno0 parent 1:8 cbs
8.1.4 Basic TSN configuration examples on the switch
The following sections describe examples for the basic configuration of TSN switch.
NXP Semiconductors
TSN
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
115 / 199