[dpdk-users] Difficulty With rte_eal_init()

Cliff Burdick shaklee3 at gmail.com
Tue Mar 29 23:16:45 CEST 2016


Hi Matthew, sorry for the late response. I'm getting compilation errors
when I try to do what you suggested. I should have the same headers
included by the l2fwd example. I'm running g++ 4.8.5. Here are the new
errors and the compilation line:

g++  -I../inc -include
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_config.h
-isystem../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include
 -std=c++11 -g -O2 -MT app-Main.o -MD -MP -MF .deps/app-Main.Tpo -c -o
app-Main.o `test -f `Main.cpp' || echo './'`Main.cpp

../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h: In
function ‘void* rte_memcpy(void*, const void*, size_t)’:
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
  ^
../../dpdk/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:625:2:
error: ‘_mm_alignr_epi8’ was not declared in this scope
  MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);



On Sat, Mar 19, 2016 at 11:16 PM, gowrishankar <
gowrishankar.m at linux.vnet.ibm.com> wrote:

> Trying CONFIG_RTE_BUILD_SHARED_LIB=y and calling eal_plugin_add() for your
> dpdk driver .so
> could solve this ?.
>
> Regards,
> Gowrishankar
>
>
> On Saturday 19 March 2016 03:15 AM, Cliff Burdick wrote:
>
>> Hi, I've been trying to create a standalone application linked against
>> DPDK, and I'm having some issues getting the program to run properly. The
>> main problem is that in my standalone app compared to the example code,
>> rte_eal_init() from the example code seems to probe the PCI bus, whereas
>> mine doesn't. Here is a snippet from mine and an example:
>>
>> mine:
>> EAL: Virtual area found at 0x7f93ad000000 (size = 0x200000)
>> EAL: Ask a virtual area of 0x3fc00000 bytes
>> EAL: Virtual area found at 0x7f936d200000 (size = 0x3fc00000)
>> EAL: Ask a virtual area of 0x200000 bytes
>> EAL: Virtual area found at 0x7f936ce00000 (size = 0x200000)
>> EAL: Requesting 512 pages of size 2MB from socket 0
>> EAL: Requesting 512 pages of size 2MB from socket 1
>> EAL: TSC frequency is ~2500000 KHz
>> EAL: Master lcore 0 is ready (tid=ef4e6940;cpuset=[0])
>> EAL: lcore 6 is ready (tid=699ed700;cpuset=[6])
>> EAL: lcore 7 is ready (tid=691ec700;cpuset=[7])
>> EAL: lcore 4 is ready (tid=6a9ef700;cpuset=[4])
>> EAL: lcore 1 is ready (tid=6c1f2700;cpuset=[1])
>> EAL: lcore 2 is ready (tid=6b9f1700;cpuset=[2])
>> EAL: lcore 3 is ready (tid=6b1f0700;cpuset=[3])
>> EAL: lcore 5 is ready (tid=6a1ee700;cpuset=[5])
>>
>> example:
>> EAL: Requesting 512 pages of size 2MB from socket 1
>> EAL: TSC frequency is ~2500000 KHz
>> EAL: Master lcore 0 is ready (tid=3019a900;cpuset=[0])
>> EAL: lcore 6 is ready (tid=aabed700;cpuset=[6])
>> EAL: lcore 5 is ready (tid=ab3ee700;cpuset=[5])
>> EAL: lcore 7 is ready (tid=aa3ec700;cpuset=[7])
>> EAL: lcore 1 is ready (tid=ad3f2700;cpuset=[1])
>> EAL: lcore 3 is ready (tid=ac3f0700;cpuset=[3])
>> EAL: lcore 2 is ready (tid=acbf1700;cpuset=[2])
>> EAL: lcore 4 is ready (tid=abbef700;cpuset=[4])
>> EAL: PCI device 0000:04:00.0 on NUMA socket 0
>> EAL:   probe driver: 8086:1572 rte_i40e_pmd
>> EAL:   Not managed by a supported kernel driver, skipped
>> EAL: PCI device 0000:04:00.1 on NUMA socket 0
>> EAL:   probe driver: 8086:1572 rte_i40e_pmd
>> EAL:   Not managed by a supported kernel driver, skipped
>> EAL: PCI device 0000:04:00.2 on NUMA socket 0
>> ...
>>
>> I even went so far as to port the dpdk part of my C++ code to C, then
>> compile it into a standalone executable with the Makefile copied from an
>> example. Sure enough, this worked and the PCI bus was scanned. However,
>> when I then tried compiling the dpdk part of my app into a library and
>> linking against it from my main program, the PCI scanning goes away and no
>> devices are found. I can't really use the DPDK makefiles easily for my
>> entire program since I'm using automake. Has anyone had this issue?
>>
>>
>
>


More information about the users mailing list