Re: [PATCH net-next v6 2/2] page_pool: Track DMA-mapped pages and unmap them when destroying the pool

Jakub Kicinski
2025-04-03T22:31:31Z

On Tue, 01 Apr 2025 11:27:19 +0200 Toke Høiland-Jørgensen wrote:
> + if (err) {
> + WARN_ONCE(1, "couldn't track DMA mapping, please report to netdev@");
> goto unmap_failed;

FWIW I second Pavel's concern about the warning being too drastic.
I have the feeling Meta's fleet will hit this.
How about WARN_ONCE(err != -ENOMEM, ... ? I presume you care mostly
about the array filling up so -EBUSY

> + }
>
> + if (page_pool_set_dma_addr_netmem(netmem, dma)) {
> + WARN_ONCE(1, "unexpected DMA address, please report to netdev@");
> + goto unmap_failed;
> + }

I think this is ever so slightly leaking the id, if it ever happens?