From: Thomas Monjalon <thomas@monjalon.net>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: 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>,
dev@dpdk.org, Dengdui Huang <huangdengdui@huawei.com>,
Chengwen Feng <fengchengwen@huawei.com>,
Konstantin Ananyev <konstantin.ananyev@huawei.com>
Subject: Re: [PATCH v4] mbuf: add raw free and alloc bulk functions
Date: Wed, 12 Feb 2025 15:56:53 +0100 [thread overview]
Message-ID: <3379015.AxlXzFCzgd@thomas> (raw)
In-Reply-To: <20250130144949.671542-1-mb@smartsharesystems.com>
30/01/2025 15:49, Morten Brørup:
> 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_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().
>
> 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>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Applied, thanks.
prev parent reply other threads:[~2025-02-12 14:57 UTC|newest]
Thread overview: 14+ 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
2025-01-24 10:23 ` Slava Ovsiienko
2025-01-24 11:47 ` Morten Brørup
2025-01-27 17:00 ` Konstantin Ananyev
2025-01-30 14:49 ` [PATCH v4] mbuf: add raw free and " Morten Brørup
2025-02-12 14:56 ` Thomas Monjalon [this message]
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=3379015.AxlXzFCzgd@thomas \
--to=thomas@monjalon.net \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=huangdengdui@huawei.com \
--cc=konstantin.ananyev@huawei.com \
--cc=mb@smartsharesystems.com \
--cc=olivier.matz@6wind.com \
--cc=shahafs@nvidia.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.