netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: willy@debian.org, netdev@oss.sgi.com
Subject: Re: [PATCH] ethtool_ops rev 4
Date: Fri, 1 Aug 2003 15:32:55 -0700	[thread overview]
Message-ID: <20030801153255.204baf66.davem@redhat.com> (raw)
In-Reply-To: <3F2AE91D.5090705@pobox.com>

On Fri, 01 Aug 2003 18:26:37 -0400
Jeff Garzik <jgarzik@pobox.com> wrote:

> Strangely enough, creating a SET_ETHTOOL_OPS() macro (or 
> netif_ethtool_ops or pick your name) reduces ifdefs.

And then we'll have all of these functions present in
the driver, unused, and we'll get tons of warning from
gcc.

The duplication of code is still there, and this is the
main point.

> I feel that I've helped shepherd the net driver and PCI APIs to maintain 
> something fairly interesting:

It's not interesting in this case.

> It's an explicit goal to avoid changing the driver API in such a way 
> that there is a remotely sane path to supporting older kernels.

This enhancement we're talking about basically has no value unless
you accept an appearance of breakage in this particular area.

You can't get rid of the duplicated code without accepting that you
will have seperate 2.6.x and 2.4.x strains of your driver.

If you aren't willing to accept seperate strains of your driver, you
simply don't use netdev_ops.

It is the end of the conversation.

> the few things that is not easily work-around-able is new additions to 
> existing structures (which wouldn't exist in older kernels).  That's 
> what SET_ETHTOOL_OPS would wrap, while also providing a trigger for 
> generic compat glue.

What gets rid of the static functions that do the work when
SET_ETHTOOL_OPS() is a nop?

I do not accept a scheme where the functions stay there in the driver
anyways.  All you seem to be talking about is a compat library which
provides netdev_ops in library form or something silly like that.

> This (IMO) feature continually saves me real time

I don't argue that, just don't use netdev_ops in drivers you
wish to keep doing this with :-)

Look at drivers/net/acenic.c, that's similar to what your drivers will
begin to look like if you don't start accepting a disconnect in
certain areas.

  reply	other threads:[~2003-08-01 22:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-01 15:02 [PATCH] ethtool_ops rev 4 Matthew Wilcox
2003-08-01 15:40 ` Jeff Garzik
2003-08-01 15:46   ` Matthew Wilcox
2003-08-01 16:25     ` Jeff Garzik
2003-08-01 20:20       ` David S. Miller
2003-08-01 22:26         ` Jeff Garzik
2003-08-01 22:32           ` David S. Miller [this message]
2003-08-01 23:01             ` Jeff Garzik
2003-08-01 23:01               ` David S. Miller
2003-08-01 23:17                 ` Jeff Garzik
2003-08-01 23:19                   ` David S. Miller
2003-08-01 23:42                     ` Jeff Garzik
2003-08-01 23:43                       ` David S. Miller
2003-08-01 22:35           ` Jeff Garzik
2003-08-01 22:34             ` David S. Miller
2003-08-01 23:09               ` Jeff Garzik
2003-08-01 23:08                 ` David S. Miller
2003-08-01 23:35                   ` Jeff Garzik
2003-08-01 23:34                     ` David S. Miller
2003-08-02 22:21       ` Matthew Wilcox
2003-08-02 22:34         ` Jeff Garzik
2003-08-03  0:27           ` Matthew Wilcox
2003-08-03  3:14             ` Jeff Garzik
2003-08-03 14:56               ` Matthew Wilcox
2003-08-03 17:09                 ` Jeff Garzik
2003-08-05 14:32                   ` Matthew Wilcox
2003-08-03  0:28           ` David S. 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=20030801153255.204baf66.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    --cc=willy@debian.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).