* sysfs question [not found] ` <4AFBE0DD.1000408@grandegger.com> @ 2009-11-12 10:39 ` Kurt Van Dijck 2009-11-12 17:00 ` Stephen Hemminger 0 siblings, 1 reply; 4+ messages in thread From: Kurt Van Dijck @ 2009-11-12 10:39 UTC (permalink / raw) To: Wolfgang Grandegger; +Cc: netdev Hi, Within the socketcan project, we came into a situation that might benefit with input from the netdev mailing list. The main issue is the policy to add sysfs properties in /sys/class/net/canX. The reason for this is that cards (devices) with multiple network interfaces may require properties per network. An obvious property would be the 'channel number of the card'. Other properties could be things like type of output circuitry, ..., rather hardware specific. I see currently 3 options: 1) such properties in /sys/class/net/canX would be allowed. 2) such properties would belong in /sys/class/net/canX/<subdirectory tbd>/ 3) such properties would go somewhere else. Some input with regard to sysfs policies would be helpfull. Kurt ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sysfs question 2009-11-12 10:39 ` sysfs question Kurt Van Dijck @ 2009-11-12 17:00 ` Stephen Hemminger 2009-11-12 17:44 ` Oliver Hartkopp 0 siblings, 1 reply; 4+ messages in thread From: Stephen Hemminger @ 2009-11-12 17:00 UTC (permalink / raw) To: Kurt Van Dijck; +Cc: Wolfgang Grandegger, netdev On Thu, 12 Nov 2009 11:39:41 +0100 Kurt Van Dijck <kurt.van.dijck@eia.be> wrote: > Hi, > > Within the socketcan project, we came into a situation that > might benefit with input from the netdev mailing list. > > The main issue is the policy to add sysfs properties in > /sys/class/net/canX. > > The reason for this is that cards (devices) with multiple network > interfaces may require properties per network. > > An obvious property would be the 'channel number of the card'. Other > properties could be things like type of output circuitry, ..., rather > hardware specific. > > I see currently 3 options: > 1) such properties in /sys/class/net/canX would be allowed. > 2) such properties would belong in /sys/class/net/canX/<subdirectory tbd>/ > 3) such properties would go somewhere else. > > Some input with regard to sysfs policies would be helpfull. > > Kurt It sounds like the property you are proposing is a property of the upper network layer not the hardware. Putting more properties in sysfs is good if is hardware related, but awkward if it is really a protocol attribute. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sysfs question 2009-11-12 17:00 ` Stephen Hemminger @ 2009-11-12 17:44 ` Oliver Hartkopp 2009-11-12 20:01 ` Kurt Van Dijck 0 siblings, 1 reply; 4+ messages in thread From: Oliver Hartkopp @ 2009-11-12 17:44 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Kurt Van Dijck, Wolfgang Grandegger, netdev Stephen Hemminger wrote: > On Thu, 12 Nov 2009 11:39:41 +0100 > Kurt Van Dijck <kurt.van.dijck@eia.be> wrote: > >> Hi, >> >> Within the socketcan project, we came into a situation that >> might benefit with input from the netdev mailing list. >> >> The main issue is the policy to add sysfs properties in >> /sys/class/net/canX. >> >> The reason for this is that cards (devices) with multiple network >> interfaces may require properties per network. >> >> An obvious property would be the 'channel number of the card'. Other >> properties could be things like type of output circuitry, ..., rather >> hardware specific. >> >> I see currently 3 options: >> 1) such properties in /sys/class/net/canX would be allowed. >> 2) such properties would belong in /sys/class/net/canX/<subdirectory tbd>/ >> 3) such properties would go somewhere else. >> >> Some input with regard to sysfs policies would be helpfull. >> >> Kurt > > It sounds like the property you are proposing is a property of the > upper network layer not the hardware. Putting more properties in sysfs > is good if is hardware related, but awkward if it is really a protocol > attribute. Then it would be good here :-) The problem that can occur here is: You plug-in a PCMCIA CAN card that has two CAN controllers on-board. That means, you're getting two CAN independed network interfaces can0 and can1 pointing to ONE pcmcia device. Both of the CAN netdevs may have different bitrates or other CAN controller specific settings (like the type of output circuitry Kurt mentioned). Finally the PCMCIA card itself may contain a serial number and/or a license information that needs to be made available. It's definitely no upper network layer stuff. Regards, Oliver ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sysfs question 2009-11-12 17:44 ` Oliver Hartkopp @ 2009-11-12 20:01 ` Kurt Van Dijck 0 siblings, 0 replies; 4+ messages in thread From: Kurt Van Dijck @ 2009-11-12 20:01 UTC (permalink / raw) To: Oliver Hartkopp; +Cc: Stephen Hemminger, Wolfgang Grandegger, netdev On Thu, Nov 12, 2009 at 06:44:36PM +0100, Oliver Hartkopp wrote: > Stephen Hemminger wrote: > > On Thu, 12 Nov 2009 11:39:41 +0100 > > Kurt Van Dijck <kurt.van.dijck@eia.be> wrote: > > [...] > > > > It sounds like the property you are proposing is a property of the > > upper network layer not the hardware. Putting more properties in sysfs > > is good if is hardware related, but awkward if it is really a protocol > > attribute. > > Then it would be good here :-) > [...] > > It's definitely no upper network layer stuff. > Ack. It's definitely datalink or even physical layer we're talking about. > Regards, > Oliver I also encountered an issue with regard to the uevent that is generated when a netdevice is registered. If I add sysfs files before register_netdevice, the system complains on creating the sysfs files. If I add those after register_netdevice, the uevent is _seems_ to have triggered userspace already, where the udev (in fact, I use another home-brew one for boot speed) does not find the extra sysfs file. Is there a mechanism to hold temporarily the uevent until after the driver has registered some extra sysfs files? Kurt ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-12 20:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200911021533.25345.matthias.fuchs@esd.eu>
[not found] ` <20091106100427.GB323@e-circ.dyndns.org>
[not found] ` <20091109112331.GE323@e-circ.dyndns.org>
[not found] ` <4AF83EB7.3070401@grandegger.com>
[not found] ` <20091112100053.GA322@e-circ.dyndns.org>
[not found] ` <4AFBE0DD.1000408@grandegger.com>
2009-11-12 10:39 ` sysfs question Kurt Van Dijck
2009-11-12 17:00 ` Stephen Hemminger
2009-11-12 17:44 ` Oliver Hartkopp
2009-11-12 20:01 ` Kurt Van Dijck
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).