From: Junlong Wang <wang.junlong1@zte.com.cn>
To: stephen@networkplumber.org
Cc: dev@dpdk.org
Subject: Re: [v8,0/4] net/zxdh: optimize Rx/Tx path performance
Date: Fri, 3 Jul 2026 16:17:04 +0800 [thread overview]
Message-ID: <20260703081705.612367-1-wang.junlong1@zte.com.cn> (raw)
In-Reply-To: <20260625120317.211780-1-wang.junlong1@zte.com.cn>
[-- Attachment #1.1.1: Type: text/plain, Size: 2231 bytes --]
> [PATCH v8 4/4] net/zxdh: optimize Tx xmit pkts performance
>
> Error: the simple Tx burst signals a bad packet with a short return,
> which the application cannot distinguish from backpressure.
> for (i = 0; i < nb_pkts; i++) {
> rte_prefetch0(tx_pkts[i]);
> if (unlikely(tx_pkts[i]->data_off < hdr_len)) {
> txvq->stats.errors += nb_pkts - i;
> nb_pkts = i;
> break;
> }
> }
>
> A short return from tx_burst is the backpressure signal (transmit ring
> full, retry later). Here it is also used to mean "packet i is bad",
> and the bad mbuf is left owned by the caller. The application has no
> way to tell the two apart: the usual
>
> for (sent = 0; sent < n; )
> sent += rte_eth_tx_burst(port, q, &pkts[sent], n - sent);
>
> loop treats the short return as backpressure and resubmits pkts[i],
> which fails again every time -- head-of-line blocking, and the good
> packets after i (which had ring space) never go out.
>
> A packet that cannot be sent must be consumed by the driver, not
> handed back. Free it in tx_burst, increment the tx error counter, and
> continue with the rest of the burst. For a burst of 16 where only
> index 3 is bad and the ring has room, tx_burst should return 16, with
> stats showing 15 transmitted and 1 tx error. A short return is then
> reserved for the one case the application is entitled to retry: ring
> full.
The design intent of zxdh_xmit_pkts_simple is a fast path with
a usage restriction, not a general Tx entry point.
The restriction is data_off >= hdr_len on single-segment
mbufs. When a packet violates the restriction, the function
exits without sending — that is the contract, not a bug.
Applications that may produce reduced-headroom mbufs are
expected to keep RTE_ETH_TX_OFFLOAD_MULTI_SEGS enabled, in
which case zxdh_xmit_pkts_packed is selected instead and
handles the full set of inputs. The split between the two
paths is intentional.
how about add a paragraph to the "Limitations or Known issues"
section of doc/guides/nics/zxdh.rst describing the fast path's
requirement and pointing at the packed path as the alternative.
Thanks.
[-- Attachment #1.1.2: Type: text/html , Size: 4630 bytes --]
prev parent reply other threads:[~2026-07-03 8:18 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 2:28 [PATCH v1] net/zxdh: optimize Rx/Tx path performance Junlong Wang
2026-03-26 3:27 ` Stephen Hemminger
2026-04-06 4:26 ` Stephen Hemminger
2026-04-23 1:18 ` [PATCH v2 0/3] " Junlong Wang
2026-04-23 1:18 ` [PATCH v2 1/3] net/zxdh: optimize queue structure to improve performance Junlong Wang
2026-04-23 18:57 ` Stephen Hemminger
2026-04-23 1:18 ` [PATCH v2 2/3] net/zxdh: optimize Rx recv pkts performance Junlong Wang
2026-04-23 18:54 ` Stephen Hemminger
2026-04-23 23:39 ` Stephen Hemminger
2026-04-23 1:18 ` [PATCH v2 3/3] net/zxdh: optimize Tx xmit " Junlong Wang
2026-04-23 19:23 ` [PATCH v2 0/3] net/zxdh: optimize Rx/Tx path performance Stephen Hemminger
2026-05-09 6:29 ` [PATCH v3 " Junlong Wang
2026-05-09 6:29 ` [PATCH v3 1/3] net/zxdh: optimize queue structure to improve performance Junlong Wang
2026-05-18 2:20 ` Stephen Hemminger
2026-05-09 6:29 ` [PATCH v3 2/3] net/zxdh: optimize Rx recv pkts performance Junlong Wang
2026-05-09 6:29 ` [PATCH v3 3/3] net/zxdh: optimize Tx xmit " Junlong Wang
2026-05-18 2:22 ` Stephen Hemminger
2026-06-06 6:32 ` [PATCH v4 0/4] net/zxdh: optimize Rx/Tx path performance Junlong Wang
2026-06-06 6:32 ` [PATCH v4 1/4] net/zxdh: optimize queue structure to improve performance Junlong Wang
2026-06-06 6:32 ` [PATCH v4 2/4] net/zxdh: optimize Rx recv pkts performance Junlong Wang
2026-06-06 6:32 ` [PATCH v4 3/4] net/zxdh: optimize Tx xmit " Junlong Wang
2026-06-06 6:32 ` [PATCH v4 4/4] net/zxdh: fix queue enable intr issues Junlong Wang
2026-06-07 18:00 ` [PATCH v4 0/4] net/zxdh: optimize Rx/Tx path performance Stephen Hemminger
2026-06-15 1:19 ` [PATCH v5 " Junlong Wang
2026-06-15 1:19 ` [PATCH v5 1/4] net/zxdh: fix queue enable intr issues Junlong Wang
2026-06-15 1:19 ` [PATCH v5 2/4] net/zxdh: optimize queue structure to improve performance Junlong Wang
2026-06-15 1:19 ` [PATCH v5 3/4] net/zxdh: optimize Rx recv pkts performance Junlong Wang
2026-06-15 1:19 ` [PATCH v5 4/4] net/zxdh: optimize Tx xmit " Junlong Wang
2026-06-15 18:38 ` Stephen Hemminger
2026-06-17 8:28 ` [PATCH v6 0/4] net/zxdh: optimize Rx/Tx path performance Junlong Wang
2026-06-17 8:28 ` [PATCH v6 1/4] net/zxdh: fix queue enable intr issues Junlong Wang
2026-06-17 8:28 ` [PATCH v6 2/4] net/zxdh: optimize queue structure to improve performance Junlong Wang
2026-06-17 8:28 ` [PATCH v6 3/4] net/zxdh: optimize Rx recv pkts performance Junlong Wang
2026-06-17 8:28 ` [PATCH v6 4/4] net/zxdh: optimize Tx xmit " Junlong Wang
2026-06-17 15:21 ` [PATCH v6 0/4] net/zxdh: optimize Rx/Tx path performance Stephen Hemminger
2026-06-23 6:09 ` [PATCH v7 " Junlong Wang
2026-06-23 6:09 ` [PATCH v7 1/4] net/zxdh: fix queue enable intr issues Junlong Wang
2026-06-23 6:09 ` [PATCH v7 2/4] net/zxdh: optimize queue structure to improve performance Junlong Wang
2026-06-23 6:09 ` [PATCH v7 3/4] net/zxdh: optimize Rx recv pkts performance Junlong Wang
2026-06-23 6:09 ` [PATCH v7 4/4] net/zxdh: optimize Tx xmit " Junlong Wang
2026-06-23 15:54 ` [PATCH v7 0/4] net/zxdh: optimize Rx/Tx path performance Stephen Hemminger
2026-06-25 12:03 ` [PATCH v8 " Junlong Wang
2026-06-25 12:03 ` [PATCH v8 1/4] net/zxdh: fix queue enable intr issues Junlong Wang
2026-06-25 12:03 ` [PATCH v8 2/4] net/zxdh: optimize queue structure to improve performance Junlong Wang
2026-06-25 12:03 ` [PATCH v8 3/4] net/zxdh: optimize Rx recv pkts performance Junlong Wang
2026-06-25 12:03 ` [PATCH v8 4/4] net/zxdh: optimize Tx xmit " Junlong Wang
2026-06-25 22:42 ` [PATCH v8 0/4] net/zxdh: optimize Rx/Tx path performance Stephen Hemminger
2026-06-26 3:10 ` [v8,0/4] " Junlong Wang
2026-07-03 8:17 ` Junlong Wang [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=20260703081705.612367-1-wang.junlong1@zte.com.cn \
--to=wang.junlong1@zte.com.cn \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/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