From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 935F8C0650E for ; Mon, 1 Jul 2019 12:31:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5970D20881 for ; Mon, 1 Jul 2019 12:31:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="tmhXAFRx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728940AbfGAMbU (ORCPT ); Mon, 1 Jul 2019 08:31:20 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:39829 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728862AbfGAMbS (ORCPT ); Mon, 1 Jul 2019 08:31:18 -0400 Received: by mail-ed1-f68.google.com with SMTP id m10so23226878edv.6 for ; Mon, 01 Jul 2019 05:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pd+A0gEBpVe7+s16CVaCoJ4HBUo3/KJhGjoXv8G0PJ4=; b=tmhXAFRxoyAx3mQ9x4QqedSk7AYgkwrPrVkisX3E//1F06Mg2wWjSzupbp7JC0151N 6BJ3fO5BKGBII28DjZ/alAsL1mmvNU+/iel7jJkTZ96TnBl0TrB2SQm43h4ev6xbhfiK 6cKUeOv4uq2IUFl13wHHuerf3aRYS3JwPTyy6gmlYW/FxFavIyxdAER0Xn3yYB8TjpOK mFki2sPs5mU31gb+ffV4xBrFYKeS38DLGPc5RCFLc3qXeUQhvCpxEjP2E14K0UZcFUrf UvhVpIVAH73vI8ZkD1SFi7+Ja2Y4Em7rxdpTwNbq8lZ0hm+OIfuELaaXACXidkQQ2QA0 GjgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pd+A0gEBpVe7+s16CVaCoJ4HBUo3/KJhGjoXv8G0PJ4=; b=BkrGbQFTeD3tejl6U3wUm9RWINfyoB/aZqWoylqKZJhAv+eDO7s5ijWp3LsMQo6ISP cReO4BsfD3fYvQGDljHhHLfuKpleGtSVRZyDek10iLrQ0opFklUcQPhsPDyEOQ4hQ1BZ 0XeFF9oEoRo9oW6IsWpWRZqINEUcabAV4gI3b2AjNm8EKyS81GswaKo9z//L97uymhqa N0K71mNaOmLBye0zb0akn9y3FmKH64aStmgtUsPWywtlI+4ticWmEwV3bpOGHcq1UVDe 0PoSAhpND0NrWkfsQCBNs3Q72xydTswP/1KNjJgi1oPzJeJLd12iOY7IxMq8/9fPxp6J XL5g== X-Gm-Message-State: APjAAAVbIsvnXEbAiHNRNChyb/8J55Up4gQ3LLwqLFFTXw37APkjFe6r FJ/LqyFkzOzLxWmf1LsV/ZvtOwlKm28= X-Google-Smtp-Source: APXvYqypW8LPTX8ElDG2aYxInkNoTVXczqYBKPksxNXT2LX2J4s6rtQzyzuDT/XuCZXot5qK4V9bJQ== X-Received: by 2002:a17:906:94ce:: with SMTP id d14mr23277825ejy.251.1561984275200; Mon, 01 Jul 2019 05:31:15 -0700 (PDT) Received: from jhurley-Precision-Tower-3420.netronome.com ([80.76.204.157]) by smtp.gmail.com with ESMTPSA id a3sm2099204ejn.64.2019.07.01.05.31.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Jul 2019 05:31:14 -0700 (PDT) From: John Hurley To: netdev@vger.kernel.org Cc: davem@davemloft.net, jiri@mellanox.com, xiyou.wangcong@gmail.com, dsahern@gmail.com, simon.horman@netronome.com, jakub.kicinski@netronome.com, oss-drivers@netronome.com, John Hurley Subject: [PATCH net-next v4 5/5] selftests: tc-tests: actions: add MPLS tests Date: Mon, 1 Jul 2019 13:30:57 +0100 Message-Id: <1561984257-9798-6-git-send-email-john.hurley@netronome.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561984257-9798-1-git-send-email-john.hurley@netronome.com> References: <1561984257-9798-1-git-send-email-john.hurley@netronome.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- .../tc-testing/tc-tests/actions/mpls.json | 812 +++++++++++++++++++++ 1 file changed, 812 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/mpls.json diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/mpls.json b/tools/testing/selftests/tc-testing/tc-tests/actions/mpls.json new file mode 100644 index 0000000..9708de9 --- /dev/null +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/mpls.json @@ -0,0 +1,812 @@ +[ + { + "id": "a933", + "name": "Add MPLS dec_ttl action with pipe opcode", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl pipe index 8", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*pipe.*index 8 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "08d1", + "name": "Add mpls dec_ttl action with pass opcode", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl pass index 8", + "expExitCode": "0", + "verifyCmd": "$TC actions get action mpls index 8", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*pass.*index 8 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "d786", + "name": "Add mpls dec_ttl action with drop opcode", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl drop index 8", + "expExitCode": "0", + "verifyCmd": "$TC actions get action mpls index 8", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*drop.*index 8 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "f334", + "name": "Add mpls dec_ttl action with reclassify opcode", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl reclassify index 8", + "expExitCode": "0", + "verifyCmd": "$TC actions get action mpls index 8", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*reclassify.*index 8 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "29bd", + "name": "Add mpls dec_ttl action with continue opcode", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl continue index 8", + "expExitCode": "0", + "verifyCmd": "$TC actions get action mpls index 8", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*continue.*index 8 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "48df", + "name": "Add mpls dec_ttl action with jump opcode", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl jump 10 index 8", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*jump 10.*index 8 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "62eb", + "name": "Add mpls dec_ttl action with trap opcode", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl trap index 8", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl trap.*index 8 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "9118", + "name": "Add mpls dec_ttl action with invalid opcode", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl foo index 8", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*foo.*index 8 ref", + "matchCount": "0", + "teardown": [] + }, + { + "id": "6ce1", + "name": "Add mpls dec_ttl action with label (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl label 20", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*label.*20.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "352f", + "name": "Add mpls dec_ttl action with tc (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl tc 3", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*tc.*3.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "fa1c", + "name": "Add mpls dec_ttl action with ttl (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl ttl 20", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*ttl.*20.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "6b79", + "name": "Add mpls dec_ttl action with bos (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls dec_ttl bos 1", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*bos.*1.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "d4c4", + "name": "Add mpls pop action with ip proto", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*pop.*protocol.*ip.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "92fe", + "name": "Add mpls pop action with mpls proto", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls pop protocol mpls_mc", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*pop.*protocol.*mpls_mc.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "7e23", + "name": "Add mpls pop action with no protocol (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls pop", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*pop.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "6182", + "name": "Add mpls pop action with label (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 label 20", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*pop.*label.*20.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "6475", + "name": "Add mpls pop action with tc (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 tc 3", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*pop.*tc.*3.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "067b", + "name": "Add mpls pop action with ttl (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 ttl 20", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*pop.*ttl.*20.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "7316", + "name": "Add mpls pop action with bos (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 bos 1", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*pop.*bos.*1.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "38cc", + "name": "Add mpls push action with label", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push label 20", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*[0-9]+.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "c281", + "name": "Add mpls push action with mpls_mc protocol", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push protocol mpls_mc label 20", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_mc.*label.*20.*ttl.*[0-9]+.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "5db4", + "name": "Add mpls push action with label, tc and ttl", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push label 20 tc 3 ttl 128", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*tc.*3.*ttl.*128.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "16eb", + "name": "Add mpls push action with label and bos", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push label 20 bos 1", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*bos.*1.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "d69d", + "name": "Add mpls push action with no label (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "e8e4", + "name": "Add mpls push action with ipv4 protocol (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push protocol ipv4 label 20", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*[0-9]+.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "ecd0", + "name": "Add mpls push action with out of range label (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push label 1048576", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*1048576.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "d303", + "name": "Add mpls push action with out of range tc (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push label 20 tc 8", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*tc.*8.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "fd6e", + "name": "Add mpls push action with ttl of 0 (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls push label 20 ttl 0", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*0.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "19e9", + "name": "Add mpls mod action with mpls label", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls mod label 20", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*modify.*label.*20.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "04b5", + "name": "Add mpls mod action with mpls tc", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls mod tc 3", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*modify.*tc.*3.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "6ed5", + "name": "Add mpls mod action with mpls label", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls mod ttl 128", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*128.*pipe", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "db7c", + "name": "Add mpls mod action with protocol (invalid)", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ] + ], + "cmdUnderTest": "$TC actions add action mpls mod protocol ipv4", + "expExitCode": "255", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*modify.*protocol.*ip.*pipe", + "matchCount": "0", + "teardown": [] + }, + { + "id": "b070", + "name": "Replace existing mpls push action with new ID", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ], + "$TC actions add action mpls push label 20 pipe index 12" + ], + "cmdUnderTest": "$TC actions replace action mpls push label 30 pipe index 12", + "expExitCode": "0", + "verifyCmd": "$TC actions get action mpls index 12", + "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*30.*pipe.*index 12 ref", + "matchCount": "1", + "teardown": [ + "$TC actions flush action mpls" + ] + }, + { + "id": "6cce", + "name": "Delete mpls pop action", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ], + "$TC actions add action mpls pop protocol ipv4 index 44" + ], + "cmdUnderTest": "$TC actions del action mpls index 44", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*pop.*index 44 ref", + "matchCount": "0", + "teardown": [] + }, + { + "id": "d138", + "name": "Flush mpls actions", + "category": [ + "actions", + "mpls" + ], + "setup": [ + [ + "$TC actions flush action mpls", + 0, + 1, + 255 + ], + "$TC actions add action mpls push label 10 index 10", + "$TC actions add action mpls push label 20 index 20", + "$TC actions add action mpls push label 30 index 30", + "$TC actions add action mpls push label 40 index 40" + ], + "cmdUnderTest": "$TC actions flush action mpls", + "expExitCode": "0", + "verifyCmd": "$TC actions list action mpls", + "matchPattern": "action order [0-9]+: mpls.*push.*", + "matchCount": "0", + "teardown": [] + } +] -- 2.7.4