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]
Date:	Fri, 10 Apr 2015 11:27:26 +0300
From:	Ido Shamay <idos@....mellanox.co.il>
To:	Amir Vadai <amirv@...lanox.com>,
	"David S. Miller" <davem@...emloft.net>
CC:	netdev@...r.kernel.org, Yevgeny Petrilin <yevgenyp@...lanox.com>,
	Saeed Mahameed <saeedm@...lanox.com>,
	Or Gerlitz <ogerlitz@...lanox.com>,
	Achiad Shochat <achiad@...lanox.com>,
	Ido Shamay <idos@...lanox.com>,
	Rana Shahout <ranas@...lanox.com>
Subject: Re: [PATCH net-next 01/11] net/mlx5_core: Set irq affinity hints

On 4/8/2015 5:51 PM, Amir Vadai wrote:
> From: Saeed Mahameed <saeedm@...lanox.com>
>
> +	int numa_node           =
> +#if IS_ENABLED(CONFIG_NUMA)
> +		mdev->pdev->dev.numa_node;
> +#else
> +		-1;
> +#endif
Would be nicer to use dev_to_node helper here, which already checks for 
CONFIG_NUMA

include/linux/device.h:
#ifdef CONFIG_NUMA
static inline int dev_to_node(struct device *dev)
{
         return dev->numa_node;
}
static inline void set_dev_node(struct device *dev, int node)
{
         dev->numa_node = node;
}
#else
static inline int dev_to_node(struct device *dev)
{
         return -1;
}
static inline void set_dev_node(struct device *dev, int node)
{
}
#endif

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ