]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
page_pool: store detach_time as ktime_t to avoid false-negatives
authorJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2026 00:39:07 +0000 (17:39 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Mar 2026 02:03:34 +0000 (19:03 -0700)
commit28b225282d44e2ef40e7f46cfdbd5d1b20b8874f
treeb9e2f912c7986b48a2ca7489c17015a5320725db
parent881a0263d502e1a93ebc13a78254e9ad19520232
page_pool: store detach_time as ktime_t to avoid false-negatives

While testing other changes in vng I noticed that
nl_netdev.page_pool_check flakes. This never happens in real CI.

Turns out vng may boot and get to that test in less than a second.
page_pool_detached() records the detach time in seconds, so if
vng is fast enough detach time is set to 0. Other code treats
0 as "not detached". detach_time is only used to report the state
to the user, so it's not a huge deal in practice but let's fix it.
Store the raw ktime_t (nanoseconds) instead. A nanosecond value
of 0 is practically impossible.

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Fixes: 69cb4952b6f6 ("net: page_pool: report when page pool was destroyed")
Link: https://patch.msgid.link/20260310003907.3540019-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/page_pool/types.h
net/core/page_pool_user.c