diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2019-06-18 15:05:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-19 11:23:13 -0400 |
commit | a25d50bfe645b3ed6b2cb3773e7025db14a608f3 (patch) | |
tree | 5bbe6d106cb73add65d943e20a0fac7bc47f321b /net/core | |
parent | 0afdeeed08b5f59148069e9f7a52d2ab0eba5d49 (diff) | |
download | linux-a25d50bfe645b3ed6b2cb3773e7025db14a608f3.tar.bz2 |
net: page_pool: add helper function to unmap dma addresses
On a previous patch dma addr was stored in 'struct page'.
Use that to unmap 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 'net/core')
-rw-r--r-- | net/core/page_pool.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 5b2252c6d49b..205af7bd6d09 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -190,6 +190,13 @@ static void __page_pool_clean_page(struct page_pool *pool, page->dma_addr = 0; } +/* unmap the page and clean our state */ +void page_pool_unmap_page(struct page_pool *pool, struct page *page) +{ + __page_pool_clean_page(pool, page); +} +EXPORT_SYMBOL(page_pool_unmap_page); + /* Return a page to the page allocator, cleaning up our state */ static void __page_pool_return_page(struct page_pool *pool, struct page *page) { |