Skip to content
  • Steve Hodgson's avatar
    sfc: Allow shared pages to be recycled · 62b330ba
    Steve Hodgson authored
    
    
    Insert a structure at the start of the shared page that
    tracks the dma mapping refcnt. DMA into the next cache
    line of the (shared) page (plus EFX_PAGE_IP_ALIGN).
    
    When recycling a page, check the page refcnt. If the
    page is otherwise unused, then resurrect the other
    receive buffer that previously referenced the page.
    Be careful not to overflow the receive ring, since we
    can now resurrect n receive buffers in a row.
    
    Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    62b330ba