[ewg] [PATCH] ofa_kernel openibd script
Mike Heinz
michael.heinz at qlogic.com
Wed Jun 16 10:15:11 PDT 2010
This patch builds upon my previously submitted patch for improving the default handling of the node_desc.
With this patch, the openibd script will set the description of each HCA in the system to the value "@: HCA-##" where "##" is replaced with a unique id number for that HCA and the "@" symbol is automatically replaced by the HCA whenever the HCA's node description is queried. For example:
root at bart:~# cat /sys/class/infiniband/mthca0/node_desc
@: HCA-1
[root at panic ~]# smpquery ND 6
Node Description: bart: HCA-1
Again, this patch is only effective when combined with my previously submitted node_desc patch.
Signed-Off-By: Michael Heinz <michael.heinz at qlogic.com>
-----
diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
index fa65611..447e1a8 100755
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -898,8 +898,8 @@ if [ -d \${IBSYSDIR} ]; then
for hca in \${IBSYSDIR}/*
do
if [ -e \${hca}/node_desc ]; then
- logger -i "Set node_desc for \$(basename \$hca): \$(hostname -s) HCA-\${hca_id}"
- echo -n "\$(hostname -s) HCA-\${hca_id}" >> \${hca}/node_desc
+ logger -i "Set node_desc for HCA-\${hca_id}"
+ echo -n "@: HCA-\${hca_id}" >> \${hca}/node_desc
fi
let hca_id++
done
More information about the ewg
mailing list