\r
p_irp->Tail.Overlay.DriverContext[1] = NULL;\r
\r
- if( h_qp->p_irp_queue->state != NDI_CM_CONNECTING_QPR_SENT )\r
+ if( h_qp->p_irp_queue->state != NDI_CM_CONNECTING_QPR_SENT &&\r
+ h_qp->p_irp_queue->state != NDI_CM_IDLE )\r
{\r
AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
("Unexpected state: %d\n", h_qp->p_irp_queue->state) );\r
- return STATUS_CONNECTION_ABORTED;\r
+ return STATUS_CONNECTION_ACTIVE;\r
}\r
\r
/* Get a CEP and bind it to the QP. */\r
ual_ndi_req_cm_ioctl_in_t *p_req = \r
(ual_ndi_req_cm_ioctl_in_t*)cl_ioctl_in_buf( p_irp );\r
ib_qp_handle_t h_qp = (ib_qp_handle_t)p_irp->Tail.Overlay.DriverContext[0];\r
+ ib_gid_pair_t gids;\r
\r
AL_ENTER( AL_DBG_NDI );\r
\r
return STATUS_CONNECTION_ACTIVE;\r
}\r
\r
+ gids.src_gid = p_req->path.sgid;\r
+ gids.dest_gid = p_req->path.dgid;\r
+\r
query_req.query_type = IB_QUERY_PATH_REC_BY_GIDS;\r
- query_req.p_query_input = &p_req->gids;\r
+ query_req.p_query_input = &gids;\r
query_req.port_guid = p_req->guid;\r
query_req.timeout_ms = g_sa_timeout;\r
query_req.retry_cnt = g_sa_retries;\r
\r
AL_PRINT( TRACE_LEVEL_INFORMATION, AL_DBG_NDI,\r
("Query for path from %I64x to %I64x\n",\r
- p_req->guid, ib_gid_get_guid( &p_req->gids.dest_gid )) );\r
+ p_req->guid, ib_gid_get_guid( &p_req->path.dgid )) );\r
\r
ref_al_obj( &h_qp->obj ); /* take path query reference */\r
status = ib_query( qp_get_al( h_qp ), &query_req, &h_qp->p_irp_queue->h_query );\r
)\r
{\r
NTSTATUS status;\r
+ ual_ndi_req_cm_ioctl_in_t *p_req = \r
+ (ual_ndi_req_cm_ioctl_in_t*)cl_ioctl_in_buf( p_irp );\r
\r
AL_ENTER( AL_DBG_NDI );\r
\r
p_irp->Tail.Overlay.DriverContext[0] = (ib_qp_t*)h_qp;\r
\r
- status = IoCsqInsertIrpEx(\r
- &h_qp->p_irp_queue->csq,\r
- p_irp,\r
- NULL,\r
- (VOID*)(ULONG_PTR)NDI_CM_CONNECTING_QPR_SENT\r
- );\r
+ if( p_req->path.dlid != 0 )\r
+ {\r
+ /* fix packet life */\r
+ uint8_t pkt_life = ib_path_rec_pkt_life( &p_req->path ) + g_pkt_life_modifier;\r
+ if( pkt_life > 0x1F )\r
+ pkt_life = 0x1F;\r
+\r
+ p_req->path.pkt_life &= IB_PATH_REC_SELECTOR_MASK;\r
+ p_req->path.pkt_life |= pkt_life;\r
+\r
+ p_irp->Tail.Overlay.DriverContext[1] = &p_req->path;\r
+ status = IoCsqInsertIrpEx(\r
+ &h_qp->p_irp_queue->csq,\r
+ p_irp,\r
+ NULL,\r
+ (VOID*)(ULONG_PTR)NDI_CM_CONNECTING_REQ_SENT\r
+ );\r
+ }\r
+ else\r
+ {\r
+ status = IoCsqInsertIrpEx(\r
+ &h_qp->p_irp_queue->csq,\r
+ p_irp,\r
+ NULL,\r
+ (VOID*)(ULONG_PTR)NDI_CM_CONNECTING_QPR_SENT\r
+ );\r
+ }\r
if( status == STATUS_SUCCESS )\r
status = STATUS_PENDING;\r
\r