Commit 0afdeeed authored by Ilias Apalodimas's avatar Ilias Apalodimas Committed by David S. Miller

net: page_pool: add helper function to retrieve dma addresses

On a previous patch dma addr was stored in 'struct page'.
Use that to retrieve DMA addresses used by network drivers
Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9371a56f
...@@ -132,6 +132,11 @@ static inline void page_pool_recycle_direct(struct page_pool *pool, ...@@ -132,6 +132,11 @@ static inline void page_pool_recycle_direct(struct page_pool *pool,
__page_pool_put_page(pool, page, true); __page_pool_put_page(pool, page, true);
} }
static inline dma_addr_t page_pool_get_dma_addr(struct page *page)
{
return page->dma_addr;
}
static inline bool is_page_pool_compiled_in(void) static inline bool is_page_pool_compiled_in(void)
{ {
#ifdef CONFIG_PAGE_POOL #ifdef CONFIG_PAGE_POOL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment