Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 May 2014 22:15:48 +0800
From:      "dongshan" <thomasyang1206@126.com>
To:        <net@freebsd.org>
Subject:   netmap pkt_gen can't compile successfully
Message-ID:  <001a01cf75c8$55586880$00093980$@126.com>

next in thread | raw e-mail | index | archive | help
Hi,

 

I have some problems in running netmap pkt_gen, the receiving mode seems
okay, but the sending  mode will cause segmentation fault. 

when i compile pkt_gen.c, it warns three times, in Makefile with CFLAGS
-Werror, so the warning is treated as error, so i deleted -Werror, then it
can make pkt_gen binary file, but int can't run successfully.

 

I did it on x86 64 bit Linux 

 

In file included from pkt-gen.c:43:0:

pkt-gen.c: In function 'main':

../sys/net/netmap_user.h:85:58: error: format '%lx' expects argument of type
'long unsigned int', but argument 8 has type 'int' [-Werror=format=]

#define NETMAP_TXRING(nifp, index) _NETMAP_OFFSET(struct netmap_ring *, \

                                                          ^

../sys/net/netmap_user.h:81:4: note: in definition of macro '_NETMAP_OFFSET'

  ((type)(void *)((char *)(ptr) + (offset)))

    ^

../sys/net/netmap_user.h:155:33: note: in expansion of macro 'NETMAP_TXRING'

       __FUNCTION__, __LINE__, ##__VA_ARGS__); \

                                 ^

pkt-gen.c:1825:4: note: in expansion of macro 'D'

    D("   TX%d at 0x%lx", i,

    ^

../sys/net/netmap_user.h:88:58: error: format '%lx' expects argument of type
'long unsigned int', but argument 8 has type 'int' [-Werror=format=]

#define NETMAP_RXRING(nifp, index) _NETMAP_OFFSET(struct netmap_ring *, \

                                                          ^

../sys/net/netmap_user.h:81:4: note: in definition of macro '_NETMAP_OFFSET'

  ((type)(void *)((char *)(ptr) + (offset)))

    ^

../sys/net/netmap_user.h:155:33: note: in expansion of macro 'NETMAP_RXRING'

       __FUNCTION__, __LINE__, ##__VA_ARGS__); \

                                 ^

pkt-gen.c:1829:4: note: in expansion of macro 'D'

    D("   RX%d at 0x%lx", i,

    ^

cc1: all warnings being treated as errors

make[1]: *** [pkt-gen.o] Error 1

make[1]: Leaving directory `/home/dsh/project/netmap/examples'

make: *** [apps] Error 2

 

Did it happen to you?

 

Best regards,

Dongshan

 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001a01cf75c8$55586880$00093980$>