aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/cam/ctl/ctl_frontend_iscsi.c5
-rw-r--r--sys/cam/ctl/ctl_frontend_iscsi.h1
-rw-r--r--sys/dev/iscsi/iscsi.c2
-rw-r--r--sys/dev/iscsi/iscsi_ioctl.h3
-rw-r--r--usr.bin/iscsictl/iscsictl.c4
-rw-r--r--usr.sbin/ctladm/ctladm.c10
-rw-r--r--usr.sbin/ctld/ctld.h1
-rw-r--r--usr.sbin/ctld/kernel.c1
-rw-r--r--usr.sbin/ctld/login.c5
9 files changed, 27 insertions, 5 deletions
diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c
index 1c270fc2c232..70de5fa79b0f 100644
--- a/sys/cam/ctl/ctl_frontend_iscsi.c
+++ b/sys/cam/ctl/ctl_frontend_iscsi.c
@@ -1514,6 +1514,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci)
cs->cs_statsn = cihp->statsn;
cs->cs_max_data_segment_length = cihp->max_recv_data_segment_length;
cs->cs_max_burst_length = cihp->max_burst_length;
+ cs->cs_first_burst_length = cihp->first_burst_length;
cs->cs_immediate_data = !!cihp->immediate_data;
if (cihp->header_digest == CTL_ISCSI_DIGEST_CRC32C)
cs->cs_conn->ic_header_crc32c = true;
@@ -1652,6 +1653,8 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci)
"<header_digest>%s</header_digest>"
"<data_digest>%s</data_digest>"
"<max_data_segment_length>%zd</max_data_segment_length>"
+ "<max_burst_length>%zd</max_burst_length>"
+ "<first_burst_length>%zd</first_burst_length>"
"<immediate_data>%d</immediate_data>"
"<iser>%d</iser>"
"<offload>%s</offload>"
@@ -1663,6 +1666,8 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci)
cs->cs_conn->ic_header_crc32c ? "CRC32C" : "None",
cs->cs_conn->ic_data_crc32c ? "CRC32C" : "None",
cs->cs_max_data_segment_length,
+ cs->cs_max_burst_length,
+ cs->cs_first_burst_length,
cs->cs_immediate_data,
cs->cs_conn->ic_iser,
cs->cs_conn->ic_offload);
diff --git a/sys/cam/ctl/ctl_frontend_iscsi.h b/sys/cam/ctl/ctl_frontend_iscsi.h
index 140aa5223cee..d24f193cbbef 100644
--- a/sys/cam/ctl/ctl_frontend_iscsi.h
+++ b/sys/cam/ctl/ctl_frontend_iscsi.h
@@ -86,6 +86,7 @@ struct cfiscsi_session {
bool cs_tasks_aborted;
size_t cs_max_data_segment_length;
size_t cs_max_burst_length;
+ size_t cs_first_burst_length;
bool cs_immediate_data;
char cs_initiator_name[CTL_ISCSI_NAME_LEN];
char cs_initiator_addr[CTL_ISCSI_ADDR_LEN];
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
index e335dc715961..5364584816c2 100644
--- a/sys/dev/iscsi/iscsi.c
+++ b/sys/dev/iscsi/iscsi.c
@@ -1934,6 +1934,8 @@ iscsi_ioctl_session_list(struct iscsi_softc *sc, struct iscsi_session_list *isl)
iss.iss_data_digest = ISCSI_DIGEST_NONE;
iss.iss_max_data_segment_length = is->is_max_data_segment_length;
+ iss.iss_max_burst_length = is->is_max_burst_length;
+ iss.iss_first_burst_length = is->is_first_burst_length;
iss.iss_immediate_data = is->is_immediate_data;
iss.iss_connected = is->is_connected;
diff --git a/sys/dev/iscsi/iscsi_ioctl.h b/sys/dev/iscsi/iscsi_ioctl.h
index 38d905d268d7..21da22eda26b 100644
--- a/sys/dev/iscsi/iscsi_ioctl.h
+++ b/sys/dev/iscsi/iscsi_ioctl.h
@@ -93,7 +93,8 @@ struct iscsi_session_state {
int iss_connected;
char iss_reason[ISCSI_REASON_LEN];
char iss_offload[ISCSI_OFFLOAD_LEN];
- int iss_spare[2];
+ int iss_max_burst_length;
+ int iss_first_burst_length;
};
/*
diff --git a/usr.bin/iscsictl/iscsictl.c b/usr.bin/iscsictl/iscsictl.c
index fd05db3f9543..71a1abedcedf 100644
--- a/usr.bin/iscsictl/iscsictl.c
+++ b/usr.bin/iscsictl/iscsictl.c
@@ -567,6 +567,10 @@ kernel_list(int iscsi_fd, const struct target *targ __unused,
"CRC32C" : "None");
xo_emit("{L:/%-18s}{V:dataSegmentLen/%d}\n",
"DataSegmentLen:", state->iss_max_data_segment_length);
+ xo_emit("{L:/%-18s}{V:maxBurstLen/%d}\n",
+ "MaxBurstLen:", state->iss_max_burst_length);
+ xo_emit("{L:/%-18s}{V:firstBurstLen/%d}\n",
+ "FirstBurstLen:", state->iss_first_burst_length);
xo_emit("{L:/%-18s}{V:immediateData/%s}\n",
"ImmediateData:", state->iss_immediate_data ? "Yes" : "No");
xo_emit("{L:/%-18s}{V:iSER/%s}\n",
diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c
index 16ce2879ed84..3eee361cf317 100644
--- a/usr.sbin/ctladm/ctladm.c
+++ b/usr.sbin/ctladm/ctladm.c
@@ -2795,6 +2795,8 @@ struct cctl_islist_conn {
char *header_digest;
char *data_digest;
char *max_data_segment_length;;
+ char *max_burst_length;;
+ char *first_burst_length;;
char *offload;;
int immediate_data;
int iser;
@@ -2909,6 +2911,12 @@ cctl_islist_end_element(void *user_data, const char *name)
} else if (strcmp(name, "max_data_segment_length") == 0) {
cur_conn->max_data_segment_length = str;
str = NULL;
+ } else if (strcmp(name, "max_burst_length") == 0) {
+ cur_conn->max_burst_length = str;
+ str = NULL;
+ } else if (strcmp(name, "first_burst_length") == 0) {
+ cur_conn->first_burst_length = str;
+ str = NULL;
} else if (strcmp(name, "offload") == 0) {
cur_conn->offload = str;
str = NULL;
@@ -3031,6 +3039,8 @@ retry:
printf("Header digest: %s\n", conn->header_digest);
printf("Data digest: %s\n", conn->data_digest);
printf("DataSegmentLen: %s\n", conn->max_data_segment_length);
+ printf("MaxBurstLen: %s\n", conn->max_burst_length);
+ printf("FirstBurstLen: %s\n", conn->first_burst_length);
printf("ImmediateData: %s\n", conn->immediate_data ? "Yes" : "No");
printf("iSER (RDMA): %s\n", conn->iser ? "Yes" : "No");
printf("Offload driver: %s\n", conn->offload);
diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h
index e9152329121f..705da33a6dc8 100644
--- a/usr.sbin/ctld/ctld.h
+++ b/usr.sbin/ctld/ctld.h
@@ -244,6 +244,7 @@ struct connection {
size_t conn_data_segment_limit;
size_t conn_max_data_segment_length;
size_t conn_max_burst_length;
+ size_t conn_first_burst_length;
int conn_immediate_data;
int conn_header_digest;
int conn_data_digest;
diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c
index 8f1cefb99c11..40ef6829892a 100644
--- a/usr.sbin/ctld/kernel.c
+++ b/usr.sbin/ctld/kernel.c
@@ -900,6 +900,7 @@ kernel_handoff(struct connection *conn)
req.data.handoff.max_recv_data_segment_length =
conn->conn_max_data_segment_length;
req.data.handoff.max_burst_length = conn->conn_max_burst_length;
+ req.data.handoff.first_burst_length = conn->conn_first_burst_length;
req.data.handoff.immediate_data = conn->conn_immediate_data;
if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
diff --git a/usr.sbin/ctld/login.c b/usr.sbin/ctld/login.c
index f767d8826740..c450b5c107ee 100644
--- a/usr.sbin/ctld/login.c
+++ b/usr.sbin/ctld/login.c
@@ -582,10 +582,7 @@ login_negotiate_key(struct pdu *request, const char *name,
tmp, conn->conn_data_segment_limit);
tmp = conn->conn_data_segment_limit;
}
- /*
- * We don't pass the value to the kernel; it only enforces
- * hardcoded limit anyway.
- */
+ conn->conn_first_burst_length = tmp;
keys_add_int(response_keys, name, tmp);
} else if (strcmp(name, "DefaultTime2Wait") == 0) {
keys_add(response_keys, name, value);