svn commit: r276457 - projects/ifnet/sys/net

Julian Elischer julian at freebsd.org
Fri Jan 2 08:11:20 UTC 2015


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.
>
>



More information about the svn-src-projects mailing list