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 3D4C04568D; Tue, 23 Jul 2024 09:41:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC29540A77; Tue, 23 Jul 2024 09:41:10 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2052.outbound.protection.outlook.com [40.107.243.52]) by mails.dpdk.org (Postfix) with ESMTP id 1614840150 for ; Tue, 23 Jul 2024 09:38:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IxGzYFIlWNc+b5XYZWu6CB1VNDgkzgDaLC9mrNW7WrDH5Hd9rTEf2aGBJ2UMIgCp80aaL7UPiC13iJdcc8zP5B/gAwRqpe8MtLJPka45kY9Ac98Gek/2o7thYvstm/sNjQ+9AhzjRDa/kc5VbVBuMn15UcLenvRPvr5g2FyBPJY733epTArLygmRmOEG002u1z3sgbPrIEZSCdt3r03qMZviZ5IpKfPv9Y+FHcyKPDQtSvPhmusSHKroWlj11z7jZcon81ceiiMeI+12C0OBnnFCywI+IW10ga9zNq1yD9M58iVeo0jrrgXBVXxdF8L5/f0411T8W3+ysaOe4BEX0Q== 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=39Ps+9r6F+Q++d01UHVKbLexq3gbIddOM2Q1r9DIdY8=; b=ePr90taY6hwqALb6PFGWaEFYNB+kj9ZfL46Miz+v6mPCSVtUE9Tcf6EDGtZs3i5aX+gIC2ekxFVfBmug2JHGM/nbYhr79wSS2It+unAywAhz2JboX0z4VS3Nd9WmCkd9Pazu54Ct4L3VJcc5D4HcmMo0JYOeETi2VnCOMvQeObrn7iXp+CcoCW1sVG8H4iSNJEZDMS8x+xOH7ZZUZlGCQ6/555L82WSQCxZgMMDE/OcFbXyelSnUBTuEM+4VfpB4v1XtNcBFNtPua29iSJJgCt/q9ZAHH/hCEpeDfuPev7Q+tJLAJR5iaETCQs2e3ythE8dFsUF3NEpLoPc+I3Ca/Q== 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=39Ps+9r6F+Q++d01UHVKbLexq3gbIddOM2Q1r9DIdY8=; b=OiGZGxOB+z57DPNSjhH27CCqeD9Ksl+mTLF7c3yqwSA7oQ2z5jpxTLBk8iklGuhsPksPy5yImGHswkRkWA6En34HsBTc9mTTbIXSLIzwuAbpsVziPZJNbBw+9vaJlnc4o8V4tqVs/YidiTd5vtjvWMAtS8jYKCoBcPjFnKDxDHyKy+b/b+gc1i+LV4abw3cMl9uxXccByRwMXk0J1kFgA04fQwj2DNfKckSX//ZIDO/QoPrb4vRKu+FclTneTy0AzEXBEiZdsIxRuqiVGwvFIh9jcnZHwK0jySiQueW28GsVHdtsJ8s8ObDqEnjRFvlbl2xUhwGsZZBdn5M1YA72DA== Received: from BY3PR04CA0018.namprd04.prod.outlook.com (2603:10b6:a03:217::23) by DM6PR12MB4233.namprd12.prod.outlook.com (2603:10b6:5:210::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29; Tue, 23 Jul 2024 07:38:00 +0000 Received: from SJ1PEPF00002326.namprd03.prod.outlook.com (2603:10b6:a03:217:cafe::af) by BY3PR04CA0018.outlook.office365.com (2603:10b6:a03:217::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 07:38:00 +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 SJ1PEPF00002326.mail.protection.outlook.com (10.167.242.89) 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 07:38:00 +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 00:37:46 -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 00:37:44 -0700 From: Gavin Li To: , , , , Aman Singh CC: , Subject: [V2] app/testpmd: restore VXLAN-GPE support Date: Tue, 23 Jul 2024 10:37:30 +0300 Message-ID: <20240723073730.33272-1-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240717071130.1548425-1-gavinl@nvidia.com> References: <20240717071130.1548425-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: SJ1PEPF00002326:EE_|DM6PR12MB4233:EE_ X-MS-Office365-Filtering-Correlation-Id: 26b676e6-8a91-472a-8ddb-08dcaaea60d5 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|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?FNjkUgiy0C9JYYGhr4SgE+Q1ovlBUMYNvJF1JNZoazmSbrOiyvXR20Vd+Vwv?= =?us-ascii?Q?2daAE2iIEfuAFK581wk/2iWz5hwetBItKd+tLoERbw2voEBDuYCLHd3XNrKH?= =?us-ascii?Q?3iNyR/eUNd8WK3W6eJxoVEa+fSWKu08K5H/icWs4bX8cFaqgA4AROVHaI+kA?= =?us-ascii?Q?FRZP5I4XOf0fz1rabTrH4qpT8sdSbSjIVnNFL/SwmxZMtRRK87fRJ56iLw9s?= =?us-ascii?Q?Ws05myDPFmceJcvxzONO7KMqIsHC0/ki+eorkTsu9LfgdGadD/W4JgqdDf9A?= =?us-ascii?Q?7Rrv3KcXdENgzay7HO6mq8NQ7bcE8onTaTbmtZ/YtkL+tzr1oykja4Xxi9NQ?= =?us-ascii?Q?44i+Y9XBQAjPNhBr6AQUj90W8a6WScmFZudZ4DWULqM+9bk3tMdr03Nnho6m?= =?us-ascii?Q?1OsV/bUhz1A4ndR6fzFKzxEna6+2i3Ln+mJIPBEoqX700N2ujmWDl9F7uUVG?= =?us-ascii?Q?UYKga1TJbkr8ZGO5xEKXJaQ7inlrqCcuWYNG+/jhtrtEmc/KLFTZgnBdYwPq?= =?us-ascii?Q?8r7zb4+WI8ViQHEpsZ6AnMBFxbPXPMa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LCrNJ0JfBWTavdERw2GIRsthl?= 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)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2024 07:38:00.1882 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 26b676e6-8a91-472a-8ddb-08dcaaea60d5 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: SJ1PEPF00002326.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4233 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 | 71 ++++++++++++++++++++- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 21 ++++-- 2 files changed, 83 insertions(+), 9 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index a76b44bf39..2c5a0491d2 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -391,7 +391,7 @@ enum index { ITEM_VXLAN_FLAG_D, ITEM_VXLAN_FLAG_A, ITEM_VXLAN_GBP_ID, - ITEM_VXLAN_GPE_PROTO, + ITEM_VXLAN_GPE_PROTOCOL, ITEM_VXLAN_FIRST_RSVD, ITEM_VXLAN_SECND_RSVD, ITEM_VXLAN_THIRD_RSVD, @@ -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_PROTO, + 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, @@ -1794,7 +1801,7 @@ static const enum index item_vxlan[] = { ITEM_VXLAN_FLAG_D, ITEM_VXLAN_FLAG_A, ITEM_VXLAN_GBP_ID, - ITEM_VXLAN_GPE_PROTO, + ITEM_VXLAN_GPE_PROTOCOL, ITEM_VXLAN_FIRST_RSVD, ITEM_VXLAN_SECND_RSVD, ITEM_VXLAN_THIRD_RSVD, @@ -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_PROTO, + 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, @@ -4992,7 +5009,7 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, hdr.policy_id)), }, - [ITEM_VXLAN_GPE_PROTO] = { + [ITEM_VXLAN_GPE_PROTOCOL] = { .name = "protocol", .help = "VXLAN GPE next protocol", .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), @@ -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_PROTO] = { + .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