From owner-svn-src-all@freebsd.org Wed Mar 1 08:01:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 863CECF2738; Wed, 1 Mar 2017 08:01:44 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CCA32859; Wed, 1 Mar 2017 08:01:43 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (220-253-188-71.dyn.iinet.net.au [220.253.188.71]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v2181bVD018360 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 1 Mar 2017 00:01:40 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r314465 - stable/11/sys/dev/iscsi To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201703010424.v214OU21019010@repo.freebsd.org> From: Julian Elischer Message-ID: Date: Wed, 1 Mar 2017 16:01:31 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <201703010424.v214OU21019010@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 08:01:44 -0000 Might be an idea to add a comment in a good place pointing out that that should not be unsigned so that the next person doesn't make the same mistake.. On 1/3/17 12:24 pm, Alexander Motin wrote: > 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 > >