From owner-freebsd-arch@FreeBSD.ORG Mon Jun 2 22:50:35 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFCAE3EF; Mon, 2 Jun 2014 22:50:35 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0145.outbound.protection.outlook.com [207.46.163.145]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47F8F2D40; Mon, 2 Jun 2014 22:50:34 +0000 (UTC) Received: from CO2PR05MB731.namprd05.prod.outlook.com (10.141.228.21) by CO2PR05MB569.namprd05.prod.outlook.com (10.141.197.12) with Microsoft SMTP Server (TLS) id 15.0.944.11; Mon, 2 Jun 2014 22:50:26 +0000 Received: from CO2PR05MB730.namprd05.prod.outlook.com (10.141.228.15) by CO2PR05MB731.namprd05.prod.outlook.com (10.141.228.21) with Microsoft SMTP Server (TLS) id 15.0.949.11; Mon, 2 Jun 2014 22:50:25 +0000 Received: from CO2PR05MB730.namprd05.prod.outlook.com ([10.141.228.15]) by CO2PR05MB730.namprd05.prod.outlook.com ([10.141.228.15]) with mapi id 15.00.0949.001; Mon, 2 Jun 2014 22:50:25 +0000 From: Anuranjan Shukla To: John-Mark Gurney , Gleb Smirnoff Subject: Re: Roadmap for ifnet(9) for FreeBSD 11 Thread-Topic: Roadmap for ifnet(9) for FreeBSD 11 Thread-Index: AQHPepLaX4+rVOOldkOoqmC4MWB2pZtW7HmAgAAEiYCAB4B2gP//jhsA Date: Mon, 2 Jun 2014 22:50:25 +0000 Message-ID: References: <20140529040425.GT50679@glebius.int.ru> <20140602223801.GC43976@funkthat.com> In-Reply-To: <20140602223801.GC43976@funkthat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.1.140326 x-originating-ip: [66.129.239.10] x-microsoft-antispam: BL:0; ACTION:Default; RISK:Low; SCL:0; SPMLVL:NotSpam; PCL:0; RULEID: x-forefront-prvs: 0230B09AC4 x-forefront-antispam-report: SFV:NSPM; SFS:(6009001)(428001)(24454002)(377454003)(479174003)(51704005)(35774003)(199002)(189002)(46102001)(83072002)(19580405001)(81542001)(77982001)(79102001)(4396001)(81342001)(99396002)(76482001)(92566001)(19580395003)(85852003)(21056001)(31966008)(99286001)(92726001)(76176999)(87936001)(80022001)(20776003)(66066001)(54356999)(77096999)(50986999)(86362001)(101416001)(83506001)(83322001)(2656002)(74502001)(36756003)(74662001); DIR:OUT; SFP:; SCL:1; SRVR:CO2PR05MB731; H:CO2PR05MB730.namprd05.prod.outlook.com; FPR:; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (: juniper.net does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anshukla@juniper.net; Content-Type: text/plain; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Microsoft-Antispam: BL:0; ACTION:Default; RISK:Low; SCL:0; SPMLVL:NotSpam; PCL:0; RULEID: X-OriginatorOrg: juniper.net Cc: Marcel Moolenaar , Rui Paulo , "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: Mon, 02 Jun 2014 22:50:36 -0000 Hi John, The first email in this thread from Marcel has the schedule: On 5/28/14, 9:34 AM, "Marcel Moolenaar" wrote: <=8Bsnip=8B> Schedule: late May 2014 Juniper adds accessor methods. Access via void *, that inside if.c is re-casted to (struct ifnet *). This =B3ugly=B2 moment is required to keep unconverted drivers compilable and will go away shortly after. 1st week June 2014 Juniper commits few converted drivers. June - July All drivers are being converted. Gleb volunteers, but this should be done by as many hands as possible. August 2014 '#define if_t void *' is removed. 'typedef if_t struct ifnet *' is added. actual struct ifnet is hidden. 2014/2015 Better APIs developed and improved, actual ifnet representation becomes variable sized. New networking stack improvements are already unblocked at this moment. On 6/2/14, 3:38 PM, "John-Mark Gurney" wrote: >Gleb Smirnoff wrote this message on Thu, May 29, 2014 at 08:04 +0400: >> On Wed, May 28, 2014 at 08:48:11PM -0700, Rui Paulo wrote: >> R> On May 28, 2014, at 9:34, Marcel Moolenaar wrote: >> R>=20 >> R> > All, >> R> >=20 >> R> > The ifnet structure represents a network interface. Right now it >> R> > is known to all NIC drivers as well as to all protocols. This >> R> > means that whenever we change the structure, we need at minimum >> R> > recompile all drivers, but usually also change them. This severely >> R> > slow downs the development in this area and also makes it hard, if >> R> > not, impossible to merge things back to stable branches. >> R> >=20 >> R> > There were at least 3 efforts on fixing this: >> R> >=20 >> R> > 1) Juniper???s JUNOS is a FreeBSD based operating system that has >> R> > its own (alternative) network stack, but that leverages the >> R> > network drivers from FreeBSD. Juniper mechanically changed all >> R> > ifnet dereferences to to accessor methods. This could have >> R> > been incorporated as early as 2011, but lacked good follow >> R> > through. Marcel Moolenaar was prime contact for this. >> R> >=20 >> R> > 2) Andre Oppermann was sponsored in 2013 by the FreeBSD >> R> > Foundation to make ifnet(9) opaque. This is not complete as of >> R> > the time of this writing. >> R> >=20 >> R> > 3) Gleb Smirnoff also planned to work on opaque ifnet(9), but >> R> > that always has been delayed due to 1) and 2). >> R>=20 >> R> 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 >> Because for now patch supports compiling unconverted drivers. This >>requires >> to pass 'void *' as argument. When all drivers are converted, this will >>be >> removed. In if_var.h we would have: >>=20 >> struct ifnet; >> typedef struct ifnet * if_t; >>=20 >> All casts to (struct ifnet *) will go away. > >When? The schedule did not have a time frame on when this will happen.. >Will it be this year? Next year? Next decade? > >--=20 > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not."