All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	lksctp-dev <lksctp-developers@lists.sourceforge.net>,
	linux-sctp@vger.kernel.org
Subject: Re: [PATCH] SCTP: Initialize partial_bytes_acked to 0, when all of
Date: Thu, 17 Apr 2008 20:29:12 +0000	[thread overview]
Message-ID: <4807B318.2000307@hp.com> (raw)
In-Reply-To: <4805A2CA.7030808@cn.fujitsu.com>

Gui Jianfeng wrote:
> Vlad,
> According to RFC4960 7.2.2, 
> When all of the data transmitted by the sender has
> been acknowledged by the recerver, partial_bytes_acked is initialized to 0.
> 
> This patch conforms to rfc requirement. 
> Without this fix, cwnd might be error incremented.
> 
> Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
> ---
>  net/sctp/outqueue.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
> index c071446..cf79485 100644
> --- a/net/sctp/outqueue.c
> +++ b/net/sctp/outqueue.c
> @@ -1544,6 +1544,9 @@ static void sctp_check_transmitted(struct sctp_outq *q,
>  						  bytes_acked);
>  
>  			transport->flight_size -= bytes_acked;
> +			if (transport->flight_size = 0) {
> +				transport->partial_bytes_acked = 0;
> +			}
>  			q->outstanding_bytes -= bytes_acked;
>  		} else {
>  			/* RFC 2960 6.1, sctpimpguide-06 2.15.2

Loose the braces, otherwise looks good.

-vlad


  reply	other threads:[~2008-04-17 20:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-16  6:55 [PATCH] SCTP: Initialize partial_bytes_acked to 0, when all of the Gui Jianfeng
2008-04-17 20:29 ` Vlad Yasevich [this message]
2008-04-17 21:22   ` [PATCH] SCTP: Initialize partial_bytes_acked to 0, when all of David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4807B318.2000307@hp.com \
    --to=vladislav.yasevich@hp.com \
    --cc=davem@davemloft.net \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lksctp-developers@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.