lkml.org 
[lkml]   [2023]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator
From
Date
On 2023/11/6 10:44, Mina Almasry wrote:
> +
> +void netdev_free_devmem(struct page_pool_iov *ppiov)
> +{
> + struct netdev_dmabuf_binding *binding = page_pool_iov_binding(ppiov);
> +
> + refcount_set(&ppiov->refcount, 1);
> +
> + if (gen_pool_has_addr(binding->chunk_pool,
> + page_pool_iov_dma_addr(ppiov), PAGE_SIZE))

When gen_pool_has_addr() returns false, does it mean something has gone
really wrong here?

> + gen_pool_free(binding->chunk_pool,
> + page_pool_iov_dma_addr(ppiov), PAGE_SIZE);
> +
> + netdev_devmem_binding_put(binding);
> +}
> +
> void netdev_unbind_dmabuf(struct netdev_dmabuf_binding *binding)
> {
> struct netdev_rx_queue *rxq;
>

\
 
 \ /
  Last update: 2023-11-20 13:51    [W:0.554 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site