[
    {
        "id": "e41d",
        "name": "Add 1M flower filters with 10 parallel tc instances",
        "category": [
            "filter",
            "flower",
            "concurrency"
        ],
        "setup": [
            "/bin/mkdir $BATCH_DIR",
            "$TC qdisc add dev $DEV2 ingress",
            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 add"
        ],
        "cmdUnderTest": "bash -c \"find $BATCH_DIR/add* -print | xargs -n 1 -P 10 $TC -b\"",
        "expExitCode": "0",
        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
        "matchCount": "1000000",
        "teardown": [
            "$TC qdisc del dev $DEV2 ingress",
            "/bin/rm -rf $BATCH_DIR"
        ]
    },
    {
        "id": "6f52",
        "name": "Delete 1M flower filters with 10 parallel tc instances",
        "category": [
            "filter",
            "flower",
            "concurrency"
        ],
        "setup": [
            "/bin/mkdir $BATCH_DIR",
            "$TC qdisc add dev $DEV2 ingress",
            "./tdc_multibatch.py $DEV2 $BATCH_DIR 1000000 1 add",
            "$TC -b $BATCH_DIR/add_0",
            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 del"
        ],
        "cmdUnderTest": "bash -c \"find $BATCH_DIR/del* -print | xargs -n 1 -P 10 $TC -b\"",
        "expExitCode": "0",
        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
        "matchCount": "0",
        "teardown": [
            "$TC qdisc del dev $DEV2 ingress",
            "/bin/rm -rf $BATCH_DIR"
        ]
    },
    {
        "id": "c9da",
        "name": "Replace 1M flower filters with 10 parallel tc instances",
        "category": [
            "filter",
            "flower",
            "concurrency"
        ],
        "setup": [
            "/bin/mkdir $BATCH_DIR",
            "$TC qdisc add dev $DEV2 ingress",
            "./tdc_multibatch.py $DEV2 $BATCH_DIR 1000000 1 add",
            "$TC -b $BATCH_DIR/add_0",
            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 10 replace"
        ],
        "cmdUnderTest": "bash -c \"find $BATCH_DIR/replace* -print | xargs -n 1 -P 10 $TC -b\"",
        "expExitCode": "0",
        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
        "matchCount": "1000000",
        "teardown": [
            "$TC qdisc del dev $DEV2 ingress",
            "/bin/rm -rf $BATCH_DIR"
        ]
    },
    {
        "id": "14be",
        "name": "Concurrently replace same range of 100k flower filters from 10 tc instances",
        "category": [
            "filter",
            "flower",
            "concurrency"
        ],
        "setup": [
            "/bin/mkdir $BATCH_DIR",
            "$TC qdisc add dev $DEV2 ingress",
            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 1 add",
            "$TC -b $BATCH_DIR/add_0",
            "./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 replace"
        ],
        "cmdUnderTest": "bash -c \"find $BATCH_DIR/replace* -print | xargs -n 1 -P 10 $TC -b\"",
        "expExitCode": "0",
        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
        "matchCount": "100000",
        "teardown": [
            "$TC qdisc del dev $DEV2 ingress",
            "/bin/rm -rf $BATCH_DIR"
        ]
    },
    {
        "id": "0c44",
        "name": "Concurrently delete same range of 100k flower filters from 10 tc instances",
        "category": [
            "filter",
            "flower",
            "concurrency"
        ],
        "setup": [
            "/bin/mkdir $BATCH_DIR",
            "$TC qdisc add dev $DEV2 ingress",
            "./tdc_multibatch.py $DEV2 $BATCH_DIR 100000 1 add",
            "$TC -b $BATCH_DIR/add_0",
            "./tdc_multibatch.py -d $DEV2 $BATCH_DIR 100000 10 del"
        ],
        "cmdUnderTest": "bash -c \"find $BATCH_DIR/del* -print | xargs -n 1 -P 10 $TC -f -b\"",
        "expExitCode": "123",
        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
        "matchCount": "0",
        "teardown": [
            "$TC qdisc del dev $DEV2 ingress",
	    "/bin/rm -rf $BATCH_DIR"
        ]
    },
    {
        "id": "ab62",
        "name": "Add and delete from same tp with 10 tc instances",
        "category": [
            "filter",
            "flower",
            "concurrency"
        ],
        "setup": [
            "/bin/mkdir $BATCH_DIR",
            "$TC qdisc add dev $DEV2 ingress",
            "./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 5 add",
            "bash -c \"find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b\"",
            "./tdc_multibatch.py -x par_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 add",
            "./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del"
        ],
        "cmdUnderTest": "bash -c \"find $BATCH_DIR/par_* -print | xargs -n 1 -P 10 $TC -b\"",
        "expExitCode": "0",
        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
        "matchCount": "500000",
        "teardown": [
            "$TC qdisc del dev $DEV2 ingress",
            "/bin/rm -rf $BATCH_DIR"
        ]
    },
    {
        "id": "6e8f",
        "name": "Replace and delete from same tp with 10 tc instances",
        "category": [
            "filter",
            "flower",
            "concurrency"
        ],
        "setup": [
            "/bin/mkdir $BATCH_DIR",
            "$TC qdisc add dev $DEV2 ingress",
            "./tdc_multibatch.py -x init_ $DEV2 $BATCH_DIR 100000 10 add",
            "bash -c \"find $BATCH_DIR/init_* -print | xargs -n 1 -P 5 $TC -b\"",
            "./tdc_multibatch.py -x par_ -a 500001 -m 5 $DEV2 $BATCH_DIR 100000 5 replace",
            "./tdc_multibatch.py -x par_ $DEV2 $BATCH_DIR 100000 5 del"
        ],
        "cmdUnderTest": "bash -c \"find $BATCH_DIR/par_* -print | xargs -n 1 -P 10 $TC -b\"",
        "expExitCode": "0",
        "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
        "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
        "matchCount": "500000",
        "teardown": [
            "$TC qdisc del dev $DEV2 ingress",
            "/bin/rm -rf $BATCH_DIR"
        ]
    }
]