All of lore.kernel.org
 help / color / mirror / Atom feed
From: Varun Prakash <varun@chelsio.com>
To: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org
Cc: nab@linux-iscsi.org, roland@kernel.org,
	swise@opengridcomputing.com, indranil@chelsio.com,
	kxie@chelsio.com, hariprasad@chelsio.com, varun@chelsio.com
Subject: [RFC 22/34] iscsi-target: call Rx thread function
Date: Sun, 14 Feb 2016 23:15:29 +0530	[thread overview]
Message-ID: <19973d4150937cdaffec583caa35b5d8c9a64fbb.1455467089.git.varun@chelsio.com> (raw)
In-Reply-To: <cover.1455467089.git.varun@chelsio.com>

call Rx thread function if registered
by transport driver, so that transport
drivers can use iscsi-target Rx thread
for Rx processing.

update iSER target driver to use this
interface.

Signed-off-by: Varun Prakash <varun@chelsio.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 10 ++++++++++
 drivers/target/iscsi/iscsi_target.c     | 10 ++--------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index f121e61..365aa8c 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -3396,6 +3396,15 @@ static void isert_free_conn(struct iscsi_conn *conn)
 	isert_put_conn(isert_conn);
 }
 
+static void isert_rx_pdu(struct iscsi_conn *conn)
+{
+	struct completion comp;
+
+	init_completion(&comp);
+
+	wait_for_completion_interruptible(&comp);
+}
+
 static struct iscsit_transport iser_target_transport = {
 	.name			= "IB/iSER",
 	.transport_type		= ISCSI_INFINIBAND,
@@ -3414,6 +3423,7 @@ static struct iscsit_transport iser_target_transport = {
 	.iscsit_queue_data_in	= isert_put_datain,
 	.iscsit_queue_status	= isert_put_response,
 	.iscsit_aborted_task	= isert_aborted_task,
+	.iscsit_rx_pdu		= isert_rx_pdu,
 	.iscsit_get_sup_prot_ops = isert_get_sup_prot_ops,
 };
 
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 3dd7ba2..e2ec56f 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4132,14 +4132,8 @@ int iscsi_target_rx_thread(void *arg)
 	if (rc < 0 || iscsi_target_check_conn_state(conn))
 		return 0;
 
-	if (conn->conn_transport->transport_type == ISCSI_INFINIBAND) {
-		struct completion comp;
-
-		init_completion(&comp);
-		rc = wait_for_completion_interruptible(&comp);
-		if (rc < 0)
-			goto transport_err;
-
+	if (conn->conn_transport->iscsit_rx_pdu) {
+		conn->conn_transport->iscsit_rx_pdu(conn);
 		goto transport_err;
 	}
 
-- 
2.0.2


  parent reply	other threads:[~2016-02-14 17:46 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-14 17:30 [RFC 00/34] Chelsio iSCSI target offload driver Varun Prakash
2016-02-14 17:32 ` [RFC 01/34] cxgb4: add new ULD type CXGB4_ULD_ISCSIT Varun Prakash
2016-02-14 17:32 ` [RFC 02/34] cxgb4: allocate resources for CXGB4_ULD_ISCSIT Varun Prakash
2016-02-14 17:32 ` [RFC 03/34] cxgb4: large receive offload support Varun Prakash
2016-02-14 17:34 ` [RFC 04/34] cxgb4, iw_cxgb4: move definitions to common header file Varun Prakash
2016-02-14 17:34 ` [RFC 05/34] cxgb4, iw_cxgb4, cxgb4i: remove duplicate definitions Varun Prakash
2016-02-14 17:37 ` [RFC 06/34] cxgb4, cxgb4i: move struct cpl_rx_data_ddp definition Varun Prakash
2016-02-14 17:37 ` [RFC 07/34] cxgb4: add definitions for iSCSI target ULD Varun Prakash
2016-02-14 17:37 ` [RFC 08/34] cxgb4: update struct cxgb4_lld_info definition Varun Prakash
2016-02-14 17:37 ` [RFC 09/34] cxgb4: move VLAN_NONE macro definition Varun Prakash
2016-02-14 17:38 ` [RFC 10/34] cxgb4, iw_cxgb4: move delayed ack macro definitions Varun Prakash
2016-02-14 17:39 ` [RFC 11/34] cxgb4: add iSCSI DDP page pod manager Varun Prakash
2016-02-14 17:39 ` [RFC 12/34] cxgb4: update Kconfig and Makefile Varun Prakash
2016-03-01 14:47   ` Christoph Hellwig
2016-03-02 10:56     ` Varun Prakash
2016-02-14 17:42 ` [RFC 13/34] iscsi-target: add new transport type Varun Prakash
2016-03-01 14:48   ` Christoph Hellwig
2016-03-02 11:52     ` Varun Prakash
2016-03-05 21:28     ` Nicholas A. Bellinger
2016-03-07 14:55       ` Varun Prakash
2016-03-07 20:30         ` Nicholas A. Bellinger
2016-02-14 17:42 ` [RFC 14/34] iscsi-target: export symbols Varun Prakash
2016-03-01 14:49   ` Christoph Hellwig
2016-03-02 12:00     ` Varun Prakash
2016-03-05 21:54       ` Nicholas A. Bellinger
2016-03-07 23:22         ` Nicholas A. Bellinger
2016-03-12  6:28           ` Nicholas A. Bellinger
2016-03-13 12:13             ` Varun Prakash
2016-04-08  7:16               ` Nicholas A. Bellinger
2016-04-09 12:09                 ` Varun Prakash
2016-04-10  8:56                 ` Sagi Grimberg
2016-02-14 17:42 ` [RFC 15/34] iscsi-target: export symbols from iscsi_target.c Varun Prakash
2016-03-01 14:49   ` Christoph Hellwig
2016-03-02 12:07     ` Varun Prakash
2016-02-14 17:42 ` [RFC 16/34] iscsi-target: split iscsit_send_r2t() Varun Prakash
2016-02-14 17:42 ` [RFC 17/34] iscsi-target: split iscsit_send_conn_drop_async_message() Varun Prakash
2016-02-14 17:42 ` [RFC 18/34] iscsi-target: call complete on conn_logout_comp Varun Prakash
2016-02-15 17:07   ` Sagi Grimberg
2016-03-01 14:52     ` Christoph Hellwig
2016-03-05 21:02       ` Nicholas A. Bellinger
2016-02-14 17:42 ` [RFC 19/34] iscsi-target: clear tx_thread_active Varun Prakash
2016-02-15 17:07   ` Sagi Grimberg
2016-03-01 14:59   ` Christoph Hellwig
2016-02-14 17:42 ` [RFC 20/34] iscsi-target: update struct iscsit_transport definition Varun Prakash
2016-02-15 17:09   ` Sagi Grimberg
2016-02-18 12:36     ` Varun Prakash
2016-02-14 17:42 ` [RFC 21/34] iscsi-target: release transport driver resources Varun Prakash
2016-03-01 14:59   ` Christoph Hellwig
2016-03-02 12:15     ` Varun Prakash
2016-02-14 17:45 ` Varun Prakash [this message]
2016-02-15 17:16   ` [RFC 22/34] iscsi-target: call Rx thread function Sagi Grimberg
2016-03-01 15:01   ` Christoph Hellwig
2016-03-05 23:16     ` Nicholas A. Bellinger
2016-02-14 17:45 ` [RFC 23/34] iscsi-target: split iscsi_target_rx_thread() Varun Prakash
2016-03-01 15:02   ` Christoph Hellwig
2016-02-14 17:45 ` [RFC 24/34] iscsi-target: validate conn operational parameters Varun Prakash
2016-03-01 15:03   ` Christoph Hellwig
2016-03-02 12:18     ` Varun Prakash
2016-02-14 17:45 ` [RFC 25/34] iscsi-target: move iscsit_thread_check_cpumask() Varun Prakash
2016-02-14 17:45 ` [RFC 26/34] iscsi-target: fix seq_end_offset calculation Varun Prakash
2016-02-14 17:45 ` [RFC 27/34] cxgbit: add cxgbit.h Varun Prakash
2016-02-14 17:45 ` [RFC 28/34] cxgbit: add cxgbit_lro.h Varun Prakash
2016-02-14 17:45 ` [RFC 29/34] cxgbit: add cxgbit_main.c Varun Prakash
2016-02-14 17:45 ` [RFC 30/34] cxgbit: add cxgbit_cm.c Varun Prakash
2016-02-14 17:45 ` [RFC 31/34] cxgbit: add cxgbit_target.c Varun Prakash
2016-02-14 17:45 ` [RFC 32/34] cxgbit: add cxgbit_ddp.c Varun Prakash
2016-02-14 17:45 ` [RFC 33/34] cxgbit: add Kconfig and Makefile Varun Prakash
2016-02-14 17:45 ` [RFC 34/34] iscsi-target: update " Varun Prakash
2016-02-26  7:29 ` [RFC 00/34] Chelsio iSCSI target offload driver Nicholas A. Bellinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19973d4150937cdaffec583caa35b5d8c9a64fbb.1455467089.git.varun@chelsio.com \
    --to=varun@chelsio.com \
    --cc=hariprasad@chelsio.com \
    --cc=indranil@chelsio.com \
    --cc=kxie@chelsio.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=roland@kernel.org \
    --cc=swise@opengridcomputing.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.