From owner-freebsd-net@FreeBSD.ORG Tue Feb 12 14:46:52 2008 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4F8616A46B for ; Tue, 12 Feb 2008 14:46:52 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from outbound0.mx.meer.net (outbound0.mx.meer.net [209.157.153.23]) by mx1.freebsd.org (Postfix) with ESMTP id C8AA413C455 for ; Tue, 12 Feb 2008 14:46:52 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [209.157.152.14]) by outbound0.mx.meer.net (8.12.10/8.12.6) with ESMTP id m1CEkk7e077669; Tue, 12 Feb 2008 06:46:52 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from mail2.meer.net (mail2.meer.net [64.13.141.16]) by mail.meer.net (8.13.3/8.13.3/meer) with ESMTP id m1CEkIuC004777; Tue, 12 Feb 2008 06:46:19 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (61.204.211.246.customerlink.pwd.ne.jp [61.204.211.246]) (authenticated bits=0) by mail2.meer.net (8.14.1/8.14.1) with ESMTP id m1CEkII5006802; Tue, 12 Feb 2008 06:46:18 -0800 (PST) (envelope-from gnn@neville-neil.com) Date: Tue, 12 Feb 2008 23:46:17 +0900 Message-ID: From: gnn@freebsd.org To: Tofig Suleymanov In-Reply-To: <47AB2798.6010202@freebsd.az> References: <47AB2798.6010202@freebsd.az> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.1.50 (i386-apple-darwin8.10.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: net@freebsd.org Subject: Re: if_start() and send queue question X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2008 14:46:53 -0000 At Thu, 07 Feb 2008 19:45:28 +0400, Tofig Suleymanov wrote: > > Hello list, > > I will be grateful if someone could point me to the right direction > regarding the question below. > > My device driver is getting incoming packets fine, but for some reason I > am not able to send a single packet. Here is the source code: > http://www.freebsd.az/if_ib.c > > I've added several debug messages to the source and here is the output: > / > /(bringing interface up and assigning the ip/netmask combination) > / > ifconfig ib0 192.168.0.6 netmask 255.255.255.0 up > > /(and here is what I get in /var/log/messages /; /it seems to be a > standard arp broadcast) > / > Feb 7 19:14:32 schizo kernel: ib_init entered > Feb 7 19:14:32 schizo kernel: ib_start entered > Feb 7 19:14:32 schizo kernel: ib_encap entered > Feb 7 19:14:32 schizo kernel: DHOST ff ff ff ff ff ff > Feb 7 19:14:32 schizo kernel: SHOST 0 c0 ee 22 3 14 > Feb 7 19:14:32 schizo kernel: txeof entered > Feb 7 19:14:32 schizo kernel: txeof exiting > > /(now I try pinging, but no joy . I've added extra debug messages inside > ping.c) > > /schizo# ping 192.168.0.1 > PING 192.168.0.1 (192.168.0.1): 56 data bytes > packets sent: -1 > ping: sendto: Invalid argument > packets sent: -1 > ping: sendto: Invalid argument > packets sent: -1 > ping: sendto: Invalid argument > ^C > --- 192.168.0.1 ping statistics --- > 3 packets transmitted, 0 packets received, 100% packet loss > / > > I have also tied to add debug messages to sys/net/if.c and > sys/net/netisr.c and it seems that the kernel doesn't even try to run my > ib_start() function. > Some things to try: 1) Add debug statements to the ib_start() routine. 2) See if bpf works (tcpdump -i ib0) 3) Show us the output of: ifconfig ib0 netstat -i Best, George