-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic when calling anssock_init() from c++ #24
Comments
You shall startup ANS(tcp/ip stack) process before run your application. |
Yes, I know. It is started with the following options: |
Your application (binxfer) can't mapping same virtual memory address. you may reboot your linux pc, and try it again. |
Or you may run ans as below, input a base virtual address. |
Rebooting host not helped but specifying virtual address works. The init is now successful. :-) |
I would like to use ANS (as of 2016-06-29 from github) from a C++ program. I could compile and link against the program successfully:
[100%] Building CXX object CMakeFiles/binxfer.dir/binxfer.cpp.o
/usr/bin/c++ -std=c++11 -I/work/dpdk-ans/librte_anssock/include -I/work/dpdk-ans/librte_ans/include -o CMakeFiles/binxfer.dir/binxfer.cpp.o -c /work/linktest/binxfer.cpp
Linking CXX executable binxfer
/usr/bin/cmake -E cmake_link_script CMakeFiles/binxfer.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++11 CMakeFiles/binxfer.dir/binxfer.cpp.o -o binxfer -rdynamic /work/dpdk-ans/librte_ans/librte_ans.a /work/dpdk-ans/librte_anssock/librte_anssock.a /usr/local/share/dpdk/x86_64-native-linuxapp-gcc/lib/librte_mbuf.a /usr/local/share/dpdk/x86_64-native-linuxapp-gcc/lib/librte_eal.a /usr/local/share/dpdk/x86_64-native-linuxapp-gcc/lib/librte_mempool.a /usr/local/share/dpdk/x86_64-native-linuxapp-gcc/lib/librte_ring.a -lrt -lpthread -ldl
But the program terminates at calling anssock_init() right after the start:
./binxfer
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 1 on socket 0
EAL: Detected lcore 2 as core 0 on socket 0
EAL: Detected lcore 3 as core 1 on socket 0
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 4 lcore(s)
PANIC in rte_eal_config_reattach():
Cannot mmap memory for rte_config
: [./binxfer() [0x40723b]]
6: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7ffff6becf45]]
5: [./binxfer(main+0x164) [0x407464]]
4: [./binxfer(anssock_init+0x17a) [0x40c16a]]
3: [./binxfer(rte_eal_init+0xf69) [0x418629]]
2: [./binxfer(__rte_panic+0xc9) [0x406c85]]
1: [./binxfer(rte_dump_stack+0x1a) [0x41f7fa]]
Aborted (core dumped)
The example webserver included with dpdk-ans is working correctly on the same system.
Is it possible to use ANS from C++ applications? Do I need some specific compile/link options to do that? (Sorry if placing issue to the wrong place.)
The text was updated successfully, but these errors were encountered: