Date: Fri, 02 Jan 2015 16:08:08 +0800 From: Julian Elischer <julian@freebsd.org> To: Gleb Smirnoff <glebius@FreeBSD.org>, src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: Re: svn commit: r276457 - projects/ifnet/sys/net Message-ID: <54A651E8.5050109@freebsd.org> In-Reply-To: <201412310941.sBV9fQWF038671@svn.freebsd.org> References: <201412310941.sBV9fQWF038671@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/31/14 5:41 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Dec 31 09:41:25 2014 > New Revision: 276457 > URL: https://svnweb.freebsd.org/changeset/base/276457 > > Log: > A draft of the new API for interface drivers, a major milestone in > the project "opaque ifnet". iti woudlbe really cool if there was an extension to the driver for "polling mode operation". This would allow us to implement ethernet/IP based debugging. Firewire and serial are less and less viable options. Firewire is going away, and devices often don't have serial any more. A "send/recieve one packet synchronously" interface would make this feasible. > > New API for drivers: > - Drivers do not include if_var.h, they do include if.h only. Thus, > drivers do not know "struct ifnet". They operate with a pointer > to it, typedefed as "if_t". > - Drivers declare static "struct ifdriver", that describes common > properties of all interfaces handled by this driver. Common > properties include: input/output/ioctl/etc methods, driver name, > interface type, address length, etc. > - In device_attach() method drivers prepare on stack a > "struct if_attach_args", which describes zillion of parameters > that if_attach() would handle. The if_attach() can't fail. > The plan is "struct if_attach_args" to be versioned, so that > in future we can keep ABI compat shims. > - During runtime drivers have a handful of methods to work with > ifnet: get softc, get/modify various flags. > > The kernel after this commit isn't compilable, even w/o any driver > in place. It was intentionally separated to outline important part > of changes from mechanical changes. More commits to follow this one. > > Sponsored by: Netflix > Sponsored by: Nginx, Inc. > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54A651E8.5050109>