All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: Dan Williams <dcbw@redhat.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] New driver "sfc" for Solarstorm SFC4000 controller (try #7)
Date: Mon, 3 Mar 2008 21:17:44 +0000	[thread overview]
Message-ID: <20080303211743.GG2988@solarflare.com> (raw)
In-Reply-To: <20080303123937.2d72d7e8@extreme>

Stephen Hemminger wrote:
> On Mon, 03 Mar 2008 14:22:55 -0500
> Dan Williams <dcbw@redhat.com> wrote:
> 
> > On Mon, 2008-03-03 at 11:02 -0800, David Miller wrote:
> > > From: Ben Hutchings <bhutchings@solarflare.com>
> > > Date: Mon, 3 Mar 2008 18:56:24 +0000
> > > 
> > > > The patch (against netdev-2.6) is at:
> > > >   https://support.solarflare.com/netdev/7/netdev-2.6-sfc-2.2.0106.patch
> > > 
> > > Nobody can properly review the driver if it's off on some external web
> > > site instead of posted here.
> > 
> > The diff is 707K; I certainly thought that netdev had a message size
> > limit.  What's the proper policy on splitting up _new_ drivers?  There
> > may/may not be a good way of splitting up any given new driver for
> > piecemeal in-line review.  If there's not, what's the alternative?
> 
> Part of the problem is that you put a lot of stuff all in one driver:

It's comparable in size to most other high-performance Ethernet
drivers.  It has to do a little more work talking to the hardware as
there is no firmware.

>   * sensors support

While this sort of protection is unusual, in this case I don't think
it's something that can reasonably be done outside the driver.

>   * large debugfs chunk

debugfs code is separated out, quite straightforward, and can't
really go anywhere but in this driver.

>   * efx driver layer

"efx" is a common prefix used in our driver code to be independent of
product and company names.  It isn't a separate layer.

>   * event queue

We could try writing a driver that just guessed what the NIC was
doing, but I don't think it would work very well. ;-)

> You created a big monolith. No one likes reading big stuff, it requires
> lots of time, as much as going over a whole subsystem. The fact that so
> many callbacks and hooks are needed implies that the design got out of hand
> for a simple device.

It's not a simple device.  There are callbacks into MAC-, PHY- and
board-specific code because this code supports several of each.  I
spent some weeks ruthlessly paring away unnecessary abstraction and
cruft, and I don't believe there is a significant amount left.

> Maybe an alternative would be to make your device better match existing
> infrastructure. The EFX code looks like a separate driver which should
> show up as a bus in the driver model, not a network device.

Are you talking about driverlink?

> Other people who don't just do network device could help as well.

The MTD driver has already benefitted from review on the linux-mtd
list.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.

  reply	other threads:[~2008-03-03 21:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 18:56 [PATCH] New driver "sfc" for Solarstorm SFC4000 controller (try #7) Ben Hutchings
2008-03-03 18:58 ` Ben Hutchings
2008-03-03 19:02 ` David Miller
2008-03-03 19:22   ` Dan Williams
2008-03-03 20:39     ` Stephen Hemminger
2008-03-03 21:17       ` Ben Hutchings [this message]
2008-03-03 21:29         ` David Miller
2008-03-05 14:22           ` Ben Hutchings
2008-03-05 18:38             ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080303211743.GG2988@solarflare.com \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=dcbw@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.