DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] igb_uio: fix missing include of slab.h
@ 2015-07-24 17:11 Jan Viktorin
  2015-07-26 22:31 ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Viktorin @ 2015-07-24 17:11 UTC (permalink / raw)
  To: dev

The missing header prevents to build with linux v3.18.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index ba1364b..865a276 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -31,6 +31,7 @@
 #include <linux/io.h>
 #include <linux/msi.h>
 #include <linux/version.h>
+#include <linux/slab.h>
 
 #ifdef CONFIG_XEN_DOM0
 #include <xen/xen.h>
-- 
2.4.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_uio: fix missing include of slab.h
  2015-07-24 17:11 [dpdk-dev] [PATCH] igb_uio: fix missing include of slab.h Jan Viktorin
@ 2015-07-26 22:31 ` Thomas Monjalon
  2015-07-27 11:16   ` Jan Viktorin
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2015-07-26 22:31 UTC (permalink / raw)
  To: Jan Viktorin; +Cc: dev

2015-07-24 19:11, Jan Viktorin:
> The missing header prevents to build with linux v3.18.

Please could you give more details of why build is broken?
What is the error message?
I don't remember having seen such issue.

Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_uio: fix missing include of slab.h
  2015-07-26 22:31 ` Thomas Monjalon
@ 2015-07-27 11:16   ` Jan Viktorin
  2015-07-27 13:02     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Viktorin @ 2015-07-27 11:16 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

Hello Thomas,

I am building in a slightly non-standard way, because I tried to integrate DPDK into Buildroot system.
The problem is with kzalloc and kfree which are undefined in the igb_uio driver. I do not use that
driver, however, it has failed to build. See below:

/usr/bin/make -j5 -C /home/jviki/Projects/buildroot-dpdk-zedboard/build/build/linux-xilinx-v2015.1 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm INSTALL_MOD_PATH=/home/jviki/Projects/buildroot-dpdk-zedboard/build/target CROSS_COMPILE=" /home/jviki/Projects/buildroot-dpdk-zedboard/build/host/usr/bin/arm-none-linux-gnueabi-" DEPMOD=/home/jviki/Projects/buildroot-dpdk-zedboard/build/host/sbin/depmod LOADADDR="0x8000" RTE_SDK=/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1 RTE_TARGET=arm-armv7-a-linuxapp-gcc RTE_SRCDIR=/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1 CROSS=/home/jviki/Projects/buildroot-dpdk-zedboard/build/host/usr/bin/arm-none-linux-gnueabi- M=/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio
  LD      /home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio/built-in.o
  CC [M]  /home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio/igb_uio.o
/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: In function 'igbuio_pci_probe':
/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:440:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
  udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
  ^
/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:440:7: error: assignment makes pointer from integer without a cast [-Werror]
  udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
       ^
/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:557:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
  kfree(udev);
  ^
cc1: all warnings being treated as errors
scripts/Makefile.build:263: recipe for target '/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio/igb_uio.o' failed
make[3]: *** [/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio/igb_uio.o] Error 1
Makefile:1381: recipe for target '_module_/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio' failed
make[2]: *** [_module_/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio] Error 2
package/pkg-generic.mk:156: recipe for target '/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/.stamp_built' failed
make[1]: *** [/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/.stamp_built] Error 2
Makefile:16: recipe for target '_all' failed
make: *** [_all] Error 2

Regards
Jan

On Mon, 27 Jul 2015 00:31:41 +0200
Thomas Monjalon <thomas.monjalon@6wind.com> wrote:

> 2015-07-24 19:11, Jan Viktorin:
> > The missing header prevents to build with linux v3.18.
> 
> Please could you give more details of why build is broken?
> What is the error message?
> I don't remember having seen such issue.
> 
> Thanks



-- 
   Jan Viktorin                  E-mail: Viktorin@RehiveTech.com
   System Architect              Web:    www.RehiveTech.com
   RehiveTech
   Brno, Czech Republic

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] igb_uio: fix missing include of slab.h
  2015-07-27 11:16   ` Jan Viktorin
@ 2015-07-27 13:02     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-07-27 13:02 UTC (permalink / raw)
  To: Jan Viktorin; +Cc: dev

2015-07-27 13:16, Jan Viktorin:
> I am building in a slightly non-standard way, because I tried to integrate DPDK into Buildroot system.
> The problem is with kzalloc and kfree which are undefined in the igb_uio driver. I do not use that
> driver, however, it has failed to build. See below:
> 
> /usr/bin/make -j5 -C /home/jviki/Projects/buildroot-dpdk-zedboard/build/build/linux-xilinx-v2015.1 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm INSTALL_MOD_PATH=/home/jviki/Projects/buildroot-dpdk-zedboard/build/target CROSS_COMPILE=" /home/jviki/Projects/buildroot-dpdk-zedboard/build/host/usr/bin/arm-none-linux-gnueabi-" DEPMOD=/home/jviki/Projects/buildroot-dpdk-zedboard/build/host/sbin/depmod LOADADDR="0x8000" RTE_SDK=/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1 RTE_TARGET=arm-armv7-a-linuxapp-gcc RTE_SRCDIR=/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1 CROSS=/home/jviki/Projects/buildroot-dpdk-zedboard/build/host/usr/bin/arm-none-linux-gnueabi- M=/home/jviki/Projects/buildroot-dpdk-zedboard/build/build/dpdk-2.1.0-rc1/lib/librte_eal/linuxapp/igb_uio

It's not clear which condition makes the build failing
(buildroot, arm, kernel version). But if it fixes it for you,
there is no reason not to apply this simple fix.

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-27 13:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 17:11 [dpdk-dev] [PATCH] igb_uio: fix missing include of slab.h Jan Viktorin
2015-07-26 22:31 ` Thomas Monjalon
2015-07-27 11:16   ` Jan Viktorin
2015-07-27 13:02     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).