From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: mb@smartsharesystems.com, ciara.loftus@intel.com,
Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v4 1/2] net/intel: write mbuf for last Tx desc of segment
Date: Tue, 2 Jun 2026 16:45:11 +0100 [thread overview]
Message-ID: <20260602154513.1079865-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20260602154513.1079865-1-bruce.richardson@intel.com>
When a single mbuf segment has more data than can be handled by a single
Tx data descriptor in the TSO case, adjust how the storing of mbufs is
being done. Rather than putting the mbuf pointer in the first slot for
that segment, store it in the last slot instead. This guarantees for us
that the descriptor for which we have desc-done (DD) writeback always
has a valid mbuf associated with it.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/common/tx_scalar.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/common/tx_scalar.h b/drivers/net/intel/common/tx_scalar.h
index 9fcd2e4733..7809bd53e8 100644
--- a/drivers/net/intel/common/tx_scalar.h
+++ b/drivers/net/intel/common/tx_scalar.h
@@ -509,7 +509,6 @@ ci_xmit_pkts(struct ci_tx_queue *txq,
if (txe->mbuf)
rte_pktmbuf_free_seg(txe->mbuf);
- txe->mbuf = m_seg;
/* Setup TX Descriptor */
/* Calculate segment length, using IPsec callback if provided */
@@ -528,6 +527,7 @@ ci_xmit_pkts(struct ci_tx_queue *txq,
((uint64_t)CI_MAX_DATA_PER_TXD << CI_TXD_QW1_TX_BUF_SZ_S) |
((uint64_t)td_tag << CI_TXD_QW1_L2TAG1_S);
write_txd(txd, buf_dma_addr, cmd_type_offset_bsz);
+ txe->mbuf = NULL;
buf_dma_addr += CI_MAX_DATA_PER_TXD;
slen -= CI_MAX_DATA_PER_TXD;
@@ -548,6 +548,7 @@ ci_xmit_pkts(struct ci_tx_queue *txq,
((uint64_t)slen << CI_TXD_QW1_TX_BUF_SZ_S) |
((uint64_t)td_tag << CI_TXD_QW1_L2TAG1_S);
write_txd(txd, buf_dma_addr, cmd_type_offset_bsz);
+ txe->mbuf = m_seg;
tx_id = txe->next_id;
txe = txn;
--
2.53.0
next prev parent reply other threads:[~2026-06-02 15:45 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 11:06 mbuf fast-free requirements analysis Morten Brørup
2025-12-15 11:46 ` Bruce Richardson
2026-01-14 15:31 ` Morten Brørup
2026-01-14 16:36 ` Bruce Richardson
2026-01-14 18:05 ` Morten Brørup
2026-01-15 8:46 ` Bruce Richardson
2026-01-15 9:04 ` Morten Brørup
2026-01-23 11:20 ` [PATCH] net/intel: optimize for fast-free hint Bruce Richardson
2026-01-23 12:05 ` Morten Brørup
2026-01-23 12:09 ` Bruce Richardson
2026-01-23 12:27 ` Morten Brørup
2026-01-23 12:53 ` Bruce Richardson
2026-01-23 13:06 ` Morten Brørup
2026-04-08 13:25 ` [PATCH v2] " Bruce Richardson
2026-04-08 19:27 ` Morten Brørup
2026-05-19 11:01 ` Bruce Richardson
2026-05-19 11:06 ` [PATCH v3] " Bruce Richardson
2026-05-28 13:23 ` Loftus, Ciara
2026-06-02 15:36 ` Bruce Richardson
2026-06-02 15:45 ` [PATCH v4 0/2] " Bruce Richardson
2026-06-02 15:45 ` Bruce Richardson [this message]
2026-06-03 14:21 ` [PATCH v4 1/2] net/intel: write mbuf for last Tx desc of segment Loftus, Ciara
2026-06-02 15:45 ` [PATCH v4 2/2] net/intel: optimize for fast-free hint Bruce Richardson
2026-06-02 16:26 ` [PATCH v4 0/2] " Morten Brørup
2026-06-03 15:56 ` Bruce Richardson
2026-01-23 11:33 ` mbuf fast-free requirements analysis Bruce Richardson
2025-12-15 14:41 ` Konstantin Ananyev
2025-12-15 16:14 ` Morten Brørup
2025-12-19 17:08 ` Konstantin Ananyev
2025-12-20 7:33 ` Morten Brørup
2025-12-22 15:22 ` Konstantin Ananyev
2025-12-22 17:11 ` Morten Brørup
2025-12-22 17:43 ` Bruce Richardson
2026-01-13 14:48 ` Konstantin Ananyev
2026-01-13 16:07 ` Stephen Hemminger
2026-01-14 17:01 ` Bruce Richardson
2026-01-14 17:31 ` Morten Brørup
2026-01-14 17:45 ` 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=20260602154513.1079865-2-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=ciara.loftus@intel.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.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