From owner-freebsd-current@FreeBSD.ORG Thu Nov 11 03:26:55 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1497716A4CE for ; Thu, 11 Nov 2004 03:26:55 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id C13BF43D5D for ; Thu, 11 Nov 2004 03:26:54 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id iAB3QrA9075191; Wed, 10 Nov 2004 22:26:53 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 74984-03; Wed, 10 Nov 2004 22:26:53 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id iAB3QrxV075167; Wed, 10 Nov 2004 22:26:53 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id iAB3QiPb034335; Wed, 10 Nov 2004 22:26:45 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.1.2.0.0.20041110223206.10e627c8@64.7.153.2> X-Sender: mdtpop@64.7.153.2 (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.1.2.0 Date: Wed, 10 Nov 2004 22:34:21 -0500 To: freebsd-current@freebsd.org From: Mike Tancsa In-Reply-To: References: <1152675CA9EDD71187130002B3CE5ADA1066120D@hoexc010.ukrtelecom.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b Subject: Re: Re[2]: em0, VLAN and bpf(?) trouble w/RELENG_5 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2004 03:26:55 -0000 This does indeed fix it for me! ---Mike At 07:11 PM 10/11/2004, Robert Watson wrote: >On Wed, 10 Nov 2004 astesin@ukrtelecom.net wrote: > > > > So now I have RELENG_5 as of today > > > > > > 1. No problems with large frames. Bing -s 2000 -S 4000 -e > > > 5000 works fine through vlan0. > > > > > > 2. trafshow -i vlan0 > > > ... silence ... > > > > > > Vlan0 hangs. > > > > 3. trafshow -p -I vlan0 works fine > >Try the attached. It looks like the sender is actually sending out >ISL-encapsulated packets rather than using the normal VLAN trunk >encapsulation (?). The patch below reverts part of a change between the >4x and 5.x drivers that modifies the behavior of the if_em driver in the >presence of promiscuous mode. The change was part of a more broad commit >described as follows: > > revision 1.45 > date: 2004/09/01 23:22:41; author: pdeuskar; state: Exp; lines: +60 -18 > Added support for Intel PRO/1000 GT Desktop Adapter(Device ID 8086 107C) > Removed support for Intel 82541ER > Added fix for 82547 which corrects an issue with Jumbo frames larger > than 10k. > Added fix for vlan tagged frames not being properly bridged. > Corrected TBI workaround. > Corrected incorrect LED operation issues > >So it sounds like the "fix" here may be mostly right, but not 100% right; >I'm unclear on why in this situation you get the ISL encapsulation on >transmit instead of the 802.1Q encapsulation. I may just be >misunderstanding the details of what is going on here, however, and >someone with more familiarity with the hardware could fix this properly. > >This change, FWIW, is not present in 4.x. > >Robert N M Watson FreeBSD Core Team, TrustedBSD Projects >robert@fledge.watson.org Principal Research Scientist, McAfee Research > > >Index: if_em.c >=================================================================== >RCS file: /home/ncvs/src/sys/dev/em/if_em.c,v >retrieving revision 1.51 >diff -u -r1.51 if_em.c >--- if_em.c 3 Nov 2004 14:11:18 -0000 1.51 >+++ if_em.c 11 Nov 2004 00:04:56 -0000 >@@ -1497,14 +1497,14 @@ > if (ifp->if_flags & IFF_PROMISC) { > reg_rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); > E1000_WRITE_REG(&adapter->hw, RCTL, reg_rctl); >- >+#if 0 > /* Disable VLAN stripping in promiscous mode > * This enables bridging of vlan tagged frames to occur > * and also allows vlan tags to be seen in tcpdump > */ > ctrl &= ~E1000_CTRL_VME; > E1000_WRITE_REG(&adapter->hw, CTRL, ctrl); >- >+#endif > } else if (ifp->if_flags & IFF_ALLMULTI) { > reg_rctl |= E1000_RCTL_MPE; > reg_rctl &= ~E1000_RCTL_UPE;