[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250820181609.616976d2@kernel.org>
Date: Wed, 20 Aug 2025 18:16:09 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Dragos Tatulea <dtatulea@...dia.com>
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, 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)
> +{
> + 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
> + * 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?)"
Powered by blists - more mailing lists