Fixes for af_packet ring handling, then Tx features: non-blocking Tx
and software checksum offload.

Patches 1-3 are fixes for stable, and 4 tests them. 5-8 are not for
stable.

v10:
* Frame size must hold a minimum Ethernet frame after the 66 byte Rx
  offset (minimum 144), so the maximum Rx length can't wrap; documented
  and tested with framesz=64. (Stephen)
* Fixes tags of "fix maximum Rx packet length" corrected. (Stephen)
* "clean up Tx and bulk free mbufs" commit message mentions its tests.
  (Stephen)

v9:
* tp_status helpers cast to (uint32_t __rte_atomic *). (Stephen)
* The invalid ring parameter error prints blocksz, framesz and framecnt
  instead of describing the constraints; af_packet.rst documents them,
  including the 2GB blocksz limit. (Stephen)

v8:
* Split as suggested: the memory ordering and frame address fixes are
  separate stable patches; the test, ring parameter validation and Tx
  cleanup are their own patches. Dropped unrelated changes from the
  fixes (counter types, loop form).
* tp_status uses rte_atomic_load/store_explicit with acquire/release
  instead of fences, as libpcap and memif do. (Stephen)
* New fix: the maximum Rx packet length and MTU used the Tx frame
  offset, so packets up to 34 bytes over the real limit were silently
  truncated.
* Invalid ring parameters are rejected at probe, matching what
  packet_set_ring() rejects, instead of logged as warnings; the hint
  warnings are gone, so configurations the kernel accepts still work.
  (Stephen)
* The Tx kick runs on every burst, so a full ring drains on later
  bursts once the kernel can send again. The ring full test now checks
  this. (Stephen)
* Removed poll() from Tx instead of adding the txpollnotrdy devarg. A
  full ring returns a short count, so Tx no longer blocks. (Stephen)
* Checksums are computed in the ring frame after the copy, so the
  checksum code does not modify the mbuf. Dropped
  rte_net_ip_udptcp_cksum_mbuf() and the tap conversion, and with them
  the dependency on "test/cksum: fix EtherType of IPv6 TCP packet".
  (Stephen, Morten) IPv6 extension headers are supported; packets with
  tunnel offload flags are dropped.
* Tests use ring geometry derived from the page size.

Scott Mitchell (8):
  net/af_packet: fix frame status memory ordering
  net/af_packet: fix frame address with unused block tail
  net/af_packet: fix maximum Rx packet length
  test/af_packet: add frame layout tests
  net/af_packet: reject invalid ring parameters at probe
  net/af_packet: clean up Tx and bulk free mbufs
  net/af_packet: do not block in Tx when the ring is full
  net/af_packet: add Tx checksum offload

 app/test/test_pmd_af_packet.c             | 1029 +++++++++++++++++++++
 doc/guides/nics/af_packet.rst             |    8 +-
 doc/guides/nics/features/af_packet.ini    |    2 +
 doc/guides/rel_notes/release_27_03.rst    |    4 +
 drivers/net/af_packet/rte_eth_af_packet.c |  245 +++--
 5 files changed, 1212 insertions(+), 76 deletions(-)

-- 
2.54.0 (Apple Git-157)

Reply via email to