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=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 022EEC76186 for ; Wed, 17 Jul 2019 12:27:44 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id BF15620880 for ; Wed, 17 Jul 2019 12:27:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF15620880 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A2A371B9D6; Wed, 17 Jul 2019 14:27:26 +0200 (CEST) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id 19B781B9AC for ; Wed, 17 Jul 2019 14:27:25 +0200 (CEST) From: Xiaoyu Min To: ferruh.yigit@intel.com, Adrien Mazarguil , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Cc: dev@dpdk.org Date: Wed, 17 Jul 2019 20:27:09 +0800 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: <20190624153736.127968-1-jackmin@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 3/4] 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 a15a756461..8409e41ea0 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", -- 2.21.0