From owner-freebsd-net@FreeBSD.ORG Mon May 10 19:35:44 2010 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCA7B1065673 for ; Mon, 10 May 2010 19:35:44 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id AE0CE8FC12 for ; Mon, 10 May 2010 19:35:44 +0000 (UTC) Received: from [172.24.98.37] ([192.75.139.252]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id o4AJ7lJw057724 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 10 May 2010 12:07:49 -0700 (PDT) (envelope-from sam@errno.com) Message-Id: From: Sam Leffler To: Luigi Rizzo In-Reply-To: <20100420215527.GA75324@onelab2.iet.unipi.it> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Mon, 10 May 2010 15:07:46 -0400 References: <20100420172845.GA71187@onelab2.iet.unipi.it> <20100420215527.GA75324@onelab2.iet.unipi.it> X-Mailer: Apple Mail (2.936) X-DCC-x.dcc-servers-Metrics: ebb.errno.com; whitelist Cc: net@freebsd.org Subject: Re: max_linkhdr defaults to 16, too short ? 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: Mon, 10 May 2010 19:35:44 -0000 On Apr 20, 2010, at 5:55 PM, Luigi Rizzo wrote: > On Tue, Apr 20, 2010 at 07:28:45PM +0200, Luigi Rizzo wrote: >> just noticed that sys/kern/uipc_domain.c still sets max_linkhdr=16 >> as a default. >> The value is often used to reserve head space in mbufs for >> the MAC header. As such, 16 is too short for systems that make >> use of vlans, and the effect might be that we would need >> additional mbuf entries or at least move stuff down >> as the vlan tag is added. >> >> Any objection to bumping the default to 20 ? > > forgot to mention: > > max_linkhdr is available as a sysctl, kern.max_linkhdr , but other > than that, there is no code in sys/ that sets the value, so systems > are stuck at 16 unless users override the default. We need a coherent way to handle max_linkhdr. I hacked it in net80211 to insure bridged 802.11 frames have sufficient contiguous space in the mbufs but never did something like define an api and generate events/callbacks on changes. Last I looked doing this right was non- trivial. Sam