linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: InfiniBand hotplug agent
@ 2006-03-22 19:05 Roland Dreier
  2006-03-22 19:47 ` Marco d'Itri
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Roland Dreier @ 2006-03-22 19:05 UTC (permalink / raw)
  To: linux-hotplug

I merged new feature for the InfiniBand stack in kernel 2.6.17.  There
will be /sys/class/infiniband/<dev>/node_desc files.  This can be used
by userspace to change the IB node description, which is retrieved by
various network management stuff.  Putting the hostname in the node
description makes things a lot nicer, since it provides a link from
the IB network view back to the real world.

Right now on my systems, I'm using the script below, which takes the
output of hostname and adds it to the node description.  I put this in
/lib/udev/infiniband.agent along with a udev rule like

    SUBSYSTEM="infiniband", RUN+="infiniband.agent"

to run it.

So I have two questions:

 - Is this script reasonable?  I'm by no means a hotplug expert, and
   I'd like to get critiques and suggestions for how to write a proper
   agent.

 - What's the right way to get this into distributions?  File wishlist
   bugs against udev with the rule and the script included?

Thanks,
  Roland

Here's the script:

#!/bin/sh -e
#
# infiniband agent
#

cd /lib/udev/
. ./hotplug.functions

if [ "$ACTION" = "add" ]; then
    DESC_PATH="/sys/$DEVPATH/node_desc"
    if [ -e "$DESC_PATH" ]; then
        DESC="`hostname` (`cat $DESC_PATH`)"
        echo -n $DESC > $DESC_PATH
    fi
fi

exit 0


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-03-23 23:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-22 19:05 RFC: InfiniBand hotplug agent Roland Dreier
2006-03-22 19:47 ` Marco d'Itri
2006-03-22 20:36 ` Roland Dreier
2006-03-23  5:13 ` Greg KH
2006-03-23 15:19 ` Scott James Remnant
2006-03-23 17:11 ` Roland Dreier
2006-03-23 23:31 ` Greg KH

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).