Report negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"
and "ctladm islist -v" outputs. MFC after: 1 month
This commit is contained in:
parent
14b258b806
commit
4e5408f10c
@ -1514,6 +1514,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci)
|
|||||||
cs->cs_statsn = cihp->statsn;
|
cs->cs_statsn = cihp->statsn;
|
||||||
cs->cs_max_data_segment_length = cihp->max_recv_data_segment_length;
|
cs->cs_max_data_segment_length = cihp->max_recv_data_segment_length;
|
||||||
cs->cs_max_burst_length = cihp->max_burst_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;
|
cs->cs_immediate_data = !!cihp->immediate_data;
|
||||||
if (cihp->header_digest == CTL_ISCSI_DIGEST_CRC32C)
|
if (cihp->header_digest == CTL_ISCSI_DIGEST_CRC32C)
|
||||||
cs->cs_conn->ic_header_crc32c = true;
|
cs->cs_conn->ic_header_crc32c = true;
|
||||||
@ -1652,6 +1653,8 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci)
|
|||||||
"<header_digest>%s</header_digest>"
|
"<header_digest>%s</header_digest>"
|
||||||
"<data_digest>%s</data_digest>"
|
"<data_digest>%s</data_digest>"
|
||||||
"<max_data_segment_length>%zd</max_data_segment_length>"
|
"<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>"
|
"<immediate_data>%d</immediate_data>"
|
||||||
"<iser>%d</iser>"
|
"<iser>%d</iser>"
|
||||||
"<offload>%s</offload>"
|
"<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_header_crc32c ? "CRC32C" : "None",
|
||||||
cs->cs_conn->ic_data_crc32c ? "CRC32C" : "None",
|
cs->cs_conn->ic_data_crc32c ? "CRC32C" : "None",
|
||||||
cs->cs_max_data_segment_length,
|
cs->cs_max_data_segment_length,
|
||||||
|
cs->cs_max_burst_length,
|
||||||
|
cs->cs_first_burst_length,
|
||||||
cs->cs_immediate_data,
|
cs->cs_immediate_data,
|
||||||
cs->cs_conn->ic_iser,
|
cs->cs_conn->ic_iser,
|
||||||
cs->cs_conn->ic_offload);
|
cs->cs_conn->ic_offload);
|
||||||
|
@ -86,6 +86,7 @@ struct cfiscsi_session {
|
|||||||
bool cs_tasks_aborted;
|
bool cs_tasks_aborted;
|
||||||
size_t cs_max_data_segment_length;
|
size_t cs_max_data_segment_length;
|
||||||
size_t cs_max_burst_length;
|
size_t cs_max_burst_length;
|
||||||
|
size_t cs_first_burst_length;
|
||||||
bool cs_immediate_data;
|
bool cs_immediate_data;
|
||||||
char cs_initiator_name[CTL_ISCSI_NAME_LEN];
|
char cs_initiator_name[CTL_ISCSI_NAME_LEN];
|
||||||
char cs_initiator_addr[CTL_ISCSI_ADDR_LEN];
|
char cs_initiator_addr[CTL_ISCSI_ADDR_LEN];
|
||||||
|
@ -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_data_digest = ISCSI_DIGEST_NONE;
|
||||||
|
|
||||||
iss.iss_max_data_segment_length = is->is_max_data_segment_length;
|
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_immediate_data = is->is_immediate_data;
|
||||||
iss.iss_connected = is->is_connected;
|
iss.iss_connected = is->is_connected;
|
||||||
|
|
||||||
|
@ -93,7 +93,8 @@ struct iscsi_session_state {
|
|||||||
int iss_connected;
|
int iss_connected;
|
||||||
char iss_reason[ISCSI_REASON_LEN];
|
char iss_reason[ISCSI_REASON_LEN];
|
||||||
char iss_offload[ISCSI_OFFLOAD_LEN];
|
char iss_offload[ISCSI_OFFLOAD_LEN];
|
||||||
int iss_spare[2];
|
int iss_max_burst_length;
|
||||||
|
int iss_first_burst_length;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -567,6 +567,10 @@ kernel_list(int iscsi_fd, const struct target *targ __unused,
|
|||||||
"CRC32C" : "None");
|
"CRC32C" : "None");
|
||||||
xo_emit("{L:/%-18s}{V:dataSegmentLen/%d}\n",
|
xo_emit("{L:/%-18s}{V:dataSegmentLen/%d}\n",
|
||||||
"DataSegmentLen:", state->iss_max_data_segment_length);
|
"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",
|
xo_emit("{L:/%-18s}{V:immediateData/%s}\n",
|
||||||
"ImmediateData:", state->iss_immediate_data ? "Yes" : "No");
|
"ImmediateData:", state->iss_immediate_data ? "Yes" : "No");
|
||||||
xo_emit("{L:/%-18s}{V:iSER/%s}\n",
|
xo_emit("{L:/%-18s}{V:iSER/%s}\n",
|
||||||
|
@ -2795,6 +2795,8 @@ struct cctl_islist_conn {
|
|||||||
char *header_digest;
|
char *header_digest;
|
||||||
char *data_digest;
|
char *data_digest;
|
||||||
char *max_data_segment_length;;
|
char *max_data_segment_length;;
|
||||||
|
char *max_burst_length;;
|
||||||
|
char *first_burst_length;;
|
||||||
char *offload;;
|
char *offload;;
|
||||||
int immediate_data;
|
int immediate_data;
|
||||||
int iser;
|
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) {
|
} else if (strcmp(name, "max_data_segment_length") == 0) {
|
||||||
cur_conn->max_data_segment_length = str;
|
cur_conn->max_data_segment_length = str;
|
||||||
str = NULL;
|
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) {
|
} else if (strcmp(name, "offload") == 0) {
|
||||||
cur_conn->offload = str;
|
cur_conn->offload = str;
|
||||||
str = NULL;
|
str = NULL;
|
||||||
@ -3031,6 +3039,8 @@ retry:
|
|||||||
printf("Header digest: %s\n", conn->header_digest);
|
printf("Header digest: %s\n", conn->header_digest);
|
||||||
printf("Data digest: %s\n", conn->data_digest);
|
printf("Data digest: %s\n", conn->data_digest);
|
||||||
printf("DataSegmentLen: %s\n", conn->max_data_segment_length);
|
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("ImmediateData: %s\n", conn->immediate_data ? "Yes" : "No");
|
||||||
printf("iSER (RDMA): %s\n", conn->iser ? "Yes" : "No");
|
printf("iSER (RDMA): %s\n", conn->iser ? "Yes" : "No");
|
||||||
printf("Offload driver: %s\n", conn->offload);
|
printf("Offload driver: %s\n", conn->offload);
|
||||||
|
@ -244,6 +244,7 @@ struct connection {
|
|||||||
size_t conn_data_segment_limit;
|
size_t conn_data_segment_limit;
|
||||||
size_t conn_max_data_segment_length;
|
size_t conn_max_data_segment_length;
|
||||||
size_t conn_max_burst_length;
|
size_t conn_max_burst_length;
|
||||||
|
size_t conn_first_burst_length;
|
||||||
int conn_immediate_data;
|
int conn_immediate_data;
|
||||||
int conn_header_digest;
|
int conn_header_digest;
|
||||||
int conn_data_digest;
|
int conn_data_digest;
|
||||||
|
@ -900,6 +900,7 @@ kernel_handoff(struct connection *conn)
|
|||||||
req.data.handoff.max_recv_data_segment_length =
|
req.data.handoff.max_recv_data_segment_length =
|
||||||
conn->conn_max_data_segment_length;
|
conn->conn_max_data_segment_length;
|
||||||
req.data.handoff.max_burst_length = conn->conn_max_burst_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;
|
req.data.handoff.immediate_data = conn->conn_immediate_data;
|
||||||
|
|
||||||
if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
|
if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
|
||||||
|
@ -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);
|
||||||
tmp = conn->conn_data_segment_limit;
|
tmp = conn->conn_data_segment_limit;
|
||||||
}
|
}
|
||||||
/*
|
conn->conn_first_burst_length = tmp;
|
||||||
* We don't pass the value to the kernel; it only enforces
|
|
||||||
* hardcoded limit anyway.
|
|
||||||
*/
|
|
||||||
keys_add_int(response_keys, name, tmp);
|
keys_add_int(response_keys, name, tmp);
|
||||||
} else if (strcmp(name, "DefaultTime2Wait") == 0) {
|
} else if (strcmp(name, "DefaultTime2Wait") == 0) {
|
||||||
keys_add(response_keys, name, value);
|
keys_add(response_keys, name, value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user