Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Aug 2009 10:33:57 -0600
From:      Manish Vachharajani <manishv@lineratesystems.com>
To:        freebsd-stable@freebsd.org
Subject:   Dropped vs. missed packets in the ixgbe driver
Message-ID:  <5bc218350908180933q22e7dc22s835fd54f35ca764b@mail.gmail.com>
In-Reply-To: <5bc218350908171524m5a46c3dbm3e6af625c51370d0@mail.gmail.com>
References:  <5bc218350908171524m5a46c3dbm3e6af625c51370d0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I've been doing some performance testing on freebsd 7.2 and noticed
that the ixgbe driver does not report missed packets as dropped when
queried via netstat -id (the ixgbe driver in the 8.0 =A0beta has a
similar issue). =A0A missed packet is a packet that was correctly
received by the NIC but because it was out of descriptors and internal
memory, the packet had to be dropped by the NIC itself -- a hardware
register counts such events. =A0Instead the driver only reports drops
that are due to the driver itself, i.e., the NIC DMAed the packet to
memory but the driver had to drop something because it was out of
mbufs. =A0Is the miss count reported elsewhere (besides via a kernel
printf from the driver)? =A0At the end of the email I give a stats dump
from the driver and from netstat, note the number of packets dropped
is 0 as reported by netstat but the Missed field in the dmesg output
shows many missed packets.

>From my perspective, it is disconcerting to see performance
degradation on the link, along with TCP ack retransmits, packet
reordering, etc. (on a point-to-point link with no switch in between)
but then see no drops reported by netstat because the driver didn't
drop the packet, the NIC did. =A0The fix should be straight-forward and
I'll gladly make a patch assuming that it is indeed a bug and not a
conscious design choice.

Here is the relevant netstat output

Name =A0 =A0Mtu Network =A0 =A0 =A0 Address =A0 =A0 =A0 =A0 =A0 =A0 =A0Ipkt=
s Ierrs =A0 =A0Opkts
Oerrs =A0Coll Drop
ix0 =A0 =A01500 <Link#1> =A0 =A0 =A000:30:48:94:60:ec =A0 =A0 =A0 =A00 =A0 =
=A0 0 =A0 =A0 =A0 =A01
=A00 =A0 =A0 0 =A0 =A00
ix0 =A0 =A01500 192.168.105.0 192.168.105.2 =A0 =A0 =A0 =A0 =A0 =A00 =A0 =
=A0 - =A0 =A0 =A0 =A00
=A0- =A0 =A0 - =A0 =A0-
ix1 =A0 =A01500 <Link#2> =A0 =A0 =A000:30:48:94:60:ed =A0 =A0 =A011M =A0 =
=A0 0 =A0 =A0 6.1M
=A00 =A0 =A0 0 =A0 =A00
ix1 =A0 =A01500 192.168.5.0 =A0 192.168.5.2 =A0 =A0 =A0 =A0 =A0 =A010M =A0 =
=A0 - =A0 =A0 6.1M
=A0- =A0 =A0 - =A0 =A0-

And here is the dmesg output after doing a sysctl dev.ix.1.stats=3D1

ix1: Std Mbuf Failed =3D 0
ix1: Missed Packets =3D 413872
ix1: Receive length errors =3D 0
ix1: Crc errors =3D 0
ix1: Driver dropped packets =3D 0
ix1: watchdog timeouts =3D 0
ix1: XON Rcvd =3D 616428212235
ix1: XON Xmtd =3D 0
ix1: XOFF Rcvd =3D 616428212235
ix1: XOFF Xmtd =3D 0
ix1: Total Packets Rcvd =3D 12424533
ix1: Good Packets Rcvd =3D 12010661
ix1: Good Packets Xmtd =3D 6419128
ix1: TSO Transmissions =3D 0

Manish
--
Manish Vachharajani
manishv@lineratesystems.com



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