|
|
Subject: Re: Converting to Sysfs - msg#00025
List: linux.kernel.janitors
I took a stab at adding a network device class some months ago. Kent Yoder and
I also took a stab at network device class interfaces for ethernet and token
ring. Here's a reference to our combined patches we submitted to the
linux-kernel mailing list:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103558156812375&w=2
We haven't updated our code, been too busy with other things. We'd love to see
network devices added into the driver model and into sysfs.
Thanks,
Dan
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: Converting to Sysfs
On Wed, 5 Mar 2003, Daniel Stekloff wrote:
>
> I took a stab at adding a network device class some months ago. Kent Yoder
> and
> I also took a stab at network device class interfaces for ethernet and token
> ring. Here's a reference to our combined patches we submitted to the
> linux-kernel mailing list:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=103558156812375&w=2
Thanks for the pointer.
> We haven't updated our code, been too busy with other things. We'd
> love to see network devices added into the driver model and into
> sysfs.
I remember the patches. Unfortunately, I've also been too busy to work
things in. Hopefully things will calm down in the coming weeks and I'll be
able to revisit this topic..
-pat
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
Next Message by Date:
click to view message preview
Re: Converting to Sysfs
On Wednesday 05 March 2003 12:08 pm, Patrick Mochel wrote:
> On Wed, 5 Mar 2003, Daniel Stekloff wrote:
> > I took a stab at adding a network device class some months ago. Kent
> > Yoder and I also took a stab at network device class interfaces for
> > ethernet and token ring. Here's a reference to our combined patches we
> > submitted to the linux-kernel mailing list:
> >
> > http://marc.theaimsgroup.com/?l=linux-kernel&m=103558156812375&w=2
>
> Thanks for the pointer.
>
> > We haven't updated our code, been too busy with other things. We'd
> > love to see network devices added into the driver model and into
> > sysfs.
>
> I remember the patches. Unfortunately, I've also been too busy to work
> things in. Hopefully things will calm down in the coming weeks and I'll be
> able to revisit this topic..
I have a question about device classes, device class attributes, and
interfaces. I'm not sure whether we should forward this to linux-kernel or
not, but here's the question:
Do device class attributes mean one file per device class or per device in the
device class? From what I've seen (and implemented), device class attributes
are one per device class and not per device in the class. Is this correct?
Is there a mechanism to create attributes for all devices in a particular
class? Or, is that what interfaces are for?
Here's an example for networking devices: There current exists a mechanism in
networking devices and through Ethtool to change the message types that can
be printed out - see linux/include/linux/netdevice.h NETIF_MSG_*. Currently,
each network device sets the msg_enable in their private data structure and
set this field through Ethtool. To make this functionality more common and
more accessible, I was thinking either of:
1) Adding the msg_enable field to struct net_device
or
2) Adding it to the net_devclass.
These messaging levels are for network class of devices only. I thought it
might be useful to export this as an attribute in sysfs so people can see
what messaging levels are currently configured and set them easily. It would
be nice if I could export those attributes for all devices in the class.
This brings up the question of - what is the difference between the net
subsystem in sysfs and the net device class that would be in the driver model
and exported through sysfs. What are the uses for each? Where do I add common
network functionality?
Thanks,
Dan
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
Previous Message by Thread:
click to view message preview
Re: Converting to Sysfs
On Thu, Mar 06, 2003 at 12:32:43PM -0800, mutex wrote:
> Only slightly OT, and maybe this is more relevant for kernel-newbies,
> but what is the advantage of sysfs in these cases ? I've heard bits
> and peices about it, but I haven't heard about why it's more
> appropriate for certain drivers in the kernel to be there rather than
> /proc (links for me to RTFM are welcome)
Driver stuff does not belong in /proc.
Driver stuff belongs in sysfs, next to either the driver entry, or the
device entry controlled by that driver.
For lots more info on the whole inner working of the driver model and
sysfs, see Pat's very good documentation at:
kernel.org/pub/linux/kernel/people/mochel/doc/lca/driver-model-lca2003.tar.gz
And the stuff in the Documentation tree.
Good luck,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
Next Message by Thread:
click to view message preview
Re: Converting to Sysfs
On Wed, 5 Mar 2003, Daniel Stekloff wrote:
>
> I took a stab at adding a network device class some months ago. Kent Yoder
> and
> I also took a stab at network device class interfaces for ethernet and token
> ring. Here's a reference to our combined patches we submitted to the
> linux-kernel mailing list:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=103558156812375&w=2
Thanks for the pointer.
> We haven't updated our code, been too busy with other things. We'd
> love to see network devices added into the driver model and into
> sysfs.
I remember the patches. Unfortunately, I've also been too busy to work
things in. Hopefully things will calm down in the coming weeks and I'll be
able to revisit this topic..
-pat
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
|
|