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 323F345E05; Mon, 2 Dec 2024 14:12:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF30F40270; Mon, 2 Dec 2024 14:12:47 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id 2BC67400D6 for ; Mon, 2 Dec 2024 14:12: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=1733145166; x=1764681166; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=6OwA2+ubzdMsz/HbeEO23BjyH9hocO0exEcKnyJCRO8=; b=EIiNBkFtJ60X3BDxV3oLdK9ZE7SvKyXmTzDnf2K9qDnwTh3SAOqjbGI/ 5iWFnCHHftXSMrKPQfjvZ7SfjbILNt8OzyhvzMc6M1k4GQgOJ8f1tPvm/ Y8yyK89M4ZZElRJ9aNsmo8aj6zsC22NY8GTBxTdNj6DwLzyYJv6OlNOen NHP334Gb/mRka95uCyelRjQDm1v40+6DYOdXcFYCRrmNDN72K4eXVfvC0 kx3jiVcmKhhXpH+RziZwg7mqA805ERzZzkxq/b6QSo7N/nfxtrIunYGF5 rDZze2GBr6uRZ9Wkr/j3iMxIRuu9KyY5oyNTlzYWBzzb58Pmfv68Ll8xE Q==; X-CSE-ConnectionGUID: 3oPQcBnXS52Aea5beVpI8Q== X-CSE-MsgGUID: 4mwAmTQlR4aA43gJDlMCEQ== X-IronPort-AV: E=McAfee;i="6700,10204,11274"; a="33369814" X-IronPort-AV: E=Sophos;i="6.12,202,1728975600"; d="scan'208";a="33369814" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2024 05:12:44 -0800 X-CSE-ConnectionGUID: CFfu07v+TE6cG/UwnrFoxA== X-CSE-MsgGUID: vfkgisUlT7Si2qiuN62OEg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,202,1728975600"; d="scan'208";a="93485950" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 02 Dec 2024 05:12:44 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 2 Dec 2024 05:12:43 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 2 Dec 2024 05:12:43 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 2 Dec 2024 05:12:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WetFvr1xBXGpzciVOlcDRRNBRT8Y5sMIgs2+vhLZHbFg+vfVZqRKQDkuMeThyoeMvuGaIj5hYvdNxnh9PuTVtXdx4OqzskWZmwJONnk4/zhLqBnn08VK36i3j0symuRKn1zANd2h6152F0HT4wWZAEHyJ/cCCeKBXCqB5lJ+tUOYeaDKp0ZXdCrNWShl1Mf97GAJdt+Ck0IkPypU13iAo9fJ9rIdHHYk9SXgER1pgwXzRZR7XSSXg8ZBpA/oiFHNnS7UgeX2Zha18iWknfN01z+3HgSUkpF252zFyYg3FGyd205CpBBgTR7TDPmzlkS2c4xe8fbbaSnDulCQLWTQdQ== 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=GQvGL4meQOmJHl01blOpxgiFdNiq+5I32vZqYC+3HjI=; b=r6GF/dCfcaW1nXDRp77uvbgF9/wdd99VDVethD7mNRf8WxxKLzNiF6wqVaMWmFVkwY9MXTjtDVAMoif5ECE0Jo5G89zm8m5c1+sWFN5pz7eQMsV56Y2yLyRbT8mj3vgQytM9/x5Abc5Jri/iipsRjqZeMjsPhahsRyF5eJeOrv5DRnKPVbi6BxNGQmLKOId3N09Tqn4g0pC94mJt4FNntkfa4N/Un7fQUjqX9Ofjq7RsRx0y6YeBNQHRjLA5o6XzQzLJORkqZXmklNHBQ/tgRCMO0UlIhEwjXliThj/T4fttgsg6UvBu49wFsQU8wKpHWr5HMWaKJop0VeZZiosdpA== 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 LV2PR11MB6070.namprd11.prod.outlook.com (2603:10b6:408:179::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 13:12: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%4]) with mapi id 15.20.8093.018; Mon, 2 Dec 2024 13:12:39 +0000 Date: Mon, 2 Dec 2024 13:12:34 +0000 From: Bruce Richardson To: David Marchand CC: , Ian Stokes , Vladimir Medvedkin , Anatoly Burakov Subject: Re: [PATCH v1 11/21] net/_common_intel: add post-Tx buffer free function Message-ID: References: <20241122125418.2857301-1-bruce.richardson@intel.com> <20241202112444.1517416-1-bruce.richardson@intel.com> <20241202112444.1517416-12-bruce.richardson@intel.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: WA2P291CA0005.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:1e::11) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|LV2PR11MB6070:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ed64ce5-593d-4ee3-41cd-08dd12d2ff66 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr 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: =?utf-8?B?d3hyUmlFRklHZlJHalI0Y1B3cC9NQnZJVkQxS3VrWHhmNFNpOW5WUVJLaUNP?= =?utf-8?B?MEJ2ZXhhWlFVcGxXM1l0TUEvazVjM2ozeUdSSlo2ZGhXZys4RC9vZU5DVGxI?= =?utf-8?B?S1lJR1FlQ1R6OHNrQXZwWHkvbEpPVWZzZENDU3lZVnpPNGNORGx3dXA1b0c1?= =?utf-8?B?L2IvUkFUSU9mSjNYejFjMEtlWW15bDJSVUZ5bGRMcEtpTHo4Qk05SjI4ZFJJ?= =?utf-8?B?WjRMYUVBeVRTYkJ5cXd6TWxGZWtjSTBsNHBWaEp4UFpjRzMwR3RlK3U4RGFk?= =?utf-8?B?WmR5NG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?= =?utf-8?B?V0dlMDF1akRTeTM3YzFiblZVbXBtaEsvOWJ4aDV3MDVyQjE3dFBmU2RIdllv?= =?utf-8?B?YlZrS2djak1kVEhlSFY3UitBeXV4WjN5TFZCaXBKTVdWZUNLMmNWV3BpMkVI?= =?utf-8?B?Z0N2YS9xSDF6dnR5VlRaVGszTkdGRVh0MDBaNGtQMiszbldxVHVZY1FBQ3ZB?= =?utf-8?B?Nm5zcS82cDFCYVNBQWkrNHpyVzhDamJXVUdsR1JqUEhQUnRrQjE0cDdvYTFG?= =?utf-8?B?WUt2UXJ1R2R0cG4zajh5VjJrbjRGejJKMGRpc3o4UW9LdFhETFdsbDZYMlp5?= =?utf-8?B?OFZ3Rk1xKzlnSms0dkdRSWluSlFZR1hnRXBSTXhmMGlLZVJ3UE5ocTk3MHNB?= =?utf-8?B?amFpc0tkUG8vdHVhRkhSeGtwdEZLbU1odWJoekh0eFVpQkFsU3gyb002SENn?= =?utf-8?B?ZER1ck5LRTRidnkwUjVPNU1tdmJDMFQ2V1dLQnBiZFk1U21iQk5WWGdoSE1Z?= =?utf-8?B?VVltcVVXVU40QXRqRU9QdlU1UXNGbXgySUUvL1BNeHpYQVNPZ2JxNnIyenM3?= =?utf-8?B?RTlvVzNPajJ1OG9KLzBUaXdzREc5ZFZzaE1JY0s3TjhEL25lQUM3cEN2NVc3?= =?utf-8?B?eEtNdEZEOEhXQW13aWNLQT09?= 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: =?utf-8?B?MkJoMXgrYjFwUC9xcDdiQmVESDUza2NxUktHUkM2b1lOcUFhWVJlVTZTUnlG?= =?utf-8?B?dlpKbVJZYS9tSFlyeE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5TzRHaWVSZjFtcmhZaVls?= =?utf-8?B?Z3BUOElHZWdDcFByaUdya29oS3psYkZrZk9JbHgxbzlZS2lCcG0xb3J5STVY?= =?utf-8?B?UTdDNnhCUy9sS1pqcEFtRUtFMW5BdG5scEh6V0ovcGpFdEN2aTZVSTdQcEQ3?= =?utf-8?B?RjZtMlM2RXZvLzgxY0JFOVZucjJuNFhEOGRGeC9tYkhPN1ZCWHBlVEtpaVkz?= =?utf-8?B?TnNkQ2tIQlZsbWxyaG43L093bUZ2MzdiZUhETUEyQlpKYkhhZ0RXYXZiKzRx?= =?utf-8?B?QXc1NC9aYkdFbWJ6YVM2c0lwUzJiTTZncGgyNm96NUdIQ2V5SElFSXpVK2V4?= =?utf-8?B?R1E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6ed64ce5-593d-4ee3-41cd-08dd12d2ff66 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 13:12:39.6392 (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: hEDeBdB8beit6Q/DwhqMo26MutD1s9nytyX8m3R6o4N6pB2itZFNUb3FJC9bDLQ7pHGc42edxzT6EPxcKmXz2OL/eD/drXfmDQwjHcloI1c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR11MB6070 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 Mon, Dec 02, 2024 at 01:59:37PM +0100, David Marchand wrote: > On Mon, Dec 2, 2024 at 12:27 PM Bruce Richardson > wrote: > > > > The actions taken for post-Tx buffer free for the SSE and AVX drivers > > for i40e, iavf and ice drivers are all common, so centralize those in > > common/intel_eth driver. > > > > Signed-off-by: Bruce Richardson > > --- > > drivers/net/_common_intel/tx.h | 71 ++++++++++++++++++++++++ > > drivers/net/i40e/i40e_rxtx_vec_common.h | 72 ++++--------------------- > > drivers/net/iavf/iavf_rxtx_vec_common.h | 61 ++++----------------- > > drivers/net/ice/ice_rxtx_vec_common.h | 61 ++++----------------- > > 4 files changed, 98 insertions(+), 167 deletions(-) > > > > diff --git a/drivers/net/_common_intel/tx.h b/drivers/net/_common_intel/tx.h > > index c372d2838b..a930309c05 100644 > > --- a/drivers/net/_common_intel/tx.h > > +++ b/drivers/net/_common_intel/tx.h > > @@ -7,6 +7,7 @@ > > > > #include > > #include > > +#include > > > > /* forward declaration of the common intel (ci) queue structure */ > > struct ci_tx_queue; > > @@ -107,4 +108,74 @@ ci_tx_backlog_entry(struct ci_tx_entry *txep, struct rte_mbuf **tx_pkts, uint16_ > > txep[i].mbuf = tx_pkts[i]; > > } > > > > +#define IETH_VPMD_TX_MAX_FREE_BUF 64 > > + > > +typedef int (*ci_desc_done_fn)(struct ci_tx_queue *txq, uint16_t idx); > > + > > +static __rte_always_inline int > > +ci_tx_free_bufs(struct ci_tx_queue *txq, ci_desc_done_fn desc_done) > > +{ > > + struct ci_tx_entry *txep; > > + uint32_t n; > > + uint32_t i; > > + int nb_free = 0; > > + struct rte_mbuf *m, *free[IETH_VPMD_TX_MAX_FREE_BUF]; > > + > > + /* check DD bits on threshold descriptor */ > > + if (!desc_done(txq, txq->tx_next_dd)) > > + return 0; > > + > > + n = txq->tx_rs_thresh; > > + > > + /* first buffer to free from S/W ring is at index > > + * tx_next_dd - (tx_rs_thresh-1) > > + */ > > + txep = &txq->sw_ring[txq->tx_next_dd - (n - 1)]; > > + > > + if (txq->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) { > > + for (i = 0; i < n; i++) { > > + free[i] = txep[i].mbuf; > > + /* no need to reset txep[i].mbuf in vector path */ > > + } > > + rte_mempool_put_bulk(free[0]->pool, (void **)free, n); > > + goto done; > > + } > > + > > + m = rte_pktmbuf_prefree_seg(txep[0].mbuf); > > + if (likely(m != NULL)) { > > + free[0] = m; > > + nb_free = 1; > > + for (i = 1; i < n; i++) { > > + m = rte_pktmbuf_prefree_seg(txep[i].mbuf); > > + if (likely(m != NULL)) { > > + if (likely(m->pool == free[0]->pool)) { > > + free[nb_free++] = m; > > + } else { > > + rte_mempool_put_bulk(free[0]->pool, > > + (void *)free, > > + nb_free); > > + free[0] = m; > > + nb_free = 1; > > + } > > + } > > + } > > + rte_mempool_put_bulk(free[0]->pool, (void **)free, nb_free); > > + } else { > > + for (i = 1; i < n; i++) { > > + m = rte_pktmbuf_prefree_seg(txep[i].mbuf); > > + if (m != NULL) > > + rte_mempool_put(m->pool, m); > > + } > > + } > > Is it possible to take an extra step and convert to rte_pktmbuf_free_bulk? > Will investigate....