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 7D91C4404A; Fri, 17 May 2024 10:08:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB75340684; Fri, 17 May 2024 10:08:15 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2068.outbound.protection.outlook.com [40.107.244.68]) by mails.dpdk.org (Postfix) with ESMTP id EDD454029F for ; Fri, 17 May 2024 10:08:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CfLCuQp6EPbw3Bv7FoeDfq4ANbHl89XiKJnPhHO+Dzr3MAJgyUFrBMFi+787FjDqAIlKnUcSIDc0ZSPZW6bBM/aHqI/k99G16kT3NWjb0O9iiF7SQo6Ugq4L8q7jVBDRiG0r1xRcRzVONlPLUeI39MEw3uQqirxJ11ud7u/HbFnlTSo5kSV6V0dCGm9Ip0H96D6vG3KWSHzwmMpmm9glvGIiNhbqI6w5WmrR2fz1yB56Xzc9xE3LZDXZEvPSEUmTtxvcZ3I7Y+Z0YEBZPoKy0qUuven+8tyvnqpdtY+u2sJONS8dn+EWLIXvV+E6x7jCwqyY4YPG7HlU15eG74Cc2g== 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=ST3sFBAwwgFj2KNxC7wfZYnmKeS3DfvUXUSeKNb0KIU=; b=XmPeHYOz1I10lCVVh4JYxh1PWYI8+u4LxZkbEza5j+3qKzYrbJnvtNP2NxpchGL51v7BFCpTchlm1Zt575QSiaO1XP6QS3uJlECkKC052ytEIycnAGOqIrqBV+iPMRyy/O4ZOt8gUKrSrAqxdMH5/jFnGqiZl0XK4F0wAxJDMlXNcJGBtenj0nVsUx6wvfiWCgGZ3n5QJ+bUpnq6EslfLDqr+IxTAVRDs7+tKNPD8MErtDd9k4o70xshKI5C0hoINkM58hyGeCWgO3DYE8fS7QTNOVILsAl3AjYJbOuL+uupg8QHdb1BS8KhPlOAsqn1SYNMSYBv3DjhcnUsxw+VsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=ST3sFBAwwgFj2KNxC7wfZYnmKeS3DfvUXUSeKNb0KIU=; b=OrkSLAnx2iMrF07c2Kst9i92HzsKpi/bGf7VvOegrWVFqbLrjMyJQtoeOm8WBQ8+zrvOjDHXwQViMEuzvHbN1Q9eLhhjLxfSox9G/RkVNeNl6VvuJhegdwVblpEmT3qZAAfIBWvkXC6wJQvscLzywT5zh1ZRERo96Mp+Javw6O1S5maTjqSNpXINuFQxhN9MT+ZVzsjFhiw7hvHOJd69M6hwHXyouWbyMH+PObp48zS9kyUimSmoPrkxgVHYibT6vqA+qAQFc/DMqwypbyPATNtrxJVMSNJG/eGWcF+zPD2I4Qp9V3s5MWyfelVRNrb4ngDJsRFR2yFVuclAtsFG4Q== Received: from CH0PR08CA0011.namprd08.prod.outlook.com (2603:10b6:610:33::16) by SA0PR12MB7073.namprd12.prod.outlook.com (2603:10b6:806:2d5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Fri, 17 May 2024 08:08:10 +0000 Received: from CH2PEPF00000144.namprd02.prod.outlook.com (2603:10b6:610:33:cafe::a) by CH0PR08CA0011.outlook.office365.com (2603:10b6:610:33::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55 via Frontend Transport; Fri, 17 May 2024 08:08:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH2PEPF00000144.mail.protection.outlook.com (10.167.244.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.21 via Frontend Transport; Fri, 17 May 2024 08:08:09 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 17 May 2024 01:07:57 -0700 Received: from nvidia.com (10.126.231.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; Fri, 17 May 2024 01:07:55 -0700 From: Gavin Li To: , , , , Aman Singh , Yuying Zhang CC: , Subject: [v1 2/2] app/testpmd: introduce VXLAN-GBP and VXLAN-GPE fields Date: Fri, 17 May 2024 11:07:35 +0300 Message-ID: <20240517080735.1787616-3-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240517080735.1787616-1-gavinl@nvidia.com> References: <20240517080735.1787616-1-gavinl@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 rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF00000144:EE_|SA0PR12MB7073:EE_ X-MS-Office365-Filtering-Correlation-Id: 7337d4fb-09b4-420c-f5e6-08dc76487dd6 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|376005|1800799015|36860700004|82310400017; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?etSaWM60hdNfaY9Kj/+jZF5vIknE8qCW0rKD9VNf1CfrVM4VCbOjULGVDytY?= =?us-ascii?Q?ar7aIw6Y87YIqd2mvAJUAeL6EGqgaa2qSHAdwHFd5/pINrUUamZsxrYioSgv?= =?us-ascii?Q?/XsJg+Az9xp+EAbDi0W9wmgX3w/zxmEXyenUy1qOC0nqUI5oDlwwgOKqAth/?= =?us-ascii?Q?op1pvTsStIrIxtc1HdpvMW+x8RmA1V9/czC9rJi7Sj5LzpKkWpNbK4t2CkNX?= =?us-ascii?Q?dA3inm1HkbQWVYbE21CCZz/k8P6Mxq3ay6rcevNQ1AueCVfTe0s5uL5LWpMO?= =?us-ascii?Q?JiynZH0w1sUQMMNhSpBuXc1NLFNXidqSpN3NBcD8JDe0bthpdaDx666V+CSp?= =?us-ascii?Q?BgfYEttoGojRmLtnM6leH9U7RbYS0iOl7QzyE1rs1FSNCsUT8dS6t4oaf7K4?= =?us-ascii?Q?8109mOrVKdya53v0PdvEaKod7EOyMu3pJILHNlMe8WO27BzuZGiTQlIQitR6?= =?us-ascii?Q?YtUy8wguUJhRdRDGhaM7oj4VOunu4SAcFCMhHkCpjZ7kCe+ldzf95qdQokyG?= =?us-ascii?Q?u3QO5WlFDaY+p9WNeX8wj36xzJpZLKC5KUrno0PrYJqvF06YJ5D4mNf2t7By?= =?us-ascii?Q?ft4TdTUQBz1iw++zaAo9k3PlldXUfSEiPScdWoouMv8DI7His93rNIaZJJEL?= =?us-ascii?Q?4Cux8h3Pwno41lSxl42TwdQGssLPTzHmLaLhnF5AN1xcIQlyxXOHN7dl/GMA?= =?us-ascii?Q?adXuvy64AtjA5zS4TRajBp0A8eI/j88zEhvRhxSqUbL3QeqJHL0tWvXe+Wb7?= =?us-ascii?Q?1nQMUoKmYIYqOvgLBwpFvtBwX7HNaDJ4zxOnMXW5ZPoKqvCroHPedOK2wcQk?= =?us-ascii?Q?XL1LKdXWs2u7e1LSwRgm1WmSgeFmaExkn0AZlRESJsPxOHokLD4nbARvUXGZ?= =?us-ascii?Q?ZdK7hdhQvqth+E/CuXee0LjpxuSHyVC578qVZxeDk7DkNUIhF6Z9Xxu23S8o?= =?us-ascii?Q?c+8/d2QXZZs/1srPSxQBPLVlXFhHw1eyVmI1NJVkqJGBUGsDwbp5vReQEofH?= =?us-ascii?Q?Yszu8pulADKgW73c5SrF/M+C5fkw1PgZYrD5a/BvO6MlCVTBbdadHHdFo6or?= =?us-ascii?Q?krUtNMm8/TPP42Y5uoC4NnTMSkOqOoQvpgoEsrz8i4K4WzI77Nz1I2/Z/4V0?= =?us-ascii?Q?yFToc/Mrc9k+MIwx7oAT15NI1eNP0Js1ZNpq9K0qweGNLjXOShOEztJEM6F0?= =?us-ascii?Q?pqOteFGZwA9LssnAXVpXsawiJo7ATH+H09yk2VmXIeeApoStyaVlZr6V1Uc/?= =?us-ascii?Q?7i0adVd5G1phIrz1ZWUZFUD0KtDb6Kn1bCkTH9VPBJr1gmf+oY/HoGdvhE1/?= =?us-ascii?Q?xgjKjboNDEayXOia83gRxpDyARLiRkJpxILyHsYMVt5M80tCQj35Ti4kc+h0?= =?us-ascii?Q?eWPtoB/cXdAAJNM693qpYN2qT8ze?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(1800799015)(36860700004)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 08:08:09.8855 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7337d4fb-09b4-420c-f5e6-08dc76487dd6 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF00000144.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7073 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 spicified 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 4321, ... / udp dst is 4789 / vxlan group_policy_id is 4321 ... / ... To match VXLAN-GPE, ... / udp dst is 4790 / vxlan protocol is 2 ... / ... Signed-off-by: Gavin Li Acked-by: Thomas Monjalon --- app/test-pmd/cmdline_flow.c | 40 +++++++++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +++ 2 files changed, 44 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 60ee9337cf..78b31d9bcd 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -383,6 +383,10 @@ enum index { ITEM_VXLAN, ITEM_VXLAN_VNI, ITEM_VXLAN_LAST_RSVD, + ITEM_VXLAN_FLAGS, + 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 +1783,10 @@ static const enum index item_sctp[] = { static const enum index item_vxlan[] = { ITEM_VXLAN_VNI, ITEM_VXLAN_LAST_RSVD, + ITEM_VXLAN_FLAGS, + ITEM_VXLAN_EXT_GBP_GPI, + ITEM_VXLAN_EXT_GPE_PROTO, + ITEM_VXLAN_EXT_GPE_RSVD0, ITEM_NEXT, ZERO, }; @@ -4918,6 +4926,38 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, hdr.rsvd1)), }, + [ITEM_VXLAN_FLAGS] = { + .name = "flags", + .help = "VXLAN flags", + .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, + flags)), + }, + [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 2fbf9220d8..f1770ab950 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3697,6 +3697,10 @@ This section lists supported pattern items and their attributes, if any. - ``vni {unsigned}``: VXLAN identifier. - ``last_rsvd {unsigned}``: VXLAN last reserved 8-bits. + - ``flags {unsigned}``: VXLAN flags + - ``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