netdev
[Top] [All Lists]

ethtool and MII (was Re: initial acenic ZC cleanup)

To: Jes Sorensen <jes@xxxxxxxxxxxxx>
Subject: ethtool and MII (was Re: initial acenic ZC cleanup)
From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
Date: Wed, 21 Mar 2001 07:07:25 -0500
Cc: netdev@xxxxxxxxxxx
Organization: MandrakeSoft
References: <200103082147.f28LlS301042@xxxxxxxxxxxxxxxxxxxxxxxxx> <15015.65092.349145.143015@xxxxxxxxxxxxxxx> <d3g0gnzzv7.fsf@xxxxxxxxxxxxxxxxx> <3AA80487.3C7E26A6@xxxxxxxxxxxxxxxx> <d34rx3fzrm.fsf@xxxxxxxxxxxxxxxxx> <3AAAEEC8.9375ED6@xxxxxxxxxxxxxxxx> <d3n1arnigr.fsf@xxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Jes Sorensen wrote:
> >>>>> "Jeff" == Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx> writes:
> Jeff> If they are NIC-specific, then you should just use ioctls...
> Jeff> It's a silly redirection to add NIC-specific stuff to the
> Jeff> ethtool ioctl, when you could just add a private ioctl.

> And another tool to access it so we end up with ethtool and acetool
> and sktool and hmetool and 3c905tool etc etc. all of them basically
> doing the same thing. It seems silly to have two tools, one for
> setting the link rate and flow control and one for setting the
> interrupt coalescing counters.

Point.

> The point is that a lot of the NICs have the same type of tuning
> variables, sometimes they are identical sometimes they are slightly
> different. My suggestion is that we either teach ethtool about the
> different names of tuning parameters or if we are lazy just allow one
> to set `NIC private parameters 1-16 with it' and define those for the
> different NIC as different things.

I stick to my assertion that creating driver-private ioctls is the way
to go.  Given your good point however, my suggestion would be to modify
userland ethtool to support the acenic/tulip/foo-specific ioctls.  Sort
of like how mount(8) supports fs-specific options, along with general
options.

Many of the Becker-derived drivers export an MDIO interface, but do not
support ethtool.h.  I already plan to modify userland ethtool to support
these driver-private ioctls, until they are modified for full ethtool
support in-kernel.  This immediately makes ethtool useful for many more
users, and it should eliminate the need for the /sbin/mii-tool that
comes with pcmcia-cs.

So far I don't yet know who is maintaining userland ethtool.  I'm
guessing DaveM or Jakub Jelinek (sp?), since they appear to have
originally written/packaged it.  I need to figure that one out before I
start making too many changes to ethtool.c...

        Jeff


P.S. For 2.5, I would like to write an mii-phy module.  Then all these
mdio-alike drivers can pass their mdio_read and mdio_write functions to
a generic layer, which properly handles ethtool and the older
dev->if_port form of media selection.  This will also allow us to
identify and work around bugs in specific MII PHYs that might affect
more than one type of NIC.

-- 
Jeff Garzik       | May you have warm words on a cold evening,
Building 1024     | a full mooon on a dark night,
MandrakeSoft      | and a smooth road all the way to your door.

<Prev in Thread] Current Thread [Next in Thread>