@@ -134,6 +134,7 @@ struct memory_provider_ops {
void (*destroy)(struct page_pool *pool);
netmem_ref (*alloc_pages)(struct page_pool *pool, gfp_t gfp);
bool (*release_page)(struct page_pool *pool, netmem_ref netmem);
+ void (*scrub)(struct page_pool *pool);
};
extern const struct memory_provider_ops dmabuf_devmem_ops;
@@ -984,6 +984,9 @@ static void page_pool_empty_alloc_cache_once(struct page_pool *pool)
static void page_pool_scrub(struct page_pool *pool)
{
+ if (pool->mp_ops && pool->mp_ops->scrub)
+ pool->mp_ops->scrub(pool);
+
page_pool_empty_alloc_cache_once(pool);
pool->destroy_cnt++;