[openib-general] [PATCH] iser: leftovers of the mem registration for unsolicited data change

Or Gerlitz ogerlitz at voltaire.com
Wed Jan 4 23:34:25 PST 2006


some leftovers of the mem registration for unsolicited data change. 
post_lock field of struct iscsi_iser_conn removed as the xmitsema 
field serializes connection xmits, removed the unused conn_lock. 

Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>

Index: ulp/iser/iscsi_iser.h
===================================================================
--- ulp/iser/iscsi_iser.h	(revision 4759)
+++ ulp/iser/iscsi_iser.h	(working copy)
@@ -113,7 +113,7 @@ struct rdma_cm_id;
 struct ib_qp;
 struct iscsi_iser_cmd_task;
 
-#define MAX_REGD_BUF_VECTOR_LEN	28
+#define MAX_REGD_BUF_VECTOR_LEN	2
 
 enum iser_dto_type {
 	ISER_DTO_RCV = 0,	/* Receive buffer */
@@ -170,9 +170,6 @@ struct iscsi_iser_conn
 	atomic_t state;		/* iSCSI connection state */
 	int      ff_mode_enabled; /* To be removed ??? */
 
-	spinlock_t conn_lock;   /* guards the conn and related structures */
-	spinlock_t post_lock;   /* serializes posting WR to the QP */
-
 	struct list_head adaptor_list;	/* entry in the adaptor's conn list */
 
 	kmem_cache_t *postrecv_cache;
Index: ulp/iser/iser_verbs.c
===================================================================
--- ulp/iser/iser_verbs.c	(revision 4759)
+++ ulp/iser/iser_verbs.c	(working copy)
@@ -596,9 +596,6 @@ int iser_post_recv(struct iser_dto *p_re
 	if (p_iser_conn == NULL)
 		iser_bug("NULL p_conn in dto: 0x%p\n", p_recv_dto);
 
-	if (p_recv_dto->regd_vector_len > MAX_REGD_BUF_VECTOR_LEN)
-		iser_bug("DTO regd_vector_len exceeds maximal IOV len\n");
-
 	iser_dto_to_iov(p_recv_dto, iov, 2);
 
 	recv_wr.next	= NULL;
@@ -606,9 +603,7 @@ int iser_post_recv(struct iser_dto *p_re
 	recv_wr.num_sge = p_recv_dto->regd_vector_len;
 	recv_wr.wr_id	= (unsigned long)p_recv_dto;
 
-	spin_lock(&p_iser_conn->post_lock);
 	ib_ret	= ib_post_recv (p_iser_conn->ib_conn->qp, &recv_wr, &recv_wr_failed);
-	spin_unlock(&p_iser_conn->post_lock);
 
 	if (ib_ret) {
 		iser_err("ib_post_recv failed ret=%d\n", ib_ret);
@@ -625,8 +620,6 @@ int iser_post_recv(struct iser_dto *p_re
  */
 int iser_start_send(struct iser_dto *p_dto)
 {
-	/* #warning we consume way too much stack here, *
-	 * sizeof ib_send_wr=72 + sizeof ib_sge=16 * 28 */
 	int		  ib_ret, ret_val = 0;
 	struct ib_send_wr send_wr, *send_wr_failed;
 	struct ib_sge	  iov[MAX_REGD_BUF_VECTOR_LEN];
@@ -639,10 +632,6 @@ int iser_start_send(struct iser_dto *p_d
 	if (p_iser_conn == NULL)
 		iser_bug("NULL p_conn in dto: 0x%p\n", p_dto);
 
-	if (p_dto->regd_vector_len > MAX_REGD_BUF_VECTOR_LEN)
-		iser_bug("DTO regd_vector_len %d exceeds maximal IOV len\n",
-			 p_dto->regd_vector_len);
-
 	iser_dto_to_iov(p_dto, iov, MAX_REGD_BUF_VECTOR_LEN);
 
 	send_wr.next	   = NULL;
@@ -652,14 +641,9 @@ int iser_start_send(struct iser_dto *p_d
 	send_wr.opcode	   = IB_WR_SEND;
 	send_wr.send_flags = p_dto->notify_enable ? IB_SEND_SIGNALED : 0;
 
-	if(p_dto->type != ISER_DTO_SEND)
-		iser_bug("Illegal DTO type for iser_start_dto\n");
-
 	atomic_inc(&p_iser_conn->post_send_buf_count);
 
-	spin_lock(&p_iser_conn->post_lock);
 	ib_ret = ib_post_send(p_iser_conn->ib_conn->qp, &send_wr, &send_wr_failed);
-	spin_unlock(&p_iser_conn->post_lock);
 
 	if (ib_ret) {
 		iser_err("Failed to start SEND DTO, p_dto: 0x%p, IOV len: %d\n",
Index: ulp/iser/iser_conn.c
===================================================================
--- ulp/iser/iser_conn.c	(revision 4759)
+++ ulp/iser/iser_conn.c	(working copy)
@@ -88,9 +88,6 @@ void iser_conn_init(struct iser_conn *p_
 void iser_conn_init_lowpart(struct iscsi_iser_conn *p_iser_conn)
 {
 	/* moved from iser_conn_init */
-	spin_lock_init(&p_iser_conn->conn_lock);
-	spin_lock_init(&p_iser_conn->post_lock);
-
 	atomic_set(&p_iser_conn->post_recv_buf_count, 0);
 	atomic_set(&p_iser_conn->post_send_buf_count, 0);
 





More information about the general mailing list