dpdk app on coreos

245 views
Skip to first unread message

varunk

unread,
Oct 30, 2017, 6:30:16 PM10/30/17
to CoreOS Dev
Hi,

I am trying to containerize a dpdk app on coreOS and have issues getting stock dpdk compiled.
I followed these steps to build a custom kernel module: https://coreos.com/os/docs/latest/kernel-modules.html

igb_uio custom module which gets built as part of dpdk fails to compile, complaining about missing header files.

Appreciate any help to get past this hurdle.

coreos_developer_container dpdk-1.6.0r2 # uname -r
4.7.3-coreos-r3
coreos_developer_container dpdk-1.6.0r2 # cat  /usr/share/coreos/release
COREOS_RELEASE_VERSION=1235.12.0
COREOS_RELEASE_BOARD=amd64-usr

Thanks

coreos_developer_container dpdk-1.6.0r2 # make config T=x86_64-default-linuxapp-gcc install
make[3]: Nothing to be done for 'depdirs'.
Configuration done
================== Installing x86_64-default-linuxapp-gcc
== Build scripts
== Build scripts/testhost
== Build lib
== Build lib/librte_eal
== Build lib/librte_eal/common
== Build lib/librte_eal/linuxapp
== Build lib/librte_eal/linuxapp/igb_uio
/usr/src/linux-4.7.3-coreos-r3/Makefile:690: Cannot use CONFIG_KCOV: -fsanitize-coverage=trace-pc is not supported by compiler

  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.o
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: In function 'store_max_vfs':
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:139:2: error: implicit declaration of function 'strict_strtoul' [-Werror=implicit-function-declaration]
  if (0 != strict_strtoul(buf, 0, &max_vfs))
  ^
In file included from ./include/linux/list.h:8:0,
                 from ./include/linux/kobject.h:20,
                 from ./include/linux/device.h:17,
                 from /root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:25:
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: In function 'igbuio_set_interrupt_mask':
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:228:34: error: 'struct pci_dev' has no member named 'msi_list'
   list_for_each_entry(desc, &pdev->msi_list, list) {
                                  ^
./include/linux/kernel.h:831:49: note: in definition of macro 'container_of'
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                 ^
./include/linux/list.h:363:2: note: in expansion of macro 'list_entry'
  list_entry((ptr)->next, type, member)
  ^
./include/linux/list.h:447:13: note: in expansion of macro 'list_first_entry'
  for (pos = list_first_entry(head, typeof(*pos), member); \
             ^
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:228:3: note: in expansion of macro 'list_for_each_entry'
   list_for_each_entry(desc, &pdev->msi_list, list) {
   ^
In file included from ./include/linux/kobject.h:20:0,
                 from ./include/linux/device.h:17,
                 from /root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:25:
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:228:34: error: 'struct pci_dev' has no member named 'msi_list'
   list_for_each_entry(desc, &pdev->msi_list, list) {
                                  ^
./include/linux/list.h:448:24: note: in definition of macro 'list_for_each_entry'
       &pos->member != (head);     \
                        ^
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c: In function 'igbuio_dom0_mmap_phys':
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:331:30: error: '_PAGE_IOMAP' undeclared (first use in this function)
  vma->vm_page_prot.pgprot |= _PAGE_IOMAP;
                              ^
/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.c:331:30: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
scripts/Makefile.build:295: recipe for target '/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.o' failed
make[10]: *** [/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igb_uio.o] Error 1
/usr/src/linux-4.7.3-coreos-r3/Makefile:1458: recipe for target '_module_/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio' failed
make[9]: *** [_module_/root/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio] Error 2
Makefile:150: recipe for target 'sub-make' failed
make[8]: *** [sub-make] Error 2
/root/dpdk-1.6.0r2/mk/rte.module.mk:79: recipe for target 'igb_uio.ko' failed
make[7]: *** [igb_uio.ko] Error 2
/root/dpdk-1.6.0r2/mk/rte.subdir.mk:61: recipe for target 'igb_uio' failed
make[6]: *** [igb_uio] Error 2
/root/dpdk-1.6.0r2/mk/rte.subdir.mk:61: recipe for target 'linuxapp' failed
make[5]: *** [linuxapp] Error 2
/root/dpdk-1.6.0r2/mk/rte.subdir.mk:61: recipe for target 'librte_eal' failed
make[4]: *** [librte_eal] Error 2
/root/dpdk-1.6.0r2/mk/rte.sdkbuild.mk:93: recipe for target 'lib' failed
make[3]: *** [lib] Error 2
/root/dpdk-1.6.0r2/mk/rte.sdkroot.mk:120: recipe for target 'all' failed
make[2]: *** [all] Error 2
/root/dpdk-1.6.0r2/mk/rte.sdkinstall.mk:58: recipe for target 'x86_64-default-linuxapp-gcc_install' failed
make[1]: *** [x86_64-default-linuxapp-gcc_install] Error 2
/root/dpdk-1.6.0r2/mk/rte.sdkroot.mk:102: recipe for target 'install' failed
make: *** [install] Error 2
coreos_developer_container dpdk-1.6.0r2 #

Geoff Levand

unread,
Oct 30, 2017, 7:03:04 PM10/30/17
to coreo...@googlegroups.com
On 10/30/2017 03:30 PM, varunk wrote:
> igb_uio.c:228:34: error: 'struct pci_dev' has no member named 'msi_list'

Seems your dpdk module doesn't match CoreOS's kernel version.

You can see the kernel versions here:

https://coreos.com/releases

Shows 1235.12.0 has Linux-4.7.3.

-Geoff

viking

unread,
Oct 31, 2017, 11:21:53 AM10/31/17
to CoreOS Dev
Thanks. Looks like I needed a dpdk upgrade. Compiles fine with dpdk 17.05.2 which is the current stable.
Reply all
Reply to author
Forward
0 new messages