Date: Mon, 2 Jun 2014 12:54:47 -0700 From: Juli Mallett <jmallett@FreeBSD.org> To: Marcel Moolenaar <marcel@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r266974 - in head/sys: dev/dc dev/fxp dev/mii dev/netmap kern net Message-ID: <CACVs6=9WsTXgbxmpMZEptu6fSOb8_PGOn70=NhOUnkxfWht9RA@mail.gmail.com> In-Reply-To: <201406021754.s52Hsd1B039620@svn.freebsd.org> References: <201406021754.s52Hsd1B039620@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Marcel, On Mon, Jun 2, 2014 at 10:54 AM, Marcel Moolenaar <marcel@freebsd.org> wrote: > Author: marcel > Date: Mon Jun 2 17:54:39 2014 > New Revision: 266974 > URL: http://svnweb.freebsd.org/changeset/base/266974 > > Log: > Introduce a procedural interface to the ifnet structure. The new > interface allows the ifnet structure to be defined as an opaque > type in NIC drivers. This then allows the ifnet structure to be > changed without a need to change or recompile NIC drivers. > > Put differently, NIC drivers can be written and compiled once and > be used with different network stack implementations, provided of > course that those network stack implementations have an API and > ABI compatible interface. > > This commit introduces the 'if_t' type to replace 'struct ifnet *' > as the type of a network interface. The 'if_t' type is defined as > 'void *' to enable the compiler to perform type conversion to > 'struct ifnet *' and vice versa where needed and without warnings. > The functions that implement the API are the only functions that > need to have an explicit cast. > [...] > Submitted by: Anuranjan Shukla <anshukla@juniper.net> > Reviewed by: glebius@ > Obtained from: Juniper Networks, Inc. > Could you say a little bit about why so few reviewers? Also, why "if_t" rather than an opaque "struct ifnet" to minimize churn, and also not conflict with other "if_t" types one might be using in third-party kernel modules. It's a pretty general name, and that seems problematic. In general am enthused about this happening, just minor implementation concerns. Thanks, Juli.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACVs6=9WsTXgbxmpMZEptu6fSOb8_PGOn70=NhOUnkxfWht9RA>