]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: lan966x: Update dma_dir of page_pool_params
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Wed, 23 Nov 2022 20:31:37 +0000 (21:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Nov 2022 10:38:10 +0000 (10:38 +0000)
commit560c7223d6e48171d5a34ca07f6c886d364bcbdf
treec3520e318ff0e004f7b22c906146f9a275c6749b
parent77ddda44411c36f6276616b9609a50ca98dc4d2c
net: lan966x: Update dma_dir of page_pool_params

To add support for XDP_TX it is required to be able to write to the DMA
area therefore it is required that the pages will be mapped using
DMA_BIDIRECTIONAL flag.
Therefore check if there are any xdp programs on the interfaces and in
that case set DMA_BIDRECTIONAL otherwise use DMA_FROM_DEVICE.
Therefore when a new XDP program is added it is required to redo the
page_pool.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
drivers/net/ethernet/microchip/lan966x/lan966x_main.h
drivers/net/ethernet/microchip/lan966x/lan966x_xdp.c