Re: Packet corruption in re0

[ Available lists | Index of freebsd-current | Month of Feb 2008 | Week of 22 Feb 2008 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Pyun YongHyeon <pyunyh@gmail.com>
Date
22 Feb 2008 10:20:35
Subject
Re: Packet corruption in re0
Message-ID
20080222102026.GH30497@cdnetworks.co.kr

In reply to

[ Hide this part ]
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


[ Hide this part ]
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;



Elapsed time: 0.116 seconds