linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sctp: move chunk from retransmit queue to abandoned list
@ 2010-01-15  3:47 Wei Yongjun
  2010-01-15 15:31 ` Vlad Yasevich
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wei Yongjun @ 2010-01-15  3:47 UTC (permalink / raw)
  To: linux-sctp

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 <yjwei@cn.fujitsu.com>
---
 net/sctp/outqueue.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 229690f..8092032 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -390,6 +390,18 @@ void sctp_retransmit_mark(struct sctp_outq *q,
 	struct list_head *lchunk, *ltemp;
 	struct sctp_chunk *chunk;
 
+	/* Walk through the retransmit queue */
+	list_for_each_safe(lchunk, ltemp, &q->retransmit) {
+		chunk = list_entry(lchunk, struct sctp_chunk,
+				   transmitted_list);
+
+		/* If the chunk is abandoned, move it to abandoned list. */
+		if (sctp_chunk_abandoned(chunk)) {
+			list_del_init(lchunk);
+			sctp_insert_list(&q->abandoned, lchunk);
+		}
+	}
+
 	/* Walk through the specified transmitted queue.  */
 	list_for_each_safe(lchunk, ltemp, &transport->transmitted) {
 		chunk = list_entry(lchunk, struct sctp_chunk,
-- 
1.6.2.2



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

end of thread, other threads:[~2010-01-19 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15  3:47 sctp: move chunk from retransmit queue to abandoned list Wei Yongjun
2010-01-15 15:31 ` Vlad Yasevich
2010-01-18  4:51 ` Wei Yongjun
2010-01-19 19:50 ` 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).