Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Nov 2010 13:57:17 -0800
From:      Patrick Mahan <mahan@mahan.org>
To:        freebsd-net@freebsd.org
Subject:   Debugging em(4) driver
Message-ID:  <4CDF09BD.3050509@mahan.org>

next in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
	ether 00:1f:29:5f:c6:aa
	inet 172.16.13.30 netmask 0xffffff00 broadcast 172.16.13.255
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active

Output of 'netstat -I em3'
Name    Mtu Network       Address              Ipkts Ierrs    Opkts Oerrs  Coll
em3    1500 <Link#4>      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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CDF09BD.3050509>