From owner-freebsd-net@FreeBSD.ORG Thu May 22 14:46:14 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 298B57FF for ; Thu, 22 May 2014 14:46:14 +0000 (UTC) Received: from m50-110.126.com (m50-110.126.com [123.125.50.110]) by mx1.freebsd.org (Postfix) with ESMTP id 375722925 for ; Thu, 22 May 2014 14:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=KZVMn UYbzspfyeRpejGxLWwv/Z2ktlkuUhWfD/pD8MI=; b=KqLqfHuQlEnFgxtiVawPX 9pMmqfrKhzk2q1xNSKe0r0X32JIx+xcMNWN0vjISZjccbBGKQAXoW8g0UsGcfH+S WcbZzBkRxsSd7yTwB+a4qaGVQgP2duZXwQrORhhApB0dQ8AfkJEd2tDm8wuCzZi6 jt/2DJEdKQKHnSZ5zP3GqA= Received: from dshPC (unknown [124.202.191.39]) by smtp4 (Coremail) with SMTP id jdKowEAZP1uMBn5TOpG1AQ--.252S2; Thu, 22 May 2014 22:15:41 +0800 (CST) From: "dongshan" To: Subject: netmap pkt_gen can't compile successfully Date: Thu, 22 May 2014 22:15:48 +0800 Message-ID: <001a01cf75c8$55586880$00093980$@126.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: Ac91yEdv9UA84reMTvil7bafpQAOTA== Content-Language: zh-cn X-CM-TRANSID: jdKowEAZP1uMBn5TOpG1AQ--.252S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7WF1kXw48Zr1UuFy5WF4xXrb_yoW8Cry7pF y3Jwn3Jr47ZrW7G348Kry0v3yFqr1kC3yavr4fZ395Ka4FgasakrWxKF4Y9rW2kr4DW3WD KFyftw1UK34DJaUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UEXdnUUUUU= X-Originating-IP: [124.202.191.39] X-CM-SenderInfo: 5wkrztxv1d0warsqlqqrswhudrp/1tbi1g6TxU0vMqzfDAAAsh X-Mailman-Approved-At: Thu, 22 May 2014 19:00:56 +0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 14:46:14 -0000 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