From patchwork Wed Jul 10 10:43:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaoyu Min X-Patchwork-Id: 56295 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 43B952BD5; Wed, 10 Jul 2019 12:43:35 +0200 (CEST) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id 519814C8E for ; Wed, 10 Jul 2019 12:43:33 +0200 (CEST) From: Xiaoyu Min To: ferruh.yigit@intel.com, Adrien Mazarguil , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Cc: dev@dpdk.org Date: Wed, 10 Jul 2019 18:43:22 +0800 Message-Id: <3465ae15728bea605c9fb76c630a093438562f18.1562754908.git.jackmin@mellanox.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: <20190624153736.127968-1-jackmin@mellanox.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 2/3] app/testpmd: support MPLS's TC and S bits X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Open the MPLS's TC and S bits of rte_flow_item_mpls in command line. Signed-off-by: Xiaoyu Min --- app/test-pmd/cmdline_flow.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 46f3da07eb..f48b202e58 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -152,6 +152,8 @@ enum index { ITEM_NVGRE_TNI, ITEM_MPLS, ITEM_MPLS_LABEL, + ITEM_MPLS_TC, + ITEM_MPLS_S, ITEM_GRE, ITEM_GRE_PROTO, ITEM_GRE_C_RSVD0_VER, @@ -800,6 +802,8 @@ static const enum index item_nvgre[] = { static const enum index item_mpls[] = { ITEM_MPLS_LABEL, + ITEM_MPLS_TC, + ITEM_MPLS_S, ITEM_NEXT, ZERO, }; @@ -1997,6 +2001,22 @@ static const struct token token_list[] = { label_tc_s, "\xff\xff\xf0")), }, + [ITEM_MPLS_TC] = { + .name = "tc", + .help = "MPLS Traffic Class", + .next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls, + label_tc_s, + "\x00\x00\x0e")), + }, + [ITEM_MPLS_S] = { + .name = "s", + .help = "MPLS Bottom-of-Stack", + .next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls, + label_tc_s, + "\x00\x00\x01")), + }, [ITEM_GRE] = { .name = "gre", .help = "match GRE header",