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 B517F4562E; Wed, 17 Jul 2024 09:12:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D14940289; Wed, 17 Jul 2024 09:12:26 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) by mails.dpdk.org (Postfix) with ESMTP id 4AE934025F for ; Wed, 17 Jul 2024 09:12:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=E2b13ejE+oKBmhW9iqfqYPG3W/1BukoMnwGiknQQt0Pp5vHPmIPUEB225Bq9kdoi+hLOvtozJCVQB507ZWGlzRtqjALLfZt6P/OsuP2yY/tvKUKZCdr9Z0xBLNp/enfHW0Umi0FCoI3PdwlMXL/hxRk1f2czHO8yVCUvvYynRAHd1EJiExtMSjb8lH6veipkc2R8DXo12Y3IOy00wmgh9ydRZQkE3EGjThsmcpgXIDg0RI4f4Ou2x/QdXBtxd5gvIA/VBE/F22PtaZXQuJqlFAAfMJkHVf1waC58I9Xs12az8Vf6N67jeO1OpHJaDh+FuAK/6S6LiqAFDSzABnniFw== 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=K6DNkbiLFSk7UXaUIgJPaEeOHvm6U38tXd4n/Ebei98=; b=cv4tfbarsYq9PzW2rEVqZuygP1R5RSIIPh0xdH+z+WVM5uB+ktnob/f1ijMQqHMEwf7GmHzOkT5nqVo+6HwIEz6ZWzEJvbO+ml7f3LS8+nmIzBTH0lu9HiUSeKs7XFSZIPWxAYE/iuWK6szcYNqz7zWak6rbYRjGXSk8iQ2uYL54SRWWPO12/1v4v2PkrHD0rUSekTdlxstUEB9ybboYTkxWjKfncxivYT2xgi0OOsIwnZ47CbzzsuKmuURzKCnGgOtY4kqqBaf5gqonrPDB9NQR5Jrm/JbSoPKaUsoj/siyi/a1qobva1P9VsllRrfF0qxG8MsLHj6IbGHlwSKmZw== 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=K6DNkbiLFSk7UXaUIgJPaEeOHvm6U38tXd4n/Ebei98=; b=PRVjHFKACIb50Ylqm0OdruH12gbffIba/pUGVFEYERDEkvoVlorW71mttYxVV9+Ay4dDJsJRaMzazls9hDVP90Zi34j+yToEKZIue6U2RMzFP20orEGrbaBtEcLAUUe0Txq3bVMsf3wHwbNTjVobd54N+iBKjBaUYo5RHhEuytyceTxpoqy7LyZw6jhXChO7cHEKJwzCm0E7xTE+MwGONLVPGIuu+CxwiJZd9r2iT7TAViYquAYdsyQ3BjVtUWKCMF4hLmHZDIDy/JUuqOw+hbAEW3jXC0Usvm1YM85NYgPFmlQCqigtO66kdnLEmxuo7O1wyk4DyXnXezzxh44NIw== Received: from SA9PR13CA0012.namprd13.prod.outlook.com (2603:10b6:806:21::17) by CH2PR12MB4311.namprd12.prod.outlook.com (2603:10b6:610:a8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29; Wed, 17 Jul 2024 07:12:07 +0000 Received: from SA2PEPF00003F61.namprd04.prod.outlook.com (2603:10b6:806:21:cafe::b) by SA9PR13CA0012.outlook.office365.com (2603:10b6:806:21::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.14 via Frontend Transport; Wed, 17 Jul 2024 07:12: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 SA2PEPF00003F61.mail.protection.outlook.com (10.167.248.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.11 via Frontend Transport; Wed, 17 Jul 2024 07:12:06 +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; Wed, 17 Jul 2024 00:11:47 -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; Wed, 17 Jul 2024 00:11:44 -0700 From: Gavin Li To: , , , , Aman Singh CC: , Subject: [V1] app/testpmd: restore VXLAN-GPE support Date: Wed, 17 Jul 2024 10:11:29 +0300 Message-ID: <20240717071130.1548425-1-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 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: SA2PEPF00003F61:EE_|CH2PR12MB4311:EE_ X-MS-Office365-Filtering-Correlation-Id: 04c98fc7-01ef-48ef-6198-08dca62fc46d 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|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?e8//HngnEsduiwwb/EoC6GkpjrumS4MFsKlQ+oSJA4x0GIQYl3bL3OBKXAV0?= =?us-ascii?Q?6pSjdkrAzQbzzt5XOARAezW2KDPZWEEKLEIgB+CIp0b3DbvltNODsMdHbj/u?= =?us-ascii?Q?0PEUL1C62NOUXUS9V4cc/kkqJ4zTAcgiLHJfRHKeTQsebbQFsQvjMuxdZrNX?= =?us-ascii?Q?DrteSniSlJWwSz7do89g0zw2k3tlYK2QqG002D5KThDGKpXE44nhHKi7f2Bo?= =?us-ascii?Q?p1fnKESEbFm5nYOBTvTOLSlwAu5jfrQROJT6+mEAxGbi3lhc2pUB0FO7B7fm?= =?us-ascii?Q?X09vv7RnQ2QN0DDCRF0cVOgE8FvqkcRNcvGZjugWp/hBT8iUQg5pKHYK+UPr?= =?us-ascii?Q?vVVks4EBnbW3o03tCabHeNFCZ7Rq82RVMIyLs167HdOgGudFNt6qC1z3tmIq?= =?us-ascii?Q?TsiyZgXLTVm4CZO8hA89U2OCh9Rq5hdZgNcfNQDbbGLxwgZKdSvHdJqs1/zQ?= =?us-ascii?Q?2RnDFc2CFViClP7Lm1g6o0SgW5o/64jYiQE1bxwW3GjSh/mmR1OYwqumxOcf?= =?us-ascii?Q?P85p8NrQ/kLlX3LlVFTk0UOJiO6IyXFBSq0ztR6vExX2rCd/AQzSiGr2aF2u?= =?us-ascii?Q?SXDXPtM4xxgS1t/0ePBhiMPZWPFN4G0PDAKlazaAhoiEM53PgDv6y9HJl7RY?= =?us-ascii?Q?kLaKtll/kJLWf/nFTvDweFqzgAw+1vT4/0/DQh1L+kAkIZneZwoF/FeHc9Ec?= =?us-ascii?Q?PEdzoZZa2C+kiFrXdItzIk6PHCmeNsgO5M/CxderltknVK+Iixi0s9JRtf2Z?= =?us-ascii?Q?w6cIVIVPxqRgvpZ73utiM5boTiDT6Uia5hjvp6GgEdkq99RgtFi2o+/caK9N?= =?us-ascii?Q?dpkuqHODeQHnbbxAsC3gDvbtEafW1Yy9KUOQjEAtJfJLY6kN8FEJZq9IJdwE?= =?us-ascii?Q?EY9MSYKacktiKbLjtUI9zNoSAgmbLQbkZdwX0e37SQO91NZDbl4b3h+kHjNG?= =?us-ascii?Q?64bKxRG6r1QLdn9wRnZkQViK1nQ4HAzaX9pQaVg+dNAP+ij8u4QanB9s/vCh?= =?us-ascii?Q?mphnXsWNgKYGvw9FTkFEOVgdrhsgbUdEi9blVI9JNEyU/YF5aa/x7J8N5pC/?= =?us-ascii?Q?DNcHoWwA15qqYs7yw29rd6k6f1lpuOsL0hUckSjyKCcxiqgevOdq6y4w49xs?= =?us-ascii?Q?3q7YQTprctVYt0mABGQ5ELbAgWlU1zQhpK3BhZVWnIu7z8lQiRW095iNUaAl?= =?us-ascii?Q?egNmrGAVvTdNMhXmEE2Ml6prWLymBnAPDf87OBW4zhq35BWYv8vqsvTout/o?= =?us-ascii?Q?L2Qez2+7bglZnpOWmuF5FbUkLtBaK0qV9SjUN9TaTtMn41aEgNTO5aAjEN4u?= =?us-ascii?Q?KY62t5eUdXqbTs4ADPCEiHjMAWK4ga529CJj+ax0HAfYt4TR8wre7tlLYQUK?= =?us-ascii?Q?jqEuMkW4v4aZhqmQLesehyoxz+I9AzGPyxxdH6LPwbUchuxWMHk1JyDgnTcg?= =?us-ascii?Q?stD1Yv3tUetUeHFWAVzQ6LJHKSin+7Nr?= 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)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2024 07:12:06.7694 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 04c98fc7-01ef-48ef-6198-08dca62fc46d 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: SA2PEPF00003F61.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4311 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. Fixes: da118115d95c ("app/testpmd: support matching any VXLAN field") Signed-off-by: Gavin Li --- app/test-pmd/cmdline_flow.c | 65 +++++++++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 21 +++++-- 2 files changed, 80 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index a76b44bf39..51a8d4993e 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -423,6 +423,12 @@ enum index { ITEM_GENEVE_VNI, ITEM_GENEVE_PROTO, ITEM_GENEVE_OPTLEN, + ITEM_VXLAN_GPE, + ITEM_VXLAN_GPE_VNI, + ITEM_VXLAN_GPE_PROTOCOL, + 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 +1618,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 +1871,16 @@ static const enum index item_geneve[] = { ZERO, }; +static const enum index item_vxlan_gpe[] = { + ITEM_VXLAN_GPE_VNI, + ITEM_VXLAN_GPE_PROTOCOL, + 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 +5258,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_PROTOCOL] = { + .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