From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35B7E43016; Wed, 9 Aug 2023 09:41:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A503C43257; Wed, 9 Aug 2023 09:41:45 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2060.outbound.protection.outlook.com [40.107.92.60]) by mails.dpdk.org (Postfix) with ESMTP id AFDA74328A for ; Wed, 9 Aug 2023 09:41:44 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jwvai4nmo8N9xiwmzB7mLahMmdURd77PQo3VOADwqrJYYFDtQkoJ8/4sBNP+IGfhPFgnDenb6Rj6TZD415pBY/O8iZ5nrEe9Ws/wsS0+zIq69uwOMpGwS8wZ47qEntzcEQ6fa6yegEsiMCIhFzPxAnWlDWp/FG+7Cq2lszoWGv7K0TQcOFLfcLeIkXCrjkFK2Ew7a3wnnSTel1GFYnkZhnWO8RbwZ0nI3tOuBbad6CxPBvirNXrBOhHkChOgrx5vIw/wIZa6D6Qx7g5T1ulpKgHdmaQTyaUoB8LgZ8Wr8GH1UVM1veWLVrUymXoCKAwui9tXCjNILXxOpzfP5swxYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lgB6HxHi+wEQ0sh5hSSmSzcQpEEl4lqgGzleBKzrqLs=; b=U+ctiq+SRmUPFA5zWRNQ6lchCSSH/ktgPe4xkS1ek+2qBWM9PAzqiSThENQqbxRYVgJ52xIBAYBP/4qZcVUleRq3oKuXRFo71Ko5buG9KTjbgS/3O2YC+6DgfAYDMMnTOSCTAxssaj1y32qbPlA78785N4/5JGGpEsm3QWbE/6JszVrHpQiyuYNYvc+RPYI8qSmRDkE8iN1B52WRPRaMH+x+Bn8Fb6bFIg9wC4JvtYYNAbsa1Mf8IXjucEh9Iiaamo8kyaeso8fNHc1DZRIbxKyJKJdlY0yyU9L10bflmdaRfwZvH644sCGxvRUvggCnxfPSMtjitn0rp4Q7myRm4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lgB6HxHi+wEQ0sh5hSSmSzcQpEEl4lqgGzleBKzrqLs=; b=PHcBK4CpxjBKXu2tcb2mv+efU5CASOT9o0w1yy/4QBKEIc8YLKOeIKy2cgUIor0OVUOs0MoXgsIqW9d5x97WTgNPfze72inxfWYmCTkgux2zTl2mbAWoO6o1KNoBRIHgk3dW4kZonTGRNKxyQFNqNd5oYKeOyPVLkGBrN/ynJK2fuziWm9ncoVANdBWNr4HJ7Xbe+oe/wZyYi9s1udCPHiWwzksf1pChyuJw6J8StBmzO5bGDEG5ow8CWgzsBQhTlcBPVOFvNTq/Piuq0zrwMvMtmiMS4kzMQYWKfUJvAERWO+FoIkKKTlWY2uB7YuzG1WKRbgciLqPeeezueQgWQQ== Received: from SJ0PR03CA0129.namprd03.prod.outlook.com (2603:10b6:a03:33c::14) by PH7PR12MB6954.namprd12.prod.outlook.com (2603:10b6:510:1b7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Wed, 9 Aug 2023 07:41:43 +0000 Received: from MWH0EPF000989EA.namprd02.prod.outlook.com (2603:10b6:a03:33c:cafe::60) by SJ0PR03CA0129.outlook.office365.com (2603:10b6:a03:33c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Wed, 9 Aug 2023 07:41:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by MWH0EPF000989EA.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 9 Aug 2023 07:41:42 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Wed, 9 Aug 2023 00:41:27 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Wed, 9 Aug 2023 00:41:24 -0700 From: Haifei Luo To: , , , , Aman Singh , Yuying Zhang CC: , , , , Subject: [PATCH 4/5] app/testpmd: support for NSH flow item Date: Wed, 9 Aug 2023 10:40:45 +0300 Message-ID: <20230809074046.121807-5-haifeil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230809074046.121807-1-haifeil@nvidia.com> References: <20230809074046.121807-1-haifeil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EA:EE_|PH7PR12MB6954:EE_ X-MS-Office365-Filtering-Correlation-Id: a0bd758c-e435-4a88-2062-08db98ac1333 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PhHKjGaQZ3a0Pc/kWTvBBgwpPZJp7TmXzcqmw+ke3nQIBKtuwU9IEKMa/8EB2EpG7BWlXGbKMuS0yyZEPq+8aRjz6hSOeynfAzJt2Ma2QweS5YihceelwwcSJBwsjSmQADjxeIvwf6HTpm9rb5bup0n2qVnDplILLRe8qK+5DUT00YfaKV6nGzd7HsUXWIpYDva9IQEyaVbIm+HuiG1rNO06TZTUo0AB31rd02us/XbD06AsywtpXtR8faZGYiMerLwYCVjZef3UV7C+XdZQ5dCCmu40ayVYTTfoZFogNhszHAwclLv5huKFMhNbyyvYiH0yGjJ8jBsZEB+sZeakSKI2m1ApLNkGn6kznBte7nUfGzEcJsx9ql/e3Ru3FqH47qKChwcy3hbJG1dZdq3BQ4yCC5qyIeCPWPzZL9hHdo64EXzh+2Dcr16N/XbW+xot/XJ9WnxsFRMA4V7vBkVlYslcZfUAGY+XIs62wE0BxAye76dEIY01py5un38rkJwFZIrTPhOoM41qGHaTmrpJ2aD+svaPIOV/FOe/oW2Xo3c7XIWk2/wU5YYkU3ymwin4cHs6cFTnTT6mNB+tbW61fF8wISz64cAMVyyFZ5RTa9BVWfw1pOcSTJptKhUf10POtMMgj7ckphbsjQ2Zl1qY53Sh6v0aX6c3XYf1wfjQsWFvNfWz4145Rb+G7ifCQz0KA4iPwXsz6LYGYqiFmLxruq4Ze8ClEbUZhYHuvjxaqDWx/AbSIIVTQreV9o+7DzRc X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(396003)(376002)(39860400002)(136003)(451199021)(82310400008)(1800799006)(186006)(36840700001)(40470700004)(46966006)(8676002)(8936002)(5660300002)(4326008)(316002)(41300700001)(426003)(47076005)(83380400001)(40480700001)(55016003)(86362001)(40460700003)(36860700001)(2906002)(6666004)(7696005)(2616005)(336012)(16526019)(107886003)(26005)(1076003)(36756003)(6286002)(70586007)(70206006)(356005)(7636003)(82740400003)(478600001)(54906003)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2023 07:41:42.6034 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0bd758c-e435-4a88-2062-08db98ac1333 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989EA.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6954 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add support for item NSH. The CLI is: nsh Example: flow create 0 transfer group 1 pattern eth / ipv6 / udp dst is 4790 / vxlan-gpe / nsh / eth / ipv4 / tcp / end actions port_id id 1 / end Signed-off-by: Haifei Luo --- app/test-pmd/cmdline_flow.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index d25f941259..bf93d649e1 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -525,6 +525,7 @@ enum index { ITEM_IB_BTH_PSN, ITEM_IPV6_PUSH_REMOVE_EXT, ITEM_IPV6_PUSH_REMOVE_EXT_TYPE, + ITEM_NSH, /* Validate/create actions. */ ACTIONS, @@ -1562,6 +1563,7 @@ static const enum index next_item[] = { ITEM_AGGR_AFFINITY, ITEM_TX_QUEUE, ITEM_IB_BTH, + ITEM_NSH, END_SET, ZERO, }; @@ -2081,6 +2083,11 @@ static const enum index item_ib_bth[] = { ZERO, }; +static const enum index item_nsh[] = { + ITEM_NEXT, + ZERO, +}; + static const enum index next_action[] = { ACTION_END, ACTION_VOID, @@ -5837,6 +5844,15 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ib_bth, hdr.psn)), }, + [ITEM_NSH] = { + .name = "nsh", + .help = "match NSH header", + .priv = PRIV_ITEM(NSH, + sizeof(struct rte_flow_item_nsh)), + .next = NEXT(item_nsh), + .call = parse_vc, + }, + /* Validate/create actions. */ [ACTIONS] = { .name = "actions", -- 2.34.1