From owner-svn-src-projects@FreeBSD.ORG Fri Jan 2 08:11:20 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31398E5D; Fri, 2 Jan 2015 08:11:20 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 02B0164938; Fri, 2 Jan 2015 08:11:19 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-228-83.lns20.per1.internode.on.net [121.45.228.83]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t0288E7K083875 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 2 Jan 2015 00:08:16 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <54A651E8.5050109@freebsd.org> Date: Fri, 02 Jan 2015 16:08:08 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: Re: svn commit: r276457 - projects/ifnet/sys/net References: <201412310941.sBV9fQWF038671@svn.freebsd.org> In-Reply-To: <201412310941.sBV9fQWF038671@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2015 08:11:20 -0000 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. > >