Date: Sun, 5 Jun 2016 08:48:38 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301437 - in head: sys/cam/ctl sys/dev/iscsi usr.bin/iscsictl usr.sbin/ctladm usr.sbin/ctld Message-ID: <201606050848.u558mc9g099970@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Sun Jun 5 08:48:37 2016 New Revision: 301437 URL: https://svnweb.freebsd.org/changeset/base/301437 Log: Report negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v" and "ctladm islist -v" outputs. MFC after: 1 month Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_frontend_iscsi.h head/sys/dev/iscsi/iscsi.c head/sys/dev/iscsi/iscsi_ioctl.h head/usr.bin/iscsictl/iscsictl.c head/usr.sbin/ctladm/ctladm.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/kernel.c head/usr.sbin/ctld/login.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Jun 5 08:42:33 2016 (r301436) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Jun 5 08:48:37 2016 (r301437) @@ -1514,6 +1514,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi * 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); Modified: head/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.h Sun Jun 5 08:42:33 2016 (r301436) +++ head/sys/cam/ctl/ctl_frontend_iscsi.h Sun Jun 5 08:48:37 2016 (r301437) @@ -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]; Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sun Jun 5 08:42:33 2016 (r301436) +++ head/sys/dev/iscsi/iscsi.c Sun Jun 5 08:48:37 2016 (r301437) @@ -1934,6 +1934,8 @@ iscsi_ioctl_session_list(struct iscsi_so 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; Modified: head/sys/dev/iscsi/iscsi_ioctl.h ============================================================================== --- head/sys/dev/iscsi/iscsi_ioctl.h Sun Jun 5 08:42:33 2016 (r301436) +++ head/sys/dev/iscsi/iscsi_ioctl.h Sun Jun 5 08:48:37 2016 (r301437) @@ -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; }; /* Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Sun Jun 5 08:42:33 2016 (r301436) +++ head/usr.bin/iscsictl/iscsictl.c Sun Jun 5 08:48:37 2016 (r301437) @@ -567,6 +567,10 @@ kernel_list(int iscsi_fd, const struct t "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", Modified: head/usr.sbin/ctladm/ctladm.c ============================================================================== --- head/usr.sbin/ctladm/ctladm.c Sun Jun 5 08:42:33 2016 (r301436) +++ head/usr.sbin/ctladm/ctladm.c Sun Jun 5 08:48:37 2016 (r301437) @@ -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, } 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); Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Sun Jun 5 08:42:33 2016 (r301436) +++ head/usr.sbin/ctld/ctld.h Sun Jun 5 08:48:37 2016 (r301437) @@ -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; Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Sun Jun 5 08:42:33 2016 (r301436) +++ head/usr.sbin/ctld/kernel.c Sun Jun 5 08:48:37 2016 (r301437) @@ -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) { Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Sun Jun 5 08:42:33 2016 (r301436) +++ head/usr.sbin/ctld/login.c Sun Jun 5 08:48:37 2016 (r301437) @@ -582,10 +582,7 @@ login_negotiate_key(struct pdu *request, 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606050848.u558mc9g099970>