* question about drivers/infiniband/core/cm.c's kobject usage
@ 2008-05-22 20:34 Greg KH
2008-05-22 21:47 ` Sean Hefty
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2008-05-22 20:34 UTC (permalink / raw)
To: Sean Hefty; +Cc: rolandd, hal.rosenstock, general, linux-kernel
Hi,
I was working on some changes to the driver core that is cleaning up the
struct class fields, when I ran accross the usage of cm.c and the
infiniband_cm class.
It looks like you are registering "raw" kobjects in this class, chaining
things off of it, as if they were devices.
If so, why not just use struct device in the first place? You are
creating a tree, which on modern distros, userspace will never see as
they are expecting everything to be showing up in /sys/devices/
Entries in /sys/class/*/* now are symlinks into the /sys/devices tree,
showing the representation of everything in one tree, not lots of little
trees all over the place.
So I was curious, was this done on purpose? If so, why? If not, any
objection to me switching it over to be using struct device properly?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: question about drivers/infiniband/core/cm.c's kobject usage
2008-05-22 20:34 question about drivers/infiniband/core/cm.c's kobject usage Greg KH
@ 2008-05-22 21:47 ` Sean Hefty
2008-05-22 21:58 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Sean Hefty @ 2008-05-22 21:47 UTC (permalink / raw)
To: 'Greg KH'; +Cc: rolandd, hal.rosenstock, general, linux-kernel
>So I was curious, was this done on purpose? If so, why? If not, any
>objection to me switching it over to be using struct device properly?
It's entirely possible I have this wrong, but the intent is to export some
infiniband communication management message counters and relate them to the
corresponding ib_device/port. For example:
/sys/class/infiniband_cm/<device name>/<port number>/<counter group>/<counter>
(E.g. /sys/class/infiniband_cm/mthca0/1/cm_tx_msgs/req)
If there's a better way to handle this, I have no objection to changing it.
- Sean
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about drivers/infiniband/core/cm.c's kobject usage
2008-05-22 21:47 ` Sean Hefty
@ 2008-05-22 21:58 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2008-05-22 21:58 UTC (permalink / raw)
To: Sean Hefty; +Cc: rolandd, hal.rosenstock, general, linux-kernel
On Thu, May 22, 2008 at 02:47:51PM -0700, Sean Hefty wrote:
> >So I was curious, was this done on purpose? If so, why? If not, any
> >objection to me switching it over to be using struct device properly?
>
> It's entirely possible I have this wrong, but the intent is to export some
> infiniband communication management message counters and relate them to the
> corresponding ib_device/port. For example:
>
> /sys/class/infiniband_cm/<device name>/<port number>/<counter group>/<counter>
>
> (E.g. /sys/class/infiniband_cm/mthca0/1/cm_tx_msgs/req)
>
> If there's a better way to handle this, I have no objection to changing it.
Yes, just hang all of the <port number> stuff off of the original
<device name> struct device. That seems like it would be much simpler.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-22 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 20:34 question about drivers/infiniband/core/cm.c's kobject usage Greg KH
2008-05-22 21:47 ` Sean Hefty
2008-05-22 21:58 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox