From nobody@FreeBSD.org  Tue Feb 22 15:01:59 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F0D551065694
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Feb 2011 15:01:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id DEE548FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Feb 2011 15:01:59 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1MF1xGW095760
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Feb 2011 15:01:59 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1MF1xMh095759;
	Tue, 22 Feb 2011 15:01:59 GMT
	(envelope-from nobody)
Message-Id: <201102221501.p1MF1xMh095759@red.freebsd.org>
Date: Tue, 22 Feb 2011 15:01:59 GMT
From: Julien Cigar <jcigar@ulb.ac.be>
To: freebsd-gnats-submit@FreeBSD.org
Subject: age: "Bad packet length xxxxx, Disconnecting: Packet corrupt" (unless TSO, rxcsum, txcsum are disabled)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154959
>Category:       kern
>Synopsis:       [age] "Bad packet length xxxxx, Disconnecting: Packet corrupt" (unless TSO, rxcsum, txcsum are disabled)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 22 15:10:02 UTC 2011
>Closed-Date:    Tue May 10 02:17:02 UTC 2011
>Last-Modified:  Tue May 10 02:17:02 UTC 2011
>Originator:     Julien Cigar
>Release:        8.2-RELEASE
>Organization:
Universit Libre de Bruxelles
>Environment:
FreeBSD dev.lan 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Tue Feb 22 11:58:24 CET 2011     root@dev.lan:/usr/obj/usr/src/sys/CUSTOM  amd64
>Description:
On a Asus P5K motherboard with the following if:

age0@pci0:2:0:0:        class=0x020000 card=0x82261043 chip=0x10481969 rev=0xb0 hdr=0x00
    vendor     = 'Attansic (Now owned by Atheros)'
    device     = 'Gigabit Ethernet 10/100/1000 Base-T Controller (Atheros L1)'
    class      = network
    subclass   = ethernet

the machine disconnects with a "Bad packet length XXXX" or a "Corrupted MAC on input" message when I unzip a simple file through SSH.
>How-To-Repeat:
jcigar@frodon ~ % ssh dev
(...)
jcigar@dev ~ % cd tmp 
jcigar@dev tmp % unzip elgg-1.7.7.zip
Archive:  elgg-1.7.7.zip
   creating: elgg-1.7.7/
   creating: elgg-1.7.7/engine/
  inflating: elgg-1.7.7/engine/settings.example.php  
   creating: elgg-1.7.7/engine/handlers/
(...)
  inflating: elgg-1.7.7/mod/tinymce/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css  
   creating: elgg-1.7.7/mod/tinymce/tinymce/jscripts/tiny_mce/plugins/fullpage/js/
  inflating: elgg-1.7.7/mod/tinymce/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js  
Bad packet length 2190802413.
Disconnecting: Packet corrupt
jcigar@frodon ~ % 

(sometimes it also fails with:
Corrupted MAC on input.
Disconnecting: Packet corrupt)
>Fix:
Disabling tcp segmentation offloading (TSO) and RX/CX checksum offloading on the interface seems to work:

jcigar@dev ~ % sudo ifconfig age0 -rxcsum -txcsum -tso

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Feb 23 09:00:19 UTC 2011 
Responsible-Changed-Why:  
reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154959 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Mon Feb 28 02:25:46 UTC 2011 
State-Changed-Why:  
I guess TSO and TX checksum offloading have nothing to do 
with the issue you're seeing. If age(4) generated corrupted 
packets via TSO/TX checksum offloading, receiver may have 
dropped these corrupted packets. 
Anyway, would you try the patch at the following URL and let 
me know how it goes? 
http://people.freebsd.org/~yongari/age/age.csum.diff 

I don't have access to age(4) hardwares any more so it was 
not tested. 


Responsible-Changed-From-To: freebsd-net->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Mon Feb 28 02:25:46 UTC 2011 
Responsible-Changed-Why:  
Grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154959 
State-Changed-From-To: feedback->closed 
State-Changed-By: yongari 
State-Changed-When: Tue May 10 02:16:27 UTC 2011 
State-Changed-Why:  
Feedback timeout(> 2 months). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154959 
>Unformatted:
