Date: Tue, 11 Feb 2014 11:58:54 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261770 - stable/10/sys/dev/iscsi Message-ID: <201402111158.s1BBwsi4067148@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Tue Feb 11 11:58:54 2014 New Revision: 261770 URL: http://svnweb.freebsd.org/changeset/base/261770 Log: MFC r260083: Fix extremely slow operation with data digests enabled. This was caused by receive code waiting for data digest even when the data segment was empty. It didn't actually read it, but it waited until those four bytes become available in the socket buffer, i.e. until any other PDU (e.g. NOP) came in. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Tue Feb 11 11:56:50 2014 (r261769) +++ stable/10/sys/dev/iscsi/icl.c Tue Feb 11 11:58:54 2014 (r261770) @@ -239,7 +239,7 @@ icl_pdu_size(const struct icl_pdu *respo icl_pdu_padding(response); if (response->ip_conn->ic_header_crc32c) len += ISCSI_HEADER_DIGEST_SIZE; - if (response->ip_conn->ic_data_crc32c) + if (response->ip_data_len != 0 && response->ip_conn->ic_data_crc32c) len += ISCSI_DATA_DIGEST_SIZE; return (len); @@ -615,7 +615,7 @@ icl_conn_receive_pdu(struct icl_conn *ic break; ic->ic_receive_state = ICL_CONN_STATE_DATA_DIGEST; - if (ic->ic_data_crc32c == false) + if (request->ip_data_len == 0 || ic->ic_data_crc32c == false) ic->ic_receive_len = 0; else ic->ic_receive_len = ISCSI_DATA_DIGEST_SIZE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402111158.s1BBwsi4067148>