[PATCH net-next v22 04/13] netdev: netdevice devmem allocator

Jakub Kicinski kuba at kernel.org
Wed Aug 28 02:15:19 UTC 2024


On Sun, 25 Aug 2024 04:15:02 +0000 Mina Almasry wrote:
> +void net_devmem_free_dmabuf(struct net_iov *niov)
> +{
> +	struct net_devmem_dmabuf_binding *binding = net_iov_binding(niov);
> +	unsigned long dma_addr = net_devmem_get_dma_addr(niov);
> +
> +	if (gen_pool_has_addr(binding->chunk_pool, dma_addr, PAGE_SIZE))
> +		gen_pool_free(binding->chunk_pool, dma_addr, PAGE_SIZE);

Is the check necessary for correctness? Should it perhaps be a WARN
under DEBUG_NET instead? The rest LGTM:

Reviewed-by: Jakub Kicinski <kuba at kernel.org>


More information about the dri-devel mailing list