From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Song Jiale <songx.jiale@intel.com>,
Aman Singh <aman.deep.singh@intel.com>,
Luca Vizzarro <luca.vizzarro@arm.com>,
Patrick Robb <patrickrobb1997@gmail.com>,
Gregory Etelson <getelson@nvidia.com>
Subject: [PATCH 2/2] app/testpmd: fix runtime config of Rx split
Date: Thu, 25 Jun 2026 01:03:23 +0200 [thread overview]
Message-ID: <20260624230656.2172633-3-thomas@monjalon.net> (raw)
In-Reply-To: <20260624230656.2172633-1-thomas@monjalon.net>
When adding selective Rx, it was assumed that the queue configuration
was set when starting testpmd via the command line options.
But it should be possible to configure mempools with --mbuf-size,
start Rx, stop, and configure later a split in the testpmd CLI.
In such a scenario, a regression prevented to start
with more than 1 mempool without configuring a split:
Configuring Port 0 (socket 0)
ETHDEV: No Rx segmentation offload configured
Fail to configure port 0 rx queues
It is fixed by considering having multiple mempools
is not a condition to trigger Rx split.
A test is added in DTS to validate this use case.
Bugzilla ID: 1956
Fixes: 0be0ad196b52 ("app/testpmd: support selective Rx")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
app/test-pmd/testpmd.c | 3 +--
dts/tests/TestSuite_rx_split.py | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index fcd8a90967..b241a7025b 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2750,8 +2750,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
uint32_t prev_hdrs = 0;
int ret;
- if (multi_rx_mempool == 0 &&
- (rx_pkt_nb_segs > 1 || mbuf_data_size_n > 1)) {
+ if (multi_rx_mempool == 0 && rx_pkt_nb_segs > 1) {
unsigned int nb_segs = RTE_MAX(rx_pkt_nb_segs, (uint8_t)mbuf_data_size_n);
/* multi-segment configuration */
diff --git a/dts/tests/TestSuite_rx_split.py b/dts/tests/TestSuite_rx_split.py
index 633ba0bf1e..5117a569e2 100644
--- a/dts/tests/TestSuite_rx_split.py
+++ b/dts/tests/TestSuite_rx_split.py
@@ -210,6 +210,30 @@ def expected(packet: bytes) -> bytes:
self._start_and_verify(testpmd, expected)
+ @func_test
+ def selective_rx_runtime_config(self) -> None:
+ """Configure selective Rx at runtime after initial startup.
+
+ Steps:
+ Start testpmd with two mbuf-size pools but no rxpkts/rxhdrs.
+ Stop ports, configure buffer split offload, set rxpkts, restart ports.
+ Send an Ether/IP/payload packet.
+
+ Verify:
+ Initial startup succeeds without error.
+ Received packet has Ether + IP headers only after runtime config.
+ Port stats show expected rx_packets and rx_bytes.
+ """
+ with self._create_testpmd(
+ mbuf_size=[512, 0],
+ ) as testpmd:
+ self._start_and_verify(testpmd)
+ testpmd.stop()
+ testpmd.stop_all_ports()
+ testpmd.send_command("port config 0 rx_offload buffer_split on")
+ testpmd.send_command(f"set rxpkts {ETHER_IP_HDR_LEN},0")
+ self._start_and_verify(testpmd, ETHER_IP_HDR_LEN)
+
@func_test
def selective_rx_no_offload(self) -> None:
"""Configure selective Rx with buffer split disabled.
--
2.54.0
prev parent reply other threads:[~2026-06-24 23:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 23:03 [PATCH 0/2] fix Rx split in testpmd Thomas Monjalon
2026-06-24 23:03 ` [PATCH 1/2] dts: simplify packet check in Rx split Thomas Monjalon
2026-06-24 23:03 ` 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=20260624230656.2172633-3-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=getelson@nvidia.com \
--cc=luca.vizzarro@arm.com \
--cc=patrickrobb1997@gmail.com \
--cc=songx.jiale@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