diff mbox

[1/1] opensm/osm_node_info_rcv.c: Fix multiple switch discovery during a sweep

Message ID 1391594898-18129-1-git-send-email-alexne@mellanox.com (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Alex Netes Feb. 5, 2014, 10:08 a.m. UTC
Because of the race between Get(SwitchInfo) and Get(NodeInfo) to the
same switch, SM will send additional Get(SwitchInfo) before it get a
first reply. In a sequence SM will send many redundant MADs and slow
down the discovery process significantly.
With this fix, when a switch doesn't respond to Get(SwitchInfo) once
during the sweep it will be dropped.

Signed-off-by: Alex Netes <alexne@mellanox.com>
---
 opensm/osm_node_info_rcv.c |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

Comments

Hal Rosenstock Feb. 5, 2014, 2:43 p.m. UTC | #1
On 2/5/2014 5:08 AM, Alex Netes wrote:
> Because of the race between Get(SwitchInfo) and Get(NodeInfo) to the
> same switch, SM will send additional Get(SwitchInfo) before it get a
> first reply. In a sequence SM will send many redundant MADs and slow
> down the discovery process significantly.
> With this fix, when a switch doesn't respond to Get(SwitchInfo) once
> during the sweep it will be dropped.
> 
> Signed-off-by: Alex Netes <alexne@mellanox.com>

Thanks. Applied.

-- Hal
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/opensm/osm_node_info_rcv.c b/opensm/osm_node_info_rcv.c
index c0233f7..b7c20e8 100644
--- a/opensm/osm_node_info_rcv.c
+++ b/opensm/osm_node_info_rcv.c
@@ -573,20 +573,9 @@  static void ni_rcv_process_existing_switch(IN osm_sm_t * sm,
 	/*
 	   If this switch has already been probed during this sweep,
 	   then don't bother reprobing it.
-	   There is one exception - if the node has been visited, but
-	   for some reason we don't have the switch object (this can happen
-	   if the SwitchInfo mad didn't reach the SM) then we want
-	   to retry to probe the switch.
 	 */
 	if (p_node->discovery_count == 1)
 		ni_rcv_process_switch(sm, p_node, p_madw);
-	else if (!p_node->sw) {
-		/* we don't have the SwitchInfo - retry to get it */
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Retry to get SwitchInfo on node GUID:0x%" PRIx64 "\n",
-			cl_ntoh64(osm_node_get_node_guid(p_node)));
-		ni_rcv_process_switch(sm, p_node, p_madw);
-	}
 
 	OSM_LOG_EXIT(sm->p_log);
 }