]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: introduce page pool API for sw buffer manager
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 19 Oct 2019 08:13:22 +0000 (10:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Oct 2019 17:36:07 +0000 (10:36 -0700)
commit110f0fb7046f6966d868a934900920c999e7101f
treebf381a925b0318994bf925d83e4324e8ac2541af
parentc8828cfbaff0b34831f255d32fa23d1a77e3fa05
net: mvneta: introduce page pool API for sw buffer manager

Use the page_pool api for allocations and DMA handling instead of
__dev_alloc_page()/dma_map_page() and free_page()/dma_unmap_page().
Pages are unmapped using page_pool_release_page before packets
go into the network stack.

The page_pool API offers buffer recycling capabilities for XDP but
allocates one page per packet, unless the driver splits and manages
the allocated page.
This is a preliminary patch to add XDP support to mvneta driver

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/Kconfig
drivers/net/ethernet/marvell/mvneta.c