public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Dragos Tatulea <dtatulea@nvidia.com>
To: Parav Pandit <parav@nvidia.com>,
	Christoph Hellwig <hch@infradead.org>,
	 Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	 Andrew Lunn <andrew+netdev@lunn.ch>,
	Jens Axboe <axboe@kernel.dk>, Cosmin Ratiu <cratiu@nvidia.com>,
	 Tariq Toukan <tariqt@nvidia.com>,
	Pavel Begunkov <asml.silence@gmail.com>,
	 Mina Almasry <almasrymina@google.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"io-uring@vger.kernel.org" <io-uring@vger.kernel.org>
Subject: Re: [PATCH v2 net-next] net: Allow SF devices to be used for ZC DMA
Date: Mon, 21 Jul 2025 07:00:02 +0000	[thread overview]
Message-ID: <msagplmsxewgtlj5e2iynvv2fizrnvms6ccntilqygojactkdh@a5ei7ktu6xrv> (raw)
In-Reply-To: <CY8PR12MB71955664081E1B2B7BE5FAFCDC56A@CY8PR12MB7195.namprd12.prod.outlook.com>

On Wed, Jul 16, 2025 at 01:23:13PM +0200, Parav Pandit wrote:
> 
> > From: Christoph Hellwig <hch@infradead.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.
Yup. This was the second more generic proposal in the RFC [1].

> Not sure how difficult it is. 
> 
> Dragos can you please evaluate?
>
It is not difficult. But some changes are required in
net_devmem_bind_dmabuf() and its callers.

Will send a v3 with the changes.

> I believe the dma_mask check in [1] should be removed regardless.
> 
> [1] https://lore.kernel.org/netdev/20250702172433.1738947-2-dtatulea@nvidia.com/
Why is that? What if the parent device really doesn't support DMA?

[1] https://lore.kernel.org/netdev/22kf5wtxym5x3zllar7ek3onkav6nfzclf7w2lzifhebjme4jb@h4qycdqmwern/

Thanks,
Dragos

      reply	other threads:[~2025-07-21  7:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11  9:26 [PATCH v2 net-next] net: Allow SF devices to be used for ZC DMA Dragos Tatulea
2025-07-15  1:11 ` Jakub Kicinski
2025-07-15  4:39   ` Christoph Hellwig
2025-07-15 13:06     ` Jakub Kicinski
2025-07-16 11:14       ` Christoph Hellwig
2025-07-16 11:23         ` Parav Pandit
2025-07-21  7:00           ` Dragos Tatulea [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=msagplmsxewgtlj5e2iynvv2fizrnvms6ccntilqygojactkdh@a5ei7ktu6xrv \
    --to=dtatulea@nvidia.com \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hch@infradead.org \
    --cc=horms@kernel.org \
    --cc=io-uring@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parav@nvidia.com \
    --cc=tariqt@nvidia.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