From owner-freebsd-net@FreeBSD.ORG Sun Nov 4 02:40:16 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCCC3E93 for ; Sun, 4 Nov 2012 02:40:16 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id B35108FC0C for ; Sun, 4 Nov 2012 02:40:16 +0000 (UTC) Received: from marcelm-sslvpn-nc.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id qA42eDqm044840 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 3 Nov 2012 19:40:14 -0700 (PDT) (envelope-from marcel@xcllnt.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Proposal for changes to network device drivers and network stack (RFC) From: Marcel Moolenaar In-Reply-To: <570F1A37-38F0-41CF-91C7-B6047AA79E97@neville-neil.com> Date: Sat, 3 Nov 2012 19:40:08 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3465231B-CEC2-4FC1-92EF-95C535EFCBED@xcllnt.net> References: <570F1A37-38F0-41CF-91C7-B6047AA79E97@neville-neil.com> To: George Neville-Neil X-Mailer: Apple Mail (2.1499) Cc: "freebsd-net@freebsd.org" , Anuranjan Shukla X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2012 02:40:17 -0000 On Sep 5, 2012, at 1:16 PM, George Neville-Neil = wrote: > One more note. Can you break the patches down into more bite sized = pieces? They're hard > to review as is. Following up finally. Let's focus on the device driver interface. I renamed the interface implementation from mumble_ddi.h to if_device.[ch] and put a diff here: http://people.freebsd.org/~marcel/Juniper/if_device.diff To see how it's used and/or how it changes a device driver, look at a diff to if_em.c here: http://people.freebsd.org/~marcel/Juniper/if_em.diff Some notes: 1. Yes, there needs a license at the top. It's 2-clause BSD 2. The function pointers are macros right now. I think it's better to have an ops structure and a single function to set the ops than a bunch of accessors to set functions. 3. The code needs to be tidied up. What I'd like to see is a discussion on the functions themselves. They're the result of looking at a single driver (or maybe 2 drivers), and as such may not be perfectly generic or logical. As said before: we'd like to focus on an ABI-stable interface, but a one based on macros should also be possible. Sorry for the delay, --=20 Marcel Moolenaar marcel@xcllnt.net