infiniband-diags/ibqueryerrors: Fix remote node name printing
PATCH 1/1 infiniband-diags/ibqueryerrors: Fix remote node name printing
From: Ira Weiny <[email protected]>
Date: Tue, 3 Nov 2009 19:51:32 -0800
Subject: [PATCH] infiniband-diags/ibqueryerrors: Fix remote node name printing
"-r" option was reporting the current node name, not the remote node name of the port as it should have been.
--- infiniband-diags/src/ibqueryerrors.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
infiniband-diags/src/ibqueryerrors.c +9 -1
@@ -145,6 +145,8 @@ static void print_port_config(char *node_name, ibnd_node_t * node, int portnum) mad_dump_val(IB_PORT_PHYS_STATE_F, physstate, 64, &iphystate));if (port->remoteport) { +char *rem_node_name =NULL ; +if (port->remoteport->ext_portnum)snprintf (ext_port_str,256 ,"%d" , port->remoteport->ext_portnum);
@@ -153,13 +155,19 @@ static void print_port_config(char *node_name, ibnd_node_t * node, int portnum)get_msg (width_msg, speed_msg,256 , port); + rem_node_name =remap_node_name (node_name_map, + port->remoteport->node->guid, + port->remoteport->node->nodedesc); +snprintf (remote_str,256 ,"0x%016" PRIx64" %6d %4d[%2s] \"%s\" (%s %s)\n" , port->remoteport->node->guid, port->remoteport->base_lid ? port->remoteport-> base_lid : port->remoteport->node->smalid, - port->remoteport->portnum, ext_port_str, node_name, + port->remoteport->portnum, ext_port_str, rem_node_name, width_msg, speed_msg); + +free (rem_node_name); }else snprintf (remote_str,256 ," [ ] \"\" ( )\n" );
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Sasha Khapyorsky
AppliedQuoted 9 lines · Ira Weiny
From: Ira Weiny <[email protected]>
Date: Tue, 3 Nov 2009 19:51:32 -0800
Subject: [PATCH] infiniband-diags/ibqueryerrors: Fix remote node name printing"-r" option was reporting the current node name, not the remote node name of the port as it should have been.
Signed-off-by Ira Weiny <[email protected]>
Applied. Thanks.
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