From owner-freebsd-net@FreeBSD.ORG Fri Dec 22 08:33:18 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 055E916A416 for ; Fri, 22 Dec 2006 08:33:18 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id A399313C45D for ; Fri, 22 Dec 2006 08:33:16 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id kBM8D6lq096756; Fri, 22 Dec 2006 11:13:06 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id kBM8D55w096755; Fri, 22 Dec 2006 11:13:05 +0300 (MSK) (envelope-from yar) Date: Fri, 22 Dec 2006 11:13:05 +0300 From: Yar Tikhiy To: Julian Elischer Message-ID: <20061222081304.GB92873@comp.chem.msu.su> References: <458B2E19.2040708@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <458B2E19.2040708@elischer.org> User-Agent: Mutt/1.5.9i Cc: FreeBSD Net Subject: Re: bridging ethernets containing vlans, 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: Fri, 22 Dec 2006 08:33:18 -0000 On Thu, Dec 21, 2006 at 05:00:09PM -0800, Julian Elischer wrote: > If I bridge two ethernets, one with HW_vlan tagging and the other > without, and there are vlans active on that network, am I right in > assuming that it requires that the two ethernets need to both have their > HW_vlan capabilities on or off, but that it won't work if they are mixed? > > The bridging code seems to turn on and off promiscuous mode for the > interfaces and bridge_mutecaps() seems to turn on the HX Checksup > capacity, but there doesn't seem to be any code whereby the > VLAN tagging is enabled or disabled. > > This means that bridging a HW-VLAN interface with one that > doesn't support HW vlans will result in just the base packet being > transmitted and the vlan header being dropped. > > Am I reading this right? > shouldn't the function bridge_mutecaps() also turn off HW vlan handling? > and is it just a case of adding it to BRIDGE_IFCAPS_MASK? I'd rather convert between the in-band and ouf-of-band representation of the VLAN tag in software. The problem with h/w capabilities is that no one can promise you that a particular NIC+driver pair can really control a particular capability; it can just stay always on due to driver incompleteness or firmware bogosity. On the output path, well-tempered network interfaces with VLAN_HWTAG should be able to accept both in-band and ouf-of-band tags, but real-world NICs can fail to operate in such a mixed mode. Many pitfalls lurk in the hardware acceleration of networking operations. -- Yar