From owner-freebsd-net@FreeBSD.ORG Wed Feb 22 06:08:11 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C51161065673; Wed, 22 Feb 2012 06:08:11 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 3094E8FC14; Wed, 22 Feb 2012 06:08:11 +0000 (UTC) Received: from julian-mac.elischer.org (adsl-69-105-197-40.dsl.scrm01.pacbell.net [69.105.197.40]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id q1M687wE062949 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 21 Feb 2012 22:08:09 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4F448641.8070403@freebsd.org> Date: Tue, 21 Feb 2012 22:08:01 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19 MIME-Version: 1.0 To: Marcel Moolenaar References: <338757D1-6B1E-49CF-983F-5D5851066FD3@xcllnt.net> <20120220231601.GA51310@lor.one-eyed-alien.net> <20120221001552.GA60050@onelab2.iet.unipi.it> <20120221090821.GE55074@deviant.kiev.zoral.com.ua> <1F812CB2-152F-47AF-9952-6AEAC6D95547@xcllnt.net> In-Reply-To: <1F812CB2-152F-47AF-9952-6AEAC6D95547@xcllnt.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , Brooks Davis , Juli Mallett , net@freebsd.org, Konstantin Belousov , Luigi Rizzo Subject: Re: Abstracting struct ifnet 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: Wed, 22 Feb 2012 06:08:11 -0000 On 2/21/12 9:13 AM, Marcel Moolenaar wrote: > On Feb 21, 2012, at 1:08 AM, Konstantin Belousov wrote: > >> On Mon, Feb 20, 2012 at 06:42:15PM -0800, Juli Mallett wrote: >>> On Mon, Feb 20, 2012 at 18:34, Adrian Chadd wrote: >>>> Is the target though _binary_ compatibility? Just having a blessed >>>> method of doing accessor method things will buy more source >>>> flexibility. The KBI can stay the same in the default case and IMHO >>>> this kind of thing gives developers more power to do smart invariant >>>> and debugging things. >>> KBI compatibility requires very little discipline and makes loadable >>> modules for network drivers much less hellish. Inlines, macros and >>> full visibility of ifnet in -current may be useful, but unless there's >>> a performance reason for doing so, retaining KBI compatibility *and* >>> the ability to merge ifnet changes to -stable sounds pretty nice to >>> me. > *snip* >> You could take a look how mutexes or vm_page_locks are handled, >> giving inlines for kernel proper and stable KBI for modules. > > A stable KBI is what we'll be aiming for at Juniper. We're working > towards a kernel proper without any networking, the FreeBSD network > stack as a module, the Juniper network stack as a module and H/W > network drivers as modules. The network drivers and how they talk > to the network stack is the big piece we still had to flesh out. > > Dynamic loading and unloading of network stack modules is not a goal, > but we do want to be able to pre-load the network stack that we want > to use and not have to worry about matching the H/W network drivers > with the stack of choice. > > Inlines for the kernel proper and a stable KBI for modules seems to > match everyone's objectives/concerns. We'll definitely take a look > at the mutexes and vm_page_locks. I've often wonderd if the vnet changes could be extended to allow not only instances of a single stack, but completely different stacks. > FYI, >