Re: [PATCH net-next 01/16] libeth: convert to netmem

From
Jakub Kicinski <kuba@kernel.org>
Date
2025-05-29 00:23:08
Also in
bpf
Reply to
Mina Almasry, 2025-05-28
On Tue, 27 May 2025 20:49:33 -0700 Mina Almasry wrote:
quoted
If you don't want to have to validate the low bit during netmem -> page
conversions - you need to clearly maintain the separation between
the two in the driver. These __netmem_to_page() calls are too much of
a liability.  
Would it make sense to add a DEBUG_NET_WARN_ON_ONCE to
__netmem_to_page to catch misuse in a driver independent way? Or is
that not good enough because there may be latent issues only hit in
production where the debug is disabled.
Yes, DEBUG_NET_WARN_ON_ONCE() is not ideal. The condition may trigger
pretty rarely, and what are we saving? A single branch per packet on
a HW-GRO capable device?

Isn't the netmem vs page confusion here primarily because we want to
use the same struct to hold head and payload pages?
Thread (26 messages) 26 messages, 4 authors, last reply 2025-05-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help