infiniband-diags/scripts/ibcheckport.in: ignore lid/sm lid checks on non zero port switches
PATCH 1/1 infiniband-diags/scripts/ibcheckport.in: ignore lid/sm lid checks on non zero port switches
--- scripts/ibcheckport.in | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
scripts/ibcheckport.in +8 -3
@@ -88,10 +88,15 @@ else fi fi +is_switch=`$IBPATH/smpquery $ca_info nodeinfo $lid $portnum | awk -F '[.:]*' '/^NodeType/{ if ($2 == "Switch") {print 1}}'` + +if [ "$is_switch" -a "$portnum" == "0" ]; then + ignore_check=true +fi text="`eval $IBPATH/smpquery $ca_info portinfo $lid $portnum`" rv=$? -if echo "$text" | awk -v mono=$bw -F '[.:]*' ' +if echo "$text" | awk -v ignore_check=$ignore_check -v mono=$bw -F '[.:]*' ' function blue(s) { if (mono)
@@ -110,9 +115,9 @@ function blue(s) /^LinkWidthActive/{ if ($2 == "1X") warn = warn "#warn: Link configured as 1X lid '$lid' port '$portnum'\n"} -/^Lid/{ if ($2 == "0") warn = warn "#warn: Lid is not configured lid '$lid' port '$portnum'\n"} +/^Lid/{ if (ignore_check == "0" && $2 == "0") warn = warn "#warn: Lid is not configured lid '$lid' port '$portnum'\n"} -/^SMLid/{ if ($2 == "0") warn = warn "#warn: SM Lid is not configured\n"} +/^SMLid/{ if (ignore_check == "0" && $2 == "0") warn = warn "#warn: SM Lid is not configured\n"} #/^LocalPort/ { if ($2 != '$portnum') {err = err "#error: port " $2 " does not match query ('$portnum')\n"; exit -1}}
Signature · 8 lines
1.7.6 -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20110911081032.GB2256-iQai9MGU/dze+A/[email protected]
Ira Weiny
AppliedQuoted 1 line · On Sun, 11 Sep 2011 01:10:32 -0700 Alex Netes…
Thanks applied,
Ira
Quoted 42 lines
--- scripts/ibcheckport.in | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)scripts/ibcheckport.in +8
-3@@ -88,10 +88,15 @@ else fi fi +is_switch=`$IBPATH/smpquery $ca_info nodeinfo $lid $portnum | awk -F '[.:]*' '/^NodeType/{ if ($2 == "Switch") {print 1}}'` + +if [ "$is_switch" -a "$portnum" == "0" ]; then + ignore_check=true +fi text="`eval $IBPATH/smpquery $ca_info portinfo $lid $portnum`" rv=$? -if echo "$text" | awk -v mono=$bw -F '[.:]*' ' +if echo "$text" | awk -v ignore_check=$ignore_check -v mono=$bw -F '[.:]*' ' function blue(s) { if (mono)@@ -110,9 +115,9 @@ function blue(s) /^LinkWidthActive/{ if ($2 == "1X") warn = warn "#warn: Link configured as 1X lid '$lid' port '$portnum'\n"} -/^Lid/{ if ($2 == "0") warn = warn "#warn: Lid is not configured lid '$lid' port '$portnum'\n"} +/^Lid/{ if (ignore_check == "0" && $2 == "0") warn = warn "#warn: Lid is not configured lid '$lid' port '$portnum'\n"} -/^SMLid/{ if ($2 == "0") warn = warn "#warn: SM Lid is not configured\n"} +/^SMLid/{ if (ignore_check == "0" && $2 == "0") warn = warn "#warn: SM Lid is not configured\n"} #/^LocalPort/ { if ($2 != '$portnum') {err = err "#error: port " $2 " does not match query ('$portnum')\n"; exit -1}}Signature · 4 lines
1.7.6 -- Alex
Signature · 9 lines
Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html