From: Wei Yongjun Date: Tue, 19 Apr 2011 21:32:28 +0000 (+0000) Subject: sctp: move chunk from retransmit queue to abandoned list X-Git-Tag: v3.0-rc1~377^2~276 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=4c6a6f42131dd750dcfe3c71e63bfc046e5a227e;p=~shefty%2Frdma-dev.git sctp: move chunk from retransmit queue to abandoned list If there is still data waiting to retransmit and remain in retransmit queue, while doing the next retransmit, if the chunk is abandoned, we should move it to abandoned list. Signed-off-by: Wei Yongjun Signed-off-by: Vlad Yasevich Signed-off-by: David S. Miller --- diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 3e9d8d2bbe7..1c88c8911dc 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ -577,6 +577,13 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, * try to send as much as possible. */ list_for_each_entry_safe(chunk, chunk1, lqueue, transmitted_list) { + /* If the chunk is abandoned, move it to abandoned list. */ + if (sctp_chunk_abandoned(chunk)) { + list_del_init(&chunk->transmitted_list); + sctp_insert_list(&q->abandoned, + &chunk->transmitted_list); + continue; + } /* Make sure that Gap Acked TSNs are not retransmitted. A * simple approach is just to move such TSNs out of the