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 957A942630; Mon, 25 Sep 2023 04:10:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF383402EB; Mon, 25 Sep 2023 04:10:10 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2073.outbound.protection.outlook.com [40.107.244.73]) by mails.dpdk.org (Postfix) with ESMTP id B99E4402E6 for ; Mon, 25 Sep 2023 04:10:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OUD1nO38JrzCa6s5J4niPPtdKl+yUNf86+C6DYeBOqnj/ke/VIZLHgilUZchLrrxZPEujoYP2e3ePOu7BgWLJhuoIqOVeg53WrvzRtzgoXgqf9pjU8DpNVAVsdRDJC9Z2Gf6bn/q4/LbgAnNUfxEhuX1UAUfeT/iPHq6HMD3TzTxSZfjA+VRPOTsvY+h27SMKvJ9qCG81YdI6JlQOo+6084/7la+/NAtmAhUhm3uyxJCDqLgANxEnwCqLkVrTCO7b8tRDOOJjWR9sLESdVDOYfFKHACuc3UwsHNW33hxjIqcZYTySiYgqP+dxmosZ5rcIkUa5JO/QVnnpPIURb5gGw== 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=olI0M/QpKtaHGx4l7R2fSIeedp4GUiue4GjEFAgkZOM=; b=R+QPRSIE9w4XdqWQi1k0VD8rrT86BmWAyjZ9yrtoL2HRrHmZbN5F936VNlrj6s/ADdW+tvxxPyHAA8gdDSrAhDFgOohY7gRJbTh3+sVlyLRdHIMXSXWmluxEWxQhAchk4T6MHc8pPNQYSEDRObPVH3G/nGx5Vxy/A9wpNMGD5WV+fq4FRSxD0YhK2T1UDpDvo2wAEkD4sDgnOKALK9K+LeNdu1c4uFfMq8lZQ7Xd8QUzxGKqevWAJuxPpWsaOWpEO/MXaycbOyPNLFvBb1ZpDI1jkedSWJ+i7vGOIIh6TgFhBCsC0SqffInkooVsG055DNuCWhWAFUJBCXcalaP6AA== 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=olI0M/QpKtaHGx4l7R2fSIeedp4GUiue4GjEFAgkZOM=; b=fKMTjGU//ooz/3a74hLQsuobwXDkavbEcR31mbR/HC2j9qzCe6mgGa34+0Et1ABXt5nwFgBlXZDYw2ZQ9+DpyVppoFeZEFRfvzZsW2um5EoQ0CZdWJZerr+/AqvPyauVnReg92SF6UkqqiiMkHNZVCLqcd1S1XXHyUcwDnKZ5QzZLVY3avGRIGUljgXlAe8UnpJykC8MGy3neGMLzNj/U7kX5U4kdKvghGEMHgaQ9D4enkbFO1g2Xd1hVaf8OO9b1RnUCAq3ZzisxhaFzzffJvZkeKiC3LeleXaOxMypObUwXRhCLp3Wvlspw3xdY6j9zo6aAg6NaB0GnduPE9ksKg== Received: from MW4P223CA0007.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::12) by SA1PR12MB6918.namprd12.prod.outlook.com (2603:10b6:806:24d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.21; Mon, 25 Sep 2023 02:10:07 +0000 Received: from MWH0EPF000971E4.namprd02.prod.outlook.com (2603:10b6:303:80:cafe::f9) by MW4P223CA0007.outlook.office365.com (2603:10b6:303:80::12) 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 02:10:07 +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 MWH0EPF000971E4.mail.protection.outlook.com (10.167.243.72) 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 02:10:06 +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; Sun, 24 Sep 2023 19:09:49 -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; Sun, 24 Sep 2023 19:09:47 -0700 From: Haifei Luo To: CC: , , , , , Dariusz Sosnowski , Aman Singh , Yuying Zhang Subject: [PATCH v2 4/5] app/testpmd: support for NSH flow item Date: Mon, 25 Sep 2023 05:09:19 +0300 Message-ID: <20230925020921.4607-5-haifeil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230925020921.4607-1-haifeil@nvidia.com> References: <20230809074046.121807-1-haifeil@nvidia.com> <20230925020921.4607-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: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail202.nvidia.com (10.129.68.7) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E4:EE_|SA1PR12MB6918:EE_ X-MS-Office365-Filtering-Correlation-Id: e41f0f34-f91b-4d92-965c-08dbbd6c89e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QsIMFiM8yXrRvzg2BQ8SgiOCjfMmU7OlaLYkreTsS841lsEXhKKEM/UUnHBse/vX4Js/XOTKD0gh6hOjNopJH2q2FpWysdZL/f0UD7Eg5le5P0R+wH4wJK1DaKruL39yM0aEJTymcLOKGtoFQrqMzgK6tO03IeKrhhttEQQD8vx3LVZ3N0lVFbKH+aIfd929qeoqm5POH5/m+TcJvTz8wXns8f90Ie2CcWFTNvhhfopKxCaODTjHDekXi5oSYoR5uOeFEF+UXI+FCV3LXmp5AcMUL86nIRzNK7dYuJFsBeZBNVE0d5Mzz6taI6XH4L/36iIY+OIF4PVP1XPmXZ0D6cZU2HFUo/6VU0Avo2OXDjRdJDNuqi3FqjYuBzx9Wa3nzg+ZvEd97XkaP5F1k3z4bdJxeE2a4UMo3qIx4sRyTy17dgJkZvsk68Dvcm+ZWjIHCcPJ2HwAZrADEI2T1w1XemCdw7l6U5O6DrdTtL44/R2ogra1aR6XFQZlFvyTTqRt/so3eWiEQ9lPWqygXolkZnyafR2VBcxmV8V0S9pVes8vXaJpcfBOTBz49lz3XTkiwfpzLpzW0rtjCwx8BYecaYYqMVL2n+6mb1pXxguNwnZD6T5d+ijqcWqoV7/DEW/3LUbEsccQ23jPcmVKJAf/OT2MBQJ/Zrv/dGcnMg1gGW9JrjXePzyJE4V/Z8pQOJIoAHFWRUlVAVpFxzHxwhpRJL8tVoq4xNhu//JHBLEfechR/0RCpvlpurmz1mFw+Y9x 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)(346002)(39860400002)(376002)(136003)(396003)(230922051799003)(451199024)(186009)(1800799009)(82310400011)(40470700004)(36840700001)(46966006)(55016003)(40480700001)(36756003)(86362001)(40460700003)(8936002)(82740400003)(7696005)(2906002)(356005)(6666004)(4326008)(7636003)(336012)(16526019)(47076005)(2616005)(26005)(83380400001)(36860700001)(5660300002)(426003)(1076003)(6286002)(6916009)(316002)(8676002)(70586007)(54906003)(478600001)(70206006)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 02:10:06.9424 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e41f0f34-f91b-4d92-965c-08dbbd6c89e7 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: MWH0EPF000971E4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6918 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 --- 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