diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2007-05-30 13:57:19 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-06-02 15:34:46 -0400 |
commit | 1548271ece9e9312fd5feb41fd58773b56a71d39 (patch) | |
tree | 89f990788a619a52c3ba4ecbf5f2a596c5711d04 /include/scsi | |
parent | 77a23c21aaa723f6b0ffc4a701be8c8e5a32346d (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/scsi')
-rw-r--r-- | include/scsi/iscsi_if.h | 2 | ||||
-rw-r--r-- | include/scsi/libiscsi.h | 7 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 1a18196d77f6..a046a329189c 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 8d48cf8f2e3f..2f303a3b270e 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 | */ |
269 | extern struct iscsi_cls_session * | 268 | extern struct iscsi_cls_session * |
270 | iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *, | 269 | iscsi_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 *); |
272 | extern void iscsi_session_teardown(struct iscsi_cls_session *); | 271 | extern void iscsi_session_teardown(struct iscsi_cls_session *); |
273 | extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *); | 272 | extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *); |
274 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); | 273 | extern 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 abc4068621d8..706c0cd36c14 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); |