Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 May 2014 20:48:11 -0700
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        Anuranjan Shukla <anshukla@juniper.net>, Gleb Smirnoff <glebius@FreeBSD.org>, "freebsd-arch@FreeBSD.org Arch" <freebsd-arch@freebsd.org>
Subject:   Re: Roadmap for ifnet(9) for FreeBSD 11
Message-ID:  <B00C215B-F87E-4C14-AC61-4C2A0D4822B8@FreeBSD.org>
In-Reply-To: <FA49AADC-A853-49F0-B80C-F0FBA1219177@xcllnt.net>
References:  <FA49AADC-A853-49F0-B80C-F0FBA1219177@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On May 28, 2014, at 9:34, Marcel Moolenaar <marcel@xcllnt.net> 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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B00C215B-F87E-4C14-AC61-4C2A0D4822B8>