svn commit: r314465 - stable/11/sys/dev/iscsi
Alexander Motin
mav at FreeBSD.org
Wed Mar 1 04:24:31 UTC 2017
Author: mav
Date: Wed Mar 1 04:24:30 2017
New Revision: 314465
URL: https://svnweb.freebsd.org/changeset/base/314465
Log:
MFC r313779: Fix handling of negative sbspace() return values.
I found that at least with Chelsio NICs TOE sockets quite often report
negative sbspace() values. Using unsigned variable to store it resulted
in attempts to aggregate too much data in one sosend() call, that caused
errors and following connection termination.
Modified:
stable/11/sys/dev/iscsi/icl_soft.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/iscsi/icl_soft.c
==============================================================================
--- stable/11/sys/dev/iscsi/icl_soft.c Wed Mar 1 04:24:24 2017 (r314464)
+++ stable/11/sys/dev/iscsi/icl_soft.c Wed Mar 1 04:24:30 2017 (r314465)
@@ -892,7 +892,7 @@ icl_conn_send_pdus(struct icl_conn *ic,
{
struct icl_pdu *request, *request2;
struct socket *so;
- size_t available, size, size2;
+ long available, size, size2;
int coalesced, error;
ICL_CONN_LOCK_ASSERT_NOT(ic);
@@ -931,7 +931,7 @@ icl_conn_send_pdus(struct icl_conn *ic,
if (available < size) {
#if 1
ICL_DEBUG("no space to send; "
- "have %zd, need %zd",
+ "have %ld, need %ld",
available, size);
#endif
so->so_snd.sb_lowat = size;
@@ -978,7 +978,7 @@ icl_conn_send_pdus(struct icl_conn *ic,
}
#if 0
if (coalesced > 1) {
- ICL_DEBUG("coalesced %d PDUs into %zd bytes",
+ ICL_DEBUG("coalesced %d PDUs into %ld bytes",
coalesced, size);
}
#endif
More information about the svn-src-stable-11
mailing list