lkml.org 
[lkml]   [2003]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH] ethtool_ops
Date
From
> Right now, each network driver which supports the ethtool 
> ioctl has its own implementation of everything from decoding
> which ethtool ioctl it is, copying data to and from
> userspace, marshalling and unmarshalling data from ethtool
> packets, etc. The current setup makes it impossible to use
> alternative interfaces to get at the same data (eg sysfs) and
> it's not exactly typesafe.

This is really cool! Thanks for doing this Matthew.

Some questions:

* On get_gregs, for example, would it make sense to ->get_drvinfo
so you'll know regdump_len and therefore can kmalloc an ethtool_regs
with enough space to pass to ->get_regs? Keep the kmalloc and
kfree together. Same for self_test, get_strings, and get_stats.
For get_strings, size = max{n_stats, testinfo_len)*sizeof(u64).

* If the above is done, can we have one function type for the
ethtool_ops
functions? int f(struct netdev *, struct ethtool_cmd *). The
drawback is the driver needs to cast to the specific ethtool_* struct.

* Can we get an HAVE_ETHTOOL_OPS defined in netdevice.h to support
backward compat?

-scott
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.044 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site