Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.99 KB | None | 0 0
  1. root@am65xx-evm:~# cat taprio_test
  2. #!/bin/sh
  3.  
  4. INTF="eth0"
  5. DADDR="98:de:d0:19:66:82"
  6.  
  7. case $1 in
  8. 1)
  9. BASE_TIME=$(./plget)
  10. BASE_TIME=$(($BASE_TIME + 30000000000))
  11. tc qdisc replace dev $INTF parent root handle 100 taprio \
  12. num_tc 3 \
  13. map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
  14. queues 1@0 1@1 1@2 \
  15. base-time $BASE_TIME \
  16. sched-entry S 01 80000 \
  17. sched-entry S 02 15000 \
  18. sched-entry S 04 40000 \
  19. flags 2
  20. ;;
  21. 1a)
  22. BASE_TIME=$(./plget)
  23. BASE_TIME=$(($BASE_TIME + 30000000000))
  24. tc qdisc replace dev $INTF parent root handle 100 taprio \
  25. num_tc 3 \
  26. map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
  27. queues 1@0 1@1 1@2 \
  28. base-time $BASE_TIME \
  29. sched-entry S 01 15000 \
  30. sched-entry S 02 20000 \
  31. sched-entry S 04 52000 \
  32. flags 2
  33. ;;
  34. 1b)
  35. BASE_TIME=$(./plget)
  36. BASE_TIME=$(($BASE_TIME + 30000000000))
  37. tc qdisc replace dev $INTF parent root handle 100 taprio \
  38. num_tc 3 \
  39. map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
  40. queues 1@0 1@1 1@2 \
  41. base-time $BASE_TIME \
  42. sched-entry S 01 80000 \
  43. sched-entry S 02 15000 \
  44. sched-entry S 04 40000 \
  45. flags 2
  46. ;;
  47. 1c)
  48. BASE_TIME=$(./plget)
  49. BASE_TIME=$(($BASE_TIME + 30000000000))
  50. tc qdisc replace dev $INTF parent root handle 100 taprio \
  51. num_tc 3 \
  52. map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
  53. queues 1@0 1@1 1@2 \
  54. cycle-time 95000 \
  55. sched-entry S 01 80000 \
  56. sched-entry S 02 15000 \
  57. sched-entry S 04 40000 \
  58. flags 2
  59. ;;
  60. 1d)
  61. BASE_TIME=$(./plget)
  62. BASE_TIME=$(($BASE_TIME + 10000000))
  63. tc qdisc replace dev $INTF parent root handle 100 taprio \
  64. num_tc 3 \
  65. map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
  66. queues 1@0 1@1 1@2 \
  67. base-time $BASE_TIME \
  68. sched-entry S 01 1000000000 \
  69. sched-entry S 02 1000000000 \
  70. sched-entry S 04 40000 \
  71. flags 2
  72. ;;
  73. 2)
  74. BASE_TIME=$(./plget)
  75. BASE_TIME=$(($BASE_TIME + 30000000))
  76. tc qdisc replace dev $INTF parent root handle 100 taprio \
  77. num_tc 3 \
  78. map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
  79. queues 1@0 1@1 1@2 \
  80. base-time $BASE_TIME \
  81. sched-entry S 01 100000 \
  82. sched-entry S 02 50000 \
  83. sched-entry S 04 50000 \
  84. flags 2
  85. ;;
  86. 3)
  87. BASE_TIME=$(./plget)
  88. BASE_TIME=$(($BASE_TIME + 20000000))
  89. tc qdisc replace dev $INTF parent root handle 100 taprio \
  90. base-time $BASE_TIME \
  91. sched-entry S 01 120000 \
  92. sched-entry S 01 120000 \
  93. sched-entry S 01 120000 \
  94. sched-entry S 01 120000 \
  95. sched-entry S 02 20000 \
  96. sched-entry S 04 120000 \
  97. sched-entry S 04 120000 \
  98. sched-entry S 04 120000 \
  99. sched-entry S 04 120000 \
  100. flags 2
  101. ;;
  102. 4)
  103. BASE_TIME=$(./plget)
  104. BASE_TIME=$(($BASE_TIME + 30000000))
  105. tc qdisc replace dev $INTF parent root handle 100 taprio \
  106. base-time $BASE_TIME \
  107. sched-entry S 01 100000 \
  108. sched-entry S 02 50000 \
  109. sched-entry S 04 50000 \
  110. flags 2
  111. ;;
  112. 5)
  113. BASE_TIME=$(./plget)
  114. BASE_TIME=$(($BASE_TIME + 30000000))
  115. tc qdisc replace dev $INTF parent root handle 100 taprio \
  116. num_tc 3 \
  117. map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
  118. queues 1@0 1@1 2@2 \
  119. base-time $BASE_TIME \
  120. sched-entry S 01 120000 \
  121. sched-entry S 01 120000 \
  122. sched-entry S 01 120000 \
  123. sched-entry S 01 120000 \
  124. sched-entry S 02 20000 \
  125. sched-entry S 04 120000 \
  126. sched-entry S 04 120000 \
  127. sched-entry S 04 120000 \
  128. sched-entry S 04 120000 \
  129. flags 2
  130. ;;
  131. 6)
  132. set -e
  133. set -x
  134. BASE_TIME=$(./plget)
  135. BASE_TIME=$(($BASE_TIME + 20000000))
  136. tc qdisc replace dev $INTF parent root handle 100 taprio \
  137. num_tc 3 \
  138. map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
  139. queues 1@0 1@1 2@2 \
  140. base-time $BASE_TIME \
  141. sched-entry S 01 100000 \
  142. sched-entry S 02 50000 \
  143. sched-entry S 04 50000 \
  144. flags 2
  145.  
  146. ./plget -t ptpl2 -i $INTF -m pkt-gen -n 100000 -a $DADDR -f hwts -p 2 \
  147. -l 512 --pps=1000&
  148. ./plget -t ptpl2 -i $INTF -m pkt-gen -n 100000 -a $DADDR -f hwts -p 0 \
  149. -l 256 --pps=1000&
  150. ./plget -t ptpl2 -i $INTF -m pkt-gen -n 100000 -a $DADDR -f hwts -p 1 \
  151. -l 100 --pps=1000
  152. ;;
  153. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement