Thread (9 messages) flat view 9 messages, 4 authors, 2025-08-11

Re: [PATCH net] net: xilinx: axienet: Increment Rx skb ring head pointer after BD is successfully allocated in dmaengine flow

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-08-11 16:43:08
Also in: linux-arm-kernel, lkml

On Mon, 11 Aug 2025 15:55:02 +0000 Pandey, Radhey Shyam wrote:
quoted
That wasn't my reading, maybe I misinterpreted the code.

From what I could tell the driver tries to give one new buffer for each buffer
completed. So it never tries to "catch up" on previously missed allocations. IOW say
we have a queue with 16 indexes, after 16 failures (which may be spread out over
time) the ring will be empty.  
Yes, IIRC there is 1:1 mapping for RX DMA callback and
axienet_rx_submit_desc(). In case there are failure in
axienet_rx_submit_desc() it is not able to reattempt
in current implementation. Theoretically there could
be other error in rx_submit_desc() (like dma_mapping/netdev
allocation)

One thought is to have some flag/index to tell that it should
be reattempted in subsequent axienet_rx_submit_desc() ?
Yes, some kind of counter of buffer that need to be allocated.
The other problem to solve is when the buffers are completely
depleted there will be no callback so no opportunity to refill.
For drivers which refill from NAPI this is usually solved by
periodically scheduling NAPI.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help