From mboxrd@z Thu Jan 1 00:00:00 1970 From: Saeed Mahameed Subject: Re: [net 02/14] Revert "mlx5: move affinity hints assignments to generic code" Date: Thu, 4 Jan 2018 12:19:30 -0800 Message-ID: References: <20171219222456.29627-1-saeedm@mellanox.com> <20171219222456.29627-3-saeedm@mellanox.com> <459db705-4586-9eab-2f5b-15014a6730da@grimberg.me> <95a5c181-79fa-da60-1c94-766e19e97dd3@grimberg.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: "David S. Miller" , Linux Netdev List , Thomas Gleixner , Jes Sorensen To: Sagi Grimberg , Saeed Mahameed Return-path: Received: from mail-eopbgr00075.outbound.protection.outlook.com ([40.107.0.75]:16667 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751946AbeADUTv (ORCPT ); Thu, 4 Jan 2018 15:19:51 -0500 In-Reply-To: <95a5c181-79fa-da60-1c94-766e19e97dd3@grimberg.me> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/26/2017 9:14 AM, Sagi Grimberg wrote: > >> Are you sure it won't get populated at all  ? even if you manually set >> IRQ affinity via sysfs ? > > Yes, the msi_desc affinity is not initialized without the affinity > descriptor passed (which is what PCI_IRQ_AFFINITY is for). > >> Anyway we can implement this driver helper function to return the IRQ >> affinity hint stored in the driver: >>   "cpumask_first(mdev->priv.irq_info[vector].mask);" > > minus the cpumask_first, but yea. Please send a new patch so we can > test it out. Actually using mdev->priv.irq_info[vector].mask is wrong since it only gives the initial hint and not the current actual affinity mask. I found a better way to address this and return the actual dynamic affinity of an interrupt vector. I will send a patch to net soon.