[ofa-general] [PATCH 1/2] infiniband-diags/set_mthca_nodedesc.sh: change to work for all HCA's

Hal Rosenstock hal.rosenstock at gmail.com
Thu Aug 9 20:10:54 PDT 2007


On 8/9/07, Ira Weiny <weiny2 at llnl.gov> wrote:
> >From 3abf9ac10ee90f7272969486704c2989d254a2ac Mon Sep 17 00:00:00 2001
> From: Ira K. Weiny <weiny2 at llnl.gov>
> Date: Thu, 9 Aug 2007 16:07:38 -0700
> Subject: [PATCH] Modify set_mthca_nodedesc to set the node_desc for any hca type found in sysfs.
>
> This has been tested for the MLX4 and mthca cards but not others.

I think the iPath driver may need some change to make this work.

>
> Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
> ---
>  infiniband-diags/scripts/set_mthca_nodedesc.sh |   13 +++++++++++--
>  1 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/infiniband-diags/scripts/set_mthca_nodedesc.sh b/infiniband-diags/scripts/set_mthca_nodedesc.sh
> index 618373f..4613de6 100755
> --- a/infiniband-diags/scripts/set_mthca_nodedesc.sh
> +++ b/infiniband-diags/scripts/set_mthca_nodedesc.sh
> @@ -1,9 +1,18 @@
>  #!/bin/sh
>
> -# set the node_desc field in the mthca to the hostname
> +# set the node_desc field of any hca found to the defined hostname
>
>  . /etc/sysconfig/network
>
> -echo -n "$HOSTNAME" >> /sys/class/infiniband/mthca0/node_desc
> +ib_sysfs="/sys/class/infiniband"
> +
> +for hca in `ls $ib_sysfs`; do
> +   if [ -f $ib_sysfs/$hca/node_desc ]; then
> +      echo -n "$HOSTNAME" >> $ib_sysfs/$hca/node_desc
> +   else
> +      logger -s "Failed to set node_desc for : $hca"
> +   fi
> +done
>
>  exit 0
> +
> --
> 1.5.2
>
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
>



More information about the general mailing list