Thread (27 messages) 27 messages, 6 authors, 2025-10-02

Re: [RFC net-next v3 1/7] queue_api: add support for fetching per queue DMA dev

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-08-19 15:30:39
Also in: lkml

On Tue, 19 Aug 2025 14:41:08 +0000 Dragos Tatulea wrote:
On Fri, Aug 15, 2025 at 10:16:27AM -0700, Jakub Kicinski wrote:
quoted
On Fri, 15 Aug 2025 14:03:42 +0300 Dragos Tatulea wrote:  
quoted
+static inline struct device *
+netdev_queue_get_dma_dev(struct net_device *dev, int idx)
+{
+	const struct netdev_queue_mgmt_ops *queue_ops = dev->queue_mgmt_ops;
+	struct device *dma_dev;
+
+	if (queue_ops && queue_ops->ndo_queue_get_dma_dev)
+		dma_dev = queue_ops->ndo_queue_get_dma_dev(dev, idx);
+	else
+		dma_dev = dev->dev.parent;
+
+	return dma_dev && dma_dev->dma_mask ? dma_dev : NULL;
+}  
This really does not have to live in the header file.  
Alright, but where? It somewhat fits in the existing net/core/dev.c or
net/core/netdev_rx_queue.c. But neither is great.

Maybe it is time to create a net/core/netdev_queues.c?
Sure, net/core/netdev_queues.c SGTM
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help