Thread (20 messages) 20 messages, 3 authors, 2025-08-21

Re: [PATCH net-next v4 7/7] net: devmem: allow binding on rx queues with same DMA devices

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-08-21 01:16:10
Also in: lkml

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?)"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help