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 EE10D44183; Fri, 7 Jun 2024 16:03:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27DE542DC7; Fri, 7 Jun 2024 16:03:06 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2082.outbound.protection.outlook.com [40.107.101.82]) by mails.dpdk.org (Postfix) with ESMTP id B7E1342DB1 for ; Fri, 7 Jun 2024 16:03:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=has7vOh9u9pjoMDXnmqGXeSv3MvnoF5ilhK3up7pvPnoxbGLwmM8nhvvUUkIjy896M/7gYUMDruSj0qRyOKdeRQamg+P6VgDI+iWoQOx32wNyfS88e3gS7dFRUe3mV/IFiPJNPB7pemPKiqZxQZnZQwBaZ8KbxgE0V2FtFNtMvQld/QB1QOzMHtMcCinwmwRk4w0zI4VGfnH8D9Vkxu2t3WoTEH1Vw6fAAbl+EAtM7qNVCZTtpctOl5wtGD60CDgKnVs2cCWuHhj/s1ROR37epgxSb6Hxu4bbNxyLOcKc1kYFTA8/MCa2djoDCMUi+9WNEFQfymzVM8thh521GfXfQ== 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=iag5hvWn6uTB+Wl7LwedPjvimaNJxMdUc5hNMvv17Tc=; b=MW2C/M4sp9E/k06adq0MpRmU0wbUNNjmh2flHy28eZRy+3kGWJMJz7li9OwySBnhX5euHiAmA7BOxASoKu3+urazAZHLKk1PrDH+6A1L2/HSYBW2LqEjH0ytbZgOy1HMPuFHB+FCBx9fZdYrlo+TZ4NRfJjXS0O4vD9p8rDvcKApKCko6T9YtQdmyjqfTpaj7swgRP/SrE9Yy2vFgKoIMgNT7z827t1ptzM0akzG19jSl6yibvRLSd8ER8/qmpWv7LjWpfBxdxZ9fNuDwfsDoLRB6SVLBS5C4lm1iQNcH6eH+Pso6oiQa3olfmw6uL5h+3hVvYEBjEW13WhNyAEJQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=iag5hvWn6uTB+Wl7LwedPjvimaNJxMdUc5hNMvv17Tc=; b=GKlGqEcduj66f9yHtyZwHTz8YzWHEGjJn5UorhXvugyCmgNZ7iMIqLqNYo6NvHvse1eblgO61oWPMBqwDDSlNZZq66drUEUaVksn6Din5OD1tkWzbMMfIDvS4Sbb2DebTj6FAAUBbyH+nWIoLKzhlp6ouWemjyB1AhuFK0mOi5m70TM7fsC8HeTCyNlYVskF7/NjBUu6MAA4yoZzGsgR0DPynyeUMDm3M/TnSp7WMqRad4lTjO4jCx5U7nTJrTNK583PaLoWvLl7iKLKhKLitFwlJHWpdLqZQ0ZHM5wnHG2paLsACYhZj1sIT3fJIDdy9apRfJ5XR4YJRhipxql7pw== Received: from BN9P221CA0022.NAMP221.PROD.OUTLOOK.COM (2603:10b6:408:10a::14) by BL1PR12MB5801.namprd12.prod.outlook.com (2603:10b6:208:391::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Fri, 7 Jun 2024 14:02:58 +0000 Received: from BN3PEPF0000B069.namprd21.prod.outlook.com (2603:10b6:408:10a:cafe::48) by BN9P221CA0022.outlook.office365.com (2603:10b6:408:10a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.21 via Frontend Transport; Fri, 7 Jun 2024 14:02:58 +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 BN3PEPF0000B069.mail.protection.outlook.com (10.167.243.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.0 via Frontend Transport; Fri, 7 Jun 2024 14:02:58 +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, 7 Jun 2024 07:02:31 -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, 7 Jun 2024 07:02:28 -0700 From: Rongwei Liu To: , , , , , CC: Dariusz Sosnowski , Aman Singh , Yuying Zhang , "Ferruh Yigit" , Andrew Rybchenko Subject: [PATCH v8 2/3] ethdev: add VXLAN last reserved field Date: Fri, 7 Jun 2024 17:02:07 +0300 Message-ID: <20240607140208.315235-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240607140208.315235-1-rongweil@nvidia.com> References: <2909053.FA0FI3ke8A@thomas> <20240607140208.315235-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B069:EE_|BL1PR12MB5801:EE_ X-MS-Office365-Filtering-Correlation-Id: 45b215a3-24e7-4ba1-12ad-08dc86fa8952 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?1qoCDzqsNqJlf69tCUbj5uS7jnK8M7eUhQGMma5iiGrq3sjdvDtcLrL84qpn?= =?us-ascii?Q?oqTCe7lIl1hiV+2DdDZL7K8XqD8Id+uYJl6hMZ1y4urhBKndvOOfJsbYXslC?= =?us-ascii?Q?cxnYQIsbxKTwZDsURamc4Bloyessy+e/CDKmsUFiq0bZDuLgYWWRXpANJ0qW?= =?us-ascii?Q?9IkBvbUZ9LfMJdDEHCq6oZBNquny4eIrq/eHxy1CQPI/mFNMrugNThWtgIxC?= =?us-ascii?Q?k6BsalAQMN29KrXOvKAD7+W+O/59HyLgu2600JpZG9rzoj+AbowRCyGPkkUj?= =?us-ascii?Q?wdJ2dlecrarzamGKuvF8X3w+BcTOrV5tiEcdz6GDK5sY6GFNsYVzFCZLCBNr?= =?us-ascii?Q?PE3YbC6rGhtNE6gp1X+v/YLgJwZMqOn/4ehIQfwdDFn3xQz7JbnZ3LRzqgoB?= =?us-ascii?Q?3o+ltWpfNDgTQZ08pr3COUABMA/YFl68DICbBEVkhzkNAWhXh8dIerM0uW6Z?= =?us-ascii?Q?WlDJ/F4/I8lRTsKSZaGDVTmU8b+Xal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q?BinNAir8qVtVAssdJV05Ro2LRZObN71fEu4hZuhuoWMWSH8BUQ=3D=3D?= 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: 07 Jun 2024 14:02:58.1539 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45b215a3-24e7-4ba1-12ad-08dc86fa8952 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: BN3PEPF0000B069.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5801 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 Add "uint8_t last_rsvd" as union with origin rsvd1. Add RTE_FLOW_FIELD_VXLAN_LAST_RSVD into rte flow packet field. The new union is used by testpmd matching item VXLAN "last_rsvd" and modify target RTE_FLOW_FIELD_VXLAN_LAST_RSVD. Signed-off-by: Rongwei Liu Acked-by: Dariusz Sosnowski Acked-by: Thomas Monjalon --- app/test-pmd/cmdline_flow.c | 5 +++-- lib/ethdev/rte_flow.h | 1 + lib/net/rte_vxlan.h | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 775ce20fc4..99e2db04df 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -1006,6 +1006,7 @@ static const char *const flow_field_ids[] = { "ipv6_flow_label", "ipv6_traffic_class", "esp_spi", "esp_seq_num", "esp_proto", "random", + "vxlan_last_rsvd", NULL }; @@ -4912,11 +4913,11 @@ static const struct token token_list[] = { }, [ITEM_VXLAN_LAST_RSVD] = { .name = "last_rsvd", - .help = "VXLAN last reserved bits", + .help = "VXLAN last reserved byte", .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, - hdr.rsvd1)), + hdr.last_rsvd)), }, [ITEM_E_TAG] = { .name = "e_tag", diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index 6e8ab1d4c7..74cf2e0f59 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -2428,6 +2428,7 @@ enum rte_flow_field_id { RTE_FLOW_FIELD_ESP_SEQ_NUM, /**< ESP Sequence Number. */ RTE_FLOW_FIELD_ESP_PROTO, /**< ESP next protocol value. */ RTE_FLOW_FIELD_RANDOM, /**< Random value. */ + RTE_FLOW_FIELD_VXLAN_LAST_RSVD, /**< VXLAN last reserved byte. */ }; /** diff --git a/lib/net/rte_vxlan.h b/lib/net/rte_vxlan.h index 997fc784fc..57300fb442 100644 --- a/lib/net/rte_vxlan.h +++ b/lib/net/rte_vxlan.h @@ -41,7 +41,10 @@ struct rte_vxlan_hdr { uint8_t flags; /**< Should be 8 (I flag). */ uint8_t rsvd0[3]; /**< Reserved. */ uint8_t vni[3]; /**< VXLAN identifier. */ - uint8_t rsvd1; /**< Reserved. */ + union { + uint8_t rsvd1; /**< Reserved. */ + uint8_t last_rsvd; /**< Reserved. */ + }; }; }; } __rte_packed; -- 2.27.0