Skip to content

net/mana: fix tx burst error handling and add TSO support

Tathagat Priyadarshi dpdk-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v22 patches 1 replySuperseded
  3. v12 patches 1 replySuperseded

Changes in v3 from the cover letter

- Patch 1: no changes.
- Patch 2:
* Mask RTE_MBUF_F_TX_TCP_SEG in the non-TSO fallback branch so rte_ipv4_phdr_cksum / rte_ipv6_phdr_cksum calculate the full L4 length into the pseudo-header checksum.
* Reject invalid TSO packets (tso_segsz > MANA_TSO_MAX_SEGSZ or gso_hs > UINT8_MAX) to prevent hardware bitfield truncations.
* Reflect the extra SGE for TSO in dev_info by setting nb_seg_max to max_sge - 1 (keeping nb_mtu_seg_max as max_sge) instead of a mana.rst limitation note.
* Bound the TSO segment walk by expected_sge and verify SGE count.
* Streamline commit message and cover letter.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net/mana: fix transmit burst error handlingdrivers/net/mana/mana.c drivers/net/mana/tx.c+16 -60 replies
2/2net/mana: add hardware TSO supportdoc/guides/nics/features/mana.ini doc/guides/rel_notes/release_26_11.rst drivers/net/mana/gdma.c +3 more+184 -380 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStephen Hemminger
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] net/mana: fix tx burst error handling and add TSO support

This series fixes transmit burst error handling and adds hardware TCP segmentation offload (TSO) for the Microsoft Azure MANA PMD.

Patch 1 drops packets that fail validation, counting them in stats.errors and consuming them, so rte_eth_tx_burst() maintains a contiguous prefix and short returns reflect only ring backpressure. It also clamps segment limits to MAX_SGL_ENTRIES_FOR_TRANSMIT.

Patch 2 implements hardware TSO for IPv4 and IPv6 TCP traffic, formatting SGE0 for headers and subsequent SGEs for payload, handling GDMA work request flags, advertising RTE_ETH_TX_OFFLOAD_TCP_TSO, and handling non-TSO fallback checksums.

Hardware TSO segmentation was verified on Azure Standard_D8ds_v6 (kernel 6.8.0-1067-azure, MANA PCI 7870:00:00.0; driver reports no firmware version) between two VMs on one subnet using an earlier revision of this series:
- 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.
- The drop paths (packets exceeding segment limit, oversized MSS or header) and IPv6 TSO were not exercised on hardware.

The v3 changes (hardware field bounds for MSS and header length, loop bound, unsegmented fallback checksum masking, and dev_info limit advertisement) were compile-tested but have not been re-run on hardware.

v3:
- Patch 1: no changes.
- Patch 2:
* Mask RTE_MBUF_F_TX_TCP_SEG in the non-TSO fallback branch so rte_ipv4_phdr_cksum / rte_ipv6_phdr_cksum calculate the full L4 length into the pseudo-header checksum.
* Reject invalid TSO packets (tso_segsz > MANA_TSO_MAX_SEGSZ or gso_hs > UINT8_MAX) to prevent hardware bitfield truncations.
* Reflect the extra SGE for TSO in dev_info by setting nb_seg_max to max_sge - 1 (keeping nb_mtu_seg_max as max_sge) instead of a mana.rst limitation note.
* Bound the TSO segment walk by expected_sge and verify SGE count.
* Streamline commit message and cover letter.

v2:
- Patch 1:
* Drop unsendable packets and return a separate consumed count (nb_done) instead of breaking out of the burst; break only when the ring is full.
* Move MAX_SGL_ENTRIES_FOR_TRANSMIT clamp from patch 2 to patch 1, and clamp dev_info nb_seg_max and nb_mtu_seg_max.
- Patch 2:
* Use the drop path for all per-packet TSO validation failures.
* Honour implied TCP checksum when RTE_MBUF_F_TX_TCP_SEG is set but the packet is unsegmented.
* Move GDMA_WR_OOB_IN_SGL and GDMA_WR_PAD_BY_SGE0 adjacent to struct gdma_work_request.
* Add release notes entry and update mana.ini feature matrix.

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/rel_notes/release_26_11.rst |   4 +
 drivers/net/mana/gdma.c                |   5 +
 drivers/net/mana/mana.c                |   9 +-
 drivers/net/mana/mana.h                |   9 +-
 drivers/net/mana/tx.c                  | 206 +++++++++++++++++++++----
 6 files changed, 195 insertions(+), 39 deletions(-)
Signature · 1 line
2.43.0