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 /drivers/infiniband/ulp/iser/iscsi_iser.c | |
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 'drivers/infiniband/ulp/iser/iscsi_iser.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 9782190a9ee5..bed583c426e6 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -373,7 +373,8 @@ static struct iscsi_transport iscsi_iser_transport; | |||
373 | static struct iscsi_cls_session * | 373 | static struct iscsi_cls_session * |
374 | iscsi_iser_session_create(struct iscsi_transport *iscsit, | 374 | iscsi_iser_session_create(struct iscsi_transport *iscsit, |
375 | struct scsi_transport_template *scsit, | 375 | struct scsi_transport_template *scsit, |
376 | uint32_t initial_cmdsn, uint32_t *hostno) | 376 | uint16_t cmds_max, uint16_t qdepth, |
377 | uint32_t initial_cmdsn, uint32_t *hostno) | ||
377 | { | 378 | { |
378 | struct iscsi_cls_session *cls_session; | 379 | struct iscsi_cls_session *cls_session; |
379 | struct iscsi_session *session; | 380 | struct iscsi_session *session; |
@@ -384,7 +385,13 @@ iscsi_iser_session_create(struct iscsi_transport *iscsit, | |||
384 | struct iscsi_iser_cmd_task *iser_ctask; | 385 | struct iscsi_iser_cmd_task *iser_ctask; |
385 | struct iser_desc *desc; | 386 | struct iser_desc *desc; |
386 | 387 | ||
388 | /* | ||
389 | * we do not support setting can_queue cmd_per_lun from userspace yet | ||
390 | * because we preallocate so many resources | ||
391 | */ | ||
387 | cls_session = iscsi_session_setup(iscsit, scsit, | 392 | cls_session = iscsi_session_setup(iscsit, scsit, |
393 | ISCSI_DEF_XMIT_CMDS_MAX, | ||
394 | ISCSI_MAX_CMD_PER_LUN, | ||
388 | sizeof(struct iscsi_iser_cmd_task), | 395 | sizeof(struct iscsi_iser_cmd_task), |
389 | sizeof(struct iser_desc), | 396 | sizeof(struct iser_desc), |
390 | initial_cmdsn, &hn); | 397 | initial_cmdsn, &hn); |
@@ -543,7 +550,7 @@ iscsi_iser_ep_disconnect(__u64 ep_handle) | |||
543 | static struct scsi_host_template iscsi_iser_sht = { | 550 | static struct scsi_host_template iscsi_iser_sht = { |
544 | .name = "iSCSI Initiator over iSER, v." DRV_VER, | 551 | .name = "iSCSI Initiator over iSER, v." DRV_VER, |
545 | .queuecommand = iscsi_queuecommand, | 552 | .queuecommand = iscsi_queuecommand, |
546 | .can_queue = ISCSI_XMIT_CMDS_MAX - 1, | 553 | .can_queue = ISCSI_DEF_XMIT_CMDS_MAX - 1, |
547 | .sg_tablesize = ISCSI_ISER_SG_TABLESIZE, | 554 | .sg_tablesize = ISCSI_ISER_SG_TABLESIZE, |
548 | .max_sectors = 1024, | 555 | .max_sectors = 1024, |
549 | .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN, | 556 | .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN, |