DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
To: dev@dpdk.org
Cc: weh@microsoft.com, longli@microsoft.com, stephen@networkplumber.org
Subject: [PATCH v2 0/2] net/mana: fix tx burst error handling and add TSO support
Date: Mon, 26 Oct 2026 21:21:23 +0000	[thread overview]
Message-ID: <20261026212125.3193356-1-tathagat.dpdk@gmail.com> (raw)
In-Reply-To: <20261012073626.642397-1-tathagat.dpdk@gmail.com>

This series fixes error handling in the MANA transmit burst and adds
hardware TCP segmentation offload (TSO).

Patch 1 drops a packet that cannot be sent, counting it in stats.errors,
instead of skipping or stalling on it, so rte_eth_tx_burst() keeps
returning a contiguous prefix and a short return means only a full ring.
It also bounds the segment count by the size of the SGL array.

Patch 2 adds hardware TSO for IPv4 and IPv6 TCP packets.

Testing on Azure Standard_D8ds_v6 (kernel 6.8.0-1067-azure, MANA PCI
7870:00:00.0; the driver reports no firmware version), two VMs on one
subnet:
- VM A ran testpmd txonly, modified locally to emit TCP packets with
  RTE_MBUF_F_TX_TCP_SEG set (not part of this series), after
  "csum set ip hw 0", "csum set tcp hw 0" and "tso set 1460 0".
- VM B captured the frames with tcpdump on its kernel interface, GRO off.
- A 4000-byte IPv4 packet in a single mbuf, in mbufs with a header-only
  first segment, and in mbufs with payload in the first segment, each
  arrived as 1514, 1514 and 1080 byte frames with consecutive TCP
  sequence numbers, per-segment IP IDs and valid IP and TCP checksums.
- Plain UDP with "tso set 0" was unaffected.
IPv6 TSO was not tested.

v2:
- Patch 1:
  * Drop unsendable packets and return a separate consumed count instead
    of breaking out of the burst; break only when the ring is full.
  * Move the MAX_SGL_ENTRIES_FOR_TRANSMIT check here from patch 2, limit
    nb_seg_max and nb_mtu_seg_max to it, and add Fixes and Cc stable.
- Patch 2:
  * Use the drop path for all per-packet TSO failures.
  * Honour the TCP checksum implied by RTE_MBUF_F_TX_TCP_SEG when the
    packet is sent unsegmented.
  * Bound the TSO segment walk and check the SGE count against the
    expected one, instead of the unreachable check in the loop.
  * Move GDMA_WR_OOB_IN_SGL and GDMA_WR_PAD_BY_SGE0 next to
    struct gdma_work_request.
  * Document the extra SGE in mana.rst, add a release note, and rewrite
    the commit message.

With the drop-and-continue path, CQE suppression is back to the original
behavior where only an uncompleted final packet of a burst may wait for a
subsequent burst to generate a CQE.

Tathagat Priyadarshi (2):
  net/mana: fix transmit burst error handling
  net/mana: add hardware TSO support

 doc/guides/nics/features/mana.ini      |   1 +
 doc/guides/nics/mana.rst               |   8 ++
 doc/guides/rel_notes/release_26_11.rst |   4 +
 drivers/net/mana/gdma.c                |   5 +
 drivers/net/mana/mana.c                |   4 +-
 drivers/net/mana/mana.h                |   6 +-
 drivers/net/mana/tx.c                  | 191 +++++++++++++++++++++----
 7 files changed, 186 insertions(+), 33 deletions(-)

-- 
2.43.0

  parent reply	other threads:[~2026-10-27  9:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12  7:36 [PATCH 0/2] net/mana: fix transmit burst and add hardware TSO support Tathagat Priyadarshi
2026-10-12  7:36 ` [PATCH 1/2] net/mana: fix transmit burst error handling Tathagat Priyadarshi
2026-10-12  7:36 ` [PATCH 2/2] net/mana: add hardware TSO support Tathagat Priyadarshi
2026-10-12 21:37 ` [PATCH 0/2] net/mana: fix transmit burst and " Stephen Hemminger
2026-10-26 21:21 ` Tathagat Priyadarshi [this message]
2026-10-26 21:21   ` [PATCH v2 1/2] net/mana: fix transmit burst error handling Tathagat Priyadarshi
2026-10-26 21:21   ` [PATCH v2 2/2] net/mana: add hardware TSO support Tathagat Priyadarshi
2026-10-27 14:02   ` [PATCH v2 0/2] net/mana: fix tx burst error handling and add " Stephen Hemminger
2026-10-27 18:21 ` [PATCH v3 " Tathagat Priyadarshi
2026-10-27 18:21   ` [PATCH v3 1/2] net/mana: fix transmit burst error handling Tathagat Priyadarshi
2026-10-27 18:21   ` [PATCH v3 2/2] net/mana: add hardware TSO support Tathagat Priyadarshi
2026-10-28 14:00   ` [PATCH v3 0/2] net/mana: fix tx burst error handling and add " Stephen Hemminger
2026-10-28 19:37     ` Tathagat Priyadarshi

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=20261026212125.3193356-1-tathagat.dpdk@gmail.com \
    --to=tathagat.dpdk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=longli@microsoft.com \
    --cc=stephen@networkplumber.org \
    --cc=weh@microsoft.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