infiniband-diags/scripts/ibcheckerrs.in: emulate all ports if necessary.
PATCH 1/1 infiniband-diags/scripts/ibcheckerrs.in: emulate all ports if necessary.
From: Ira Weiny <[email protected]>
Date: Wed, 5 May 2010 19:49:37 -0700
Subject: [PATCH] infiniband-diags/scripts/ibcheckerrs.in: emulate all ports if necessary.
--- infiniband-diags/scripts/ibcheckerrs.in | 2 +- infiniband-diags/src/perfquery.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
infiniband-diags/scripts/ibcheckerrs.in +1 -1
@@ -153,7 +153,7 @@ fi nodename=`$IBPATH/smpquery $ca_info nodedesc $lid | sed -e "s/^Node Description:\.*\(.*\)/\1/"` -text="`eval $IBPATH/perfquery $ca_info $lid $portnum`" +text="`eval $IBPATH/perfquery -a $ca_info $lid $portnum`" rv=$? if echo "$text" | awk -v mono=$bw -v brief=$brief -F '[.:]*' ' function blue(s)
infiniband-diags/src/perfquery.c +3 -3
@@ -525,11 +525,11 @@ int main(int argc, char **argv)/* ClassPortInfo should be supported as part of libibmad */ memcpy (&cap_mask, pc +2 ,sizeof (cap_mask));/* CapabilityMask */ cap_mask =ntohs (cap_mask); -if (!(cap_mask &0x100 )) {/* bit 8 is AllPortSelect */ -if (!all_ports && port ==ALL_PORTS ) -IBERROR ("AllPortSelect not supported" ); +if (port ==ALL_PORTS && !(cap_mask &0x100 )) {/* bit 8 is AllPortSelect */ if (all_ports) all_ports_loop =1 ; +else +IBERROR ("AllPortSelect not supported" ); }if (xmt_sl) {
Signature · 6 lines
1.5.4.5 -- 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
Upon thinking about this a bit more, and seeing Mikes patch. I think that the patch which Mike sent some time ago is a better fix. This will work fine for ibcheckerrs. However ibcheckerrors will run AllPortSelect and then go on to query all the ports individually. The patch below will cause a double read for each port which will kill ibcheckerrors performance on a large cluster.
Sasha, what is the status of Mikes patch?
Ira
Quoted 52 lines · On Wed, 5 May 2010 19:47:20 -0700 Ira Weiny…
From: Ira Weiny <[email protected]>
Date: Wed, 5 May 2010 19:49:37 -0700
Subject: [PATCH] infiniband-diags/scripts/ibcheckerrs.in: emulate all ports if necessary.Signed-off-by Ira Weiny <[email protected]>--- infiniband-diags/scripts/ibcheckerrs.in | 2 +- infiniband-diags/src/perfquery.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)infiniband-diags/scripts/ibcheckerrs.in +1
-1@@ -153,7 +153,7 @@ fi nodename=`$IBPATH/smpquery $ca_info nodedesc $lid | sed -e "s/^Node Description:\.*\(.*\)/\1/"` -text="`eval $IBPATH/perfquery $ca_info $lid $portnum`" +text="`eval $IBPATH/perfquery -a $ca_info $lid $portnum`" rv=$? if echo "$text" | awk -v mono=$bw -v brief=$brief -F '[.:]*' ' function blue(s)infiniband-diags/src/perfquery.c +3
-3@@ -525,11 +525,11 @@ int main(int argc, char **argv)/* ClassPortInfo should be supported as part of libibmad */ memcpy (&cap_mask, pc +2 ,sizeof (cap_mask));/* CapabilityMask */ cap_mask =ntohs (cap_mask); -if (!(cap_mask &0x100 )) {/* bit 8 is AllPortSelect */ -if (!all_ports && port ==ALL_PORTS ) -IBERROR ("AllPortSelect not supported" ); +if (port ==ALL_PORTS && !(cap_mask &0x100 )) {/* bit 8 is AllPortSelect */ if (all_ports) all_ports_loop =1 ; +else +IBERROR ("AllPortSelect not supported" ); }if (xmt_sl) {Signature · 6 lines
1.5.4.5 -- 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
Signature · 5 lines
Ira Weiny <[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
Quoted 7 lines · Ira Weiny
Upon thinking about this a bit more, and seeing Mikes patch. I think that the patch which Mike sent some time ago is a better fix. This will work fine for ibcheckerrs. However ibcheckerrors will run AllPortSelect and then go on to query all the ports individually. The patch below will cause a double read for each port which will kill ibcheckerrors performance on a large cluster.
Sasha, what is the status of Mikes patch?
Applied now.
Sasha
--
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