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 6CE0245695; Tue, 23 Jul 2024 16:27:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 595D8402D7; Tue, 23 Jul 2024 16:27:40 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2087.outbound.protection.outlook.com [40.107.94.87]) by mails.dpdk.org (Postfix) with ESMTP id AA5F240151 for ; Tue, 23 Jul 2024 16:27:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ET9XP4oXCpzqSiwJSxPbtaJ5GidRDOfI8S3UgM1zy57o1ujCB8cyeAenZqa7+hmizCJuUgsSPSSj1oAYsLt/1Xjknc8R8ZqlujT6jcK44WAGD2kCQnj+FwbosHvhSHvfgDlhbTo2EDVngsxcf5JmW4u5S0jcIQEgRBP1RwkuNKftt2UmmGtRypbAIprrvRcKwxdTmKBZ4DLUjbEvkqYmeWtXwzED9N+XJQX8OJzu5SNVTebE5GRdEE9h0np1iCVsViOevKo8L7uzJttOZZJLi+1w2k2JTElsXuo6vY8IpeY5U8mNluGCSsZL+WvDkZRrN1+avH7hJYRUTBWxkI0YnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=m5IKZN+NRhGl880ZlPOuAYRkYKMo+G4USEm56SRYhro=; b=WXRikaWQKMuy8ZCEwguPzdMmEnkmgiED+SMnyMHrmApk6M7L0i8B869nzbW44N8U0tNVKhatj740V4qia0YbX11c6s5NZN2mKZay5ujwDjqetNV3cZ5R8P4klv7hp/Jz+lBKGMmOCKKbrIBLnIXreKvsirnAQtriThzp8MG/R9XMMiUnOHeNsBUiVroJSVpp93Zc0ykltfwm4UaapLWYDykXgmJ2ktSROZ6dcyNh6cxZqXc7K23l6EppExTw8O3aM0DmizKd5Aj7fYv+PfExdnoseSoZahq64iPq/FHv3ieMN516CBa/PpST2kpTMAHvsQ8T9Zrc2wVkF5RXSdJ4Ew== 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=m5IKZN+NRhGl880ZlPOuAYRkYKMo+G4USEm56SRYhro=; b=Byc+nmrB2QYzIxrpqc2I+QLuSKcsK0L8g9IxOvfovq63I1rU8hN8ZNy0qY6Fqw8X9OhIiDZzu/iwGvBmYDvQT5dcmMfCNdPtXNU86LG8mII1glk4pESkX8VJYNGs3HW+YUNDOb42WSynWG/IFnOeK20HtPCLbL0rKJDQyck9COooZIoWDqO8MAHyJoAE9FDU4Z6nxqK8LiHhw7dTMtOi3TeHF6mbQZv8eLWrCyOYmhG7AkxbMzSSosHBr7PE+mYLFpH++XujEkA5ZRKnnlVuxZl5sQRjE98zpm75I2iywoulY2MRpZfmvv8qqAk9+oeFWFB6qJFSWsSYcpzqwzwjFA== Received: from BN8PR03CA0010.namprd03.prod.outlook.com (2603:10b6:408:94::23) by CY8PR12MB7563.namprd12.prod.outlook.com (2603:10b6:930:96::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.15; Tue, 23 Jul 2024 14:27:32 +0000 Received: from BL6PEPF0001AB57.namprd02.prod.outlook.com (2603:10b6:408:94:cafe::f1) by BN8PR03CA0010.outlook.office365.com (2603:10b6:408:94::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29 via Frontend Transport; Tue, 23 Jul 2024 14:27:32 +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 BL6PEPF0001AB57.mail.protection.outlook.com (10.167.241.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.11 via Frontend Transport; Tue, 23 Jul 2024 14:27:32 +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; Tue, 23 Jul 2024 07:27:14 -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; Tue, 23 Jul 2024 07:27:11 -0700 From: Gavin Li To: , , , , Aman Singh CC: , Subject: [V3] app/testpmd: restore VXLAN-GPE support Date: Tue, 23 Jul 2024 17:26:49 +0300 Message-ID: <20240723142649.44013-1-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240723073730.33272-1-gavinl@nvidia.com> References: <20240723073730.33272-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: BL6PEPF0001AB57:EE_|CY8PR12MB7563:EE_ X-MS-Office365-Filtering-Correlation-Id: 62fd569e-1fe1-4179-db48-08dcab2396df 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:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?+dLJbBwXHN0JjMIsLG4N6WPaY5jRGI6MimqmS2ykVQ+DDu/hxefF6CsLhp4D?= =?us-ascii?Q?BnHas6/9z/TAjVdEAa4QQvCb7T2+4rb+yStchKU5NsbOAlPKib5f+HGF0JRe?= =?us-ascii?Q?Z822mz+7H7LevllE76Jw8tws7DW6Cvf4ccdMTV9WCLoqwSprA/wUe4Z1JO4X?= =?us-ascii?Q?avRhUGDvDAJSptwmtp9cBcA+UMfiHqHDq14dArBVAEUJO6Aj5W9hemMz5Bdi?= =?us-ascii?Q?RHq6UTrGGQA7KMWgyyNva7icCvRxAB/gzg1YWV95Mi+19V91mxB51VSyJKf9?= =?us-ascii?Q?IyB1UPmG188QxStICxlZGdUhRQvbLOXsDm6PzlGeNJekAJ+GrU4Cswx84ohJ?= =?us-ascii?Q?yle12f542u0e+OOEsqmyvBmXmrNjO/ZV4x8EYjIGHOqBNZ7FAv057WL26vR0?= =?us-ascii?Q?5FpwVg0Zh/ecfQndTc5oLStmc8kjR01n6SAIsB4QJL4ivv5wg2oMJl/TtYXn?= =?us-ascii?Q?ApwZtW9iirB/TN/IysUEgLyeTRMuFsOEizTDs6anOsI5DcmVyP7WoDaGIo2z?= =?us-ascii?Q?IAFLySLce0+9+dLKhbKBMg0puRqTTTev19cAl2009k8B+dw/65U3dwk27lR2?= =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AfAJ?= 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:(13230040)(376014)(1800799024)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2024 14:27:32.1038 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62fd569e-1fe1-4179-db48-08dcab2396df 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: BL6PEPF0001AB57.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7563 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 VXLAN-GPE support was removed from testpmd recently. Drivers which are not migrated are still using VXLAN-GPE in tests. This commit is to restore the support for VXLAN-GPE in testpmd. After this change, there are two command line items with the same name, ie. "protocol". One is for the new VXLAN extensions and the other is for the deprecated VXLAN-GPE. Add a new one that is more obvious for the new VXLAN structure since the two have different command line context. Fixes: da118115d95c ("app/testpmd: support matching any VXLAN field") Signed-off-by: Gavin Li --- app/test-pmd/cmdline_flow.c | 67 +++++++++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 21 +++++-- 2 files changed, 82 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index fb6a552863..d04280eb3e 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -391,6 +391,7 @@ enum index { ITEM_VXLAN_FLAG_D, ITEM_VXLAN_FLAG_A, ITEM_VXLAN_GBP_ID, + /* Used for "struct rte_vxlan_hdr", GPE Next protocol */ ITEM_VXLAN_GPE_PROTO, ITEM_VXLAN_FIRST_RSVD, ITEM_VXLAN_SECND_RSVD, @@ -423,6 +424,13 @@ enum index { ITEM_GENEVE_VNI, ITEM_GENEVE_PROTO, ITEM_GENEVE_OPTLEN, + ITEM_VXLAN_GPE, + ITEM_VXLAN_GPE_VNI, + /* Used for "struct rte_vxlan_gpe_hdr", deprecated, prefer ITEM_VXLAN_GPE_PROTO */ + ITEM_VXLAN_GPE_PROTO_IN_DEPRECATED_VXLAN_GPE_HDR, + ITEM_VXLAN_GPE_FLAGS, + ITEM_VXLAN_GPE_RSVD0, + ITEM_VXLAN_GPE_RSVD1, ITEM_ARP_ETH_IPV4, ITEM_ARP_ETH_IPV4_SHA, ITEM_ARP_ETH_IPV4_SPA, @@ -1612,6 +1620,7 @@ static const enum index next_item[] = { ITEM_GTPC, ITEM_GTPU, ITEM_GENEVE, + ITEM_VXLAN_GPE, ITEM_ARP_ETH_IPV4, ITEM_IPV6_EXT, ITEM_IPV6_FRAG_EXT, @@ -1864,6 +1873,16 @@ static const enum index item_geneve[] = { ZERO, }; +static const enum index item_vxlan_gpe[] = { + ITEM_VXLAN_GPE_VNI, + ITEM_VXLAN_GPE_PROTO_IN_DEPRECATED_VXLAN_GPE_HDR, + ITEM_VXLAN_GPE_FLAGS, + ITEM_VXLAN_GPE_RSVD0, + ITEM_VXLAN_GPE_RSVD1, + ITEM_NEXT, + ZERO, +}; + static const enum index item_arp_eth_ipv4[] = { ITEM_ARP_ETH_IPV4_SHA, ITEM_ARP_ETH_IPV4_SPA, @@ -5241,6 +5260,54 @@ static const struct token token_list[] = { ver_opt_len_o_c_rsvd0, "\x3f\x00")), }, + [ITEM_VXLAN_GPE] = { + .name = "vxlan-gpe", + .help = "match VXLAN-GPE header", + .priv = PRIV_ITEM(VXLAN_GPE, + sizeof(struct rte_flow_item_vxlan_gpe)), + .next = NEXT(item_vxlan_gpe), + .call = parse_vc, + }, + [ITEM_VXLAN_GPE_VNI] = { + .name = "vni", + .help = "VXLAN-GPE identifier", + .next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe, + hdr.vni)), + }, + [ITEM_VXLAN_GPE_PROTO_IN_DEPRECATED_VXLAN_GPE_HDR] = { + .name = "protocol", + .help = "VXLAN-GPE next protocol", + .next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe, + protocol)), + }, + [ITEM_VXLAN_GPE_FLAGS] = { + .name = "flags", + .help = "VXLAN-GPE flags", + .next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe, + flags)), + }, + [ITEM_VXLAN_GPE_RSVD0] = { + .name = "rsvd0", + .help = "VXLAN-GPE rsvd0", + .next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe, + rsvd0)), + }, + [ITEM_VXLAN_GPE_RSVD1] = { + .name = "rsvd1", + .help = "VXLAN-GPE rsvd1", + .next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe, + rsvd1)), + }, [ITEM_ARP_ETH_IPV4] = { .name = "arp_eth_ipv4", .help = "match ARP header for Ethernet/IPv4", diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index c19b4f8958..f00ab07605 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -214,6 +214,7 @@ For example: vxlan geneve nvgre + vxlan-gpe show port (module_eeprom|eeprom) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1103,12 +1104,12 @@ Where: * ``ip|udp|tcp|sctp`` always relate to the inner layer. * ``outer-ip`` relates to the outer IP layer (only for IPv4) in the case where the packet is recognized - as a tunnel packet by the forwarding engine (geneve, gre, gtp, ipip and vxlan are supported). - See also the ``csum parse-tunnel`` command. + as a tunnel packet by the forwarding engine (geneve, gre, gtp, ipip, vxlan and vxlan-gpe are + supported). See also the ``csum parse-tunnel`` command. * ``outer-udp`` relates to the outer UDP layer in the case where the packet is recognized - as a tunnel packet by the forwarding engine (geneve, gtp and vxlan are supported). - See also the ``csum parse-tunnel`` command. + as a tunnel packet by the forwarding engine (geneve, gtp, vxlan and vxlan-gpe are + supported). See also the ``csum parse-tunnel`` command. .. note:: @@ -1123,7 +1124,7 @@ engine:: testpmd> csum parse-tunnel (on|off) (tx_port_id) If enabled, the csum forward engine will try to recognize supported -tunnel headers (geneve, gtp, gre, ipip, vxlan). +tunnel headers (geneve, gtp, gre, ipip, vxlan, vxlan-gpe). If disabled, treat tunnel packets as non-tunneled packets (a inner header is handled as a packet payload). @@ -2221,7 +2222,7 @@ port config udp_tunnel_port Add/remove UDP tunnel port for VXLAN/GENEVE tunneling protocols:: - testpmd> port config (port_id) udp_tunnel_port add|rm vxlan|geneve|ecpri (udp_port) + testpmd> port config (port_id) udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe|ecpri (udp_port) port config tx_metadata ~~~~~~~~~~~~~~~~~~~~~~~ @@ -3745,6 +3746,14 @@ This section lists supported pattern items and their attributes, if any. - ``data {hex string}``: GENEVE option data, the length is defined by ``length`` field. +- ``vxlan-gpe``: match VXLAN-GPE header. + + - ``vni {unsigned}``: VXLAN-GPE identifier. + - ``flags {unsigned}``: VXLAN-GPE flags. + - ``protocol {unsigned}`` : VXLAN-GPE next protocol. + - ``rsvd0 {unsigned}``: VXLAN-GPE reserved field 0. + - ``rsvd1 {unsigned}``: VXLAN-GPE reserved field 1. + - ``arp_eth_ipv4``: match ARP header for Ethernet/IPv4. - ``sha {MAC-48}``: sender hardware address. -- 2.34.1