-
Notifications
You must be signed in to change notification settings - Fork 349
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
pfsend segmentation fault on ARM #39
Comments
Hi Alfredo
|
Hi, pfbridge program 0 pps pfsend program root@linaro-nano:~/PF_RING/userland/examples# ./pfsend -i eth0 Has anyone an idea how to fix this issue? |
Latest dev pfsend seems to be working on ARM, if you are still able to reproduce this please reopen the issue. |
Hello,
I am running an ARM board (DE1-SoC) and compiled PF_RING in version 6.0.3 on it. While compiling the ../userland/examples I got error messages such as "undefined reference to `pfring_recv' ". I could solve that by editing the Makefile and change this line
LIBS = ${LIBPCAP} ${LIBPFRING} ${LIBPCAP} -lpthread -lrt -lrt
to
LIBS = ${LIBPCAP} ${LIBPFRING} ${LIBPCAP} -lpthread -lpfring -lrt.
Now I receive the following errors (shown below) while compiling. The problem is the static inline ticks getticks(void) function of pfutils.c. I know this function is specified for x68_64 and amd64 architectures but is there also an ARM implementation that you know of? I like to use the pfsend program but if I comment "asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));" out I receive a segmentation fault while running the compiled pfsend. I also found some piece of code that I implemented that doesn`t result in any error but pfsend also shows the segmentation fault.
Has someone an answer to get pfsend working?
static inline ticks getticks(void)
{
u_int32_t r = 0;
asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(r) );
return r;
}
./pfsend -i eth0 -n 0
[ 1584.745357] 7fc0: 000762e0 00000014 00008134 00000122 0006d37c 0006d4c8 00000000 0006dc60
[ 1584.753500] 7fe0: bebf6690 bebf6684 0002a8e3 b6f372dc 400d0030 00000003 00000000 00000000
[ 1584.761660] [](ring_sendmsg [pf_ring]) from
[ 1584.770072] from
[ 1584.777448] from
[ 1584.785074] Code: e24cb004 e52de004 e8bd4000 e1a06002 (e5922000)
[ 1584.791188] ---[ end trace 842d2bdb38ad7866 ]---
Segmentation fault
In file included from pfsend.c:44:0:
pfsend.c: In function ‘main’:
pfutils.c:266:3: error: impossible constraint in ‘asm’
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
^
pfutils.c:266:3: error: impossible constraint in ‘asm’
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
^
pfutils.c:266:3: error: impossible constraint in ‘asm’
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
^
pfutils.c:266:3: error: impossible constraint in ‘asm’
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
^
pfutils.c:266:3: error: impossible constraint in ‘asm’
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
^
pfutils.c:266:3: error: impossible constraint in ‘asm’
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
^
pfutils.c:266:3: error: impossible constraint in ‘asm’
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
^
pfutils.c:266:3: error: impossible constraint in ‘asm’
asm volatile ("rdtsc" : "=a"(lo), "=d"(hi));
^
Makefile:54: recipe for target 'pfsend.o' failed
make: *** [pfsend.o] Error 1
The text was updated successfully, but these errors were encountered: