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, swise@opengridcomputing.com,
	kxie@chelsio.com, indranil@chelsio.com, varun@chelsio.com
Subject: [PATCH v3 02/13] iscsi-target: add void (*iscsit_release_cmd)()
Date: Wed, 20 Apr 2016 00:00:09 +0530	[thread overview]
Message-ID: <5cd6e587f8c539c20dc9d2383121360d59b46ab1.1461088672.git.varun@chelsio.com> (raw)
In-Reply-To: <cover.1461088672.git.varun@chelsio.com>
In-Reply-To: <cover.1461088672.git.varun@chelsio.com>

Add void (*iscsit_release_cmd)() to
struct iscsit_transport, iscsi-target
uses this callback to release transport
driver resources associated with an iSCSI cmd.

cxgbit.ko needs this callback to release DDP
resource and sg page in case of
PASSTHROUGH_SG_TO_MEM_NOALLOC.

Signed-off-by: Varun Prakash <varun@chelsio.com>
---
 drivers/target/iscsi/iscsi_target_util.c | 3 +++
 include/target/iscsi/iscsi_transport.h   | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c
index 428b0d9..a533017 100644
--- a/drivers/target/iscsi/iscsi_target_util.c
+++ b/drivers/target/iscsi/iscsi_target_util.c
@@ -725,6 +725,9 @@ void __iscsit_free_cmd(struct iscsi_cmd *cmd, bool scsi_cmd,
 		iscsit_remove_cmd_from_immediate_queue(cmd, conn);
 		iscsit_remove_cmd_from_response_queue(cmd, conn);
 	}
+
+	if (conn && conn->conn_transport->iscsit_release_cmd)
+		conn->conn_transport->iscsit_release_cmd(conn, cmd);
 }
 
 void iscsit_free_cmd(struct iscsi_cmd *cmd, bool shutdown)
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h
index 24b613a..3b0053e 100644
--- a/include/target/iscsi/iscsi_transport.h
+++ b/include/target/iscsi/iscsi_transport.h
@@ -24,6 +24,7 @@ struct iscsit_transport {
 	void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *);
 	int (*iscsit_xmit_pdu)(struct iscsi_conn *, struct iscsi_cmd *,
 			       struct iscsi_datain_req *, const void *, u32);
+	void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *);
 	enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *);
 };
 
-- 
2.0.2

  parent reply	other threads:[~2016-04-19 18:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19 18:30 [PATCH v3 00/13] Chelsio iSCSI target offload driver Varun Prakash
2016-04-19 18:30 ` [PATCH v3 01/13] iscsi-target: add int (*iscsit_xmit_pdu)() Varun Prakash
2016-04-19 18:30 ` Varun Prakash [this message]
2016-04-19 18:30 ` [PATCH v3 03/13] iscsi-target: add void (*iscsit_get_rx_pdu)() Varun Prakash
2016-08-09  3:19   ` Andy Grover
2016-08-13 16:56     ` Varun Prakash
2016-04-19 18:30 ` [PATCH v3 04/13] iscsi-target: split iscsi_target_rx_thread() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 05/13] iscsi-target: add int (*iscsit_validate_params)() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 06/13] iscsi-target: add void (*iscsit_get_r2t_ttt)() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 07/13] iscsi-target: move iscsit_thread_check_cpumask() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 08/13] iscsi-target: use conn_transport->transport_type in text rsp Varun Prakash
2016-04-19 18:30 ` [PATCH v3 09/13] iscsi-target: add new offload transport type Varun Prakash
2016-04-19 18:30 ` [PATCH v3 10/13] iscsi-target: clear tx_thread_active Varun Prakash
2016-04-19 18:30 ` [PATCH v3 11/13] iscsi-target: call complete on conn_logout_comp Varun Prakash
2016-04-19 18:30 ` [PATCH v3 12/13] iscsi-target: export symbols Varun Prakash
2016-04-19 18:30 ` [PATCH v3 13/13] cxgbit: add files for cxgbit.ko Varun Prakash
2016-04-30 15:54   ` Or Gerlitz
2016-05-18 11:45     ` Or Gerlitz
2016-05-24  6:40       ` Nicholas A. Bellinger
2016-05-25 15:04         ` Or Gerlitz
2016-05-25 17:40           ` Steve Wise
2016-05-25 20:41             ` Or Gerlitz
2016-05-26  4:55               ` Nicholas A. Bellinger
2016-05-26 18:58                 ` Varun Prakash
2016-07-05 21:24                   ` Or Gerlitz
2016-07-06 17:17                     ` Varun Prakash
2016-07-07  7:54                       ` Or Gerlitz
2016-07-08 18:03                         ` Varun Prakash
2016-07-08 18:36                           ` Steve Wise
2016-07-12  7:53                             ` Or Gerlitz

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=5cd6e587f8c539c20dc9d2383121360d59b46ab1.1461088672.git.varun@chelsio.com \
    --to=varun@chelsio.com \
    --cc=indranil@chelsio.com \
    --cc=kxie@chelsio.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.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.