aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2014-07-17 21:16:52 +0000
committerAlexander Motin <mav@FreeBSD.org>2014-07-17 21:16:52 +0000
commit8cbf9eae6f129323eeb6b9e77e9baa4b6e17a828 (patch)
treefc4be5f3b6e4b9743e280f46c8be2a6398ea6dc4 /sys
parent38afa8f733a6ce89f0b924655358268ce61ff5f3 (diff)
downloadsrc-8cbf9eae6f129323eeb6b9e77e9baa4b6e17a828.tar.gz
src-8cbf9eae6f129323eeb6b9e77e9baa4b6e17a828.zip
Increase maximal number of SCSI ports in CTL from 32 to 128.
After I gave each iSCSI target its own port, the old limit appeared to be not so big. This change almost proportionally increases per-LUN memory use, but it is still three times better then it was before r268807. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=268808
Diffstat (limited to 'sys')
-rw-r--r--sys/cam/ctl/ctl.c3
-rw-r--r--sys/cam/ctl/ctl_io.h2
-rw-r--r--sys/cam/ctl/ctl_ioctl.h2
-rw-r--r--sys/cam/ctl/ctl_private.h6
-rw-r--r--sys/cam/ctl/ctl_tpc.c2
5 files changed, 7 insertions, 8 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 43a8a8becfaa..25629a9e9201 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -8208,8 +8208,7 @@ ctl_pro_preempt(struct ctl_softc *softc, struct ctl_lun *lun, uint64_t res_key,
&& lun->res_type != SPR_TYPE_EX_AC_AR)
lun->pr_res_idx = residx;
else
- lun->pr_res_idx =
- CTL_PR_ALL_REGISTRANTS;
+ lun->pr_res_idx = CTL_PR_ALL_REGISTRANTS;
persis_io.hdr.nexus = ctsio->io_hdr.nexus;
persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION;
diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h
index 2e4066588aec..8f4ab92c330b 100644
--- a/sys/cam/ctl/ctl_io.h
+++ b/sys/cam/ctl/ctl_io.h
@@ -407,7 +407,7 @@ struct ctl_pr_info {
ctl_pr_action action;
uint8_t sa_res_key[8];
uint8_t res_type;
- uint16_t residx;
+ uint32_t residx;
};
struct ctl_ha_msg_hdr {
diff --git a/sys/cam/ctl/ctl_ioctl.h b/sys/cam/ctl/ctl_ioctl.h
index 94a7cc8f3985..a90475b8fcf5 100644
--- a/sys/cam/ctl/ctl_ioctl.h
+++ b/sys/cam/ctl/ctl_ioctl.h
@@ -70,7 +70,7 @@
/*
* Maximum number of ports registered at one time.
*/
-#define CTL_MAX_PORTS 32
+#define CTL_MAX_PORTS 128
/*
* Maximum number of initiators we support.
diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h
index 7fc408386391..23298fa05d7c 100644
--- a/sys/cam/ctl/ctl_private.h
+++ b/sys/cam/ctl/ctl_private.h
@@ -355,8 +355,8 @@ struct ctl_per_res_info {
uint8_t registered;
};
-#define CTL_PR_ALL_REGISTRANTS 0xFFFF
-#define CTL_PR_NO_RESERVATION 0xFFF0
+#define CTL_PR_ALL_REGISTRANTS 0xFFFFFFFF
+#define CTL_PR_NO_RESERVATION 0xFFFFFFF0
struct ctl_devid {
int len;
@@ -398,7 +398,7 @@ struct ctl_lun {
struct ctl_per_res_info per_res[2*CTL_MAX_INITIATORS];
unsigned int PRGeneration;
int pr_key_count;
- uint16_t pr_res_idx;
+ uint32_t pr_res_idx;
uint8_t res_type;
uint8_t write_buffer[262144];
struct ctl_devid *lun_devid;
diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c
index d5baa01a008c..ad66ca9961bd 100644
--- a/sys/cam/ctl/ctl_tpc.c
+++ b/sys/cam/ctl/ctl_tpc.c
@@ -89,7 +89,7 @@ struct tpc_io {
struct tpc_list {
uint8_t service_action;
int init_port;
- uint16_t init_idx;
+ uint32_t init_idx;
uint32_t list_id;
uint8_t flags;
uint8_t *params;