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 BC37642635; Mon, 25 Sep 2023 10:08:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC2DF40A8A; Mon, 25 Sep 2023 10:08:45 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2074.outbound.protection.outlook.com [40.107.100.74]) by mails.dpdk.org (Postfix) with ESMTP id 3A85140A79 for ; Mon, 25 Sep 2023 10:08:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f/WjhB2IikY6xfd2ZsgSbooqqoV9+bBylfqZWtPdUsu2Xpg0EqNBTSOFqoLko+SrMLXSugWFX3lNm9Ityx6rIWC+cyXy71UVrMJxzq8M7WraxsmwNZjShJVzyeUqs8/OaSHn730UqdgkAD6vuTys4tg/w2jwO49M3dQfV29Z6Ef63cga5qx+Pb5BWBAFP50N/iD5WWPwNv3fg1owdQbp20iobN4bfwimoDxANUl/MlTs5ni+LwI1E4xoSkunTBbugkxHW06elYPWKE6vrjpP7z33Nm5PPs9Wc3b1XZajz5cDDZC0Ef8D9M6Oy6ojEQHToc6iJMhoQ2DjpHxmCWEM8g== 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=2JKTLzy7LXr8r76zG5rFFy9qPguVLZH7g0ieXk7hz7E=; b=eLy8Qe5DtSWIYL8m3UTLWSsiN8gBgD5iZnYQry4OnHRjlZop+PeFRQS9b1SMIG8FXLPNpkR3MwV6DL5A1OyZvuKH3fF0mWrFvVTyS15o8ebJdpc0JaeJ0zPEAXgdKV+6kafl25+EjSl2GFrv5wU1+KtTXxAgIIySkdYW+kczv3H+VMorwUMFDx3vCKy9KfY0VxisJ8kN71Sf3A9QffZSD9FJlkiGH7PjRKqdi8DKBo+GwSYAyRhacnbo94sMzP3a70H0sHIsWoq2TVKL1stycdjbWI/OM4qSZbeQCNLFckgJzegHekJLYo+q3CnZwj+8xYzJ/SMbO3weLGjCNyGoww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org 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=2JKTLzy7LXr8r76zG5rFFy9qPguVLZH7g0ieXk7hz7E=; b=S1N7mziiyjfvJC7lCfAPmo4XtTVmiJ/1cjp940ACcrBl1O/g/+/8fmRpOUDTphe2Xm+9P8FOhifKQxVj5PBSiPQ2UIk/QPs0anGfCekyG2iuE7ah4wiKUeazsU7U+1udkce0AeiW2qsk7+rRn8jHujoM/kB/jEJieysNOhC6in1MEp+R5lXYZFZTC9WLw8zYYSYEfAs6PDEf+KH7bol+nuHVPSIpkavBQJQDyRgM5WWS6PwzqbDGD6RT8+Wz48lZQ8/PGAkx1tiOXrYKaKlCgBQffzvkUyJTSykCbAdm5MaVbm76wuXzpoueeNz9hoQV0ygWkzPkpQelybiM0dglXg== Received: from BYAPR11CA0071.namprd11.prod.outlook.com (2603:10b6:a03:80::48) by PH0PR12MB5677.namprd12.prod.outlook.com (2603:10b6:510:14d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.25; Mon, 25 Sep 2023 08:08:36 +0000 Received: from CO1PEPF000044F3.namprd05.prod.outlook.com (2603:10b6:a03:80:cafe::23) by BYAPR11CA0071.outlook.office365.com (2603:10b6:a03:80::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Mon, 25 Sep 2023 08:08:36 +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 CO1PEPF000044F3.mail.protection.outlook.com (10.167.241.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.14 via Frontend Transport; Mon, 25 Sep 2023 08:08:36 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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.41; Mon, 25 Sep 2023 01:08:21 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 25 Sep 2023 01:08:17 -0700 From: Haifei Luo To: CC: , , , , , Dariusz Sosnowski , Suanming Mou , Aman Singh , Yuying Zhang Subject: [PATCH v3 4/5] app/testpmd: support for NSH flow item Date: Mon, 25 Sep 2023 11:07:45 +0300 Message-ID: <20230925080746.16438-5-haifeil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230925080746.16438-1-haifeil@nvidia.com> References: <20230925020921.4607-1-haifeil@nvidia.com> <20230925080746.16438-1-haifeil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail202.nvidia.com (10.129.68.7) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F3:EE_|PH0PR12MB5677:EE_ X-MS-Office365-Filtering-Correlation-Id: ca8fa98f-6615-4c3e-e152-08dbbd9e9e93 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5YIGbhGIog2Un5HbKGt2O5hrVnrohNFSjIgFeaZVVsyeUmuct9YuyykGBGPg5M+XMSSIY6p7P2ViEWN45kGodHMeGL3x+qCZdlaTKi38Y8RGAlVTGCF+s+Jf20ZeukQLkYmKevYZKPO5hgtd1G7ODYQX9stdYG322BnzPmsPWHvoitrmhOQb6dAFsyE3QsQj1HFyQZhnce94IejPRP+uZJw5M6sD4AjCI3JNmxTykBbosNiOGv197huY04PlsXyyp7zZuFe68FdnPu+SlSwNW7AC1JOP9Ki9v2ZmlIA1HTkCqMbOVcSMJS/+YQZ9fGpkepGJlRxSpjPyiDLlzrqfNpxTbcdCpo416PSUAzecJyORWcUtFOJMQMARIw5UPZLASqoIT0PJbkBfyQhEXGj68yCqhWJ08RzjsmJeFlvYUdtSVu7SS8270AnQKLWArUDWOFpvRrqf+ZVoyzaM6AO84r4YN4HmhYx5sDKSGo1tZva2nj7Qrr7rz3ZK3fEeR1rdrIvgEeeHaD5GDs+/VfkQXtRTfxb0Omc2TQt755OMuQqEg1tWHoxeSRHcBXVGBz+ZX4HN34aXmPaDLRXDBdNSywmPJPuH9kn5sZC47ja5slvk5HRBapvU2D+AtL05wMz23Cq6be5+oW77fZ+6Wm+jdCCbbJ7PNm9f0y0VX9ZdiSiGYu8PVGM4O7HM1PMeRhGgZIuuyCZFCGUG4ZM1dBIwuPw10cskUaR2jmKXmggXOHKKYwVgpmg1ldKvq4ezdDok 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:(13230031)(4636009)(136003)(376002)(346002)(39860400002)(396003)(230922051799003)(82310400011)(451199024)(186009)(1800799009)(36840700001)(40470700004)(46966006)(82740400003)(356005)(36756003)(86362001)(7636003)(4326008)(7696005)(2906002)(70586007)(478600001)(8936002)(8676002)(70206006)(5660300002)(41300700001)(6666004)(40480700001)(40460700003)(55016003)(426003)(16526019)(83380400001)(2616005)(316002)(6916009)(54906003)(36860700001)(47076005)(26005)(336012)(6286002)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 08:08:36.5093 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ca8fa98f-6615-4c3e-e152-08dbbd9e9e93 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: CO1PEPF000044F3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5677 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 Acked-by: Dariusz Sosnowski Acked-by: Suanming Mou --- 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.27.0