From: Jakub Kicinski <kuba@kernel.org>
To: Dragos Tatulea <dtatulea@nvidia.com>
Cc: almasrymina@google.com, asml.silence@gmail.com,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Saeed Mahameed <saeedm@nvidia.com>,
tariqt@nvidia.com, cratiu@nvidia.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC net-next 1/4] net: Allow non parent devices to be used for ZC DMA
Date: Wed, 2 Jul 2025 13:53:29 -0700 [thread overview]
Message-ID: <20250702135329.76dbd878@kernel.org> (raw)
In-Reply-To: <c5pxc7ppuizhvgasy57llo2domksote5uvo54q65shch3sqmkm@bgcnojnxt4hh>
On Wed, 2 Jul 2025 20:01:48 +0000 Dragos Tatulea wrote:
> On Wed, Jul 02, 2025 at 11:32:08AM -0700, Jakub Kicinski wrote:
> > On Wed, 2 Jul 2025 20:24:23 +0300 Dragos Tatulea wrote:
> > > For zerocopy (io_uring, devmem), there is an assumption that the
> > > parent device can do DMA. However that is not always the case:
> > > for example mlx5 SF devices have an auxiliary device as a parent.
> >
> > Noob question -- I thought that the point of SFs was that you can pass
> > them thru to a VM. How do they not have DMA support? Is it added on
> > demand by the mediated driver or some such?
> They do have DMA support. Maybe didn't state it properly in the commit
> message. It is just that the the parent device
> (sf_netdev->dev.parent.device) is not a DMA device. The grandparent
> device is a DMA device though (PCI dev of parent PFs). But I wanted to
> keep it generic. Maybe it doesn't need to be so generic?
>
> Regarding SFs and VM passtrhough: my understanding is that SFs are more
> for passing them to a container.
Mm. We had macvlan offload for over a decade, there's no need for
a fake struct device, auxbus and all them layers to delegate a
"subdevice" to a container in netdev world.
In my head subfunctions are a way of configuring a PCIe PASID ergo
they _only_ make sense in context of DMA.
Maybe someone with closer understanding can chime in. If the kind
of subfunctions you describe are expected, and there's a generic
way of recognizing them -- automatically going to parent of parent
would indeed be cleaner and less error prone, as you suggest.
next prev parent reply other threads:[~2025-07-02 20:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 17:24 [RFC net-next 0/4] devmem/io_uring: Allow devices without parent PCI device Dragos Tatulea
2025-07-02 17:24 ` [RFC net-next 1/4] net: Allow non parent devices to be used for ZC DMA Dragos Tatulea
2025-07-02 18:32 ` Jakub Kicinski
2025-07-02 20:01 ` Dragos Tatulea
2025-07-02 20:53 ` Jakub Kicinski [this message]
2025-07-03 11:58 ` Parav Pandit
2025-07-04 13:11 ` Dragos Tatulea
2025-07-07 18:44 ` Mina Almasry
2025-07-07 21:35 ` Dragos Tatulea
2025-07-07 21:55 ` Mina Almasry
2025-07-08 8:52 ` Parav Pandit
2025-07-08 10:47 ` Pavel Begunkov
2025-07-08 14:23 ` Dragos Tatulea
2025-07-08 11:08 ` Pavel Begunkov
2025-07-08 14:26 ` Dragos Tatulea
2025-07-10 23:58 ` Jakub Kicinski
2025-07-11 2:52 ` Parav Pandit
2025-07-11 13:51 ` Jakub Kicinski
2025-07-08 11:06 ` Pavel Begunkov
2025-07-08 14:10 ` Mina Almasry
2025-07-08 15:25 ` Pavel Begunkov
2025-07-02 17:24 ` [RFC net-next 2/4] io_uring/zcrx: Use the new netdev_get_dma_dev() API Dragos Tatulea
2025-07-02 17:24 ` [RFC net-next 3/4] net: devmem: " Dragos Tatulea
2025-07-02 17:24 ` [RFC net-next 4/4] net/mlx5e: Enable HDS zerocopy flows for SFs Dragos Tatulea
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=20250702135329.76dbd878@kernel.org \
--to=kuba@kernel.org \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=asml.silence@gmail.com \
--cc=cratiu@nvidia.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.