Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Feb 2008 19:20:26 +0900
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Ian FREISLICH <ianf@clue.co.za>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, Robert Backhaus <robbak@robbak.com>
Subject:   Re: Packet corruption in re0
Message-ID:  <20080222102026.GH30497@cdnetworks.co.kr>
In-Reply-To: <20080222094742.GF30497@cdnetworks.co.kr>
References:  <20080222042700.GB30497@cdnetworks.co.kr> <E1JSTV4-0000l2-EE@clue.co.za> <20080222094742.GF30497@cdnetworks.co.kr>

next in thread | previous in thread | raw e-mail | index | archive | help

--vGgW1X5XWziG23Ko
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Feb 22, 2008 at 06:47:42PM +0900, To Ian FREISLICH wrote:

[...]
 >  > It seems like it's corrupting large packets on transmit when vlanhwtag
 >  > is enabled.  From the tcpdump output it looks like a padding or
 >  > packet length issue.
 >  > 
 >  > Here's what tcpdump on the re(4) device thinks it's transmitting:
 >  > 
 >  > 00:08:a1:3c:32:9c > 00:90:fb:0c:89:7d, ethertype 802.1Q (0x8100), length 1510: vlan 1000, p 0, ethertype IPv4, 196.22.138.92 > 196.22.138.89: OSPFv2, Database Description, length: 1472
 >  > 
 >  > Here's what was actually recieved by the em(4) device on the
 >  > neighbour.  Note the absense of the 801.1Q header:
 >  > 
 > 
 > I see, I'll check it.
 > 
 >  > 00:08:a1:3c:32:9c > 00:90:fb:0c:89:7d, ethertype IPv4 (0x0800), length 1506: 196.22.138.92 > 196.22.138.89: OSPFv2, Database Description, length: 1472
 >  > 
 >  > When vlanhwtagging is disabled, the re(4) device transmits:
 >  > 
 >  > 00:90:fb:0c:89:7d > 00:08:a1:3c:32:9c, ethertype 802.1Q (0x8100), length 1510: vlan 1000, p 0, ethertype IPv4, 196.22.138.89 > 196.22.138.92: OSPFv2, Database Description, length: 1472
 >  > 
 >  > and the em(4) device recieves:
 >  > 
 >  > 00:08:a1:3c:32:9c > 00:90:fb:0c:89:7d, ethertype 802.1Q (0x8100), length 1510: vlan 1000, p 0, ethertype IPv4, 196.22.138.92 > 196.22.138.89: OSPFv2, Database Description, length: 1472
 >  > 
 >  > Let me know if you need more detailed tcpdump output than I've provided.
 >  > 

Apply attached patch and let me know how it goes.
It just disables checksum offload for vlan interface.

-- 
Regards,
Pyun YongHyeon

--vGgW1X5XWziG23Ko
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="re.vcsum.patch"

Index: if_re.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/re/if_re.c,v
retrieving revision 1.103
diff -u -r1.103 if_re.c
--- if_re.c	17 Jan 2008 23:37:47 -0000	1.103
+++ if_re.c	22 Feb 2008 10:16:26 -0000
@@ -1332,8 +1332,10 @@
 
 	/* VLAN capability setup */
 	ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING;
+#if 0
 	if (ifp->if_capabilities & IFCAP_HWCSUM)
 		ifp->if_capabilities |= IFCAP_VLAN_HWCSUM;
+#endif
 	ifp->if_capenable = ifp->if_capabilities;
 #ifdef DEVICE_POLLING
 	ifp->if_capabilities |= IFCAP_POLLING;

--vGgW1X5XWziG23Ko--



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