[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALzJLG-+zcGtvghqRcKXoCOMhDO7iwzm77CRP4ZnTxOpib6U9A@mail.gmail.com>
Date: Sun, 12 Apr 2015 14:15:06 +0300
From: Saeed Mahameed <saeedm@....mellanox.co.il>
To: Ido Shamay <idos@....mellanox.co.il>
Cc: Amir Vadai <amirv@...lanox.com>,
"David S. Miller" <davem@...emloft.net>, 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 Fri, Apr 10, 2015 at 11:27 AM, Ido Shamay <idos@....mellanox.co.il> wrote:
> 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
Right, will fix in V1
--
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