[patch] Re: [ofw] confused about win srp driver's send_msg_depth

Chas Williams (CONTRACTOR) chas at cmf.nrl.navy.mil
Mon Jul 14 08:46:49 PDT 2008


In message <200807111711.m6BHBrTS017172 at cmf.nrl.navy.mil>,chas williams - CONTR
ACTOR writes:
>targets.  it appears this value is being stuck in cm_req.init_depth

send message depth is a reserved field and does not correpond to the
initiator's rdma depth.  since the srp initiator does not issue rdma
operations, it is safe to leave init_depth = 0 (the truncation of the
send message depth due to casting of the network endian 16 bit word to
8 bits is always 0 anyway).  this patch removes this bogus code.

Index: srp_session.c
===================================================================
--- srp_session.c	(revision 1371)
+++ srp_session.c	(working copy)
@@ -352,7 +352,6 @@
 
 	status = srp_connect( &p_srp_session->connection,
 						  &p_srp_session->hca,
-						  (uint8_t)p_srp_session->p_hba->ioc_info.profile.send_msg_depth,
 						  p_srp_session );
 
 exit:
Index: srp_connection.c
===================================================================
--- srp_connection.c	(revision 1371)
+++ srp_connection.c	(working copy)
@@ -561,7 +561,7 @@
 					("REQUESTED DESC FORMAT: %#x, SUPPORTED FORMAT %#x\n",
 					p_connection->descriptor_format, 
 					get_srp_login_reject_supported_data_buffer_formats(p_srp_login_rej) ));
-					__srp_issue_session_login( p_connection, (srp_hca_t *)&p_srp_session->hca, p_connection->ioc_max_send_msg_depth );
+					__srp_issue_session_login( p_connection, (srp_hca_t *)&p_srp_session->hca );
 					return;
 			default:
 				break;
@@ -586,7 +586,6 @@
 
 @param p_connection   - pointer to the connection structure
 @param p_hca          - pointer to the hca structure used by this connection
- at param send_msg_depth - initial request limit delta value
 
 @return - result of login/cm connect request operations
 */
@@ -596,8 +595,7 @@
 ib_api_status_t
 __srp_issue_session_login(
 	IN OUT  srp_connection_t    *p_connection,
-	IN      srp_hca_t           *p_hca,
-	IN      uint8_t             send_msg_depth )
+	IN      srp_hca_t           *p_hca )
 {
 	ib_api_status_t status;
 	ib_cm_req_t     cm_req;
@@ -657,8 +655,6 @@
 		goto exit;
 	}
 
-	cm_req.init_depth = send_msg_depth;
-
 	cm_req.remote_resp_timeout = ib_path_rec_pkt_life( p_connection->p_path_rec ) + 1;
 	cm_req.flow_ctrl = FALSE;
 	cm_req.local_resp_timeout = ib_path_rec_pkt_life( p_connection->p_path_rec ) + 1;
@@ -758,7 +754,6 @@
 
 @param p_connection        - pointer to the connection structure
 @param p_hca               - pointer to the hca structure used by this connection
- at param send_msg_depth      - initial request limit delta value
 @param p_session           - context passed to callback functions
 
 @return -  result of connect operations
@@ -767,7 +762,6 @@
 srp_connect(
 	IN OUT  srp_connection_t    *p_connection,
 	IN      srp_hca_t           *p_hca,
-	IN      uint8_t             send_msg_depth,
 	IN      p_srp_session_t     p_session )
 {
 	ib_api_status_t status;
@@ -777,7 +771,6 @@
 
 	p_connection->ioc_max_send_msg_size =
 		cl_ntoh32 (p_session->p_hba->ioc_info.profile.send_msg_size);
-	p_connection->ioc_max_send_msg_depth = send_msg_depth;
 	p_connection->reject_reason = 0;
 
 	status = __srp_create_cqs( p_connection, p_hca, p_session );
@@ -801,7 +794,7 @@
 		goto exit;
 	}
 
-	status = __srp_issue_session_login( p_connection, p_hca, send_msg_depth );
+	status = __srp_issue_session_login( p_connection, p_hca );
 	if ( status != IB_SUCCESS )
 	{
 		cl_event_destroy( &p_connection->conn_req_event );
Index: srp_connection.h
===================================================================
--- srp_connection.h	(revision 1371)
+++ srp_connection.h	(working copy)
@@ -95,7 +95,6 @@
 	cl_event_t              conn_req_event;
 	DATA_BUFFER_DESCRIPTOR_FORMAT  descriptor_format;
 	LOGIN_REJECT_CODE		reject_reason;
-	uint8_t					ioc_max_send_msg_depth;
 }   srp_connection_t;
 
 ib_api_status_t
@@ -111,7 +110,6 @@
 srp_connect(
 	IN OUT  srp_connection_t    *p_connection,
 	IN      srp_hca_t           *p_hca,
-	IN      uint8_t             send_msg_depth,
 	IN      p_srp_session_t     p_session );
 
 void
@@ -121,7 +119,6 @@
 ib_api_status_t
 __srp_issue_session_login(
 	IN OUT  srp_connection_t    *p_connection,
-	IN      srp_hca_t           *p_hca,
-	IN      uint8_t             send_msg_depth );
+	IN      srp_hca_t           *p_hca );
 
 #endif  /* _SRP_CONNECTION_H_ */



More information about the ofw mailing list