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 433E84414A; Tue, 4 Jun 2024 08:28:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5F3243492; Tue, 4 Jun 2024 08:28:27 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2074.outbound.protection.outlook.com [40.107.244.74]) by mails.dpdk.org (Postfix) with ESMTP id 7C86A43491 for ; Tue, 4 Jun 2024 08:28:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rfr7L1JgoDKDr1ns8Q7s/3G3wMnSwHQTJTqf1SmcB8zgbfs6X3ZgykblWND64w/l5i4P1jDnLGElctPzG2pzP8oIsTG92EOm/Rj99AmCSxZGd5gzBWlcSV3PaKLL3AzzufVeLNHuitj66QCOq8Svd3sMt2NDc/iOBqjhjg35j6kxPVxqZSr6FIQts0Pb46Q9HJ4aWjUzbe+g9biMXrN2HUKqqh1VnKP79TKlpVAS0U6+R1pF13EsVST+nhiM2orVrSYetXV87HCa4xKzmBOIAlXQipaO1fvmHU1HNU5PDjrb1eN/wnDLR/a0NEZ2FXog8YVz+kr3fz/f7jH8Kmz/Lw== 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=xJ3WSpoUFmgUCNfqD6f28P8VJTlFN9CMMqGft4xuBg0=; b=UEoluTPAqb81CbVlV+2zUeFMSz1pjhCV8+35e9T6XHUSE/W0YZWhA2T3tLIoLysd/sNRQEu0LR7RUNNgUIwDa9G6Glvb2J9GBLkm7aua7E9oV5epo5nOcjHpVaT38pUXUGNTpGIas2+NtCIDvDbHGpIm/r0pohr05fwBr4AtZFYUs6aZMZBoTaBpFAd9omYZhp2W7OpVPILXKURnt19HoF9rK4LGCvgDjPNnhSZ54UX17itqBekGR1mP/4CyowEbZGr82pylTy5IdkOKfyYMgQPn2xWW0F1qujOZFOrnu/1gXj0OwxloWJXVkX5iFrYtz7RuU/HzFoRq2wLrLp0jww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=monjalon.net 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 (0) 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=xJ3WSpoUFmgUCNfqD6f28P8VJTlFN9CMMqGft4xuBg0=; b=PmLyooRqa47TFSYQggFvNIb5nt+9owUGBfllEOw+R0osIwONJiB5ZVfRXnDsCj2tO4enXM/HS994kksbD83QAOYaFs8V7LzBJ/93k0JU7HqdRu2VjPsHtJGJ1lD4ox+m9zDkIdmg4Wi7XI+3Ji+ZUk6UPa+9vGbTWFeclmi86y6s5sx2NSrkOINQgwFMNru+a2ey5FdSr83gqLjcwi/PHWvBLhTO6TzaRglgC7Q2yVd2e/NZvo5z0LQdCjiVsMk1NEwAgcw8D3ccnh3KvS6EazXXkQrTYBT4wRu6dOBZFre8DdHX370fWq2BWed0qrqJ9K0hgYgHPPBKkT/p6sfPsQ== Received: from BN8PR16CA0006.namprd16.prod.outlook.com (2603:10b6:408:4c::19) by PH0PR12MB8125.namprd12.prod.outlook.com (2603:10b6:510:293::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Tue, 4 Jun 2024 06:28:21 +0000 Received: from BN3PEPF0000B073.namprd04.prod.outlook.com (2603:10b6:408:4c:cafe::4a) by BN8PR16CA0006.outlook.office365.com (2603:10b6:408:4c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.29 via Frontend Transport; Tue, 4 Jun 2024 06:28:20 +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 BN3PEPF0000B073.mail.protection.outlook.com (10.167.243.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Tue, 4 Jun 2024 06:28:20 +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.1544.4; Mon, 3 Jun 2024 23:28:09 -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.1544.4; Mon, 3 Jun 2024 23:28:06 -0700 From: Gavin Li To: , , , , Aman Singh , Yuying Zhang CC: , Subject: [V2 2/2] app/testpmd: introduce VXLAN-GBP and VXLAN-GPE fields Date: Tue, 4 Jun 2024 09:27:45 +0300 Message-ID: <20240604062746.355383-3-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604062746.355383-1-gavinl@nvidia.com> References: <20240604062746.355383-1-gavinl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B073:EE_|PH0PR12MB8125:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c68bdb4-ace0-4907-7d02-08dc845f874d 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; ARA:13230031|1800799015|82310400017|376005|36860700004; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Vfsn3R9B/F81a1dSpVfWLsNW/990S+fo+jQQn/czKJ/5jbs/5tToBscJahE9?= =?us-ascii?Q?fJ6owQgOpDXhHr++RjwUQ2yMDyK7kBOIyiHax8HX06+FD4vNP4rkwy3csGwN?= =?us-ascii?Q?s1VqWQ4PRYFGkmPELU08Z7x83SsrSXtOA42PPmz90W2ie3XdUQAHuHKGvVAn?= =?us-ascii?Q?3B+EdN8lsUwAzGgEKs7R07ugiXO3MYhEmvkuVkCBGW+qot3/hb5ZQcSzNAMW?= =?us-ascii?Q?Lw2Xvfmfpk8CaMSAfVbwuivoqLYGfzg4+iYg9BIm0rqbh+bW3wDrbtm7RIbi?= =?us-ascii?Q?VyAeAmVf75v6NPK1CMbDg/cmdlTCRUIV0Sy5gNuaVdjBYZfOKYwwY07QIz1i?= =?us-ascii?Q?PswOAgibr/R/1viNiKDDhf9VfcaZeSwWRQo1jsSdCrBiwvf0K1W77mtzW+0F?= =?us-ascii?Q?dJn7p5HVvgMHX9BmT3igWmw0TXSAi9EwFbczqX42VgaSXLof69fuDYUqeTnJ?= =?us-ascii?Q?sscsohaFG6xaF45IsjKMPm3GnoYmwKfQ29rCK7DtGQe0jYLrkbr3OlNtRVOA?= =?us-ascii?Q?uhqeFFmzYcrN35W2/4WXMumluqfV1I23I1Wmasvn4g429tDtk6CnC/WoLCv5?= =?us-ascii?Q?KwjuvV/InXS8LRw5p0zNIhfQG2luc7CAVxWkldaCxFaIHKFb2yrpGttZM9vK?= =?us-ascii?Q?Hgsbm3snaCsayswqdNVjyNFzkYfLNWA6nCzUx1ZI1zmVL9TjguxAbI3xYIiA?= =?us-ascii?Q?of1dhnsKxDPTnWX5v4Ewj4NRheT0ZAARU1605KdH2yeHzXWb0t7BozO0SPPU?= =?us-ascii?Q?moTjPKml6puY+oRRTcHrGD88yXpGk/SjUa/D1xyOHuUa4LpEbjfSf9ePJPYW?= =?us-ascii?Q?1Q+BkludO8pTHfkNUGVfN4lDUiy5zX8+mT/Xo3xAW8PAO/yClCiLXK+8Ay1Z?= =?us-ascii?Q?7+QPFBVsQ5l/W9ea5HhxmVAH0wu13HetEJgl0i5xh1pSCdN1vDTawEdqjLzA?= =?us-ascii?Q?FlHITNTZO88JfukBWLbd/5J6eoOS+GPV+iNSgVYBjhvKcUwPIg1yTbQfp5EG?= =?us-ascii?Q?4CHExzoTqHRMk27ZjdkI2NPr0NTczs6Qm2NK7HemqKX1CrNmtOg3HlsFk96k?= =?us-ascii?Q?KobCU9OKKNBWzPrUvNKBlYRi1dV8J1hoLVVcq461sFQ9N1AGFej74tP/uLP0?= =?us-ascii?Q?lbrX7U9DgXyMsshVMIK40xoLqS8+9JrB2/oiSK9YWUVS86GRsjNx0KTOmzrc?= =?us-ascii?Q?LhbcjbkNZbec4DTpztSNmN82w35QIzJQdIp+vn/U8p02m+RwMrsnUNeNvW0q?= =?us-ascii?Q?qzy7HIZuF7EHg8QINOsygxAzzHRfx72n1E397kLexpPUNWyTIeRs1aM9Yp+x?= =?us-ascii?Q?ABeVQ9B1m7Wc/7v+HUq8ejxlv9AIv3JKoUsKZdFFOzjmG4RvDBiCr2lW8rYN?= =?us-ascii?Q?P3izazEKsP87SKoyvQJQ+1YRQ3Ks?= 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)(1800799015)(82310400017)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 06:28:20.4654 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8c68bdb4-ace0-4907-7d02-08dc845f874d 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: BN3PEPF0000B073.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8125 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 After unification of VXLAN and all its extension protocols(VXLAN-GPE and VXLAN-GBP currently), all related RTE items should be specified after 'vxlan'. And it's user's responsibility to specify correct UDP port for the protocol to be matched. Below are the examples to match standard VXLAN, VXLAN-GPE and VXLAN-GBP. To match standard vxlan, ... / udp dst is 4789 / vxlan ... / ... To match VXLAN-GBP, group policy ID is 4321, ... / udp dst is 4789 / vxlan flag_g is 1 group_policy_id is 4321 ... / ... To match VXLAN-GPE, next protocol is IPv6 ... / udp dst is 4790 / vxlan flag_p is 1 protocol is 2 ... / ... Signed-off-by: Gavin Li Acked-by: Thomas Monjalon Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 110 ++++++++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 ++ 2 files changed, 121 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 60ee9337cf..6c8210ccd4 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -383,6 +383,17 @@ enum index { ITEM_VXLAN, ITEM_VXLAN_VNI, ITEM_VXLAN_LAST_RSVD, + ITEM_VXLAN_FLAG_G, + ITEM_VXLAN_FLAG_VER, + ITEM_VXLAN_FLAG_I, + ITEM_VXLAN_FLAG_P, + ITEM_VXLAN_FLAG_B, + ITEM_VXLAN_FLAG_O, + ITEM_VXLAN_FLAG_D, + ITEM_VXLAN_FLAG_A, + ITEM_VXLAN_EXT_GBP_GPI, + ITEM_VXLAN_EXT_GPE_PROTO, + ITEM_VXLAN_EXT_GPE_RSVD0, ITEM_E_TAG, ITEM_E_TAG_GRP_ECID_B, ITEM_NVGRE, @@ -1779,6 +1790,17 @@ static const enum index item_sctp[] = { static const enum index item_vxlan[] = { ITEM_VXLAN_VNI, ITEM_VXLAN_LAST_RSVD, + ITEM_VXLAN_FLAG_G, + ITEM_VXLAN_FLAG_VER, + ITEM_VXLAN_FLAG_I, + ITEM_VXLAN_FLAG_P, + ITEM_VXLAN_FLAG_B, + ITEM_VXLAN_FLAG_O, + ITEM_VXLAN_FLAG_D, + ITEM_VXLAN_FLAG_A, + ITEM_VXLAN_EXT_GBP_GPI, + ITEM_VXLAN_EXT_GPE_PROTO, + ITEM_VXLAN_EXT_GPE_RSVD0, ITEM_NEXT, ZERO, }; @@ -4918,6 +4940,94 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, hdr.rsvd1)), }, + [ITEM_VXLAN_FLAG_G] = { + .name = "flag_g", + .help = "VXLAN flag GBP bit", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vxlan, + hdr.flag_g, 1)), + }, + [ITEM_VXLAN_FLAG_VER] = { + .name = "flag_ver", + .help = "VXLAN flag GPE version bits", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vxlan, + hdr.flag_ver, 2)), + }, + [ITEM_VXLAN_FLAG_I] = { + .name = "flag_i", + .help = "VXLAN flag instance bit", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vxlan, + hdr.flag_i, 1)), + }, + [ITEM_VXLAN_FLAG_P] = { + .name = "flag_p", + .help = "VXLAN flag GPE Next Protocol bit", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vxlan, + hdr.flag_p, 1)), + }, + [ITEM_VXLAN_FLAG_B] = { + .name = "flag_b", + .help = "VXLAN flag GPE Ingress-Replicated BUM", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vxlan, + hdr.flag_b, 1)), + }, + [ITEM_VXLAN_FLAG_O] = { + .name = "flag_o", + .help = "VXLAN flag GPE OAM Packet bit", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vxlan, + hdr.flag_o, 1)), + }, + [ITEM_VXLAN_FLAG_D] = { + .name = "flag_d", + .help = "VXLAN flag GBP Don't Learn bit", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vxlan, + hdr.flag_d, 1)), + }, + [ITEM_VXLAN_FLAG_A] = { + .name = "flag_a", + .help = "VXLAN flag GBP Applied bit", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vxlan, + hdr.flag_a, 1)), + }, + [ITEM_VXLAN_EXT_GBP_GPI] = { + .name = "group_policy_id", + .help = "VXLAN Group Based Policy ID", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, + hdr.policy_id)), + }, + [ITEM_VXLAN_EXT_GPE_PROTO] = { + .name = "protocol", + .help = "VXLAN-GPE next protocol", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, + hdr.proto)), + }, + [ITEM_VXLAN_EXT_GPE_RSVD0] = { + .name = "rsvd0_gpe", + .help = "VXLAN-GPE rsvd0", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, + hdr.rsvd0_gpe)), + }, [ITEM_E_TAG] = { .name = "e_tag", .help = "match E-Tag header", diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index ecd040504e..5fb369c107 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3697,6 +3697,17 @@ This section lists supported pattern items and their attributes, if any. - ``vni {unsigned}``: VXLAN identifier. - ``last_rsvd {unsigned}``: VXLAN last reserved 8-bits. + - ``flag_g {unsigned}``: VXLAN flag GBP bit + - ``flag_ver {unsigned}``: VXLAN flag GPE version bits + - ``flag_i {unsigned}``: VXLAN flag instance bit + - ``flag_p {unsigned}``: VXLAN flag GPE Next Protocol bit + - ``flag_b {unsigned}``: VXLAN flag GPE Ingress-Replicated BUM + - ``flag_o {unsigned}``: VXLAN flag GPE OAM Packet bit + - ``flag_d {unsigned}``: VXLAN flag GBP Don't Learn bit + - ``flag_a {unsigned}``: VXLAN flag GBP Applied bit + - ``group_policy_id {unsigned}``: VXLAN-GBP Group Policy ID. + - ``protocol {unsigned}`` : VXLAN-GPE next protocol + - ``rsvd0_gpe {unsigned}`` : VXLAN-GPE rsvd0 - ``e_tag``: match IEEE 802.1BR E-Tag header. -- 2.34.1