netdev
[Top] [All Lists]

Re: [PATCH] netdev_ops

To: Matthew Wilcox <willy@xxxxxxxxxx>
Subject: Re: [PATCH] netdev_ops
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Tue, 08 Jul 2003 13:44:32 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20030708163042.GL23597@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Organization: Candela Technologies
References: <20030708163042.GL23597@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529
Matthew Wilcox wrote:
After a conversation with acme, I realised that ethtool_ops is far too
narrow scope.  What we need are netdev_ops.  This patch renames the
ethtool_ops to netdev_ops and fixes some other minor flaws:

 - add _len() ops for operations which previously had to kmalloc their
   own memory.
 - move the netdev_ops from ethtool.h to netdevice.h
 - makes some ops generic as requested by Jeff Garzik.

I think netdev_ops is still a little too ethtool-specific; something
I'd like to do is convert the parameters to be a little less
ethtool-related.  For example, instead of ->get_drvinfo, I'd like to
see ethtool_get_drvinfo() call several methods and fill in all the data
that way.

But let's see what everyone thinks of this patch first ...


+ * Each operation is passed a &struct net_device as its first parameter.

Some of these are missing their netdevice arg?
+       int     (*get_regs_len)(struct ethtool_regs *);

+       int     (*self_test_len)(struct ethtool_test *);

+       int     (*get_strings_len)(struct ethtool_gstrings *);

+       int     (*get_stats_len)(struct ethtool_stats *);



--
Ben Greear <greearb@xxxxxxxxxxxxxxx>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear



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