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 8B7614611D; Wed, 29 Jan 2025 17:48:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57C76402AE; Wed, 29 Jan 2025 17:48:48 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mails.dpdk.org (Postfix) with ESMTP id 1933A40274 for ; Wed, 29 Jan 2025 17:48:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738169326; x=1769705326; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=qHKdlyVxFeHejFK/zfD6kECCdJrAG4BoAQp9eL8qEqs=; b=AbMq/ddllPxqjLfPqcs0utlB7oylWu7F/vb7yK08XIagIbZ9QgistprB lorPpd/ZEzkBWeTXB38hSM1zzXsNBGowE6/7+yLj5f30qF+DUbOpiZTwe 1FI1HVdeMmTG0cuwQuDgu74KaZjLH6oa2oanLXmmiTj4q96m40ueVm6fd iFMd2QaUbdBYSJ8CXah/fD7k2shZFsnNtWH0AH5fPRTkqrGu/l2nbbypw 7/Vi+0uaf1iGFnJXHVv/LnxzRj+itpLVjpqGiR+wagxk8njnJGwzvLG2S LQYP4rnRaeCQl3ymFjiGQc+AR1DkLxG38NEUoVhFclMRG1bIuhhFkaC38 g==; X-CSE-ConnectionGUID: vdgwJePtRFqlHnniYiUDOg== X-CSE-MsgGUID: iwk2uRXSQQCIxIkYnjaX9g== X-IronPort-AV: E=McAfee;i="6700,10204,11330"; a="41530064" X-IronPort-AV: E=Sophos;i="6.13,244,1732608000"; d="scan'208";a="41530064" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2025 08:48:45 -0800 X-CSE-ConnectionGUID: q+6TT0IQT8K0MYpofUSgeg== X-CSE-MsgGUID: poKopU0jRfi/tp/uZybODg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,244,1732608000"; d="scan'208";a="108879872" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa009.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Jan 2025 08:48:44 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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; Wed, 29 Jan 2025 08:48:44 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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:48:44 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.102) 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:48:44 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MKom17VNSHoxjNeifWS8n1Bgs9l7uxJrb8aIWNY1XIsZOI44TJRwlLT91PIUQt0e0RBSpFymr3nGpMDTisBAn7jdbDDtNa4s7RMo79ekth+wcqr0XV8mVL7gm6WK2lZ/T7WlHe4ZaqEUVbRnA0HhqZ+phSWjWjuHpuSwzmTIMu8reYy41GC30nH3UqLRPii73SosTOdhMaMk07PWfpBcJsI/PzcdB5/gvvqa/iH0qvRhMFN3o/voc1UyJRO2fGbXeJl7djxA07eVAgIzGJUsZNanVZBtA8GuEa5fQjs8H/EG54q4mkBD/Ph65YJWZyBbFYMoZ/2Nn27AhekscE3e7Q== 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=gACYVsNetFMpVgIc8ZAybk8SHHrXwWD76PnU0NnRcMk=; b=caQUgmrdT9rhwpyiSi+rF6MFVGSq0SwcyBPKpscfdqH1DERJ6PQ0OgNu944Vmgq7bsM0dseiGJ4oQYxsDy3y49bpN9xhhf0rskXzMaYAFgzxgWSFnN8fRYemydhJ3qPECgVLlZ+pLSJXsflVjqnYAYmpT6fh78TfO8sL2r+t0bOMWhrTGq9UbTHr92EVfbYMiHD4dGZL1zGpFoZN2ZXPWIlpt7JqugPcqfEKjDMgrH1xUXrCctTtIpHaTeuzvnpKNYkOtcksLc/502AjIRJ/9198sdHzxIEHQpBgR7Ps5swMNfAa6Egw5Ur6lUiNe3msbvtB6kgwJKUpjgB4xBrB5w== 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 LV1PR11MB8844.namprd11.prod.outlook.com (2603:10b6:408:2b4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.18; Wed, 29 Jan 2025 16:48:40 +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:48:40 +0000 Date: Wed, 29 Jan 2025 16:48:34 +0000 From: Bruce Richardson To: Shaiq Wani CC: , Subject: Re: [PATCH v2 1/3] common/idpf: enable AVX2 for single queue Rx Message-ID: References: <20250108121757.170494-2-shaiq.wani@intel.com> <20250129121856.1040065-1-shaiq.wani@intel.com> <20250129121856.1040065-2-shaiq.wani@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20250129121856.1040065-2-shaiq.wani@intel.com> X-ClientProxiedBy: DB9PR06CA0012.eurprd06.prod.outlook.com (2603:10a6:10:1db::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|LV1PR11MB8844:EE_ X-MS-Office365-Filtering-Correlation-Id: 226bc51e-bfb6-4bfe-a21e-08dd4084c88d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?xw83kHT4tEDNSa6ZYWjdG+9gU1R0Ty888nkxiH6L7g8I3PfPuTc/2OXyNfWF?= =?us-ascii?Q?RnvuXzYObgWHZRjUbbrk9PLHy6nDpu21epSRBnTq8Ww1fs9S9CJT8xooMLXz?= =?us-ascii?Q?geBy7kx1Tn+1nmsSn71wtfYJzSQGcKSmNyqx4Ff9758dWhrfj7rvyEo9yfOF?= =?us-ascii?Q?Kjt+fhRsZXPjSIxoucVlnfDpYt0bt2yPAT2xIl25rRMnROIaIN+QP9dDsrsy?= =?us-ascii?Q?LH0aFdOFp34iotvMg2jth24JNq97hUfkFpMbfyRwRhFY7avWMgn2YG/4aQnw?= =?us-ascii?Q?fvz9eg3S6GvjHp/dDSfySt4kRq2SsAxG9PQySxQWH33QDzzs6HOEdkf8tXP9?= =?us-ascii?Q?o1Jfv18GydzNwtPJEGfenDsPisf7pUMm5y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8XlcKOWvfzIIoLU07OCK0X/+7I/u52B57QHlOOG6u7c/tl2TukosS+nU1YZU?= =?us-ascii?Q?6UeKUD4IXwFCCpjIQbd0C76MpmCK1cU+v4QncXtDPYFQREhRdHBDfpuGT0KR?= =?us-ascii?Q?ZtLTk/1MAg7kbSx1eOMObnPpYyHq?= 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)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zeG9iy8Gw2kQQqN6iqfSoOttvkjg7wC0CyLfdXN5ZXyrLlgFcIbD1/Ni4Miu?= =?us-ascii?Q?bVVJcS7Hbf1p09OcxaoNAhjpvWRJFr2La3w4wlA4UFQwcISZkZiRx9ewhi/7?= =?us-ascii?Q?6VnonO77L1bh2Jb0AtnBG10JQ3ASLUDNuQc2VSSZmyIiffvhO+y68xT2AqL/?= =?us-ascii?Q?DCoEt4hu7727IS14HH18hL6LAPgH2ALMZ/dHatR7b/s9vIdJ1jbkSpQ7a7Lj?= =?us-ascii?Q?QLmGDUM0pHfuxVTjzxW9h5wr7LxSl80N37dtbQNpGKIOjysIUCfQoa1+1I5+?= =?us-ascii?Q?c3sS9wJl08FNTKJfM3tkyqavOXHMLd4CAsHCUQsbt7QH/EIhQq6BH+cOgguz?= =?us-ascii?Q?ZfJkoT+4f+9dyh7//ZEwf4R3k+RzxN6FLkEc1bMASEafEQuypFQo06BD9SHd?= =?us-ascii?Q?fXJ6yNxyBQMmIzmYJwn8wOcuATBVdNxxvPsdYbAY0v8BJOvd1gXExmlupioZ?= =?us-ascii?Q?DxcZexRt+fMfnkRXjf68ezYUpJmetyUB6Vf6jNjsCj+Cg0R7I9kGBp8FQ037?= =?us-ascii?Q?rJXE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UCGur3ro1Q?= =?us-ascii?Q?sEn7SsweejCEj/BYtpyQhe4IzbIwzyhD2dpvHEZ2AM1ZOudpvwEd11ZxmwTk?= =?us-ascii?Q?MTrut3g9SsRCrshQndSMreWORlkKovuX58WwVC0HPfV06EUQCpY5RoQZJmqj?= =?us-ascii?Q?ok4F3/ZwEFmrr/b6e6gucENove0Lqq+w083ENC+RNAsjJS4UWh5MrQHs456O?= =?us-ascii?Q?tQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 226bc51e-bfb6-4bfe-a21e-08dd4084c88d 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:48:40.2553 (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: 71KabuNyo1dquFn3VE2MKM2Fmg92f0lDZD2G02VO8AZZd5rHyas72EvFJR5RbCeiuDbgl4U5N+blSH8z58XMfRDC9tp1z9FPQCB6O2W6Jkw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV1PR11MB8844 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:54PM +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 > --- > drivers/common/idpf/idpf_common_device.h | 1 + > drivers/common/idpf/idpf_common_rxtx.h | 4 + > drivers/common/idpf/idpf_common_rxtx_avx2.c | 485 ++++++++++++++++++++ > drivers/common/idpf/meson.build | 9 + > drivers/common/idpf/version.map | 1 + > drivers/net/idpf/idpf_rxtx.c | 11 + This patch needs a rebase onto next-net-intel to update this final path. See also comments inline below. Regards, /Bruce > 6 files changed, 511 insertions(+) > create mode 100644 drivers/common/idpf/idpf_common_rxtx_avx2.c > > diff --git a/drivers/common/idpf/idpf_common_device.h b/drivers/common/idpf/idpf_common_device.h > index bfa927a5ff..734be1c88a 100644 > --- a/drivers/common/idpf/idpf_common_device.h > +++ b/drivers/common/idpf/idpf_common_device.h > @@ -123,6 +123,7 @@ struct idpf_vport { > > bool rx_vec_allowed; > bool tx_vec_allowed; > + bool rx_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 eeeeed12e2..f50cf5ef46 100644 > --- a/drivers/common/idpf/idpf_common_rxtx.h > +++ b/drivers/common/idpf/idpf_common_rxtx.h > @@ -302,5 +302,9 @@ uint16_t idpf_dp_splitq_xmit_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pk > __rte_internal > uint16_t idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, > uint16_t nb_pkts); > +__rte_internal > +uint16_t idpf_dp_singleq_recv_pkts_avx2(void *rx_queue, > + struct rte_mbuf **rx_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 > new file mode 100644 > index 0000000000..de76f01ff8 > --- /dev/null > +++ b/drivers/common/idpf/idpf_common_rxtx_avx2.c > @@ -0,0 +1,485 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2023 Intel Corporation > + */ > + > +#include > + > +#include "idpf_common_rxtx.h" > +#include "idpf_common_device.h" > + > +idpf_dp_singleq_recv_pkts_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) > +{ > + return _idpf_singleq_recv_raw_pkts_vec_avx2(rx_queue, rx_pkts, nb_pkts); > +} I assume the presence of this wrapper function is to allow future support for scattered packets, as with other drivers? > diff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meson.build > index 46fd45c03b..fe54fdcd87 100644 > --- a/drivers/common/idpf/meson.build > +++ b/drivers/common/idpf/meson.build > @@ -16,6 +16,15 @@ sources = files( > ) > > if arch_subdir == 'x86' > + sources += files('idpf_common_rxtx.c') This is already added to sources in the block above. It's also not x86 specific, I believe. > + cflags += ['-DCC_AVX2_SUPPORT'] Strictly speaking, we don't need this, as we always have AVX2 support in x86 builds. The code can just check for RTE_ARCH_x86 macro. > + idpf_avx2_lib = static_library('idpf_avx2_lib', > + 'idpf_common_rxtx_avx2.c', > + dependencies: [static_rte_ethdev, static_rte_kvargs, static_rte_hash], rte_kvargs is already a dependency of hash and ethdev libraries, so you can drop it from the list to shorten it. > + include_directories: includes, > + c_args: [cflags, '-mavx2']) > + objs += idpf_avx2_lib.extract_objects('idpf_common_rxtx_avx2.c') > + > if cc_has_avx512 > cflags += ['-DCC_AVX512_SUPPORT'] > avx512_args = cflags + cc_avx512_flags > diff --git a/drivers/common/idpf/version.map b/drivers/common/idpf/version.map > index 0729f6b912..22b689f5f5 100644 > --- a/drivers/common/idpf/version.map > +++ b/drivers/common/idpf/version.map > @@ -6,6 +6,7 @@ INTERNAL { > > idpf_dp_prep_pkts; > idpf_dp_singleq_recv_pkts; > + idpf_dp_singleq_recv_pkts_avx2; > idpf_dp_singleq_recv_pkts_avx512; > idpf_dp_singleq_recv_scatter_pkts; > idpf_dp_singleq_xmit_pkts; > diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c > index 858bbefe3b..a8377d3fee 100644 > --- a/drivers/net/idpf/idpf_rxtx.c > +++ b/drivers/net/idpf/idpf_rxtx.c > @@ -776,6 +776,10 @@ idpf_set_rx_function(struct rte_eth_dev *dev) > rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) { > vport->rx_vec_allowed = true; > > + if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 && > + rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256) > + vport->rx_use_avx2 = true; > + > if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_512) > #ifdef CC_AVX512_SUPPORT > if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 && > @@ -827,6 +831,13 @@ idpf_set_rx_function(struct rte_eth_dev *dev) > return; > } > #endif /* CC_AVX512_SUPPORT */ > + if (vport->rx_use_avx2) { > + PMD_DRV_LOG(NOTICE, > + "Using Single AVX2 Vector Rx (port %d).", > + dev->data->port_id); > + dev->rx_pkt_burst = idpf_dp_singleq_recv_pkts_avx2; > + return; > + } > } > > if (dev->data->scattered_rx) { > -- > 2.34.1 >