From: fengchengwen <fengchengwen@huawei.com>
To: "Morten Brørup" <mb@smartsharesystems.com>,
"Thomas Monjalon" <thomas@monjalon.net>,
"Ferruh Yigit" <ferruh.yigit@amd.com>,
"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
"Slava Ovsiienko" <viacheslavo@nvidia.com>,
"Shahaf Shuler" <shahafs@nvidia.com>,
"Olivier Matz" <olivier.matz@6wind.com>
Cc: <dev@dpdk.org>, Dengdui Huang <huangdengdui@huawei.com>
Subject: Re: [PATCH v3] mbuf: add fast free bulk and raw alloc bulk functions
Date: Fri, 24 Jan 2025 14:35:08 +0800 [thread overview]
Message-ID: <faa03324-4d7b-4d01-84dc-7468637dcb2d@huawei.com> (raw)
In-Reply-To: <20250121134028.20733-1-mb@smartsharesystems.com>
LGTM
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
On 2025/1/21 21:40, Morten Brørup wrote:
> When putting an mbuf back into its mempool, there are certain requirements
> to the mbuf. Specifically, some of its fields must be initialized.
>
> 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 == 1.
>
> The description of RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE was updated to
> include the remaining requirements, which were missing here.
>
> And finally:
> A new rte_mbuf_fast_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().
>
> For symmetry, a new rte_mbuf_raw_alloc_bulk() inline function was also
> added.
>
> Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> Acked-by: Dengdui Huang <huangdengdui@huawei.com>
next prev parent reply other threads:[~2025-01-24 6:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 16:25 [PATCH] mbuf: add fast free bulk function Morten Brørup
2025-01-14 16:39 ` [PATCH v2] " Morten Brørup
2025-01-14 17:39 ` Stephen Hemminger
2025-01-15 6:52 ` huangdengdui
2025-01-15 9:38 ` Morten Brørup
2025-01-15 12:14 ` huangdengdui
2025-01-16 3:50 ` Stephen Hemminger
2025-01-21 13:40 ` [PATCH v3] mbuf: add fast free bulk and raw alloc bulk functions Morten Brørup
2025-01-24 6:35 ` fengchengwen [this message]
2025-01-24 10:23 ` Slava Ovsiienko
2025-01-24 11:47 ` Morten Brørup
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=faa03324-4d7b-4d01-84dc-7468637dcb2d@huawei.com \
--to=fengchengwen@huawei.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=huangdengdui@huawei.com \
--cc=mb@smartsharesystems.com \
--cc=olivier.matz@6wind.com \
--cc=shahafs@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.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).