From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by dpdk.org (Postfix) with ESMTP id 8CEA21B6A8 for ; Mon, 5 Feb 2018 20:46:13 +0100 (CET) Received: by mail-qt0-f195.google.com with SMTP id l20so41100381qtj.11 for ; Mon, 05 Feb 2018 11:46:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S454O3+8yuJa1+VaQZo7dhc5kTlsBqACT6z0XLgbdBw=; b=N5/3zzgY7ivfEIKjzVos34zMLp+EIScdSVQ7yjY/2GGb3p5LznlHcE6TzKLNW+YAtE nAei5f/6jP7KsOAUQaFN/Q7feN1zkR1a8hYzpgfUhFzkfFppg9CYNcwW8tVCa2ndIM1F iWH0D/cTWmtRWx7cHKcBuz3V57qgmJfmA1cBo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S454O3+8yuJa1+VaQZo7dhc5kTlsBqACT6z0XLgbdBw=; b=LNJhFIzw4hWNXWJXkS63uRvmTPIDa0qlKUUWcKIq66/1/u94I0cUIgjlqVqHrTMkUz WlwNskrM7w43c0mv7o/lV7CrnIUt+TENniEsTi8Iz0RvJWR9C8exCjr4A5VcPXfN2GBR MfiEjG/09H4hm6rDu4/WnoA36Mtu+Pegch2AP/F8eyHXYwxAP2jUlJ2vXLATxu3xDflJ Rp/JcQkiAl15mrR4961aRRj2cGudKAAlOKhCU0uF+lxf1RHFdnrooRp1ZnMRG+NY776o rkedhR9ZxFAercCv83Qm12suCwK96+jwM8nnm5n359gUkcjf2NqgRO+aPOrpMM1v2+jU FlQA== X-Gm-Message-State: AKwxyte1swN3Hl/YA4WQg1LqyWUQAXtbByYQTt0VVaC3hrxqz9LXx5bo UZqZRhMx8BwkdSs4KACevL+4JMG6gU/cdUygyb82ZA== X-Google-Smtp-Source: AH8x225EhiA5UJZen9AqAfZpbeDN1BGNy47v2BnMtSUPOe66ECM+R+3w3ilABI7wHts+xX2nwB7AhgyFUYpS0p5TThA= X-Received: by 10.237.41.39 with SMTP id s36mr79858849qtd.2.1517859972661; Mon, 05 Feb 2018 11:46:12 -0800 (PST) MIME-Version: 1.0 References: <1513577790-6608-1-git-send-email-aroulin@cumulusnetworks.com> In-Reply-To: From: Andy Roulin Date: Mon, 05 Feb 2018 19:46:02 +0000 Message-ID: To: Ferruh Yigit Cc: dev@dpdk.org, shm@cumulusnetworks.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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:46:13 -0000 Hi Ferruh, You can drop it then. I encountered the same porting bug in another project and came across dpdk's code and patchwork comments which helped me debugging. I just thought I would contribute the fix back. If it's not functional then just drop it :) Andy On Mon, Feb 5, 2018 at 11:05 AM Ferruh Yigit wrote: > 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. " > > > >