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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 27 May 2025 20:49:33 -0700 Mina Almasry wrote:
> > 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?




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux