lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <gessx5kiukxckwkjqmtrf7j52i42zzme2th4zmvleppnklt2dq@wif23q6f6cog>
Date: Tue, 19 Aug 2025 14:41:08 +0000
From: Dragos Tatulea <dtatulea@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>, almasrymina@...gle.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, 
	tariqt@...dia.com, parav@...dia.com, Christoph Hellwig <hch@...radead.org>, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC net-next v3 1/7] queue_api: add support for fetching per
 queue DMA dev

On Fri, Aug 15, 2025 at 10:16:27AM -0700, Jakub Kicinski wrote:
> On Fri, 15 Aug 2025 14:03:42 +0300 Dragos Tatulea wrote:
> > +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?

Thanks,
Dragos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ