diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index 005673cb73c6..5f8a8004d4d3 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -1449,6 +1449,9 @@ icl_soft_limits(struct icl_drv_limits *idl) { idl->idl_max_recv_data_segment_length = 128 * 1024; + idl->idl_max_send_data_segment_length = 128 * 1024; + idl->idl_max_burst_length = 262144; + idl->idl_first_burst_length = 65536; return (0); } 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); /* diff --git a/sys/dev/iser/icl_iser.c b/sys/dev/iser/icl_iser.c index bd65077ab7a7..226177af4ffd 100644 --- a/sys/dev/iser/icl_iser.c +++ b/sys/dev/iser/icl_iser.c @@ -486,7 +486,11 @@ iser_conn_task_done(struct icl_conn *ic, void *prv) static int iser_limits(struct icl_drv_limits *idl) { + idl->idl_max_recv_data_segment_length = 128 * 1024; + idl->idl_max_send_data_segment_length = 128 * 1024; + idl->idl_max_burst_length = 262144; + idl->idl_first_burst_length = 65536; return (0); }