netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Tariq Toukan <tariqt@nvidia.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Horman <horms@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mina Almasry <almasrymina@google.com>,
	Yonglong Liu <liuyonglong@huawei.com>,
	Yunsheng Lin <linyunsheng@huawei.com>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Matthew Wilcox <willy@infradead.org>,
	netdev@vger.kernel.org, bpf@vger.kernel.org,
	linux-rdma@vger.kernel.org, linux-mm@kvack.org,
	Qiuling Ren <qren@redhat.com>, Yuying Ma <yuma@redhat.com>
Subject: Re: [PATCH net-next v6 2/2] page_pool: Track DMA-mapped pages and unmap them when destroying the pool
Date: Fri, 04 Apr 2025 11:53:26 +0200	[thread overview]
Message-ID: <87tt74l0bt.fsf@toke.dk> (raw)
In-Reply-To: <20250403153129.013a7bdd@kernel.org>

Jakub Kicinski <kuba@kernel.org> writes:

> 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

Ah yes, that's a good solution, will do!

>> +	}
>>  
>> +	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?

Good catch! Will swap the order of the operations.

-Toke


      reply	other threads:[~2025-04-04  9:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  9:27 [PATCH net-next v6 0/2] Fix late DMA unmap crash for page pool Toke Høiland-Jørgensen
2025-04-01  9:27 ` [PATCH net-next v6 1/2] page_pool: Move pp_magic check into helper functions Toke Høiland-Jørgensen
2025-04-01  9:27 ` [PATCH net-next v6 2/2] page_pool: Track DMA-mapped pages and unmap them when destroying the pool Toke Høiland-Jørgensen
2025-04-01 10:09   ` Pavel Begunkov
2025-04-02 11:10     ` Toke Høiland-Jørgensen
2025-04-02 11:40       ` Pavel Begunkov
2025-04-02 14:10         ` Toke Høiland-Jørgensen
2025-04-03 22:31   ` Jakub Kicinski
2025-04-04  9:53     ` Toke Høiland-Jørgensen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tt74l0bt.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=asml.silence@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linyunsheng@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=qren@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=willy@infradead.org \
    --cc=yuma@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).