lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <CY8PR12MB71955664081E1B2B7BE5FAFCDC56A@CY8PR12MB7195.namprd12.prod.outlook.com>
Date: Wed, 16 Jul 2025 11:23:13 +0000
From: Parav Pandit <parav@...dia.com>
To: Christoph Hellwig <hch@...radead.org>, Jakub Kicinski <kuba@...nel.org>
CC: Dragos Tatulea <dtatulea@...dia.com>, "David S. Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
	<pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Andrew Lunn
	<andrew+netdev@...n.ch>, Jens Axboe <axboe@...nel.dk>, Cosmin Ratiu
	<cratiu@...dia.com>, Tariq Toukan <tariqt@...dia.com>, Pavel Begunkov
	<asml.silence@...il.com>, Mina Almasry <almasrymina@...gle.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"io-uring@...r.kernel.org" <io-uring@...r.kernel.org>
Subject: RE: [PATCH v2 net-next] net: Allow SF devices to be used for ZC DMA


> From: Christoph Hellwig <hch@...radead.org>
> Sent: 16 July 2025 04:44 PM
> 
> On Tue, Jul 15, 2025 at 06:06:49AM -0700, Jakub Kicinski wrote:
> > On Mon, 14 Jul 2025 21:39:30 -0700 Christoph Hellwig wrote:
> > > > LGTM, but we need a better place for this function. netdevice.h is
> > > > included directly by 1.5k files, and indirectly by probably another 5k.
> > > > It's not a great place to put random helpers with 2 callers.
> > > > Maybe net/netdev_rx_queue.h and net/core/netdev_rx_queue.c?
> > > > I don't think it needs to be a static inline either.
> > >
> > > The whole concept is also buggy.  Trying to get a dma-able device by
> > > walking down from an upper level construct like the netdevice can't
> > > work reliably.  You'll need to explicitly provide the dma_device
> > > using either a method or a pointer to it instead of this guesswork.
> >
> > Yeah, I'm pretty sure we'll end up with a method in queue ops.
> > But it's not that deep, an easy thing to change.
> 
> Why not get this right now instead of adding more of the hacky parent
> walking?
The previous RFC version (v1) [1], the driver was explicitly providing dma_dev 
at device level.
Queue level is even better; it will address the Netdev with two pci devs socket direct use case too.
Not sure how difficult it is. 

Dragos can you please evaluate?

I believe the dma_mask check in [1] should be removed regardless.

[1] https://lore.kernel.org/netdev/20250702172433.1738947-2-dtatulea@nvidia.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ