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 0C6D846F2B; Thu, 18 Sep 2025 10:50:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E72AF402C9; Thu, 18 Sep 2025 10:50:15 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id E67CD402C5; Thu, 18 Sep 2025 10:50:13 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id BF283205C8; Thu, 18 Sep 2025 10:50:12 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Fixing MBUF_FAST_FREE TX offload requirements? Date: Thu, 18 Sep 2025 10:50:11 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F65442@smartserver.smartshare.dk> X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-TNEF-Correlator: Thread-Topic: Fixing MBUF_FAST_FREE TX offload requirements? Thread-Index: AdwoeT4kzGDKcdJWQM+eShxAfVQ/ZQ== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Ajit Khaparde" , "Somnath Kotur" , "Nithin Dabilpuram" , "Kiran Kumar K" , "Sunil Kumar Kori" , "Satha Rao" , "Harman Kalra" , "Hemant Agrawal" , "Sachin Saxena" , "Shai Brandes" , "Evgeny Schemeilin" , "Ron Beider" , "Amit Bernstein" , "Wajeeh Atrash" , "Gaetan Rivet" , "Xingui Yang" , "Chengwen Feng" , "Bruce Richardson" , "Praveen Shetty" , "Vladimir Medvedkin" , "Anatoly Burakov" , "Jingjing Wu" , "Praveen Shetty" , "Rosen Xu" , "Andrew Boyer" , "Dariusz Sosnowski" , "Viacheslav Ovsiienko" , "Bing Zhao" , "Ori Kam" , "Suanming Mou" , "Matan Azrad" , "Harman Kalra" , "Wenbo Cao" , "Andrew Rybchenko" , "Jerin Jacob" , "Maciej Czekaj" Cc: , , "Konstantin Ananyev" , "Ivan Malov" , "Thomas Monjalon" 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 Dear NIC driver maintainers (CC: DPDK Tech Board), The DPDK Tech Board has discussed that patch [1] (included in DPDK = 25.07) extended the documented requirements to the = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload. These changes put additional limitations on applications' use of the = MBUF_FAST_FREE TX offload, and made MBUF_FAST_FREE mutually exclusive = with MULTI_SEGS (which is typically used for jumbo frame support). The Tech Board discussed that these changes do not reflect the intention = of the MBUF_FAST_FREE TX offload, and wants to fix it. Mainly, MBUF_FAST_FREE and MULTI_SEGS should not be mutually exclusive. The original RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE requirements were: When set, application must guarantee that 1) per-queue all mbufs come from the same mempool, and 2) mbufs have refcnt =3D 1. The patch added the following requirements to the MBUF_FAST_FREE = offload, reflecting rte_pktmbuf_prefree_seg() postconditions: 3) mbufs are direct, 4) mbufs have next =3D NULL and nb_segs =3D 1. Now, the key question is: Can we roll back to the original two requirements? Or do the drivers also depend on the third and/or fourth requirements? Drivers freeing mbufs directly to a mempool should use the new = rte_mbuf_raw_free_bulk() instead of rte_mempool_put_bulk(), so the = preconditions for freeing mbufs directly into a mempool are validated in = mbuf debug mode (with RTE_LIBRTE_MBUF_DEBUG enabled). Similarly, rte_mbuf_raw_alloc_bulk() should be used instead of = rte_mempool_get_bulk(). PS: The feature documentation [2] still reflects the original = requirements. [1]: = https://github.com/DPDK/dpdk/commit/55624173bacb2becaa67793b7139188487667= 3c1 [2]: = https://elixir.bootlin.com/dpdk/v25.07/source/doc/guides/nics/features.rs= t#L125 Venlig hilsen / Kind regards, -Morten Br=F8rup