From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 22:17:30 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30B3C106564A for ; Sat, 13 Nov 2010 22:17:30 +0000 (UTC) (envelope-from mahan@mahan.org) Received: from ns.mahan.org (ns.mahan.org [67.116.10.138]) by mx1.freebsd.org (Postfix) with ESMTP id DDBE28FC1C for ; Sat, 13 Nov 2010 22:17:29 +0000 (UTC) Received: from Gypsy.mahan.org (crowTrobot [67.116.10.140]) by ns.mahan.org (8.13.6/8.13.6) with ESMTP id oADLwc5E009642 for ; Sat, 13 Nov 2010 13:58:38 -0800 (PST) (envelope-from mahan@mahan.org) Message-ID: <4CDF09BD.3050509@mahan.org> Date: Sat, 13 Nov 2010 13:57:17 -0800 From: Patrick Mahan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Debugging em(4) driver 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: Sat, 13 Nov 2010 22:17:30 -0000 Good afternoon, I am trying to run down a root cause of a link failure between two of my HP Proliant DL350's. pciconf shows them as the 82571EB chip. These are a 4 port card on the HP. We are doing some routing code in the kernel and have a call to our entry function in the forwarding path in ip_input(). We have WITNESS and INVARIANTS enable in our kernel configuration. Our current testbed has these two HP's em3 ports connected via a ethernet crossover cable. I am generating traffic using 'iperf -u -b 20M' and these links show up as 1000Mbps, so I should not be saturating the interface. The traffic is fine for a while, but then we start to fail to see anymore traffic. A ping started before generating the traffic just stops almost as soon as the iperf traffic begins. I cannot find any error messages indicating that there is a problem with em(4). Is there anything I can use to debug this issue? If not, then I guess I will need to put in some debugging in the xmit path of em(4). Another issue that sometimes raises it head, especially if I have a lot of printf's occurring on a per-packet basis, is I get a double deallocation panic from uma_dbg_free(). When this has occurred I have freed the packet using m_freem() (Since we don't want the packet to be forwarded). But then it looks like em(4) gets an interrupt and frees the packet at em_init_locked()+0x91f. Which may be in the receive handler code. Any and all help/ideas will be appreciated. Output of 'ifconfig em3' em3: flags=8843 metric 0 mtu 1500 options=19b ether 00:1f:29:5f:c6:aa inet 172.16.13.30 netmask 0xffffff00 broadcast 172.16.13.255 media: Ethernet autoselect (1000baseT ) status: active Output of 'netstat -I em3' Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll em3 1500 00:1f:29:5f:c6:aa 11099 89322 11298 0 0 em3 1500 172.16.13.0 172.16.13.30 11096 - 11296 - - pciconf -lv shows - em0@pci0:21:0:0: class=0x020000 card=0x704b103c chip=0x10bc8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = '82571EB Gigabit Ethernet Controller (Copper)' class = network subclass = ethernet em1@pci0:21:0:1: class=0x020000 card=0x704b103c chip=0x10bc8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = '82571EB Gigabit Ethernet Controller (Copper)' class = network subclass = ethernet em2@pci0:22:0:0: class=0x020000 card=0x704b103c chip=0x10bc8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = '82571EB Gigabit Ethernet Controller (Copper)' class = network subclass = ethernet em3@pci0:22:0:1: class=0x020000 card=0x704b103c chip=0x10bc8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = '82571EB Gigabit Ethernet Controller (Copper)' class = network subclass = ethernet Thanks, Patrick