[PATCH 1/3] net/hns3: fix simple Tx path incorrect free the mbuf
Stephen Hemminger
stephen at networkplumber.org
Wed Jan 8 17:57:40 CET 2025
On Wed, 8 Jan 2025 10:40:43 +0800
Jie Hai <haijie1 at huawei.com> wrote:
> On 2024/12/31 1:55, Stephen Hemminger wrote:
> > On Mon, 30 Dec 2024 14:54:03 +0800
> > Jie Hai <haijie1 at huawei.com> wrote:
> >
> >> From: Jie Hai <haijie1 at huawei.com>
> >> To: <dev at dpdk.org>, <thomas at monjalon.net>, <ferruh.yigit at amd.com>, <david.marchand at redhat.com>, <andrew.rybchenko at oktetlabs.ru>, Chengwen Feng <fengchengwen at huawei.com>, "Wei Hu (Xavier)" <xavier.huwei at huawei.com>, Huisong Li <lihuisong at huawei.com>
> >> CC: <haijie1 at huawei.com>, <huangdengdui at huawei.com>
> >> Subject: [PATCH 1/3] net/hns3: fix simple Tx path incorrect free the mbuf
> >> Date: Mon, 30 Dec 2024 14:54:03 +0800
> >> X-Mailer: git-send-email 2.22.0
> >>
> >> From: Dengdui Huang <huangdengdui at huawei.com>
> >>
> >> When RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload is not set,
> >> use rte_pktmbuf_free_seg() to free the mbuf.
> >>
> >> Fixes: 7ef933908f04 ("net/hns3: add simple Tx path")
> >> Cc: stable at dpdk.org
> >>
> >> Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
> >> Signed-off-by: Jie Hai <haijie1 at huawei.com>
> >
> > What about the fast free case which is using rte_mempool_put_bulk when
> > it should use rte_pktmbuf_free_bulk instead?
> >
> >
> Hi, Stephen Hemminger,
>
> During the fast free case, the performance of using
> rte_mempool_put_bulk is higher than that of using
> rte_pktmbuf_free_bulk because other references
> to mbuf do not need to be considered. So it's better
> to not change.
>
> Thanks,
> Jie Hai
The problem is that having an open coded version of this buried in
one driver is a long term potential problem.
If you really think that optimizing free like this is noticeable, then
why not make a new function "rte_pktmuf_fast_free_bulk" and put it in the
regular mbuf library.
More information about the dev
mailing list