From owner-freebsd-net@FreeBSD.ORG Mon Mar 3 03:57:28 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AFD3106566C for ; Mon, 3 Mar 2008 03:57:28 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 786C08FC13 for ; Mon, 3 Mar 2008 03:57:28 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id 284F63C0482; Sun, 2 Mar 2008 19:57:28 -0800 (PST) Date: Sun, 2 Mar 2008 19:57:28 -0800 From: Christopher Cowart To: Pyun YongHyeon Message-ID: <20080303035728.GD58253@hal.rescomp.berkeley.edu> Mail-Followup-To: Pyun YongHyeon , freebsd-net@freebsd.org References: <20080225091712.GM88015@hal.rescomp.berkeley.edu> <20080226074355.GD47750@cdnetworks.co.kr> <20080228023840.GR58253@hal.rescomp.berkeley.edu> <20080229060353.GC60623@cdnetworks.co.kr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zsz/KTM5+kqAkz1u" Content-Disposition: inline In-Reply-To: <20080229060353.GC60623@cdnetworks.co.kr> Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-net@freebsd.org Subject: msk driver issues [was: Re: vlan issues with 7.0-RC3] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 03:57:28 -0000 --zsz/KTM5+kqAkz1u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 29, 2008 at 03:03:53PM +0900, Pyun YongHyeon wrote: > On Wed, Feb 27, 2008 at 06:38:40PM -0800, Christopher Cowart wrote: >>On Tue, Feb 26, 2008 at 04:43:55PM +0900, Pyun YongHyeon wrote: >>>On Mon, Feb 25, 2008 at 01:17:12AM -0800, Christopher Cowart wrote: >>>> I have a mac mini running 7.0-RC3, which I'm trying to turn it into a >>>> router. I have a Linksys SRW2008 "fully managed" (via an IE only web >>>> interface, ick) switch.=20 >>>>=20 >>>> Switch: >>>> Port 1 - Trunk vlans 10,60,98 - FreeBSD Box >>>> Port 7 - Access vlan 98 - Existing LAN (192.168.1.0/24) >>>>=20 >>>> OpenWRT (192.168.1.1): >>>> WRT54G box on the Existing LAN >>>>=20 >>>> FreeBSD Box: >>>> ifconfig msk0 up >>>> ifconfig vlan98 create vlan 98 vlandev msk0 inet 192.168.1.67/24 >>>>=20 >>>> With this configuration, I can ping hosts on the other lan segment (Po= rt >>>> 7). Arp and icmp seem to be quite happy. Unfortunately, I'm not having >>>> any luck with tcp and udp. Any attempt to ssh to OpenWRT or dig >>>> @OpenWRT hangs indefinitely. If I do a tcpdump, I see the SYN or A? >>>> leaving and absolutely no response returning. If I run a tcpdump on >>>> OpenWRT, I see no incoming traffic. >>>>=20 >>>> When I try to connect *to* the FreeBSD box from the other lan segment,= I >>>> continue to have problems. tcpdump shows the SYNs arriving via vlan98 >>>> and the FreeBSD box responding with SYN-ACK. OpenWRT receives the SYNA= CK. >>>>=20 >>>> I disabled ipfw just to be sure (sysctl -w net.inet.ip.fw.enable=3D0),= but >>>> it had no effect on the problem. If I connect the FreeBSD box to a vlan >>>> 98 access port and assign the address to msk0, my connectivity problems >>>> go away. This leads me to believe that the firewall on OpenWRT is not >>>> the problem and the problem is related to vlans. >>>>=20 >>>> Thinking it was a problem with the not-so-cheap Linksys POS (bitterness >>>> about the IE web interface again), I plugged my MacBook (running >>>> Leopard, not FreeBSD) into the trunk port. Running the ifconfig comman= ds >>>> above (s/msk0/en0/), I got up and running without any problems. This >>>> causes me to suspect the FreeBSD box. >>>>=20 >>>> Does anyone have any idea what's going on here? Any suggestions for >>>> further troubleshooting? >>> >>> Try disabling hardware features one by one in msk(4) and see how >>> it goes. >>> o Disable TSO. >>> o Disable Tx checksum offload. >>> o Disable VLAN hardware tagging. >> >>Works great after `sudo ifconfig msk0 -txcsum'.=20 >> >>Is this a known bug, or should I file a PR? Let me know if there are any >>other details I can provide to help somebody squash it. >=20 > Would you capture broken TCP/UDP frames with tcpdump on receiving side > and show it to me? Thanks for your help. I will e-mail you the corresponding tracefile off-list. I wanted to discuss my initial findings here. When the FreeBSD box sends tcp or udp traffic to elsewhere on the network, it is not seen at the receiving side, not even with bad checksums. I tried setting up the Linksys device with a port mirror, but apparently that's only supported on native vlan access ports. Great. So, I decided to cross-connect the FreeBSD box with my MacBook. I set up a vlan interface and was able to reproduce the behavior. I did a traffic dump on the parent interface (not the vlan interface) on the MacBook, and noticed that the ethernet frames originating from the FreeBSD box lacked 802.1q tags. Is it possible that the interface is not performing the hardware tagging when txcsum is enabled?=20 While I have your attention, I am also suffering from a problem that was reported to -questions here[1]. About 3 times a day, I'll see the watchdog timeout (missed Tx interrupts) message get logged, after which point the NIC is useless until I reboot. Any ideas? [1] http://lists.freebsd.org/pipermail/freebsd-questions/2008-February/1696= 33.html --=20 Chris Cowart Network Technical Lead Network & Infrastructure Services, RSSP-IT UC Berkeley --zsz/KTM5+kqAkz1u Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iQIVAwUBR8t3JyPHEDszU3zYAQK3uQ/8DCa74Eh12ZoFxeKobeEswGhZ/8PC+7/F uNnwfI5tFqa/bxZ6kLplS6hjWRMAIZ/0udFFyYVp99QP7+Iv4hLInmL+NlB+tecL 8WZs2z6x1JHIskqFB9tR4fhvolelk1QHj+jbT8oDJXt8N6cSj6GcCeRbyFwyg49N 30tCYNhafevqMCnHnxLJVfr2tSTOzaYh5Ofu7LwOIEmMQaSYMXoIVTxkBClOhEDy d1lGWmPLX/9GwyAjivKPi1Dt7C4wTeN6kBoW3btSUNxW63yx1zxDfB7hARppy9EM icnQyBZUe0sGgqAsFm623z9Bssrm16zAihZNUCk4ENn5mrhEFGc5Mv0oue32w+sk dLSLePlHPEQbhJxA1fqYr1KLU1DrUfyHH7oUMk6gOjrsCSLFuyhhRo7h66zYedZE fGhV/nB9eNl/zd3RhQyEbqLbNxtFKV976MAPHk2kFqNO7vLxqS78fxivl/ey/7/B BKnFIFFAw8aHifWnDM+fNS6aHgHzo/IOYYTsAQw8u5R8nXVjr3dAEKIj7+uQBW7A ad54f/rTvD9w2UR9lkVn330sGfKp7+oNcYfm301fW6UBaStFhMdhjHXiZWAxeEAF kc8zkUGEiNLfp+ySo5zK08/3SPQfkUHZ9qAI53wANcfD7Vcv688MoVR1dNymqo5D CRHORnaVNTU= =rX8s -----END PGP SIGNATURE----- --zsz/KTM5+kqAkz1u--