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 1387746C4D; Wed, 30 Jul 2025 09:59:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA28F40668; Wed, 30 Jul 2025 09:59:55 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 20F014025E for ; Wed, 30 Jul 2025 09:59:54 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id AB6AE209B9; Wed, 30 Jul 2025 09:59:53 +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: Ethdev driver request for changes X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Wed, 30 Jul 2025 09:59:52 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FDD3@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Ethdev driver request for changes Thread-Index: AdwBJ+39pe7zqIBrReydHFmPzH8bMg== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Ajit Khaparde" , "Somnath Kotur" , "Chas Williams" , "Min Hu (Connor" , "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" , "Dengdui Huang" , "Bruce Richardson" , "Praveen Shetty" , "Vladimir Medvedkin" , "Anatoly Burakov" , "Jingjing Wu" , "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: "Thomas Monjalon" , "Andrew Rybchenko" , 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 Ethdev driver maintainers (CC: Ethdev API maintainers), Your ethdev drivers support RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE, and = probably call rte_mempool_put_bulk() in the mempool lib when = FAST_FREE'ing mbufs, thereby bypassing the mbuf lib. The appropriate mbuf lib function is rte_mbuf_raw_free_bulk(), which is = a relatively new [1] inline function. It's a simple wrapper calling rte_mempool_put_bulk(), with the addition = of performing mbuf sanity checks when the appropriate defines are = enabled. In this context, "the appropriate defines" should be = RTE_LIBRTE_MBUF_DEBUG (and not also RTE_ENABLE_ASSERT), so I have = provided a patch [2] to fix this. Similarly, the relatively new [1] inline function = rte_mbuf_raw_alloc_bulk() in the mbuf lib is a wrapper for = rte_mempool_get_bulk() in the mempool lib, with added sanity checks = (when the appropriate defines are enabled). Request 1: Please consider changing your driver to call = rte_mbuf_raw_free_bulk() instead of rte_mempool_put_bulk() when = FAST_FREE'ing mbufs. Request 2: Please consider changing your driver to call = rte_mbuf_raw_alloc_bulk() instead of rte_mempool_get_bulk() when = allocating mbufs. Request 3: Please review the patch [2]. General question: Are ethdev drivers being tested with = RTE_LIBRTE_MBUF_DEBUG enabled, or should they be? [1]: = https://git.dpdk.org/dpdk/commit/lib/mbuf/rte_mbuf.h?id=3D55624173bacb2be= caa67793b71391884876673c1 [2]: = https://inbox.dpdk.org/dev/20250722093431.555214-1-mb@smartsharesystems.c= om/ -Morten