From owner-freebsd-current@FreeBSD.ORG Fri Aug 25 10:38:20 2006 Return-Path: X-Original-To: freebsd-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 089C416A4DD; Fri, 25 Aug 2006 10:38:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC9B743D45; Fri, 25 Aug 2006 10:38:19 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 53CE146DED; Fri, 25 Aug 2006 06:38:19 -0400 (EDT) Date: Fri, 25 Aug 2006 11:38:19 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Gleb Smirnoff In-Reply-To: <20060825101053.GU76666@FreeBSD.org> Message-ID: <20060825113658.D40887@fledge.watson.org> References: <20060825101053.GU76666@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Ian FREISLICH , freebsd-current@FreeBSD.org, yar@FreeBSD.org Subject: Re: 802.1Q vlan performance. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 25 Aug 2006 10:38:20 -0000 On Fri, 25 Aug 2006, Gleb Smirnoff wrote: > As said before by Andrew. It consumes memory. And looks like a regression on > a system with small number of vlans. > > However, after your email I see that we need to document this option in > vlan(4) and encourage people to try it, when they are building a system with > a huge number of vlans. > > And here are some more performance thoughts on vlan(4) driver. When we are > processing an incoming VLAN tagged frame, we need either hash or the array > to determine which VLAN does this frame belong to. When we are sending a > VLAN frame outwards, we don't need this lookup. I've made some tests and it > looks like that the performance decrease that is observed between bare > Ethernet interface and vlan(4) interface, is mostly caused by the transmit > part. The packet is put twice on interface queues. I hope, this will be > optimized after Robert Watson finishes his if_start_mbuf work. Ideally, it will also be possible to remove the m_tag allocation/free from the path once I'm done, which should help also. Is it possible to make the hash table decision a run-time decision? Robert N M Watson Computer Laboratory University of Cambridge