aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/outqueue.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2016-10-07 23:36:05 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-13 09:44:13 -0400
commitcc6ac9bccf6b9814d37932e86a92f8e6a92960dc (patch)
treeac905a2010a6d2835d5bbea5e2541c590190aaf4 /net/sctp/outqueue.c
parent0f505b1ae6794242240e40f7904c8b345fa38c41 (diff)
sctp: reuse sent_count to avoid retransmitted chunks for RTT measurements
Now sctp uses chunk->resent to record if a chunk is retransmitted, for RTT measurements with retransmitted DATA chunks. chunk->sent_count was introduced to record how many times one chunk has been sent for prsctp RTX policy before. We actually can know if one chunk is retransmitted by checking chunk->sent_count is greater than 1. This patch is to remove resent from sctp_chunk and reuse sent_count to avoid retransmitted chunks for RTT measurements. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r--net/sctp/outqueue.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 582585393d35..e54082699520 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -507,8 +507,6 @@ void sctp_retransmit_mark(struct sctp_outq *q,
507 transport->rto_pending = 0; 507 transport->rto_pending = 0;
508 } 508 }
509 509
510 chunk->resent = 1;
511
512 /* Move the chunk to the retransmit queue. The chunks 510 /* Move the chunk to the retransmit queue. The chunks
513 * on the retransmit queue are always kept in order. 511 * on the retransmit queue are always kept in order.
514 */ 512 */
@@ -1439,7 +1437,7 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1439 * instance). 1437 * instance).
1440 */ 1438 */
1441 if (!tchunk->tsn_gap_acked && 1439 if (!tchunk->tsn_gap_acked &&
1442 !tchunk->resent && 1440 !sctp_chunk_retransmitted(tchunk) &&
1443 tchunk->rtt_in_progress) { 1441 tchunk->rtt_in_progress) {
1444 tchunk->rtt_in_progress = 0; 1442 tchunk->rtt_in_progress = 0;
1445 rtt = jiffies - tchunk->sent_at; 1443 rtt = jiffies - tchunk->sent_at;