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 5D4834611D; Wed, 29 Jan 2025 17:53:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7A7440274; Wed, 29 Jan 2025 17:53:38 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id DACC440274 for ; Wed, 29 Jan 2025 17:53:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738169617; x=1769705617; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=3WkSrWP5ucnWb9JNr6yz4Axo9NOX3tAygF93AS5+Okk=; b=RrEf9QyThsjGpW7sA0I6f1YHA70RAP9gFfNxqk4/XdeALIM7x9ghrUIJ XFkCCeQdkQ1+Tq9fBSpM9swMLocdyeWv2p1z8Wv5jauscQfAVuru8KyJL 2PMUH/xegt/FvNAB8G6uqx7IMM8byNPye4xQVygOmnzfSSR9gAvVJdBaq mRyNz+OjsAzshyA91pLIZMK3LCIfNKKoo3niXVG/YsiKfOCkPdMcF1vgB lwPUgmP+iCW0DWp8tob+Hk0PRbVpp+/L3vURW3g6mM1yVzu7FXR+Kwi/o 4pzx7oG/ZosRKwkDU2KPW10H62K/evCMi/FgDTitNFmrkFGvsL/iLw6P4 A==; X-CSE-ConnectionGUID: 9+ycykxeToiNIpy2Y43ZDg== X-CSE-MsgGUID: w2UoDVhgSe2nO1T9CQkzkg== X-IronPort-AV: E=McAfee;i="6700,10204,11330"; a="64054965" X-IronPort-AV: E=Sophos;i="6.13,244,1732608000"; d="scan'208";a="64054965" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2025 08:53:36 -0800 X-CSE-ConnectionGUID: bYgH98KZTWiB2IzPkcLsUw== X-CSE-MsgGUID: BTQAW9EUQUSd6odaj9WVPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="132347870" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Jan 2025 08:53:36 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Wed, 29 Jan 2025 08:53:35 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44 via Frontend Transport; Wed, 29 Jan 2025 08:53:35 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.173) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.44; Wed, 29 Jan 2025 08:53:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oRbuOlIBa3ZqPK5vVPpAurVvVu0YrI7HOcVWnscEq4dGkTh6Sxu9DmNrZVIc/iqX5g4aUC2WVtumY5OI2PWu7ldIEvshh9sKiecBu9cNja/YS6VfcJZ7FJgvD72TQGo0r3c2uMUik1MEa503wvIf9I1JbuNnEhD/D9PXTwSgfR87si6ttOJPCBKQGCVEs3YXK8FODqPYMTfyN6HQkOckpMDwM7qCAht4ynwuKYrg/rcfHAFGMY8XwU/vLvXXABWKnwBEtdOkZeeFVUZmgEiWMpc9YuPvaW8/eKYt0afOYuBiqjsLBGdMVHhRsRRol5NTqvEpFp4wT161ksgOtKqBGA== 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=2lNROg8lVQpBl7ytc57mVByM+zYOPAnNIenupz2ckDQ=; b=bfY4OnrqhpDkVco2ecgm+10k+XZvy7lSvih4ttrTlDZWKt3UlTd0Xn91QTF9YmMaeoSedRgJXHGmhf5Dqd3gop4H1J1dKvcSYWasM2J9CGiGfiHD9lv0Fjxwgj+9x5c21ZNWsNb/cLuAlIe2FdaNdRlOkRNbS0TpoWdb7lPRNnVz6mYlc8lGhgONUm3HuhGkURYLYBn99bwpLXBkhkkDHs4xvjtbgtdpRYaHrVgr0IzibGyDQA4Cs/f6tQD4gbbkaH7ZSCAUwlGQJfXoIOCGCRYL82YYOHttM7FAtU5zMaDw+UKBHPYCrTEifUYnrzFjYgIQv0UxZUpvYxRQs1Tihg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH7PR11MB6793.namprd11.prod.outlook.com (2603:10b6:510:1b7::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.22; Wed, 29 Jan 2025 16:53:32 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%5]) with mapi id 15.20.8377.021; Wed, 29 Jan 2025 16:53:32 +0000 Date: Wed, 29 Jan 2025 16:53:26 +0000 From: Bruce Richardson To: Shaiq Wani CC: , Subject: Re: [PATCH v2 2/3] common/idpf: enable AVX2 for single queue Tx Message-ID: References: <20250108121757.170494-2-shaiq.wani@intel.com> <20250129121856.1040065-1-shaiq.wani@intel.com> <20250129121856.1040065-3-shaiq.wani@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20250129121856.1040065-3-shaiq.wani@intel.com> X-ClientProxiedBy: DU2PR04CA0256.eurprd04.prod.outlook.com (2603:10a6:10:28e::21) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH7PR11MB6793:EE_ X-MS-Office365-Filtering-Correlation-Id: fc0b98b0-b5e2-44e3-2e0f-08dd40857690 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?U5yKDh2t63h3+fcODZiKmrFZ9gDODFPYGII/rS6FFJv0RRWyhvONshsPrD5s?= =?us-ascii?Q?0IGbSBlOUcV2orUadj3ASOoHvUWtXmk3vgaChxXKBu5TylDZnb2g/MQM2C2l?= =?us-ascii?Q?sCHV5TUG/AuRTLUJt9/1PjW/wm/LpiMtYsBD858h702R706a1puELmR/MB7/?= =?us-ascii?Q?CQ+3JHC/6G9bM27OFUH48HxKqCiNcZCUFciTS2qdyWhjalOg0QZHYgktJCKH?= =?us-ascii?Q?ix/AQHs8Y7fEbnm3YdkArzqD/8mP2cxxPds4PQ/WuxNbHXAWGSbEOe+QC2ae?= =?us-ascii?Q?1MV/ymbPiZIlKJ2KfMCrnOhh7HndrEDjs7iRJ9BfktVYp9pLqOd39RE9IWTh?= =?us-ascii?Q?gRLFsrKkReTjpFe5HkvCpOR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?us-ascii?Q?5cZnjDBcM0XyMnrDSmDcu/09JpeEJZR9eZie9729w5+ZJqDtwdSlIXcSfVpn?= =?us-ascii?Q?aiyDDd3+CLztu/vmtj8svwBuhfdqnu+R5rsN3PQNL/MN1gFmvde/QUsbHOjH?= =?us-ascii?Q?7EHstTFAr9Q8ygyMAZwFT4l32lhO?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5m3sUS5uKfMEbbxkuGn3KSPmQ5AS7x5iyk2ALqERmAaYHn7IQ02LdC6+fVEv?= =?us-ascii?Q?1UdxgThMdQHAC7INKaqKwRvPGvgPshXRTcguhs5g8vPg0fgIOlmJxAtQyiRA?= =?us-ascii?Q?Yl1OfISDOq5gzf1fI3U9GuVrX0T1LUMzZwfoC1c0Bngulkh5RiLydxg8JFa5?= =?us-ascii?Q?D/aUcqCTceFdO22vKML80zzOZnNDuXx+HWG+20VqtfOBfDXmFspavtdzeFLS?= =?us-ascii?Q?bt16jFZqNo3lzYXy8XBscG2Aarve7Iu1DiZMbCG2Fzx8e34a7dzXzoJq/qrj?= =?us-ascii?Q?0yrdjdySOUmqmITuRvz7vH8gcrMfHugibYwCgV/N4QOw3srrZyCOtWDhGxMK?= =?us-ascii?Q?30Jg+CheuUPYsLKFWWQV9X6NLDSqfpoYV21sqeD5kg6yyUeRixJ32HhT/29S?= =?us-ascii?Q?FCx0rJwCMZSDRtU7xTdxCIsw0LgPpJx4OLc9lJnpLPDM3KIUdq151Ic4x41F?= =?us-ascii?Q?QdrWvz1+gVnXkHOp0BRgAmUFAGCyrM7V6GUMwT1Jp0X8jKspQyF28jf4f8TJ?= =?us-ascii?Q?Cg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63185xC57ukSQlBw7?= =?us-ascii?Q?odc1HfAFk7DWwhrgr0RN7bYjbLRaBa6jgGIgHzQY7IjASnphZPHtSgkZlwNP?= =?us-ascii?Q?sv7RiPnOwKThipbjr7LNdaA8/K9bG4NMpb+Q/C4shTn6EnKYCGfocdKHzktK?= =?us-ascii?Q?MDhwn/wDiDatKGUblumZeyKurE2Y7oH0PtJQ8UkcR+UZcTMT74B0fiPnJBX4?= =?us-ascii?Q?OQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: fc0b98b0-b5e2-44e3-2e0f-08dd40857690 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2025 16:53:32.1751 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +zzKRtsWWUyIzVhdv7ogc68hzHqq19+DoHNuBFp0/qi1JUZnS81V2fEoPJXNIHKCsLXqhCo1WLJH5Fve0uXR4mB7krMiOZozmvbpN7QYNPo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6793 X-OriginatorOrg: intel.com 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 On Wed, Jan 29, 2025 at 05:48:55PM +0530, Shaiq Wani wrote: > In case some CPUs don't support AVX512. Enable AVX2 for them to > get better per-core performance. > > The single queue model processes all packets in order while > the split queue model separates packet data and metadata into > different queues for parallel processing and improved performance > > Signed-off-by: Shaiq Wani > --- > doc/guides/rel_notes/release_25_03.rst | 7 + > drivers/common/idpf/idpf_common_device.h | 1 + > drivers/common/idpf/idpf_common_rxtx.h | 4 + > drivers/common/idpf/idpf_common_rxtx_avx2.c | 224 ++++++++++++++++++++ > drivers/common/idpf/version.map | 1 + > drivers/net/idpf/idpf_rxtx.c | 13 ++ > 6 files changed, 250 insertions(+) > > diff --git a/doc/guides/rel_notes/release_25_03.rst b/doc/guides/rel_notes/release_25_03.rst > index 85986ffa61..a075bdf695 100644 > --- a/doc/guides/rel_notes/release_25_03.rst > +++ b/doc/guides/rel_notes/release_25_03.rst > @@ -63,6 +63,13 @@ New Features > and even substantial part of its code. > It can be viewed as an extension of rte_ring functionality. > > +* **Added support of AVX2 instructions on IDPF.** > + > + Support for AVX2 instructions in IDPF single queue RX and TX path > + added.The single queue model processes all packets in order within > + one RX queue, while the split queue model separates packet data and > + metadata into different queues for parallel processing and improved performance. > + > Good to see the release note update here. Please also merge in the other doc updates into this patch too. > Removed Items > ------------- > diff --git a/drivers/common/idpf/idpf_common_device.h b/drivers/common/idpf/idpf_common_device.h > index 734be1c88a..5f3e4a4fcf 100644 > --- a/drivers/common/idpf/idpf_common_device.h > +++ b/drivers/common/idpf/idpf_common_device.h > @@ -124,6 +124,7 @@ struct idpf_vport { > bool rx_vec_allowed; > bool tx_vec_allowed; > bool rx_use_avx2; > + bool tx_use_avx2; > bool rx_use_avx512; > bool tx_use_avx512; > > diff --git a/drivers/common/idpf/idpf_common_rxtx.h b/drivers/common/idpf/idpf_common_rxtx.h > index f50cf5ef46..e19e1878f3 100644 > --- a/drivers/common/idpf/idpf_common_rxtx.h > +++ b/drivers/common/idpf/idpf_common_rxtx.h > @@ -306,5 +306,9 @@ __rte_internal > uint16_t idpf_dp_singleq_recv_pkts_avx2(void *rx_queue, > struct rte_mbuf **rx_pkts, > uint16_t nb_pkts); > +__rte_internal > +uint16_t idpf_dp_singleq_xmit_pkts_avx2(void *tx_queue, > + struct rte_mbuf **tx_pkts, > + uint16_t nb_pkts); > > #endif /* _IDPF_COMMON_RXTX_H_ */ > diff --git a/drivers/common/idpf/idpf_common_rxtx_avx2.c b/drivers/common/idpf/idpf_common_rxtx_avx2.c > index de76f01ff8..f82b6d7f4b 100644 > --- a/drivers/common/idpf/idpf_common_rxtx_avx2.c > +++ b/drivers/common/idpf/idpf_common_rxtx_avx2.c > @@ -483,3 +483,227 @@ idpf_dp_singleq_recv_pkts_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16 > { > return _idpf_singleq_recv_raw_pkts_vec_avx2(rx_queue, rx_pkts, nb_pkts); > } > +static __rte_always_inline void > +idpf_tx_backlog_entry(struct idpf_tx_entry *txep, > + struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > +{ > + int i; > + > + for (i = 0; i < (int)nb_pkts; ++i) > + txep[i].mbuf = tx_pkts[i]; > +} > + I don't think it should block this patch - since other paths already use idpf-specific versions - but in next release we must look to switch this driver over to using the common tx (and rx) primitives now in net/intel/common. /Bruce