Message ID | 20231219210357.4029713-6-dw@davidwei.uk (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Zero copy Rx using io_uring | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply, async |
diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h index a701310b9811..fd846cac9fb6 100644 --- a/include/net/page_pool/types.h +++ b/include/net/page_pool/types.h @@ -134,6 +134,7 @@ enum pp_memory_provider_type { struct pp_memory_provider_ops { int (*init)(struct page_pool *pool); void (*destroy)(struct page_pool *pool); + void (*scrub)(struct page_pool *pool); struct page *(*alloc_pages)(struct page_pool *pool, gfp_t gfp); bool (*release_page)(struct page_pool *pool, struct page *page); }; diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 71af9835638e..9e3073d61a97 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -947,6 +947,8 @@ static int page_pool_release(struct page_pool *pool) { int inflight; + if (pool->mp_ops && pool->mp_ops->scrub) + pool->mp_ops->scrub(pool); page_pool_scrub(pool); inflight = page_pool_inflight(pool); if (!inflight)