All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] net: mrmac: Fix Rx packet loss on back-to-back frames
@ 2026-08-20  9:25 Padmarao Begari
  2026-08-20  9:25 ` [PATCH 1/8] net: mrmac: check memalign() return values Padmarao Begari
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Padmarao Begari @ 2026-08-20  9:25 UTC (permalink / raw)
  To: u-boot, michal.simek; +Cc: git, padmarao.begari

The MRMAC Rx path drops frames when two arrive back to back. recv()
always starts at rx_bd[0] and clears the status of both descriptors,
and the status field is the only record that a frame arrived, so the
second frame is lost without any error being reported. This shows up
with multiple boards on a switch, where the extra traffic makes
back-to-back arrivals common and network transfers time out.

Fixing that needs an Rx ring the driver can index, so the series first
makes the ring scalable and then fixes the bug:

  1-3  Independent cleanups: check memalign() failures, give the
       driver its own Rx buffer pool instead of borrowing the shared
       net_rx_packets[], and read the link speed from the standard
       max-speed property.

  4-6  Make the descriptor ring scale: index the contiguous BD blocks
       directly, build the Rx chain in a loop over RX_DESC, and
       program CURDESC only once the ring is complete in memory.

  7    Track the descriptor to consume next in rx_bd_idx and take
       completion from the per-descriptor COMPLETE bit, so a
       descriptor goes back to hardware only after the network stack
       has read it.

  8    Size the Rx ring from ETH_PACKETS_BATCH_RECV, so a full
       eth_rx() call can be served without hardware running out of
       descriptors.

Padmarao Begari (8):
  net: mrmac: check memalign() return values
  net: mrmac: use a driver-owned RX buffer pool
  net: mrmac: switch to max-speed property
  net: mrmac: use contiguous BD arrays
  net: mrmac: initialize the Rx BD ring in a loop
  net: mrmac: write CURDESC after ring setup
  net: mrmac: fix Rx packet loss on back-to-back frames
  net: mrmac: increase the Rx BD ring

 drivers/net/xilinx_axi_mrmac.c | 235 +++++++++++++++++----------------
 drivers/net/xilinx_axi_mrmac.h |  20 ++-
 2 files changed, 137 insertions(+), 118 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-09-07  6:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20  9:25 [PATCH 0/8] net: mrmac: Fix Rx packet loss on back-to-back frames Padmarao Begari
2026-08-20  9:25 ` [PATCH 1/8] net: mrmac: check memalign() return values Padmarao Begari
2026-08-20  9:25 ` [PATCH 2/8] net: mrmac: use a driver-owned RX buffer pool Padmarao Begari
2026-08-20  9:25 ` [PATCH 3/8] net: mrmac: switch to max-speed property Padmarao Begari
2026-08-20  9:25 ` [PATCH 4/8] net: mrmac: use contiguous BD arrays Padmarao Begari
2026-08-20  9:25 ` [PATCH 5/8] net: mrmac: initialize the Rx BD ring in a loop Padmarao Begari
2026-08-20  9:25 ` [PATCH 6/8] net: mrmac: write CURDESC after ring setup Padmarao Begari
2026-08-20  9:25 ` [PATCH 7/8] net: mrmac: fix Rx packet loss on back-to-back frames Padmarao Begari
2026-08-20  9:25 ` [PATCH 8/8] net: mrmac: increase the Rx BD ring Padmarao Begari
2026-08-20 10:28 ` [PATCH 0/8] net: mrmac: Fix Rx packet loss on back-to-back frames Peter Robinson
2026-08-20 11:17   ` Begari, Padmarao
2026-09-07  6:57 ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.