vge traffic problem

Pyun YongHyeon pyunyh at gmail.com
Tue Jan 12 00:09:52 UTC 2010


On Mon, Jan 11, 2010 at 03:38:33PM -0800, David Ehrmann wrote:
> Pyun YongHyeon wrote:
> >If receiver drops TX UDP frame sent by vge(4) would you try
> >disabling TX checksum offloading of vge(4)? If packet drop happens
> >only with UDP frames it could be checksum offload bug. Does your
> >controller is VT6130(PCIe)?
> >  
> 
> First, netstat before and after the test:
> 
> share2# netstat -I vge0 -d
> Name    Mtu Network       Address              Ipkts Ierrs Idrop    
> Opkts Oerrs  Coll Drop
> vge0   1500 <Link#1>      00:40:63:xx:xx:xx 38940717     0     0 
> 55913584     0     0    0
> vge0   1500 10.0.0.0/22   share2            38886994     -     - 
> 55898223     -     -    -
> share2# netstat -I vge0 -d
> Name    Mtu Network       Address              Ipkts Ierrs Idrop    
> Opkts Oerrs  Coll Drop
> vge0   1500 <Link#1>      00:40:63:xx:xx:xx 38942065     0     0 
> 55914869     0     0    0
> vge0   1500 10.0.0.0/22   share2            38888320     -     - 
> 55899491     -     -    -
> 
> The error counters were uninteresting.  Here's what the internal 
> counters said, but they weren't very interesting, either:
> 
> http://pastebin.com/m20114095
> 

Ok, it indicates there are no FIFO overrun or no buf condition
occurred in controller.

> I ran the test, again, and had tcpdump capture the packets (on the host 
> with the vge interface).
> 
> tcpdump -i vge0 -w dump.cap -K -s 0 host 10.0.1.2
> 
> When I opened it up in Wireshark, it's reporting that the outgoing UDP 
> checksums are incorrect; they're always 0x1ae3.  That said, maybe the 

Because bpf(4) see the frame before controller inserts checksum
value it always reports incorrect checksum. It's normal for TX
checksum offload capable controller.
In order to verify the hardware assisted checksum you should check
that on receiver side. If the checksum was invalid, receiver
dropped them. See "netstat -s | grep bad" on receiver host.

> checksums are done in hardware AFTER tcpdump sees them.
> 
> I set net.inet.udp.checksum to 0.  The bad checksums are gone, but I 
> still see dropped packets.
> 

This doesn't disable TX checksum offload of driver. Instead use
#ifconfig vge0 -txcsum

> It's on the motherboard, probably wired directly to a PCI-E connection, 
> but yes, it is a VT6130.

Show me "pciconf -lcv" output.


More information about the freebsd-current mailing list