1[
2    {
3        "id": "e41d",
4        "name": "Add 1M flower filters with 10 parallel tc instances",
5        "category": [
6            "filter",
7            "flower",
8            "concurrency"
9        ],
10        "setup": [
11            "/bin/mkdir $BATCH_DIR",
12            "$TC qdisc add dev $DEV2 ingress",
13            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 add"
14        ],
15        "cmdUnderTest": "bash -c \"find $BATCH_DIR/add* -print | xargs -n 1 -P 10 $TC -b\"",
16        "expExitCode": "0",
17        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
18        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
19        "matchCount": "1000000",
20        "teardown": [
21            "$TC qdisc del dev $DEV2 ingress",
22            "/bin/rm -rf $BATCH_DIR"
23        ]
24    },
25    {
26        "id": "6f52",
27        "name": "Delete 1M flower filters with 10 parallel tc instances",
28        "category": [
29            "filter",
30            "flower",
31            "concurrency"
32        ],
33        "setup": [
34            "/bin/mkdir $BATCH_DIR",
35            "$TC qdisc add dev $DEV2 ingress",
36            "./tdc_multibatch.py $DEV2 $BATCH_DIR 1000000 1 add",
37            "$TC -b $BATCH_DIR/add_0",
38            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 del"
39        ],
40        "cmdUnderTest": "bash -c \"find $BATCH_DIR/del* -print | xargs -n 1 -P 10 $TC -b\"",
41        "expExitCode": "0",
42        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
43        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
44        "matchCount": "0",
45        "teardown": [
46            "$TC qdisc del dev $DEV2 ingress",
47            "/bin/rm -rf $BATCH_DIR"
48        ]
49    },
50    {
51        "id": "c9da",
52        "name": "Replace 1M flower filters with 10 parallel tc instances",
53        "category": [
54            "filter",
55            "flower",
56            "concurrency"
57        ],
58        "setup": [
59            "/bin/mkdir $BATCH_DIR",
60            "$TC qdisc add dev $DEV2 ingress",
61            "./tdc_multibatch.py $DEV2 $BATCH_DIR 1000000 1 add",
62            "$TC -b $BATCH_DIR/add_0",
63            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 replace"
64        ],
65        "cmdUnderTest": "bash -c \"find $BATCH_DIR/replace* -print | xargs -n 1 -P 10 $TC -b\"",
66        "expExitCode": "0",
67        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
68        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
69        "matchCount": "1000000",
70        "teardown": [
71            "$TC qdisc del dev $DEV2 ingress",
72            "/bin/rm -rf $BATCH_DIR"
73        ]
74    },
75    {
76        "id": "14be",
77        "name": "Concurrently replace same range of 100k flower filters from 10 tc instances",
78        "category": [
79            "filter",
80            "flower",
81            "concurrency"
82        ],
83        "setup": [
84            "/bin/mkdir $BATCH_DIR",
85            "$TC qdisc add dev $DEV2 ingress",
86            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 1 add",
87            "$TC -b $BATCH_DIR/add_0",
88            "./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 replace"
89        ],
90        "cmdUnderTest": "bash -c \"find $BATCH_DIR/replace* -print | xargs -n 1 -P 10 $TC -b\"",
91        "expExitCode": "0",
92        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
93        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
94        "matchCount": "100000",
95        "teardown": [
96            "$TC qdisc del dev $DEV2 ingress",
97            "/bin/rm -rf $BATCH_DIR"
98        ]
99    },
100    {
101        "id": "0c44",
102        "name": "Concurrently delete same range of 100k flower filters from 10 tc instances",
103        "category": [
104            "filter",
105            "flower",
106            "concurrency"
107        ],
108        "setup": [
109            "/bin/mkdir $BATCH_DIR",
110            "$TC qdisc add dev $DEV2 ingress",
111            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 1 add",
112            "$TC -b $BATCH_DIR/add_0",
113            "./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 del"
114        ],
115        "cmdUnderTest": "bash -c \"find $BATCH_DIR/del* -print | xargs -n 1 -P 10 $TC -f -b\"",
116        "expExitCode": "123",
117        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
118        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
119        "matchCount": "0",
120        "teardown": [
121            "$TC qdisc del dev $DEV2 ingress",
122	    "/bin/rm -rf $BATCH_DIR"
123        ]
124    },
125    {
126        "id": "ab62",
127        "name": "Add and delete from same tp with 10 tc instances",
128        "category": [
129            "filter",
130            "flower",
131            "concurrency"
132        ],
133        "setup": [
134            "/bin/mkdir $BATCH_DIR",
135            "$TC qdisc add dev $DEV2 ingress",
136            "./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 5 add",
137            "bash -c \"find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b\"",
138            "./tdc_multibatch.py -x par_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 add",
139            "./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del"
140        ],
141        "cmdUnderTest": "bash -c \"find $BATCH_DIR/par_* -print | xargs -n 1 -P 10 $TC -b\"",
142        "expExitCode": "0",
143        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
144        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
145        "matchCount": "500000",
146        "teardown": [
147            "$TC qdisc del dev $DEV2 ingress",
148            "/bin/rm -rf $BATCH_DIR"
149        ]
150    },
151    {
152        "id": "6e8f",
153        "name": "Replace and delete from same tp with 10 tc instances",
154        "category": [
155            "filter",
156            "flower",
157            "concurrency"
158        ],
159        "setup": [
160            "/bin/mkdir $BATCH_DIR",
161            "$TC qdisc add dev $DEV2 ingress",
162            "./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 10 add",
163            "bash -c \"find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b\"",
164            "./tdc_multibatch.py -x par_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 replace",
165            "./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del"
166        ],
167        "cmdUnderTest": "bash -c \"find $BATCH_DIR/par_* -print | xargs -n 1 -P 10 $TC -b\"",
168        "expExitCode": "0",
169        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
170        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
171        "matchCount": "500000",
172        "teardown": [
173            "$TC qdisc del dev $DEV2 ingress",
174            "/bin/rm -rf $BATCH_DIR"
175        ]
176    }
177]
178