Thread (1 message) 1 message, 1 author, 2015-10-31

Re: [PATCH v4] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

From: Måns Rullgård <hidden>
Date: 2015-10-31 18:44:06
Also in: lkml

Francois Romieu [off-list ref] writes:
Måns Rullgård [off-list ref] :
quoted
Francois Romieu [off-list ref] writes:
[...]
quoted
quoted
It looks like it receives, then tries to allocate new resources. If so
it may deplete the ring and you should instead consider allocating new
resources first, then receive data if alloc + map suceeded.
The hardware receives a frame and stores it in the provided DMA buffer,
then raises an interrupt and moves on to the next buffer.  When a buffer
is handed over to the network stack, a new one has to take its place in
the DMA queue.  I'm not sure how you're suggesting this be done
differently.
- The hardware raises an interrupt and moves on to the next packet
- The driver allocates a new buffer - call it Bob - and maps it.
  - If it succeeds
    - The driver unmaps the received packet
    - The driver hands the received packet to the network stack
    - The driver hands Bob to the hardware
  - It it fails
    - The driver updates the dropped packet stats
    - The driver recycles the received - yet non-unmapped - packet to the
      hardware
Oh, I see.  That's better.

-- 
Måns Rullgård
mans@mansr.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help