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 0769146203; Wed, 12 Feb 2025 15:57:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B3B142789; Wed, 12 Feb 2025 15:56:59 +0100 (CET) Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.146]) by mails.dpdk.org (Postfix) with ESMTP id DDDE04111B for ; Wed, 12 Feb 2025 15:56:57 +0100 (CET) Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id 5E27F1380044; Wed, 12 Feb 2025 09:56:57 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Wed, 12 Feb 2025 09:56:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739372217; x=1739458617; bh=Pt63Wb6mmQttGr+z9J7TfcbVW69RgSJgFjxSvWcM14s=; b= dqk8tLSmNf2GcxbW2e6VEu/AyybZ9v2Hn1UG2cnsGskJKH0wX0i1z735vmvSHNsE Q2xR8inLlx2jsK9I9IFTswJslhEk4aKrvBhilGXgcbYyJ2UNwlsngngH4i6Ar9TD pTfIs5mYoan6KG24D31V4/o4BQR3ytzui6uVUiFqaPMdktNif7z6bm9T1sfwwoqy 6R9+6FCWcDb7HKzysmYZZDgrLF3fKSva31tuz+He6SPyqktd1IOkRpv361yCl2HK O0gNxubqSNiLqPiTCaAIDm5hlA2lvdBPxT6txa2sm0Cbf2bsXZz8hI0ZiYD3xyhm tnxyei6LSmx23nNx9sb0Bw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739372217; x= 1739458617; bh=Pt63Wb6mmQttGr+z9J7TfcbVW69RgSJgFjxSvWcM14s=; b=E O++8mRMPh0m+nfRrb69WOUO7UI43HjhdpVeiYUdmf0ojWPr9/sCOi14VO4OUeOKH XVxTCsoOGVNe/yi2UW+yflA7bCcHKnKkqvOqVJaPnFm+BjiVIpsumtBqyHIfX72v PjSarMOMXiIK9WSqxVbq3gYNjXTrmvr+FtiW4fcFEtRpARBQzO6sXU1B1mgxv46l p23lOHvGgoU2twoBMY8z70hrRsJ92zNjkIox5ZbiyYr/jPZBf58ifFC1ShY8onS+ c6R96x7S2f8M/LDkcbTtV792SjwosQy69rYjqoQUFuJpgWdVQMBXq3VugszXeAa6 AhCqKEJLDiWjBM4GFlYUg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeggedujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdej necuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjh grlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepgedttdeljeejgeffkeekkedtjeev tdehvedtkeeivdeuuedvieduvdelveejueejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdp nhgspghrtghpthhtohepuddtpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmsg esshhmrghrthhshhgrrhgvshihshhtvghmshdrtghomhdprhgtphhtthhopehfvghrrhhu hhdrhihighhithesrghmugdrtghomhdprhgtphhtthhopegrnhgurhgvfidrrhihsggthh gvnhhkohesohhkthgvthhlrggsshdrrhhupdhrtghpthhtohepvhhirggthhgvshhlrghv ohesnhhvihguihgrrdgtohhmpdhrtghpthhtohepshhhrghhrghfshesnhhvihguihgrrd gtohhmpdhrtghpthhtohepohhlihhvihgvrhdrmhgrthiiseeifihinhgurdgtohhmpdhr tghpthhtohepuggvvhesughpughkrdhorhhgpdhrtghpthhtohephhhurghnghguvghngh guuhhisehhuhgrfigvihdrtghomhdprhgtphhtthhopehfvghnghgthhgvnhhgfigvnhes hhhurgifvghirdgtohhm X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Feb 2025 09:56:55 -0500 (EST) From: Thomas Monjalon To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: Ferruh Yigit , Andrew Rybchenko , Slava Ovsiienko , Shahaf Shuler , Olivier Matz , dev@dpdk.org, Dengdui Huang , Chengwen Feng , Konstantin Ananyev Subject: Re: [PATCH v4] mbuf: add raw free and alloc bulk functions Date: Wed, 12 Feb 2025 15:56:53 +0100 Message-ID: <3379015.AxlXzFCzgd@thomas> In-Reply-To: <20250130144949.671542-1-mb@smartsharesystems.com> References: <20250114162544.125448-1-mb@smartsharesystems.com> <20250130144949.671542-1-mb@smartsharesystems.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 30/01/2025 15:49, Morten Br=C3=B8rup: > When putting an mbuf back into its mempool, there are certain requirements > to the mbuf. Specifically, some of its fields must be initialized. >=20 > These requirements are in fact invariants about free mbufs, held in > mempools, and thus also apply when allocating an mbuf from a mempool. > With this in mind, the additional assertions in rte_mbuf_raw_free() were > moved to __rte_mbuf_raw_sanity_check(). > Furthermore, the assertion regarding pinned external buffer was enhanced; > it now also asserts that the referenced pinned external buffer has > refcnt =3D=3D 1. >=20 > The description of RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE was updated to > include the remaining requirements, which were missing here. >=20 > And finally: > A new rte_mbuf_raw_free_bulk() inline function was added for the > benefit of ethdev drivers supporting fast release of mbufs. > It asserts these requirements and that the mbufs belong to the specified > mempool, and then calls rte_mempool_put_bulk(). >=20 > For symmetry, a new rte_mbuf_raw_alloc_bulk() inline function was also > added. >=20 > Signed-off-by: Morten Br=C3=B8rup > Acked-by: Dengdui Huang > Acked-by: Chengwen Feng > Acked-by: Viacheslav Ovsiienko > Acked-by: Konstantin Ananyev Applied, thanks.