mirred.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. [
  2. {
  3. "id": "5124",
  4. "name": "Add mirred mirror to egress action",
  5. "category": [
  6. "actions",
  7. "mirred"
  8. ],
  9. "setup": [
  10. [
  11. "$TC actions flush action mirred",
  12. 0,
  13. 1,
  14. 255
  15. ]
  16. ],
  17. "cmdUnderTest": "$TC actions add action mirred egress mirror index 1 dev lo",
  18. "expExitCode": "0",
  19. "verifyCmd": "$TC actions list action mirred",
  20. "matchPattern": "action order [0-9]*: mirred \\(Egress Mirror to device lo\\).*index 1 ref",
  21. "matchCount": "1",
  22. "teardown": [
  23. "$TC actions flush action mirred"
  24. ]
  25. },
  26. {
  27. "id": "6fb4",
  28. "name": "Add mirred redirect to egress action",
  29. "category": [
  30. "actions",
  31. "mirred"
  32. ],
  33. "setup": [
  34. [
  35. "$TC actions flush action mirred",
  36. 0,
  37. 1,
  38. 255
  39. ]
  40. ],
  41. "cmdUnderTest": "$TC actions add action mirred egress redirect index 2 dev lo action pipe",
  42. "expExitCode": "0",
  43. "verifyCmd": "$TC actions list action mirred",
  44. "matchPattern": "action order [0-9]*: mirred \\(Egress Redirect to device lo\\).*index 2 ref",
  45. "matchCount": "1",
  46. "teardown": [
  47. "$TC actions flush action mirred",
  48. "$TC actions flush action gact"
  49. ]
  50. },
  51. {
  52. "id": "ba38",
  53. "name": "Get mirred actions",
  54. "category": [
  55. "actions",
  56. "mirred"
  57. ],
  58. "setup": [
  59. [
  60. "$TC actions flush action mirred",
  61. 0,
  62. 1,
  63. 255
  64. ],
  65. "$TC actions add action mirred egress mirror index 1 dev lo",
  66. "$TC actions add action mirred egress redirect index 2 dev lo"
  67. ],
  68. "cmdUnderTest": "$TC actions show action mirred",
  69. "expExitCode": "0",
  70. "verifyCmd": "$TC actions list action mirred",
  71. "matchPattern": "[Mirror|Redirect] to device lo",
  72. "matchCount": "2",
  73. "teardown": [
  74. "$TC actions flush action mirred"
  75. ]
  76. },
  77. {
  78. "id": "d7c0",
  79. "name": "Add invalid mirred direction",
  80. "category": [
  81. "actions",
  82. "mirred"
  83. ],
  84. "setup": [
  85. [
  86. "$TC actions flush action mirred",
  87. 0,
  88. 1,
  89. 255
  90. ]
  91. ],
  92. "cmdUnderTest": "$TC actions add action mirred inbound mirror index 20 dev lo",
  93. "expExitCode": "255",
  94. "verifyCmd": "$TC actions list action mirred",
  95. "matchPattern": "action order [0-9]*: mirred \\(.*to device lo\\).*index 20 ref",
  96. "matchCount": "0",
  97. "teardown": [
  98. "$TC actions flush action mirred"
  99. ]
  100. },
  101. {
  102. "id": "e213",
  103. "name": "Add invalid mirred action",
  104. "category": [
  105. "actions",
  106. "mirred"
  107. ],
  108. "setup": [
  109. [
  110. "$TC actions flush action mirred",
  111. 0,
  112. 1,
  113. 255
  114. ]
  115. ],
  116. "cmdUnderTest": "$TC actions add action mirred egress remirror index 20 dev lo",
  117. "expExitCode": "255",
  118. "verifyCmd": "$TC actions list action mirred",
  119. "matchPattern": "action order [0-9]*: mirred \\(Egress.*to device lo\\).*index 20 ref",
  120. "matchCount": "0",
  121. "teardown": [
  122. "$TC actions flush action mirred"
  123. ]
  124. },
  125. {
  126. "id": "2d89",
  127. "name": "Add mirred action with invalid device",
  128. "category": [
  129. "actions",
  130. "mirred"
  131. ],
  132. "setup": [
  133. [
  134. "$TC actions flush action mirred",
  135. 0,
  136. 1,
  137. 255
  138. ]
  139. ],
  140. "cmdUnderTest": "$TC actions add action mirred egress mirror index 20 dev eltoh",
  141. "expExitCode": "255",
  142. "verifyCmd": "$TC actions list action mirred",
  143. "matchPattern": "action order [0-9]*: mirred \\(.*to device eltoh\\).*index 20 ref",
  144. "matchCount": "0",
  145. "teardown": [
  146. "$TC actions flush action mirred"
  147. ]
  148. },
  149. {
  150. "id": "300b",
  151. "name": "Add mirred action with duplicate index",
  152. "category": [
  153. "actions",
  154. "mirred"
  155. ],
  156. "setup": [
  157. [
  158. "$TC actions flush action mirred",
  159. 0,
  160. 1,
  161. 255
  162. ],
  163. "$TC actions add action mirred egress redirect index 15 dev lo"
  164. ],
  165. "cmdUnderTest": "$TC actions add action mirred egress mirror index 15 dev lo",
  166. "expExitCode": "255",
  167. "verifyCmd": "$TC actions list action mirred",
  168. "matchPattern": "action order [0-9]*: mirred \\(.*to device lo\\).*index 15 ref",
  169. "matchCount": "1",
  170. "teardown": [
  171. "$TC actions flush action mirred"
  172. ]
  173. },
  174. {
  175. "id": "8917",
  176. "name": "Add mirred mirror action with control pass",
  177. "category": [
  178. "actions",
  179. "mirred"
  180. ],
  181. "setup": [
  182. [
  183. "$TC actions flush action mirred",
  184. 0,
  185. 1,
  186. 255
  187. ]
  188. ],
  189. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo pass index 1",
  190. "expExitCode": "0",
  191. "verifyCmd": "$TC actions get action mirred index 1",
  192. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) pass.*index 1 ref",
  193. "matchCount": "1",
  194. "teardown": [
  195. "$TC actions flush action mirred"
  196. ]
  197. },
  198. {
  199. "id": "1054",
  200. "name": "Add mirred mirror action with control pipe",
  201. "category": [
  202. "actions",
  203. "mirred"
  204. ],
  205. "setup": [
  206. [
  207. "$TC actions flush action mirred",
  208. 0,
  209. 1,
  210. 255
  211. ]
  212. ],
  213. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo pipe index 15",
  214. "expExitCode": "0",
  215. "verifyCmd": "$TC actions get action mirred index 15",
  216. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) pipe.*index 15 ref",
  217. "matchCount": "1",
  218. "teardown": [
  219. "$TC actions flush action mirred"
  220. ]
  221. },
  222. {
  223. "id": "9887",
  224. "name": "Add mirred mirror action with control continue",
  225. "category": [
  226. "actions",
  227. "mirred"
  228. ],
  229. "setup": [
  230. [
  231. "$TC actions flush action mirred",
  232. 0,
  233. 1,
  234. 255
  235. ]
  236. ],
  237. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo continue index 15",
  238. "expExitCode": "0",
  239. "verifyCmd": "$TC actions get action mirred index 15",
  240. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) continue.*index 15 ref",
  241. "matchCount": "1",
  242. "teardown": [
  243. "$TC actions flush action mirred"
  244. ]
  245. },
  246. {
  247. "id": "e4aa",
  248. "name": "Add mirred mirror action with control reclassify",
  249. "category": [
  250. "actions",
  251. "mirred"
  252. ],
  253. "setup": [
  254. [
  255. "$TC actions flush action mirred",
  256. 0,
  257. 1,
  258. 255
  259. ]
  260. ],
  261. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo reclassify index 150",
  262. "expExitCode": "0",
  263. "verifyCmd": "$TC actions get action mirred index 150",
  264. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) reclassify.*index 150 ref",
  265. "matchCount": "1",
  266. "teardown": [
  267. "$TC actions flush action mirred"
  268. ]
  269. },
  270. {
  271. "id": "ece9",
  272. "name": "Add mirred mirror action with control drop",
  273. "category": [
  274. "actions",
  275. "mirred"
  276. ],
  277. "setup": [
  278. [
  279. "$TC actions flush action mirred",
  280. 0,
  281. 1,
  282. 255
  283. ]
  284. ],
  285. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo drop index 99",
  286. "expExitCode": "0",
  287. "verifyCmd": "$TC actions get action mirred index 99",
  288. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) drop.*index 99 ref",
  289. "matchCount": "1",
  290. "teardown": [
  291. "$TC actions flush action mirred"
  292. ]
  293. },
  294. {
  295. "id": "0031",
  296. "name": "Add mirred mirror action with control jump",
  297. "category": [
  298. "actions",
  299. "mirred"
  300. ],
  301. "setup": [
  302. [
  303. "$TC actions flush action mirred",
  304. 0,
  305. 1,
  306. 255
  307. ]
  308. ],
  309. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo jump 10 index 99",
  310. "expExitCode": "0",
  311. "verifyCmd": "$TC actions get action mirred index 99",
  312. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) jump 10.*index 99 ref",
  313. "matchCount": "1",
  314. "teardown": [
  315. "$TC actions flush action mirred"
  316. ]
  317. },
  318. {
  319. "id": "407c",
  320. "name": "Add mirred mirror action with cookie",
  321. "category": [
  322. "actions",
  323. "mirred"
  324. ],
  325. "setup": [
  326. [
  327. "$TC actions flush action mirred",
  328. 0,
  329. 1,
  330. 255
  331. ]
  332. ],
  333. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo reclassify cookie aa11bb22cc33dd44ee55",
  334. "expExitCode": "0",
  335. "verifyCmd": "$TC actions ls action mirred",
  336. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) reclassify.*cookie aa11bb22cc33dd44ee55",
  337. "matchCount": "1",
  338. "teardown": [
  339. "$TC actions flush action mirred"
  340. ]
  341. },
  342. {
  343. "id": "8b69",
  344. "name": "Add mirred mirror action with index at 32-bit maximum",
  345. "category": [
  346. "actions",
  347. "mirred"
  348. ],
  349. "setup": [
  350. [
  351. "$TC actions flush action mirred",
  352. 0,
  353. 1,
  354. 255
  355. ]
  356. ],
  357. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo pipe index 4294967295",
  358. "expExitCode": "0",
  359. "verifyCmd": "$TC actions get action mirred index 4294967295",
  360. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) pipe.*index 4294967295",
  361. "matchCount": "1",
  362. "teardown": [
  363. "$TC actions flush action mirred"
  364. ]
  365. },
  366. {
  367. "id": "3f66",
  368. "name": "Add mirred mirror action with index exceeding 32-bit maximum",
  369. "category": [
  370. "actions",
  371. "mirred"
  372. ],
  373. "setup": [
  374. [
  375. "$TC actions flush action mirred",
  376. 0,
  377. 1,
  378. 255
  379. ]
  380. ],
  381. "cmdUnderTest": "$TC actions add action mirred ingress mirror dev lo pipe index 429496729555",
  382. "expExitCode": "255",
  383. "verifyCmd": "$TC actions get action mirred index 429496729555",
  384. "matchPattern": "action order [0-9]*: mirred \\(Ingress Mirror to device lo\\) pipe.*index 429496729555",
  385. "matchCount": "0",
  386. "teardown": []
  387. },
  388. {
  389. "id": "a70e",
  390. "name": "Delete mirred mirror action",
  391. "category": [
  392. "actions",
  393. "mirred"
  394. ],
  395. "setup": [
  396. [
  397. "$TC actions flush action mirred",
  398. 0,
  399. 1,
  400. 255
  401. ],
  402. "$TC actions add action mirred egress mirror index 5 dev lo"
  403. ],
  404. "cmdUnderTest": "$TC actions del action mirred index 5",
  405. "expExitCode": "0",
  406. "verifyCmd": "$TC actions list action mirred",
  407. "matchPattern": "action order [0-9]*: mirred \\(Egress Mirror to device lo\\).*index 5 ref",
  408. "matchCount": "0",
  409. "teardown": [
  410. "$TC actions flush action mirred"
  411. ]
  412. },
  413. {
  414. "id": "3fb3",
  415. "name": "Delete mirred redirect action",
  416. "category": [
  417. "actions",
  418. "mirred"
  419. ],
  420. "setup": [
  421. [
  422. "$TC actions flush action mirred",
  423. 0,
  424. 1,
  425. 255
  426. ],
  427. "$TC actions add action mirred egress redirect index 5 dev lo"
  428. ],
  429. "cmdUnderTest": "$TC actions del action mirred index 5",
  430. "expExitCode": "0",
  431. "verifyCmd": "$TC actions list action mirred",
  432. "matchPattern": "action order [0-9]*: mirred \\(Egress Redirect to device lo\\).*index 5 ref",
  433. "matchCount": "0",
  434. "teardown": [
  435. "$TC actions flush action mirred"
  436. ]
  437. }
  438. ]