* [PATCH] SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
@ 2008-04-16 6:55 Gui Jianfeng
2008-04-17 20:29 ` Vlad Yasevich
0 siblings, 1 reply; 3+ messages in thread
From: Gui Jianfeng @ 2008-04-16 6:55 UTC (permalink / raw)
To: vladislav; +Cc: David Miller, netdev, lksctp-dev, linux-sctp
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
--
1.5.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
2008-04-16 6:55 [PATCH] SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked Gui Jianfeng
@ 2008-04-17 20:29 ` Vlad Yasevich
2008-04-17 21:22 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Vlad Yasevich @ 2008-04-17 20:29 UTC (permalink / raw)
To: Gui Jianfeng; +Cc: David Miller, netdev, lksctp-dev, linux-sctp
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-17 21:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-16 6:55 [PATCH] SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked Gui Jianfeng
2008-04-17 20:29 ` Vlad Yasevich
2008-04-17 21:22 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).