From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: Can't build DPDK-16.04 on CentOS 6.8 Date: Thu, 16 Jun 2016 16:31:17 +0100 Message-ID: <5762C645.4000509@intel.com> References: <57515FB0.3040800@intel.com> <9B0331B6EBBD0E4684FBFAEDA55776F92CD5CBC7@HASMSX110.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dev To: =?UTF-8?B?TWFydGlueCAtIOOCuOOCp+ODvOODoOOCug==?= , "Rosen, Rami" Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EA4AACBC6 for ; Thu, 16 Jun 2016 17:31:19 +0200 (CEST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/15/2016 7:59 PM, Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0=E3=82= =BA wrote: > On 13 June 2016 at 12:15, Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0= =E3=82=BA > > wrote: >=20 >=20 >=20 > On 12 June 2016 at 11:30, Rosen, Rami > wrote: >=20 > Hi Thiago, >=20 > > Any clue? >=20 > Sure. This is the reason: in > dpdk-16.04/lib/librte_eal/linuxapp/igb_uio we have: > .... > #ifndef PCI_MSIX_ENTRY_SIZE > #define PCI_MSIX_ENTRY_SIZE 16 > #define PCI_MSIX_ENTRY_LOWER_ADDR 0 > #define PCI_MSIX_ENTRY_UPPER_ADDR 4 > #define PCI_MSIX_ENTRY_DATA 8 > #define PCI_MSIX_ENTRY_VECTOR_CTRL 12 > #define PCI_MSIX_ENTRY_CTRL_MASKBIT 1 > #endif > ... >=20 > The root cause of the problem is due to that in CentOS 6.8, > PCI_MSIX_ENTRY_SIZE is defined; this > causes *avoiding* having the PCI_MSIX_ENTRY_CTRL_MASKBIT > definition as shown above. >=20 > The definition of PCI_MSIX_ENTRY_SIZE is due to the following > patch, which was introduced in CentOS 6.8, which moved > PCI_MSIX_ENTRY_SIZE from the inner drivers/pci/msi.h header fil= e > into include/linux/pci_regs.h, > The linux/pci_regs.h is included in the pci.h header, which is > used by the igb_uio.c, which failed in compilation. >=20 > "PATCH 1/8] PCI: MSI: Move MSI-X entry definition to pci_regs.h= " >=20 > --- a/drivers/pci/msi.h > +++ b/drivers/pci/msi.h > @@ -6,12 +6,6 @@ > #ifndef MSI_H > #define MSI_H >=20 > -#define PCI_MSIX_ENTRY_SIZE 16 > ... > ... > ... > diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.= h > index 455b9cc..acfc224 100644 > --- a/include/linux/pci_regs.h > +++ b/include/linux/pci_regs.h > @@ -307,6 +307,13 @@ > #define PCI_MSIX_FLAGS_MASKALL (1 << 14) > #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) >=20 > +/* MSI-X entry's format */ > +#define PCI_MSIX_ENTRY_SIZE 16 > .... >=20 > http://linux-pci.vger.kernel.narkive.com/cZquopIw/patch-1-8-pci= -msi-move-msi-x-entry-definition-to-pci-regs-h >=20 > See also: > rpm -qp --changelog kernel-devel-2.6.32-642.el6.x86_64.rpm | > grep "Move MSI-X entry" > warning: kernel-devel-2.6.32-642.el6.x86_64.rpm: Header V3 > RSA/SHA1 Signature, key ID c105b9de: NOKEY > - [pci] msi: Move MSI-X entry definition to pci_regs.h (Myron > Stowe) [1288629 >=20 >=20 > A proper patch which checks kernel version can fix it. >=20 > Regards, > Rami Rosen > Intel Corporation >=20 >=20 > Interesting! >=20 > Do you have this proper fix? I would like to build and use DPDK on > CentOS 6.8... >=20 > Thank you for your reply! >=20 > Best, > Thiago >=20 >=20 > Hey guys, >=20 > I tried something different, just for testing, and it also doesn't buil= d. >=20 > What I tried was to install the "centos-release-xen" repo, and run "yum > upgrade" in my CentOS 6.8 box, this way, I can receive a new Kernel for > it, which is "3.18.34-20.el6.x86_64", and here is the DPDK build error = now: >=20 > --- > ........... > CC eal_common_dev.o > cc1: warnings being treated as errors > /root/rpmbuild/BUILD/dpdk-16.04/x86_64-default-linuxapp-gcc/build/lib/l= ibrte_eal/linuxapp/igb_uio/igb_uio.c: > In function 'igbuio_pci_probe': > /usr/src/kernels/3.18.34-20.el6.x86_64/include/linux/slab.h:582: error: > inlining failed in call to 'kzalloc.clone.0': --param > max-inline-insns-single limit reached > /root/rpmbuild/BUILD/dpdk-16.04/x86_64-default-linuxapp-gcc/build/lib/l= ibrte_eal/linuxapp/igb_uio/igb_uio.c:383: > error: called from here > make[8]: *** > [/root/rpmbuild/BUILD/dpdk-16.04/x86_64-default-linuxapp-gcc/build/lib/= librte_eal/linuxapp/igb_uio/igb_uio.o] > Error 1 > make[7]: *** > [_module_/root/rpmbuild/BUILD/dpdk-16.04/x86_64-default-linuxapp-gcc/bu= ild/lib/librte_eal/linuxapp/igb_uio] > Error 2 <...> I did able to compile dpdk16.04 with 3.18.34-20.el6.x86_64, is the problem can be related to gcc version? For me both gcc 5.3.1 and 4.9.3 worked fine. Or for "max-inline-insns-single limit reached" issue you can try increasing the gcc limit: -finline-limit=3Dn > I'm still looking for a way to build and package the latest DPDK on > CentOS 6.8 box. >=20 > I appreciate any help... >=20 > Thanks! > Thiago