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 CD0E7454B8 for ; Mon, 24 Jun 2024 03:58:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05C1A40E18; Mon, 24 Jun 2024 03:58:16 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2108.outbound.protection.outlook.com [40.107.95.108]) by mails.dpdk.org (Postfix) with ESMTP id A4E4940DD7; Mon, 24 Jun 2024 03:58:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=luUe9uIUHv70SvfUwM8n9ocLiUC+eIT6awzuZMyjUwGMA9Z0Smyj0amtfxQ3Ez+TZ26JsuVzmEFCdnIQ3bsXh8xslYvTT652S79aQTs1Oj1yfyaEbWoEDhOAbCK7Fwp7nYu6MfnoL9wfyeytSbXUSeEKvYY4S5jt9DJLiMqc0YFG+5d4A3EadY1UC5AqJXWNFFzIOGBxp+cpPZxPUeVpce2EYrZZbdXhg9GTdjHUeGgTKDaPcqRNergEhi9Yk5X0r/0hDPtW4bHGKcCasTV4jDi+qCoNgm9vrfKLZWbi9PgX9972Cc9JCISUW4XMiNrVQeXD01PALyq7S24BC3eNFQ== 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=RBrqNALka9W0J+I7NWFVEnf0EW5nDK9azkOLkLkofmM=; b=HBW1Kqi7LoTaSLM0f6uG1QZEII40HmPJOzgUE34U2C9SPYOMWHY0YwrjT89lpnCTsEynv+aPlyXKwNVYIzRW8ygjMbNVSwE31BxeEs3vx7ZpNSTzY3cHTkDpnj2M8xg/YZc9QmGHPnUNIQtupQoGTrdvdXJo+aB35/rRd9gAKDjy/nIc2DLQGM/zQsU1fVeMfAH2hpIWLnHt2Ig8/Zs6zfEunONOIlpe5N7/rG52XmVcyEjWoqdsw5auBDb3d8JFhOP2zfGqjgVqNfTU2yrnkUzWHGqTnE2oD8fNJuO2HJiBIP9zp/R9Ng1+9E3hPBSepvB8wcIYKHKyWD8lYwQ4wA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RBrqNALka9W0J+I7NWFVEnf0EW5nDK9azkOLkLkofmM=; b=r45+jlTmrtxfmBkHPMQiJaHWaGi0mdrYSPXibGPcCq5ZVLMDZsdP2Ic8QPPUF8lw2uiPLQOgE4H0BvwacSLuwpuCZOgsPQCdKuFU10sPjeUNoOsuISPeeukG7HXDmZ7a4UMHHMMsZzC038WRKa/UfKpnjNq5xoLWYVBe1ETl2eU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH7PR13MB5867.namprd13.prod.outlook.com (2603:10b6:510:159::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.19; Mon, 24 Jun 2024 01:58:12 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7698.024; Mon, 24 Jun 2024 01:58:12 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Peng Zhang , stable@dpdk.org, Chaoyong He , Long Wu Subject: [PATCH 14/17] net/nfp: remove the unneeded logic Date: Mon, 24 Jun 2024 09:57:20 +0800 Message-Id: <20240624015723.3712898-15-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240624015723.3712898-1-chaoyong.he@corigine.com> References: <20240624015723.3712898-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0070.namprd13.prod.outlook.com (2603:10b6:a03:2c4::15) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5867:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b9a67f6-4265-4a1e-ef1b-08dc93f11a7a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|366013|1800799021|376011|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?dZxbOIoIBB0N3hED8mAGtCnc6wF/4O5xrjSSKE3bQJf71WFbHpL8GLNnPhR+?= =?us-ascii?Q?DFC6i6Hzp4SFlMjl504auTFMedza6tms0PWgnxSlq8IKYGhOBXYPfuiUch6L?= =?us-ascii?Q?kRKhe0LZVg1A+QcwxReL4jVOKthLDPQqscwKQwx4oVfUjd2M8Q1wq8/eloR1?= =?us-ascii?Q?F7p3nRVcSejiGg/stl9LfMlSQNSaKuKSsi7u7PaHugtlQ8ntIPTbuvB8l1jZ?= =?us-ascii?Q?SSfwvvyVpP8eXws9mUgJZ14s0RUbgZ8zAo1b6fNLaMtV1c+UqXbahlHdYMAb?= =?us-ascii?Q?ij864YU0h8PwaD2LvHl98VQSz63QPfTAjcfuT5dhCKboIDpdDbBkYXSOcjKQ?= =?us-asc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jHFD6nUJWThSI?= =?us-ascii?Q?UsmsBB+7DBZHkSnTdBUa+7CusYD0kOs+kJbC3V/NEctrBR1JuaOvGm0dpRc4?= =?us-ascii?Q?nkl13QIf/zG0nDKWNcaKiEvapz9PagA7lop7CNROcK9y9GMNLviUXkbmqoGa?= =?us-ascii?Q?YwaPSKk=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(366013)(1800799021)(376011)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?xgPFaoUjrx8Q6UuoFdh9/Ek5dECRUSdEbwxBZp8JNOUNm+qnQQlhxBBpZrqg?= =?us-ascii?Q?krLALrI+gKLqQI1VRjANCViqld+hcPaVmjPtWbr5a5BQHVQuNnmgNjmUEjKh?= =?us-ascii?Q?fl/GmPM3NPAHwMb7ZEGwAeb7H+RPszFJEwmdrhs5Yf8a4x45T9Wn+t94HfBR?= =?us-ascii?Q?EN93/2sqfwnXbIlWbLNPswlnixFbbOjvwf6cP5lLvZBV+RRD4myziGhep1HP?= =?us-ascii?Q?jmv7kt58Eefrp9ck0bcO+z6MtTYfd6JhjjO3+M1EGsBCNZQ6SZXFKMohjDUC?= =?us-ascii?Q?+g0B/iht6Y/B/DfB3ElEUGelvmkGE0xlUhtsYKRhgzOs0tz6kEI1SJs12HHd?= =?us-ascii?Q?uYVNL5CugBl//7PUf033VlUdBXyfP2WM5eGCIJd0/OlYmR1V9jPqMWTyXvv+?= =?us-ascii?Q?FYH+Ks6YGqImc33RsvucnXTT5aAZgbgveAC2ZBEekwMfWUg1XDtR2IvivSR+?= =?us-ascii?Q?8Cu+TXpsIKzjbr0kCAHMPiuahVRfOLapJJcM+GXfVh1fKjcjjNRPj+azMtdw?= =?us-ascii?Q?nAAzUVoK/x4AQ6Kma6cjPZX7SPaEIIbny/fBDJhiItWJU8wnZ1GOtxAJYhER?= =?us-ascii?Q?T1FIsmNntKq3bbJXwprlwUbAtZf0TZMqfJKGoDNSsVyEOtIeCn8nvwJiB61V?= =?us-ascii?Q?1vlKKm2Um7O+LJldag6Kn5/2SY9AP89KFLTiHoOtAwhMxjdjG7Ths20d0NfU?= =?us-ascii?Q?8NVGTWuQAepN5ImDIt4KQVJlZCs8IM2dwxhKC3gwSFn/cXwJ7QcEJZ5KueOt?= =?us-ascii?Q?6RBlvkohMtK4O6BjKu/EfWFt5otiLfAcrmrJoS8404ZlSO29aVdcUzBNnuNG?= =?us-ascii?Q?1cBektu1kte3PzfKhOt4PMscIT23ieBAcdCjGe+KR0rK6xax3OLUz/fkPO5k?= =?us-ascii?Q?BdYYondOFS+ukoqXokC9W3/APUlsDw6Ftb0CzxeOfBueJtLb+to6s4vlR5EX?= =?us-ascii?Q?JzKq2lO7gk6Yb62sivPvbyvkedXvzBPtknVcio/FOUVukezpaAhsrESC/+ON?= =?us-ascii?Q?Mp0w+8L/CYn69xgGdR9wLzBxU1oyx8xp3/dvwDig5D0PcNQM+VkiJiP5mTb8?= =?us-ascii?Q?zOdnxb8RdgMMTmnui71VR9KiOU0CQWABp7pzZxRqUbi9k51Y+UoYMNoTxvey?= =?us-ascii?Q?q6q2tH5HdLG7Xww4ySGeH1zWF0ZAOXtvoKlNtraAYona9YtH/ReEaiaBMP6S?= =?us-ascii?Q?WeBiEUU88McnRCt7r/wpMtprCOPPdke/IYRYUz2ntfd9z1n6op+YO/DqLrSn?= =?us-ascii?Q?zqtumenegFKBVpDzlPIJn56tuzWGI7XfP7XSDpllPFkklwdt094qRdiln2pU?= =?us-ascii?Q?e7bYf4SJlxr46nFashyP45Kx5Ep7dbeyQRGln5HAAr+NjgNJqyKyNEZND353?= =?us-ascii?Q?7W6B7nIUAibmvktkXeDXAHIASU6Xl/e71c1AbM+dKzRQ/6y94r6KomLwvjmA?= =?us-ascii?Q?MNUiOkodPKVHVgD3mGQztB/7WQuTUfa+S7M96yRLQlZ0eY1prLCWkwTP8Rao?= =?us-ascii?Q?i1CVtcJvM8V3ocmo93eBAp+RG9wMXWIjHO0mQgOC3m/7htn3UYGPD9lCLp+z?= =?us-ascii?Q?GOQm5kUJdutP4ekKDM+Ksv2CnoGtf7Phi10cKGmeLe9YHX8Tf8saHtuYNv7u?= =?us-ascii?Q?7g=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b9a67f6-4265-4a1e-ef1b-08dc93f11a7a X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2024 01:58:12.3162 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wHd7e3MGVZk4y2iqhh89Dcmn0e921BSMVDq6nCn4SR/t7Gk6BfIbRICjv6VbzIOd+mWNGYn3kBp+CBPKO4CrxPIXcvJ6SA2GuHKoDthvO7A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5867 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Peng Zhang The logic in NFDk datapatch can make sure there only one layer VLAN, so remove the unneeded logic here and make it clean and easy to understand. Fixes: 7c82b8626af8 ("net/nfp: support VLAN insert with NFDk") Cc: stable@dpdk.org Signed-off-by: Peng Zhang Reviewed-by: Chaoyong He Reviewed-by: Long Wu --- drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c index e6847ccb33..2cea5688b3 100644 --- a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c +++ b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c @@ -141,7 +141,6 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt, uint32_t meta_type; struct nfp_net_hw *hw; uint32_t header_offset; - uint8_t vlan_layer = 0; uint8_t ipsec_layer = 0; struct nfp_net_meta_raw meta_data; @@ -184,12 +183,7 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt, meta += NFP_NET_META_FIELD_SIZE) { switch (meta_type & NFP_NET_META_FIELD_MASK) { case NFP_NET_META_VLAN: - if (vlan_layer > 0) { - PMD_DRV_LOG(ERR, "At most 1 layers of vlan is supported"); - return -EINVAL; - } nfp_net_meta_set_vlan(&meta_data, pkt, layer); - vlan_layer++; break; case NFP_NET_META_IPSEC: if (ipsec_layer > 2) { -- 2.39.1