]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit568a3fa24a95476d40afe3f8616bafb543bc4182
treebf381a925b0318994bf925d83e4324e8ac2541af
parentff519e2acd463bff6c5bb4e8d7ed350c9bae885b
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