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: <20250815101627.3c0bc59d@kernel.org>
Date: Fri, 15 Aug 2025 10:16:27 -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>,
 <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, 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ