netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: sctp: set chunk->tsn_gap_acked at the end of cycle
@ 2013-11-22  7:49 Chang Xiangzhong
  2013-11-22 12:10 ` Neil Horman
  2013-11-22 14:27 ` Vlad Yasevich
  0 siblings, 2 replies; 8+ messages in thread
From: Chang Xiangzhong @ 2013-11-22  7:49 UTC (permalink / raw)
  To: vyasevich, nhorman, davem
  Cc: linux-sctp, netdev, linux-kernel, Chang Xiangzhong

tsn_gap_acked is an important state flag in chunk, which indicates if the
chunk has been acked in gap reports before. SFR-CACC algorithm depends on this
variable. So set this at the end of each iteration, otherwise the SFR-CACC
algorithm would never be toggled.

Signed-off-by: Chang Xiangzhong <changxiangzhong@gmail.com>
---
 net/sctp/outqueue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 1b494fa..bff828c 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -1396,7 +1396,6 @@ static void sctp_check_transmitted(struct sctp_outq *q,
 			 * while DATA was outstanding).
 			 */
 			if (!tchunk->tsn_gap_acked) {
-				tchunk->tsn_gap_acked = 1;
 				if (TSN_lt(*highest_new_tsn_in_sack, tsn))
 					*highest_new_tsn_in_sack = tsn;
 				bytes_acked += sctp_data_size(tchunk);
@@ -1460,6 +1459,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
 				 */
 				list_add_tail(lchunk, &tlist);
 			}
+
+			tchunk->tsn_gap_acked = 1;
 		} else {
 			if (tchunk->tsn_gap_acked) {
 				pr_debug("%s: receiver reneged on data TSN:0x%x\n",
-- 
1.8.4.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-23 19:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22  7:49 [PATCH] net: sctp: set chunk->tsn_gap_acked at the end of cycle Chang Xiangzhong
2013-11-22 12:10 ` Neil Horman
2013-11-22 14:27 ` Vlad Yasevich
2013-11-22 19:24   ` Chang
2013-11-22 22:48     ` Vlad Yasevich
2013-11-23  8:22       ` Chang
2013-11-23 11:14       ` Chang
2013-11-23 19:37         ` Vlad Yasevich

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).