From patchwork Thu Feb 4 11:21:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 76963 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o14BLl1T018405 for ; Thu, 4 Feb 2010 11:21:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756285Ab0BDLVr (ORCPT ); Thu, 4 Feb 2010 06:21:47 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:30529 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756279Ab0BDLVq (ORCPT ); Thu, 4 Feb 2010 06:21:46 -0500 Received: from zuben.voltaire.com ([172.25.5.15]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 4 Feb 2010 13:21:42 +0200 Message-ID: <4B6AADD4.2050607@Voltaire.com> Date: Thu, 04 Feb 2010 13:21:56 +0200 From: Or Gerlitz User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: Mike Christie CC: Roland Dreier , linux-rdma Subject: Re: [PATCH 08/9] ib/iser: move to use libiscsi passthrough mode References: <4B69EB5A.4050301@cs.wisc.edu> In-Reply-To: <4B69EB5A.4050301@cs.wisc.edu> X-OriginalArrivalTime: 04 Feb 2010 11:21:42.0574 (UTC) FILETIME=[3A4EFCE0:01CAA58C] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 04 Feb 2010 11:21:48 +0000 (UTC) Index: linux-2.6.33-rc4/drivers/infiniband/ulp/iser/iscsi_iser.c =================================================================== --- linux-2.6.33-rc4.orig/drivers/infiniband/ulp/iser/iscsi_iser.c +++ linux-2.6.33-rc4/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -190,7 +190,7 @@ iscsi_iser_mtask_xmit(struct iscsi_conn { int error = 0; - iser_dbg("task deq [cid %d itt 0x%x]\n", conn->id, task->itt); + iser_dbg("mtask xmit [cid %d itt 0x%x]\n", conn->id, task->itt); error = iser_send_control(conn, task); @@ -200,9 +200,6 @@ iscsi_iser_mtask_xmit(struct iscsi_conn * - if yes, the task is recycled at iscsi_complete_pdu * - if no, the task is recycled at iser_snd_completion */ - if (error && error != -ENOBUFS) - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); - return error; } @@ -254,7 +251,7 @@ iscsi_iser_task_xmit(struct iscsi_task * task->imm_count, task->unsol_r2t.data_length); } - iser_dbg("task deq [cid %d itt 0x%x]\n", + iser_dbg("ctask xmit [cid %d itt 0x%x]\n", conn->id, task->itt); /* Send the cmd PDU */ @@ -270,8 +267,6 @@ iscsi_iser_task_xmit(struct iscsi_task * error = iscsi_iser_task_xmit_unsol_data(conn, task); iscsi_iser_task_xmit_exit: - if (error && error != -ENOBUFS) - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); return error; } @@ -423,7 +418,7 @@ iscsi_iser_session_create(struct iscsi_e struct Scsi_Host *shost; struct iser_conn *ib_conn; - shost = iscsi_host_alloc(&iscsi_iser_sht, 0, 1); + shost = iscsi_host_alloc(&iscsi_iser_sht, 0, 0); if (!shost) return NULL; shost->transportt = iscsi_iser_scsi_transport; Index: linux-2.6.33-rc4/drivers/infiniband/ulp/iser/iser_initiator.c =================================================================== --- linux-2.6.33-rc4.orig/drivers/infiniband/ulp/iser/iser_initiator.c +++ linux-2.6.33-rc4/drivers/infiniband/ulp/iser/iser_initiator.c @@ -514,10 +514,7 @@ void iser_rcv_completion(struct iser_rx_ void iser_snd_completion(struct iser_tx_desc *tx_desc, struct iser_conn *ib_conn) { - struct iscsi_iser_conn *iser_conn = ib_conn->iser_conn; - struct iscsi_conn *conn = iser_conn->iscsi_conn; struct iscsi_task *task; - int resume_tx = 0; struct iser_device *device = ib_conn->device; if (tx_desc->type == ISCSI_TX_DATAOUT) { @@ -526,17 +523,8 @@ void iser_snd_completion(struct iser_tx_ kmem_cache_free(ig.desc_cache, tx_desc); } - if (atomic_read(&iser_conn->ib_conn->post_send_buf_count) == - ISER_QP_MAX_REQ_DTOS) - resume_tx = 1; - atomic_dec(&ib_conn->post_send_buf_count); - if (resume_tx) { - iser_dbg("%ld resuming tx\n",jiffies); - iscsi_conn_queue_work(conn); - } - if (tx_desc->type == ISCSI_TX_CONTROL) { /* this arithmetic is legal by libiscsi dd_data allocation */ task = (void *) ((long)(void *)tx_desc -