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 v2 04/16] iscsi-target: add void (*iscsit_release_cmd)()
Date: Sat,  9 Apr 2016 18:41:14 +0530	[thread overview]
Message-ID: <1499510260d6358522b4023822022f0add88b687.1460204441.git.varun@chelsio.com> (raw)
In-Reply-To: <cover.1460204441.git.varun@chelsio.com>
In-Reply-To: <cover.1460204441.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.

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 77ae41e..19cef94 100644
--- a/include/target/iscsi/iscsi_transport.h
+++ b/include/target/iscsi/iscsi_transport.h
@@ -29,6 +29,7 @@ struct iscsit_transport {
 	int (*iscsit_xmit_datain_pdu)(struct iscsi_conn *, struct iscsi_cmd *,
 				      struct iscsi_datain_req *,
 				      struct iscsi_datain *);
+	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-09 13:11 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 13:11 [PATCH v2 00/16] Chelsio iSCSI target offload driver Varun Prakash
2016-04-09 13:11 ` [PATCH v2 01/16] iscsi-target: add callback to alloc and free PDU Varun Prakash
2016-04-10 17:33   ` Sagi Grimberg
2016-04-11 14:54     ` Varun Prakash
2016-04-13  9:56       ` Sagi Grimberg
2016-04-13 16:21         ` Varun Prakash
2016-04-09 13:11 ` [PATCH v2 02/16] iscsi-target: add int (*iscsit_xmit_pdu)() Varun Prakash
2016-04-10 17:36   ` Sagi Grimberg
2016-04-09 13:11 ` [PATCH v2 03/16] iscsi-target: add int (*iscsit_xmit_datain_pdu)() Varun Prakash
2016-04-10 17:38   ` Sagi Grimberg
2016-04-11 16:12     ` Varun Prakash
2016-04-09 13:11 ` Varun Prakash [this message]
2016-04-10 17:42   ` [PATCH v2 04/16] iscsi-target: add void (*iscsit_release_cmd)() Sagi Grimberg
2016-04-11 17:16     ` Varun Prakash
2016-04-09 13:11 ` [PATCH v2 05/16] iscsi-target: add void (*iscsit_get_rx_pdu)() Varun Prakash
2016-04-10 17:43   ` Sagi Grimberg
2016-04-09 13:11 ` [PATCH v2 06/16] iscsi-target: split iscsi_target_rx_thread() Varun Prakash
2016-04-09 13:11 ` [PATCH v2 07/16] iscsi-target: add int (*iscsit_validate_params)() Varun Prakash
2016-04-10 17:50   ` Sagi Grimberg
2016-04-11 17:44     ` Varun Prakash
2016-04-09 13:11 ` [PATCH v2 08/16] iscsi-target: add void (*iscsit_get_r2t_ttt)() Varun Prakash
2016-04-10 17:51   ` Sagi Grimberg
2016-04-11 18:08     ` Varun Prakash
2016-04-13  9:52       ` Sagi Grimberg
2016-04-13 13:03         ` Varun Prakash
2016-04-09 13:11 ` [PATCH v2 09/16] iscsi-target: move iscsit_thread_check_cpumask() Varun Prakash
2016-04-09 13:11 ` [PATCH v2 10/16] iscsi-target: use conn->network_transport in text rsp Varun Prakash
2016-04-10 17:55   ` Sagi Grimberg
2016-04-09 13:11 ` [PATCH v2 11/16] iscsi-target: add new offload transport type Varun Prakash
2016-04-10 17:56   ` Sagi Grimberg
2016-04-09 13:11 ` [PATCH v2 12/16] iscsi-target: clear tx_thread_active Varun Prakash
2016-04-09 13:11 ` [PATCH v2 13/16] iscsi-target: call complete on conn_logout_comp Varun Prakash
2016-04-09 13:11 ` [PATCH v2 14/16] iscsi-target: export symbols Varun Prakash
2016-04-09 13:11 ` [PATCH v2 15/16] iscsi-target: fix seq_end_offset calculation Varun Prakash
2016-04-10 17:59   ` Sagi Grimberg
2016-04-09 13:11 ` [PATCH v2 16/16] cxgbit: add files for cxgbit.ko Varun Prakash

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=1499510260d6358522b4023822022f0add88b687.1460204441.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.