[ofw] patch: Support APM on IBAL code
Tzachi Dar
tzachid at mellanox.co.il
Wed Sep 23 09:48:06 PDT 2009
The bellow patch is needed in order to allow WSD to load alternate paths
using the cm.
It has a few trivial parts but two changes that I believe that need some
attention from the community:
1) It seems that on the QP the cid (that belongs to the cm) was never
set. I now set it on the function al_cep_pre_req(). I'm not sure that
this is the right place. Please note that if this value is not being set
than on the function al_cep_migrate a cid of -1 is used (which actually
means that the migration notification is lost).
Please also note that for the passive side this value is not currently
set (yet things still seem to work ).
2) when sending LAP, there are two parameters for the path record: one
is the src port that is based on the av that I'm now loading. The second
is the dest_lid which is based on the value that we have on our
p_cep->av[p_cep->idx_primary]. I'm not sure if this is the design, or is
this just a bug and the dest_lid should also be taken from the av that
is currently being supplied.
Thanks
Tzachi
Index: al_cm_qp.c
===================================================================
--- al_cm_qp.c (revision 4841)
+++ al_cm_qp.c (working copy)
@@ -1034,6 +1034,8 @@
//p_conn->p_sync_event = p_sync_event = &sync_event;
}
+
+//????????????
p_qp = (al_conn_qp_t*)p_cm_req->h_qp;
/* Get a CEP and bind it to the QP. */
@@ -1309,7 +1311,7 @@
if( status != IB_SUCCESS )
{
AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
- ("__cep_pre_req returned %s\n", ib_get_err_str(status)) );
+ ("__cep_pre_rep returned %s\n", ib_get_err_str(status)) );
goto err;
}
@@ -1749,6 +1751,12 @@
}
status = al_cep_send_apr( h_cm_lap.h_al, h_cm_lap.cid );
+ if( status != IB_SUCCESS )
+ {
+ AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
+ ("al_cep_send_apr returned %s.\n",
+ ib_get_err_str( status )) );
+ }
AL_EXIT( AL_DBG_CM );
return status;
Index: kernel/al_cm_cep.c
===================================================================
--- kernel/al_cm_cep.c (revision 4841)
+++ kernel/al_cm_cep.c (working copy)
@@ -1116,7 +1116,7 @@
/* Reject the request for insufficient resources. */
reason = IB_REJ_INSUF_RESOURCES;
AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,
- ("al_create_cep failed\nREJ sent for insufficient resources.\n") );
+ ("__create_cep failed\nREJ sent for insufficient resources.\n") );
goto reject;
}
@@ -4731,6 +4731,12 @@
break;
}
+ if(p_cm_req->h_qp->type == IB_QPT_RELIABLE_CONN)
+ {
+ ((al_conn_qp_t *)(p_cm_req->h_qp))->cid = cid;
+ }
+
+
/* Format the INIT qp modify attributes. */
p_init->req_state = IB_QPS_INIT;
p_init->state.init.primary_port =
@@ -5424,7 +5430,7 @@
__format_mad_hdr( p_mad->p_mad_buf, p_cep, CM_LAP_ATTR_ID );
- __format_mad_av( p_mad, &p_cep->av[p_cep->idx_primary] );
+ __format_mad_av( p_mad, &p_cep->av[((p_cep->idx_primary + 1) & 0x1)]
);
p_lap = (mad_cm_lap_t*)p_mad->p_mad_buf;
Index: kernel/al_proxy_cep.c
===================================================================
--- kernel/al_proxy_cep.c (revision 4841)
+++ kernel/al_proxy_cep.c (working copy)
@@ -641,8 +641,6 @@
AL_ENTER( AL_DBG_CM );
- UNUSED_PARAM( p_ret_bytes );
-
p_context = (al_dev_open_context_t*)p_open_context;
/* Validate user parameters. */
@@ -656,6 +654,8 @@
(*(ib_api_status_t*)cl_ioctl_out_buf( h_ioctl )) = al_cep_send_apr(
p_context->h_al, *(net32_t*)cl_ioctl_in_buf( h_ioctl ) );
+ *p_ret_bytes = sizeof(ib_api_status_t);
+
AL_EXIT( AL_DBG_CM );
return CL_SUCCESS;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090923/8027476e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: al_apm.patch
Type: application/octet-stream
Size: 2623 bytes
Desc: al_apm.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090923/8027476e/attachment.obj>
More information about the ofw
mailing list