From: Stephen Hemminger <stephen@networkplumber.org>
To: Kai Ji <kai.ji@intel.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
Konstantin Ananyev <konstantin.ananyev@huawei.com>,
Jie Liu <liujie5@linkdatatechnology.com>
Subject: Re: [dpdk-dev v1] net/sxe2: replace private mempool cache bypass with rte_mbuf_raw_free_bulk
Date: Fri, 21 Aug 2026 11:03:28 -0700 [thread overview]
Message-ID: <20260821110328.25240bf9@phoenix.local> (raw)
In-Reply-To: <20260820155008.1989965-1-kai.ji@intel.com>
On Thu, 20 Aug 2026 15:50:08 +0000
Kai Ji <kai.ji@intel.com> wrote:
> The AVX-512 TX completion path directly manipulated the mempool cache
> internals (cache->objs, cache->len, cache->flushthresh) instead of using
> the mempool API. This pattern is the same private bypass that existed in
> the Intel common TX library before it was removed by commit 062d6fe5d0e4
> ("net/intel: do not bypass mbuf lib for buffer fast-free") for the same
> reason: it omits mbuf instrumentation (history marking) and contains
> dead flush code that accesses cache->objs[cache->size], which is one
> past the end of the array when cache_size == RTE_MEMPOOL_CACHE_MAX_SIZE.
>
> Replace with a single rte_mbuf_raw_free_bulk() call, matching the Intel
> common library. The MBUF_FAST_FREE offload guarantee (single pool,
> refcnt == 1) makes this correct and the compiler inlines the bulk-free
> call to eliminate the overhead difference.
>
> Signed-off-by: Kai Ji <kai.ji@intel.com>
> ---
Looks good but still some leftovers to remove.
FAILED: drivers/net/sxe2/libsxe2_avx512_lib.a.p/sxe2_txrx_vec_avx512.c.o
gcc -Idrivers/net/sxe2/libsxe2_avx512_lib.a.p -Idrivers/net/sxe2 -I../drivers/net/sxe2 -Idrivers/common/sxe2 -I../drivers/common/sxe2 -Ilib/ethdev -I../lib/ethdev -Ilib/eal/common -I../lib/eal/common -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -I../kernel/linux -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/argparse -I../lib/argparse -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter -I../lib/meter -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -Ilib/security -I../lib/security -Ilib/cryptodev -I../lib/cryptodev -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/pci -I../lib/pci -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -include rte_config.h -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -g -DCC_AVX512_SUPPORT -mavx512f -mavx512bw -march=skylake-avx512 -MD -MQ drivers/net/sxe2/libsxe2_avx512_lib.a.p/sxe2_txrx_vec_avx512.c.o -MF drivers/net/sxe2/libsxe2_avx512_lib.a.p/sxe2_txrx_vec_avx512.c.o.d -o drivers/net/sxe2/libsxe2_avx512_lib.a.p/sxe2_txrx_vec_avx512.c.o -c ../drivers/net/sxe2/sxe2_txrx_vec_avx512.c
../drivers/net/sxe2/sxe2_txrx_vec_avx512.c: In function ‘sxe2_tx_bufs_free_vec_avx512’:
../drivers/net/sxe2/sxe2_txrx_vec_avx512.c:47:1: error: label ‘normal’ defined but not used [-Werror=unused-label]
normal:
^~~~~~
cc1: all warnings being treated as errors
[2434/3759] Generating drivers/rte_net_sxe2_ma
next prev parent reply other threads:[~2026-08-21 18:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 15:50 [dpdk-dev v1] net/sxe2: replace private mempool cache bypass with rte_mbuf_raw_free_bulk Kai Ji
2026-08-21 18:03 ` Stephen Hemminger [this message]
2026-08-27 15:10 ` [dpdk-dev v2] " Kai Ji
2026-09-21 15:52 ` [PATCH v3] " Kai Ji
2026-09-22 16:24 ` Stephen Hemminger
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=20260821110328.25240bf9@phoenix.local \
--to=stephen@networkplumber.org \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=kai.ji@intel.com \
--cc=konstantin.ananyev@huawei.com \
--cc=liujie5@linkdatatechnology.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.