Skip to contentSkip to conversation

SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.

PATCH In review Gui Jianfeng 3 participants 3 messages Apr 16, 2008 – Apr 17, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.

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.

---
 net/sctp/outqueue.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/sctp/outqueue.c +3 -0
index c071446..cf79485 100644
@@ -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
Signature · 1 line
1.5.3
#1 lore raw
Quoted 18 lines · Gui Jianfeng

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.

---
 net/sctp/outqueue.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/sctp/outqueue.c +0 -0
index c071446..cf79485 100644

net/sctp/outqueue.c static void sctp_check_transmitted(struct sctp_outq *q, · line 1552

Quoted 9 lines
net/sctp/outqueue.c +3 -0
@@ -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

maintainer
#2 lore raw

From: Vlad Yasevich <[email protected]>
Date: Thu, 17 Apr 2008 16:29:12 -0400

Quoted 1 line

Loose the braces, otherwise looks good.

I took care of this an applied to net-2.6.26, thanks.