From owner-freebsd-net@FreeBSD.ORG Thu Sep 7 15:07:34 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EEB716A4DA for ; Thu, 7 Sep 2006 15:07:34 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E24BF43D7F for ; Thu, 7 Sep 2006 15:07:26 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 60814 invoked from network); 7 Sep 2006 14:52:16 -0000 Received: from dotat.atdotat.at (HELO [62.48.0.47]) ([62.48.0.47]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 7 Sep 2006 14:52:16 -0000 Message-ID: <450035AD.3040600@freebsd.org> Date: Thu, 07 Sep 2006 17:07:25 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217 MIME-Version: 1.0 To: freebsd-arch@freebsd.org, freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: yar@comp.chem.msu.su Subject: Moving ethernet VLAN tags into the mbuf packet header (from mtags) 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: Thu, 07 Sep 2006 15:07:34 -0000 With the recent addition of a 16bit field for TSO into the mbuf packet header we've got 16bits left over. I've reserved these bits for the ethernet VLAN tagging of packet to do away with the allocated mbuf mtag. The change is rather mechanical. Patch available here: http://people.freebsd.org/~andre/vlan_pkthdr-20060907.diff The big advantage is that we don't have to do a UMA zalloc for very incoming vlan tagged packet. The m_pkthdr.ether_vlan field is always present and its validity depends on the M_VLANTAG flag. Testing & reviews encouraged. :-) -- Andre