[openib-general] [PATCH] agent: Fix agent_mad_send PCI mapping	and gather address	and length
    Roland Dreier 
    roland at topspin.com
       
    Tue Nov  9 15:54:07 PST 2004
    
    
  
OK, I think I understand the problem, but I'm not sure what the
correct solution is.  When a DR SMP arrives at a CA from the SM,
hop_cnt == hop_ptr == number of hops in the directed route, and
somehow they are not updated correctly by the time the response
reaches handle_outgoing_smp().
I can't follow the code well enough to understand why all DR SMPs have
to go through both smi_handle_dr_smp_recv() and
smi_handle_dr_smp_send() but the patch below seems to correct things
for me (ports go to ACTIVE on all my systems).  (handle_outgoing_smp()
already calls smi_handle_dr_smp_recv() so it seems the response was
getting passed to smi_handle_dr_smp_recv() twice).
 - R.
Index: mad.c
===================================================================
--- mad.c	(revision 1186)
+++ mad.c	(working copy)
@@ -1144,16 +1144,6 @@
 						     &response->mad.mad);
 		if (ret & IB_MAD_RESULT_SUCCESS) {
 			if (ret & IB_MAD_RESULT_REPLY) {
-				if (response->mad.mad.mad_hdr.mgmt_class ==
-				    IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) {
-					if (!smi_handle_dr_smp_recv(
-					    (struct ib_smp *)&response->mad.mad,
-					    port_priv->device->node_type,
-					    port_priv->port_num,
-					    port_priv->device->phys_port_cnt)) {
-						goto out;
-					}
-				}
 				/* Send response */
 				grh = (void *)recv->header.recv_buf.mad -
 				      sizeof(struct ib_grh);
    
    
More information about the general
mailing list