Skip to content

Commit

Permalink
net: page_pool: add helper function to retrieve dma addresses
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilias Apalodimas authored and David S. Miller committed Jun 19, 2019
1 parent 9371a56 commit 0afdeee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/net/page_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0afdeee

Please sign in to comment.