From owner-cvs-src@FreeBSD.ORG Mon Jan 30 13:45:16 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B64016A420; Mon, 30 Jan 2006 13:45:16 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1DFB43D48; Mon, 30 Jan 2006 13:45:15 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0UDjFnI096852; Mon, 30 Jan 2006 13:45:15 GMT (envelope-from glebius@repoman.freebsd.org) Received: (from glebius@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0UDjFZq096851; Mon, 30 Jan 2006 13:45:15 GMT (envelope-from glebius) Message-Id: <200601301345.k0UDjFZq096851@repoman.freebsd.org> From: Gleb Smirnoff Date: Mon, 30 Jan 2006 13:45:15 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/conf options src/sys/kern kern_mbuf.c src/sys/net if.c if.h if_ethersubr.c if_var.h if_vlan.c if_vlan_var.h src/sys/sys mbuf.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 13:45:16 -0000 glebius 2006-01-30 13:45:15 UTC FreeBSD src repository Modified files: sys/conf options sys/kern kern_mbuf.c sys/net if.c if.h if_ethersubr.c if_var.h if_vlan.c if_vlan_var.h sys/sys mbuf.h Log: Merge the //depot/user/yar/vlan branch into CVS. It contains some collective work by yar, thompsa and myself. The checksum offloading part also involves work done by Mihail Balikov. The most important changes: o Instead of global linked list of all vlan softc use a per-trunk hash. The size of hash is dynamically adjusted, depending on number of entries. This changes struct ifnet, replacing counter of vlans with a pointer to trunk structure. This change is an improvement for setups with big number of VLANs, several interfaces and several CPUs. It is a small regression for a setup with a single VLAN interface. An alternative to dynamic hash is a per-trunk static array with 4096 entries, which is a compile time option - VLAN_ARRAY. In my experiments the array is not an improvement, probably because such a big trunk structure doesn't fit into CPU cache. o Introduce an UMA zone for VLAN tags. Since drivers depend on it, the zone is declared in kern_mbuf.c, not in optional vlan(4) driver. This change is a big improvement for any setup utilizing vlan(4). o Use rwlock(9) instead of mutex(9) for locking. We are the first ones to do this! :) o Some drivers can do hardware VLAN tagging + hardware checksum offloading. Add an infrastructure for this. Whenever vlan(4) is attached to a parent or parent configuration is changed, the flags on vlan(4) interface are updated. In collaboration with: yar, thompsa In collaboration with: Mihail Balikov Revision Changes Path 1.526 +2 -0 src/sys/conf/options 1.19 +25 -0 src/sys/kern/kern_mbuf.c 1.253 +2 -1 src/sys/net/if.c 1.100 +1 -0 src/sys/net/if.h 1.213 +3 -3 src/sys/net/if_ethersubr.c 1.106 +2 -1 src/sys/net/if_var.h 1.94 +462 -119 src/sys/net/if_vlan.c 1.24 +9 -5 src/sys/net/if_vlan_var.h 1.187 +5 -0 src/sys/sys/mbuf.h