From owner-freebsd-arch@FreeBSD.ORG Thu May 29 03:48:15 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F25912B; Thu, 29 May 2014 03:48:15 +0000 (UTC) Received: from felyko.com (felyko.com [IPv6:2001:470:1:2d5:26:3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 44B172512; Thu, 29 May 2014 03:48:15 +0000 (UTC) Received: from [IPv6:2601:9:8280:426:20f6:fc7d:1197:e2f0] (unknown [IPv6:2601:9:8280:426:20f6:fc7d:1197:e2f0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 01EBD34A9E4; Wed, 28 May 2014 20:48:13 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: Roadmap for ifnet(9) for FreeBSD 11 From: Rui Paulo In-Reply-To: Date: Wed, 28 May 2014 20:48:11 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Marcel Moolenaar X-Mailer: Apple Mail (2.1878.2) Cc: Anuranjan Shukla , Gleb Smirnoff , "freebsd-arch@FreeBSD.org Arch" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 03:48:15 -0000 On May 28, 2014, at 9:34, Marcel Moolenaar wrote: > All, >=20 > The ifnet structure represents a network interface. Right now it > is known to all NIC drivers as well as to all protocols. This > means that whenever we change the structure, we need at minimum > recompile all drivers, but usually also change them. This severely > slow downs the development in this area and also makes it hard, if > not, impossible to merge things back to stable branches. >=20 > There were at least 3 efforts on fixing this: >=20 > 1) Juniper=92s JUNOS is a FreeBSD based operating system that has > its own (alternative) network stack, but that leverages the > network drivers from FreeBSD. Juniper mechanically changed all > ifnet dereferences to to accessor methods. This could have > been incorporated as early as 2011, but lacked good follow > through. Marcel Moolenaar was prime contact for this. >=20 > 2) Andre Oppermann was sponsored in 2013 by the FreeBSD > Foundation to make ifnet(9) opaque. This is not complete as of > the time of this writing. >=20 > 3) Gleb Smirnoff also planned to work on opaque ifnet(9), but > that always has been delayed due to 1) and 2). This is indeed needed, but it would be nice to understand what would = happen if the community has comments about your patch. Will Juniper be = able to integrate back those comments? For example, I think the type = "if_t" should be "ifnet_t". Another comment I have is: why do you have = to cast if_t to (struct ifnet *) in all the accessor methods? It would = be better to create a private header typedef'ing if_t to struct ifnet, = avoiding the copy & paste casting. =20 -- Rui Paulo