[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <73yte2bgpw4e6vdycrbgiyhujtl4z6h33e743vvo2rg3bioajb@u3ebcsmuench>
Date: Thu, 21 Aug 2025 11:10:57 +0000
From: Dragos Tatulea <dtatulea@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: almasrymina@...gle.com, asml.silence@...il.com,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, cratiu@...dia.com,
parav@...dia.com, netdev@...r.kernel.org, sdf@...a.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v4 7/7] net: devmem: allow binding on rx queues
with same DMA devices
On Wed, Aug 20, 2025 at 06:16:09PM -0700, Jakub Kicinski wrote:
> On Wed, 20 Aug 2025 20:11:58 +0300 Dragos Tatulea wrote:
> > +static struct device *netdev_nl_get_dma_dev(struct net_device *netdev,
> > + unsigned long *rxq_bitmap,
> > + struct netlink_ext_ack *extack)
>
> break after type if it's long and multi line:
>
> static struct device *
> netdev_nl_get_dma_dev(struct net_device *netdev, unsigned long *rxq_bitmap,
> struct netlink_ext_ack *extack)
>
Will fix. Hope to remember for next times as well.
> > +{
> > + struct device *dma_dev = NULL;
> > + u32 rxq_idx, prev_rxq_idx;
> > +
> > + for_each_set_bit(rxq_idx, rxq_bitmap, netdev->real_num_rx_queues) {
> > + struct device *rxq_dma_dev;
> > +
> > + rxq_dma_dev = netdev_queue_get_dma_dev(netdev, rxq_idx);
> > + /* Multi-PF netdev queues can belong to different DMA devoces.
>
> typo: devoces
>
Thanks!
> > + * Block this case.
> > + */
> > + if (dma_dev && rxq_dma_dev != dma_dev) {
> > + NL_SET_ERR_MSG_FMT(extack, "Queue %u has a different dma device than queue %u",
>
> s/dma/DMA/
> I think we may want to bubble up the Multi-PF thing from the comment to
> the user. This could be quite confusing to people. How about:
>
> "DMA device mismatch between queue %u and %u (multi-PF device?)"
Sounds good. Do we still need the comment? A similar remark is done in
the commit message as well.
Thanks,
Dragos
Powered by blists - more mailing lists