From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 98D4D1B6A0 for ; Mon, 5 Feb 2018 20:05:16 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2018 11:05:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,465,1511856000"; d="scan'208";a="25013408" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by FMSMGA003.fm.intel.com with ESMTP; 05 Feb 2018 11:05:14 -0800 To: Andy Roulin , dev@dpdk.org Cc: shm@cumulusnetworks.com References: <1513577790-6608-1-git-send-email-aroulin@cumulusnetworks.com> From: Ferruh Yigit Message-ID: Date: Mon, 5 Feb 2018 19:05:14 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1513577790-6608-1-git-send-email-aroulin@cumulusnetworks.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] kni: fix pci_enable_msix_range error handling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Feb 2018 19:05:17 -0000 On 12/18/2017 6:16 AM, Andy Roulin wrote: > pci_enable_msix_range's return value has a different meaning than what > was previously returned by pci_enable_msix. > > "It returns a negative errno if an error occurs. If it succeeds, it > returns the actual number of interrupts allocated and indicates the > successful configuration of MSI-X capability structure with new > allocated MSI-X interrupts." > > The following commit introduced pci_enable_msix_range: > dpdk: 9fb3cd2c ("kni: fix ethtool build with kernel 4.11") > http://dpdk.org/dev/patchwork/patch/24076/ Hi Andy, This is updating driver within KNI, and these drivers are used for ethtool support and most of the driver is already not used at all. I doubt the updated code is functional at all. Did you encounter any problem? These drivers are already outdated, and I am definitely not for actively maintaining them which is not required for ethtool support. > > Signed-off-by: Andy Roulin > --- > lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c > index e0f427a..32ef3b9 100644 > --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c > +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c > @@ -1043,14 +1043,16 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter, bool msix) > #ifdef HAVE_PCI_ENABLE_MSIX > err = pci_enable_msix(pdev, > adapter->msix_entries, numvecs); > + if (err == 0) > + break; > #else > err = pci_enable_msix_range(pdev, > adapter->msix_entries, > numvecs, > numvecs); > -#endif > - if (err == 0) > + if (err < 0) > break; > +#endif > } > /* MSI-X failed, so fall through and try MSI */ > dev_warn(pci_dev_to_dev(pdev), "Failed to initialize MSI-X interrupts. " >