DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Ajit Khaparde" <ajit.khaparde@broadcom.com>,
	"Somnath Kotur" <somnath.kotur@broadcom.com>,
	"Chas Williams" <chas3@att.com>,
	"Min Hu (Connor" <humin29@huawei.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
	"Kiran Kumar K" <kirankumark@marvell.com>,
	"Sunil Kumar Kori" <skori@marvell.com>,
	"Satha Rao" <skoteshwar@marvell.com>,
	"Harman Kalra" <hkalra@marvell.com>,
	"Hemant Agrawal" <hemant.agrawal@nxp.com>,
	"Sachin Saxena" <sachin.saxena@oss.nxp.com>,
	"Shai Brandes" <shaibran@amazon.com>,
	"Evgeny Schemeilin" <evgenys@amazon.com>,
	"Ron Beider" <rbeider@amazon.com>,
	"Amit Bernstein" <amitbern@amazon.com>,
	"Wajeeh Atrash" <atrwajee@amazon.com>,
	"Gaetan Rivet" <grive@u256.net>,
	"Dengdui Huang" <huangdengdui@huawei.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>,
	"Praveen Shetty" <praveen.shetty@intel.com>,
	"Vladimir Medvedkin" <vladimir.medvedkin@intel.com>,
	"Anatoly Burakov" <anatoly.burakov@intel.com>,
	"Jingjing Wu" <jingjing.wu@intel.com>,
	"Rosen Xu" <rosen.xu@altera.com>,
	"Andrew Boyer" <andrew.boyer@amd.com>,
	"Dariusz Sosnowski" <dsosnowski@nvidia.com>,
	"Viacheslav Ovsiienko" <viacheslavo@nvidia.com>,
	"Bing Zhao" <bingz@nvidia.com>, "Ori Kam" <orika@nvidia.com>,
	"Suanming Mou" <suanmingm@nvidia.com>,
	"Matan Azrad" <matan@nvidia.com>,
	"Harman Kalra" <hkalra@marvell.com>,
	"Wenbo Cao" <caowenbo@mucse.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	"Jerin Jacob" <jerinj@marvell.com>,
	"Maciej Czekaj" <mczekaj@marvell.com>
Cc: "Thomas Monjalon" <thomas@monjalon.net>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	<dev@dpdk.org>
Subject: Ethdev driver request for changes
Date: Wed, 30 Jul 2025 09:59:52 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FDD3@smartserver.smartshare.dk> (raw)

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=55624173bacb2becaa67793b71391884876673c1
[2]: https://inbox.dpdk.org/dev/20250722093431.555214-1-mb@smartsharesystems.com/

-Morten


                 reply	other threads:[~2025-07-30  7:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98CBD80474FA8B44BF855DF32C47DC35E9FDD3@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=amitbern@amazon.com \
    --cc=anatoly.burakov@intel.com \
    --cc=andrew.boyer@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=atrwajee@amazon.com \
    --cc=bingz@nvidia.com \
    --cc=bruce.richardson@intel.com \
    --cc=caowenbo@mucse.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=evgenys@amazon.com \
    --cc=grive@u256.net \
    --cc=hemant.agrawal@nxp.com \
    --cc=hkalra@marvell.com \
    --cc=huangdengdui@huawei.com \
    --cc=humin29@huawei.com \
    --cc=jerinj@marvell.com \
    --cc=jingjing.wu@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=matan@nvidia.com \
    --cc=mczekaj@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=orika@nvidia.com \
    --cc=praveen.shetty@intel.com \
    --cc=rbeider@amazon.com \
    --cc=rosen.xu@altera.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=shaibran@amazon.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).