Public

Hi Peter,

> From: Peter Robinson <[email protected]>
> Sent: Thursday, August 20, 2026 3:59 PM
> To: Begari, Padmarao <[email protected]>
> Cc: [email protected]; Simek, Michal <[email protected]>; git
> (AMD-Xilinx) <[email protected]>
> Subject: Re: [PATCH 0/8] net: mrmac: Fix Rx packet loss on back-to-back frames
>
> On Thu, 20 Aug 2026 at 10:26, Padmarao Begari <[email protected]>
> wrote:
> >
> > 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.
>
> Out of interest is this using the legacy IP or LWIP stack?

Presently using LWIP but we tested it on both.

Regards
Padmarao
>
> > 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
> >

Reply via email to