From owner-freebsd-arch Wed Nov 27 8:11:10 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43C5237B401; Wed, 27 Nov 2002 08:11:09 -0800 (PST) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3E8643EC2; Wed, 27 Nov 2002 08:11:08 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.3/8.12.3) with ESMTP id gARGAtTO077169; Wed, 27 Nov 2002 08:10:55 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.3/8.12.3/Submit) id gARGAthB077168; Wed, 27 Nov 2002 08:10:55 -0800 (PST) (envelope-from rizzo) Date: Wed, 27 Nov 2002 08:10:55 -0800 From: Luigi Rizzo To: Marko Zec Cc: Julian Elischer , "M. Warner Losh" , phk@critter.freebsd.dk, rwatson@FreeBSD.ORG, arch@FreeBSD.ORG Subject: Re: ABIs and 5.x branch: freeze kernel module ABI at 5.0 or 5.1? Message-ID: <20021127081054.A76965@xorpc.icir.org> References: <20021127.002657.21921523.imp@bsdimp.com> <20021126234344.A59511@xorpc.icir.org> <3DE4EB22.39D9BD07@tel.fer.hr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3DE4EB22.39D9BD07@tel.fer.hr>; from zec@tel.fer.hr on Wed, Nov 27, 2002 at 04:56:18PM +0100 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Nov 27, 2002 at 04:56:18PM +0100, Marko Zec wrote: ... > > mbufs. ifnet's can be easily extended in much the same way used by > > the bridging code (by using the if_index to point into external > > arrays containing specific extensions); processes/threads/kseg have > > the extra pointer/room for custom schedulers... I think the > > usual suspects are all covered. > > This concepts are unfortunately not applicable in case of virtualization / > cloning of the entire network stack. As each network stack instance has its > own set of arrays a'la ifindex2ifnet[], the if_index often has the same value i don't follow. Why can't you think of the if_index as a unique identifier for the actual device and put the extra pointer in extra_pointer[if_index] ? This way you can also have per-virtual-image instances of whatever extra info you need. Same for struct proc (we used a few spare bytes in -stable' struct proc exactly in this way, storing an equivalent of if_index, and going to an external structure through it to access extension information for our proportional share scheduler). There are surely minor performance issues with this (you have to go through a base_ptr+index whenever you access the extra info instead of using a direct pointer), but in many cases this disappears in the noise. cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message