From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org
Subject: Re: [PATCH v6 00/10] selective Rx
Date: Wed, 3 Jun 2026 10:31:06 -0700 [thread overview]
Message-ID: <20260603103106.5f13272e@phoenix.local> (raw)
In-Reply-To: <20260602215022.3698662-1-thomas@monjalon.net>
On Tue, 2 Jun 2026 23:49:12 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> This is a new feature in ethdev with tests and mlx5 implementation.
> Selective Rx allows to receive partial data,
> saving some hardware bandwidth.
>
> Note 1: mlx5 support patch is not correctly indented
> to make review easier. An indent patch follows to be squashed.
>
> Note 2: DTS patch is an attempt to test the feature on day 1,
> it is not mandatory if it is blocking the merge.
>
> v2: rework after Gregory
> v3: fix bugs found with AI by Stephen
> v4: fix packet type in DTS test
> v5: fix mlx5 Rx to handle discarding first segment
> v6: fix reindent patch
>
>
> Gregory Etelson (4):
> ethdev: introduce selective Rx
> app/testpmd: support selective Rx
> common/mlx5: add null MR functions
> net/mlx5: support selective Rx
>
> Thomas Monjalon (6):
> app/testpmd: print Rx split capabilities
> net/mlx5: fix Rx split segment counter type
> net/mlx5: reindent previous changes
> common/mlx5: remove callbacks for MR registration
> dts: fix topology capability comparison
> dts: add selective Rx tests
>
> app/test-pmd/config.c | 17 ++
> app/test-pmd/testpmd.c | 71 ++++-
> devtools/libabigail.abignore | 7 +
> doc/guides/nics/features.rst | 14 +
> doc/guides/nics/features/default.ini | 1 +
> doc/guides/nics/features/mlx5.ini | 1 +
> doc/guides/nics/mlx5.rst | 86 ++++--
> doc/guides/rel_notes/release_26_07.rst | 11 +
> doc/guides/testpmd_app_ug/run_app.rst | 20 ++
> drivers/common/mlx5/linux/mlx5_common_verbs.c | 53 ++--
> drivers/common/mlx5/mlx5_common.c | 6 +-
> drivers/common/mlx5/mlx5_common_mr.c | 37 ++-
> drivers/common/mlx5/mlx5_common_mr.h | 29 +-
> drivers/common/mlx5/windows/mlx5_common_os.c | 31 ++-
> drivers/compress/mlx5/mlx5_compress.c | 4 +-
> drivers/crypto/mlx5/mlx5_crypto.h | 2 -
> drivers/crypto/mlx5/mlx5_crypto_gcm.c | 6 +-
> drivers/net/mlx5/mlx5.c | 7 +
> drivers/net/mlx5/mlx5.h | 4 +-
> drivers/net/mlx5/mlx5_ethdev.c | 25 ++
> drivers/net/mlx5/mlx5_flow_aso.c | 21 +-
> drivers/net/mlx5/mlx5_flow_hw.c | 11 +-
> drivers/net/mlx5/mlx5_flow_quota.c | 6 +-
> drivers/net/mlx5/mlx5_hws_cnt.c | 19 +-
> drivers/net/mlx5/mlx5_rx.c | 186 ++++++++-----
> drivers/net/mlx5/mlx5_rx.h | 5 +-
> drivers/net/mlx5/mlx5_rxq.c | 75 +++--
> drivers/net/mlx5/mlx5_trigger.c | 64 ++++-
> dts/api/capabilities.py | 2 +
> dts/api/testpmd/__init__.py | 17 ++
> dts/api/testpmd/types.py | 6 +
> dts/framework/testbed_model/capability.py | 10 +-
> dts/tests/TestSuite_rx_split.py | 262 ++++++++++++++++++
> lib/ethdev/rte_ethdev.c | 24 +-
> lib/ethdev/rte_ethdev.h | 14 +-
> 35 files changed, 880 insertions(+), 274 deletions(-)
> create mode 100644 dts/tests/TestSuite_rx_split.py
>
Still has some issues:
Patch 6: net/mlx5: support selective Rx
Error: after a non-critical Rx error CQE, the next packet is processed with
a stale length and stale CQE; the queue effectively wedges.
To avoid re-polling the CQE on each leading discard segment of one packet,
v6 wraps the poll in "if (len == 0)" and resets len to 0 at the points where
a packet finishes. Two of the three exits reset it (normal completion and
the "no real segment found" skip both do "len = 0;"), but the non-critical
error-CQE path does not:
if (unlikely(len & MLX5_ERROR_CQE_MASK)) {
if (seg->pool)
rte_mbuf_raw_free(rep);
if (len == MLX5_CRITICAL_ERROR_CQE_RET) {
rq_ci = rxq->rq_ci << sges_n;
break;
}
rq_ci >>= sges_n;
rq_ci += skip_cnt;
rq_ci <<= sges_n;
MLX5_ASSERT(!pkt);
continue; /* len still == MLX5_ERROR_CQE_MASK (0x40000000) */
}
MLX5_ERROR_CQE_MASK is 0x40000000, so len is non-zero on this continue. The
next iteration hits "if (len == 0)" == false and skips mlx5_rx_poll_len()
entirely. The following real segment then sets pkt with PKT_LEN(pkt) ==
0x40000000 and rxq_cq_to_mbuf() reads the stale cqe/mcqe. Because
0x40000000 > DATA_LEN(seg), the "more data" branch keeps consuming
descriptors as one bogus giant packet, walking the whole ring and emitting
nothing. Pre-v6 this worked because the poll was unconditional in the !pkt
block.
Suggested fix: reset len before the error-skip continue, matching the other
two exits:
rq_ci >>= sges_n;
rq_ci += skip_cnt;
rq_ci <<= sges_n;
MLX5_ASSERT(!pkt);
len = 0;
continue;
Minor: "tail = seg;" is now set in both the "first real segment" block and
the "real segment: replenish WQE" block; the first is redundant since the
second always runs for the same segment. Harmless, but the duplicate can be
dropped.
next prev parent reply other threads:[~2026-06-03 17:31 UTC|newest]
Thread overview: 99+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 16:09 [PATCH 1/2] ethdev: support selective Rx data Gregory Etelson
2026-02-02 16:09 ` [PATCH 2/2] app/testpmd: " Gregory Etelson
2026-02-02 17:37 ` Stephen Hemminger
2026-02-02 18:17 ` [PATCH 1/2] ethdev: " Stephen Hemminger
2026-05-09 21:56 ` [PATCH v2 00/10] selective Rx Thomas Monjalon
2026-05-09 21:56 ` [PATCH v2 01/10] app/testpmd: print Rx split capabilities Thomas Monjalon
2026-05-09 21:56 ` [PATCH v2 02/10] ethdev: introduce selective Rx Thomas Monjalon
2026-05-09 21:56 ` [PATCH v2 03/10] app/testpmd: support " Thomas Monjalon
2026-05-09 21:56 ` [PATCH v2 04/10] common/mlx5: add null MR functions Thomas Monjalon
2026-05-09 21:56 ` [PATCH v2 05/10] net/mlx5: fix Rx split segment counter type Thomas Monjalon
2026-05-09 21:56 ` [PATCH v2 06/10] net/mlx5: support selective Rx Thomas Monjalon
2026-05-09 21:56 ` [PATCH v2 07/10] net/mlx5: reindent previous changes Thomas Monjalon
2026-05-09 21:56 ` [PATCH v2 08/10] common/mlx5: remove callbacks for MR registration Thomas Monjalon
2026-05-09 21:57 ` [PATCH v2 09/10] dts: fix topology capability comparison Thomas Monjalon
2026-05-09 21:57 ` [PATCH v2 10/10] dts: add selective Rx tests Thomas Monjalon
2026-05-10 16:19 ` [PATCH v2 00/10] selective Rx Stephen Hemminger
2026-05-28 12:46 ` [PATCH v3 " Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 01/10] app/testpmd: print Rx split capabilities Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 02/10] ethdev: introduce selective Rx Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 03/10] app/testpmd: support " Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 04/10] common/mlx5: add null MR functions Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 05/10] net/mlx5: fix Rx split segment counter type Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 06/10] net/mlx5: support selective Rx Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 07/10] net/mlx5: reindent previous changes Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 08/10] common/mlx5: remove callbacks for MR registration Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 09/10] dts: fix topology capability comparison Thomas Monjalon
2026-05-28 12:46 ` [PATCH v3 10/10] dts: add selective Rx tests Thomas Monjalon
2026-05-29 13:33 ` [PATCH v4 00/10] selective Rx Thomas Monjalon
2026-05-29 13:33 ` [PATCH v4 01/10] app/testpmd: print Rx split capabilities Thomas Monjalon
2026-05-29 13:33 ` [PATCH v4 02/10] ethdev: introduce selective Rx Thomas Monjalon
2026-06-01 8:07 ` Andrew Rybchenko
2026-05-29 13:33 ` [PATCH v4 03/10] app/testpmd: support " Thomas Monjalon
2026-05-29 13:33 ` [PATCH v4 04/10] common/mlx5: add null MR functions Thomas Monjalon
2026-05-29 13:33 ` [PATCH v4 05/10] net/mlx5: fix Rx split segment counter type Thomas Monjalon
2026-05-29 13:34 ` [PATCH v4 06/10] net/mlx5: support selective Rx Thomas Monjalon
2026-06-02 13:53 ` Stephen Hemminger
2026-06-02 21:37 ` Thomas Monjalon
2026-05-29 13:34 ` [PATCH v4 07/10] net/mlx5: reindent previous changes Thomas Monjalon
2026-05-29 13:34 ` [PATCH v4 08/10] common/mlx5: remove callbacks for MR registration Thomas Monjalon
2026-05-29 13:34 ` [PATCH v4 09/10] dts: fix topology capability comparison Thomas Monjalon
2026-05-29 13:34 ` [PATCH v4 10/10] dts: add selective Rx tests Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 00/10] selective Rx Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 01/10] app/testpmd: print Rx split capabilities Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 02/10] ethdev: introduce selective Rx Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 03/10] app/testpmd: support " Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 04/10] common/mlx5: add null MR functions Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 05/10] net/mlx5: fix Rx split segment counter type Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 06/10] net/mlx5: support selective Rx Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 07/10] net/mlx5: reindent previous changes Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 08/10] common/mlx5: remove callbacks for MR registration Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 09/10] dts: fix topology capability comparison Thomas Monjalon
2026-06-02 21:38 ` [PATCH v5 10/10] dts: add selective Rx tests Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 00/10] selective Rx Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 01/10] app/testpmd: print Rx split capabilities Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 02/10] ethdev: introduce selective Rx Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 03/10] app/testpmd: support " Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 04/10] common/mlx5: add null MR functions Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 05/10] net/mlx5: fix Rx split segment counter type Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 06/10] net/mlx5: support selective Rx Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 07/10] net/mlx5: reindent previous changes Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 08/10] common/mlx5: remove callbacks for MR registration Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 09/10] dts: fix topology capability comparison Thomas Monjalon
2026-06-02 21:49 ` [PATCH v6 10/10] dts: add selective Rx tests Thomas Monjalon
2026-06-03 17:31 ` Stephen Hemminger [this message]
2026-06-03 18:23 ` [PATCH v7 00/10] selective Rx Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 01/10] app/testpmd: print Rx split capabilities Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 02/10] ethdev: introduce selective Rx Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 03/10] app/testpmd: support " Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 04/10] common/mlx5: add null MR functions Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 05/10] net/mlx5: fix Rx split segment counter type Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 06/10] net/mlx5: support selective Rx Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 07/10] net/mlx5: reindent previous changes Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 08/10] common/mlx5: remove callbacks for MR registration Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 09/10] dts: fix topology capability comparison Thomas Monjalon
2026-06-03 18:23 ` [PATCH v7 10/10] dts: add selective Rx tests Thomas Monjalon
2026-06-04 19:30 ` [PATCH v8 0/9] selective Rx Thomas Monjalon
2026-06-04 19:30 ` [PATCH v8 1/9] app/testpmd: print Rx split capabilities Thomas Monjalon
2026-06-04 19:30 ` [PATCH v8 2/9] ethdev: introduce selective Rx Thomas Monjalon
2026-06-04 19:30 ` [PATCH v8 3/9] app/testpmd: support " Thomas Monjalon
2026-06-04 19:30 ` [PATCH v8 4/9] common/mlx5: add null MR functions Thomas Monjalon
2026-06-04 19:30 ` [PATCH v8 5/9] net/mlx5: fix Rx split segment counter type Thomas Monjalon
2026-06-04 19:30 ` [PATCH v8 6/9] net/mlx5: support selective Rx Thomas Monjalon
2026-06-04 19:30 ` [PATCH v8 7/9] common/mlx5: remove callbacks for MR registration Thomas Monjalon
2026-06-04 19:31 ` [PATCH v8 8/9] dts: fix topology capability comparison Thomas Monjalon
2026-06-04 19:31 ` [PATCH v8 9/9] dts: add selective Rx tests Thomas Monjalon
2026-06-05 21:28 ` Stephen Hemminger
2026-06-05 23:31 ` Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 00/10] selective Rx Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 01/10] app/testpmd: print Rx split capabilities Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 02/10] ethdev: introduce selective Rx Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 03/10] app/testpmd: support " Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 04/10] common/mlx5: add null MR functions Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 05/10] net/mlx5: fix Rx split segment counter type Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 06/10] net/mlx5: support selective Rx Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 07/10] common/mlx5: remove callbacks for MR registration Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 08/10] dts: fix topology capability comparison Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 09/10] dts: use specific types for Rx/Tx offloads Thomas Monjalon
2026-06-05 23:33 ` [PATCH v9 10/10] dts: add selective Rx tests Thomas Monjalon
2026-06-07 18:15 ` [PATCH v9 00/10] selective Rx 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=20260603103106.5f13272e@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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.