From: Bruce Richardson <bruce.richardson@intel.com>
To: Shaiq Wani <shaiq.wani@intel.com>
Cc: <dev@dpdk.org>, <aman.deep.singh@intel.com>
Subject: Re: [PATCH 6/6] net/idpf: fix split queue AVX2 Tx burst and completion
Date: Wed, 20 May 2026 13:25:45 +0100 [thread overview]
Message-ID: <ag2oSQq8lGrbm3qi@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260511090935.2288837-7-shaiq.wani@intel.com>
On Mon, May 11, 2026 at 02:39:35PM +0530, Shaiq Wani wrote:
> Clamp burst size to tx_rs_thresh to prevent crossing completion
> boundaries. Update tx_next_rs on ring wrap and after each burst
> so that completion tracking in idpf_splitq_scan_cq_ring works
> correctly. Fix sw_ring pointer to use base-plus-offset.
>
> Fixes: 57560a92167a ("net/idpf: add AVX2 Tx path for split queue config")
> Signed-off-by: Shaiq Wani <shaiq.wani@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> .../net/intel/idpf/idpf_common_rxtx_avx2.c | 24 ++++++++++++++-----
> 1 file changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c b/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
> index 7c547b5f09..b6c4fdf20e 100644
> --- a/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
> +++ b/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
> @@ -884,17 +884,21 @@ idpf_splitq_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
> struct ci_tx_queue *txq = (struct ci_tx_queue *)tx_queue;
> struct idpf_flex_tx_sched_desc *txdp;
> struct ci_tx_entry_vec *txep;
> - uint16_t n, nb_commit;
> + uint16_t n, nb_commit, tx_id;
> uint64_t cmd_dtype = IDPF_TXD_FLEX_FLOW_CMD_EOP;
> - uint16_t tx_id = txq->tx_tail;
>
> - nb_commit = (uint16_t)RTE_MIN(txq->nb_tx_free, nb_pkts);
> - nb_pkts = nb_commit;
> + /* cross rs_thresh boundary is not allowed */
> + nb_pkts = RTE_MIN(nb_pkts, txq->tx_rs_thresh);
> +
> + nb_pkts = (uint16_t)RTE_MIN(txq->nb_tx_free, nb_pkts);
> + nb_commit = nb_pkts;
> if (unlikely(nb_pkts == 0))
> return 0;
>
> - txdp = (struct idpf_flex_tx_sched_desc *)&txq->desc_ring[tx_id];
> - txep = &txq->sw_ring_vec[tx_id];
> + tx_id = txq->tx_tail;
> + txdp = &txq->desc_ring[tx_id];
> + txep = (void *)txq->sw_ring;
> + txep += tx_id;
>
> txq->nb_tx_free = (uint16_t)(txq->nb_tx_free - nb_pkts);
>
> @@ -909,10 +913,14 @@ idpf_splitq_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
> idpf_splitq_vtx1_avx2(txdp, *tx_pkts++, cmd_dtype);
>
> nb_commit = (uint16_t)(nb_commit - n);
> +
> tx_id = 0;
> + txq->tx_next_rs = (uint16_t)(txq->tx_rs_thresh - 1);
>
> + /* avoid reach the end of ring */
> txdp = &txq->desc_ring[tx_id];
> txep = (void *)txq->sw_ring;
> + txep += tx_id;
> }
>
> ci_tx_backlog_entry_vec(txep, tx_pkts, nb_commit);
> @@ -920,6 +928,10 @@ idpf_splitq_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
> idpf_splitq_vtx_avx2(txdp, tx_pkts, nb_commit, cmd_dtype);
>
> tx_id = (uint16_t)(tx_id + nb_commit);
> + if (tx_id > txq->tx_next_rs)
> + txq->tx_next_rs =
> + (uint16_t)(txq->tx_next_rs + txq->tx_rs_thresh);
> +
> txq->tx_tail = tx_id;
>
> IDPF_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail);
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-05-20 12:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 9:09 [PATCH 0/6] net/idpf: fix split queue AVX2 datapath Shaiq Wani
2026-05-11 9:09 ` [PATCH 1/6] net/idpf: fix gen bit extraction in split queue AVX2 Rx Shaiq Wani
2026-05-20 12:20 ` Bruce Richardson
2026-05-11 9:09 ` [PATCH 2/6] net/idpf: fix DD bit byte offset " Shaiq Wani
2026-05-20 12:21 ` Bruce Richardson
2026-05-11 9:09 ` [PATCH 3/6] net/idpf: fix mbuf initializer source " Shaiq Wani
2026-05-20 12:21 ` Bruce Richardson
2026-05-11 9:09 ` [PATCH 4/6] net/idpf: fix ptype insert position " Shaiq Wani
2026-05-20 12:22 ` Bruce Richardson
2026-05-11 9:09 ` [PATCH 5/6] net/idpf: fix split queue AVX2 Tx buffer size shift Shaiq Wani
2026-05-20 12:23 ` Bruce Richardson
2026-05-11 9:09 ` [PATCH 6/6] net/idpf: fix split queue AVX2 Tx burst and completion Shaiq Wani
2026-05-20 12:25 ` Bruce Richardson [this message]
2026-05-20 12:36 ` [PATCH 0/6] net/idpf: fix split queue AVX2 datapath Bruce Richardson
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=ag2oSQq8lGrbm3qi@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=shaiq.wani@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