summaryrefslogtreecommitdiff
path: root/include/net/page_pool.h
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2019-06-18 15:05:12 +0200
committerDavid S. Miller <davem@davemloft.net>2019-06-19 11:23:13 -0400
commit0afdeeed08b5f59148069e9f7a52d2ab0eba5d49 (patch)
treeeef742791f3841fa6d7ace5be6487661e708b136 /include/net/page_pool.h
parent9371a56f7101cc3f12b57db4bfbb6159205211f4 (diff)
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: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/page_pool.h')
-rw-r--r--include/net/page_pool.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/page_pool.h b/include/net/page_pool.h
index 694d055e01ef..b885d86cb7a1 100644
--- a/include/net/page_pool.h
+++ b/include/net/page_pool.h
@@ -132,6 +132,11 @@ static inline void page_pool_recycle_direct(struct page_pool *pool,
__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)
{
#ifdef CONFIG_PAGE_POOL