aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iscsi/iscsi.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-11-23 13:57:44 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-11-23 13:57:44 +0000
commit9ac7c5a64ca5728ea0ed15fc3c191695938f226d (patch)
tree87475c8e84583d18aa13ca91a277cb0d59d1b7b6 /sys/dev/iscsi/iscsi.c
parentdd62bb6aeb3d35f252bd6c51a0039d158dbee54e (diff)
downloadsrc-9ac7c5a64ca5728ea0ed15fc3c191695938f226d.tar.gz
src-9ac7c5a64ca5728ea0ed15fc3c191695938f226d.zip
Make sure the iSCSI I/O limits are set properly so that the ISCSIDSEND IOCTL
can be used prior to the ISCSIDHANDOFF IOCTL which set the negotiated values. Else the login PDU will fail when passing the "-r" option to "iscsictl" which means iSCSI over RDMA instead of TCP/IP. Discussed with: np@ and trasz@ Sponsored by: Mellanox Technologies MFC after: 1 week
Notes
Notes: svn path=/head/; revision=326127
Diffstat (limited to 'sys/dev/iscsi/iscsi.c')
-rw-r--r--sys/dev/iscsi/iscsi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
index 673af553b658..0d53d68066e0 100644
--- a/sys/dev/iscsi/iscsi.c
+++ b/sys/dev/iscsi/iscsi.c
@@ -1787,6 +1787,18 @@ iscsi_ioctl_session_add(struct iscsi_softc *sc, struct iscsi_session_add *isa)
is = malloc(sizeof(*is), M_ISCSI, M_ZERO | M_WAITOK);
memcpy(&is->is_conf, &isa->isa_conf, sizeof(is->is_conf));
+ /*
+ * Set some default values, from RFC 3720, section 12.
+ *
+ * These values are updated by the handoff IOCTL, but are
+ * needed prior to the handoff to support sending the ISER
+ * login PDU.
+ */
+ is->is_max_recv_data_segment_length = 8192;
+ is->is_max_send_data_segment_length = 8192;
+ is->is_max_burst_length = 262144;
+ is->is_first_burst_length = 65536;
+
sx_xlock(&sc->sc_lock);
/*