From owner-freebsd-current@FreeBSD.ORG Tue Aug 1 01:04:42 2006 Return-Path: X-Original-To: current@freebsd.org 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 D7EBF16A4DA for ; Tue, 1 Aug 2006 01:04:42 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B67743D46 for ; Tue, 1 Aug 2006 01:04:41 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by ug-out-1314.google.com with SMTP id k40so1269702ugc for ; Mon, 31 Jul 2006 18:04:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=YQpFkIw4wxHsWF0wFhv+1xf+mCYbL6JETw+nMnrY0oEren3nLKgsGWfQYGK1rvFLuOqp6HnP8WIvr3bz5mVPIEB0WBK8brKZzh9Uh1G+VoZtlKW/Lr+/DxJEx/lZert4FWEwi0eECcCT01J+I68gd40suonR74BRZVE9Qn/6Kj4= Received: by 10.65.160.7 with SMTP id m7mr30538qbo; Mon, 31 Jul 2006 18:04:40 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.gmail.com with ESMTP id 15sm10099616nzn.2006.07.31.18.04.38; Mon, 31 Jul 2006 18:04:40 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id k7115Mmr040042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Aug 2006 10:05:22 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id k7115Ku0040041; Tue, 1 Aug 2006 10:05:20 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Tue, 1 Aug 2006 10:05:20 +0900 From: Pyun YongHyeon To: Ian FREISLICH Message-ID: <20060801010520.GD39581@cdnetworks.co.kr> References: <20060731054421.GB35573@cdnetworks.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: current@freebsd.org Subject: Re: em promiscuous mode bug? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2006 01:04:42 -0000 On Mon, Jul 31, 2006 at 01:25:59PM +0200, Ian FREISLICH wrote: > Pyun YongHyeon wrote: > > On Mon, Jul 31, 2006 at 07:16:03AM +0200, Ian FREISLICH wrote: > > > Pyun YongHyeon wrote: > > > > Hardware VLAN tagging was disabled in em(4) when it operates > > > > in promiscuous mode and em(4) will insert a VLAN tag in the > > > > driver. > > > > > > Um, no. When an em interface with hardware VLAN tagging enabled > > > is placed in promiscuous mode, it just _stops_ tagging. Entirely. > > > The 802.1Q vlan just breaks. > > > > > > > Would you try latest em(4) in CURRENT?(if_em.c, rev. 1.122) > > No change with r1.122 (used to be r1.116). Note that with > VLAN_HWTAGGING enabled, both hosts bring up their carp interface > as master. This is because none of the frames are tagged when the > carp driver puts the vlan interface which in turn puts the em > interface into promiscuous mode. > Then I have no clue. I'm not familiar with carp(4) but I guess carp(4) has nothing to do with em(4). > You stated that in an earlier email that VLAN_HWTAGGING is disabled > when the interface is placed in promiscuous mode. Is there any See cvs logs if_em.c, rev 1.58. > reason for this appart from not being to view the VLAN header with > tcpdump? My site runs a lot of VLANS (500+) and it would be nice > to offload this work to the card. > Normally you can't see VLAN information with tcpdump if your NIC supports VLAN_HWTAGGING. On Tx side the VLAN information is carried with a mbuf tag and the hardware is programmed to send the VLAN id from the mbuf tag. On Rx side the hardware performs VLAN tag stripping before tcpdump see the received packet. You have to disable VLAN_HWTAGGING to see VLAN header with tcpdump. If you need real hardware VLAN tag stripping/insertion in promiscuous mode switch your NIC with other cards such as bge(4)/bce(4). -- Regards, Pyun YongHyeon