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

Reply via email to