aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-05-30 13:57:19 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-02 15:34:46 -0400
commit1548271ece9e9312fd5feb41fd58773b56a71d39 (patch)
tree89f990788a619a52c3ba4ecbf5f2a596c5711d04 /include
parent77a23c21aaa723f6b0ffc4a701be8c8e5a32346d (diff)
[SCSI] libiscsi: make can_queue configurable
This patch allows us to set can_queue and cmds_per_lun from userspace when we create the session/host. From there we can set it on a per target basis. The patch fully converts iscsi_tcp, but only hooks up ib_iser for cmd_per_lun since it currently has a lots of preallocations based on can_queue. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Roland Dreier <rdreier@cisco.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/iscsi_if.h2
-rw-r--r--include/scsi/libiscsi.h7
-rw-r--r--include/scsi/scsi_transport_iscsi.h3
3 files changed, 7 insertions, 5 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index 1a18196d77f..a046a329189 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -72,6 +72,8 @@ struct iscsi_uevent {
72 /* messages u -> k */ 72 /* messages u -> k */
73 struct msg_create_session { 73 struct msg_create_session {
74 uint32_t initial_cmdsn; 74 uint32_t initial_cmdsn;
75 uint16_t cmds_max;
76 uint16_t queue_depth;
75 } c_session; 77 } c_session;
76 struct msg_destroy_session { 78 struct msg_destroy_session {
77 uint32_t sid; 79 uint32_t sid;
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 8d48cf8f2e3..2f303a3b270 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -48,9 +48,8 @@ struct iscsi_nopin;
48#define debug_scsi(fmt...) 48#define debug_scsi(fmt...)
49#endif 49#endif
50 50
51#define ISCSI_XMIT_CMDS_MAX 128 /* must be power of 2 */ 51#define ISCSI_DEF_XMIT_CMDS_MAX 128 /* must be power of 2 */
52#define ISCSI_MGMT_CMDS_MAX 32 /* must be power of 2 */ 52#define ISCSI_MGMT_CMDS_MAX 16 /* must be power of 2 */
53#define ISCSI_CONN_MAX 1
54 53
55#define ISCSI_MGMT_ITT_OFFSET 0xa00 54#define ISCSI_MGMT_ITT_OFFSET 0xa00
56 55
@@ -268,7 +267,7 @@ extern int iscsi_host_get_param(struct Scsi_Host *shost,
268 */ 267 */
269extern struct iscsi_cls_session * 268extern struct iscsi_cls_session *
270iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *, 269iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *,
271 int, int, uint32_t, uint32_t *); 270 uint16_t, uint16_t, int, int, uint32_t, uint32_t *);
272extern void iscsi_session_teardown(struct iscsi_cls_session *); 271extern void iscsi_session_teardown(struct iscsi_cls_session *);
273extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *); 272extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *);
274extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); 273extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *);
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index abc4068621d..706c0cd36c1 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -90,7 +90,8 @@ struct iscsi_transport {
90 unsigned int max_conn; 90 unsigned int max_conn;
91 unsigned int max_cmd_len; 91 unsigned int max_cmd_len;
92 struct iscsi_cls_session *(*create_session) (struct iscsi_transport *it, 92 struct iscsi_cls_session *(*create_session) (struct iscsi_transport *it,
93 struct scsi_transport_template *t, uint32_t sn, uint32_t *hn); 93 struct scsi_transport_template *t, uint16_t, uint16_t,
94 uint32_t sn, uint32_t *hn);
94 void (*destroy_session) (struct iscsi_cls_session *session); 95 void (*destroy_session) (struct iscsi_cls_session *session);
95 struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, 96 struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess,
96 uint32_t cid); 97 uint32_t cid);