From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yongjun Date: Wed, 20 Apr 2011 07:32:28 +0000 Subject: [PATCH net-next-2.6 9/9] sctp: move chunk from retransmit queue to Message-Id: <4DAE8C0C.8090506@cn.fujitsu.com> List-Id: References: <4DAE8A27.3040007@cn.fujitsu.com> In-Reply-To: <4DAE8A27.3040007@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Miller Cc: "netdev@vger.kernel.org" , lksctp 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 --- net/sctp/outqueue.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 3e9d8d2..1c88c89 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 -- 1.6.5.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yongjun Subject: [PATCH net-next-2.6 9/9] sctp: move chunk from retransmit queue to abandoned list Date: Wed, 20 Apr 2011 15:32:28 +0800 Message-ID: <4DAE8C0C.8090506@cn.fujitsu.com> References: <4DAE8A27.3040007@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" , lksctp To: David Miller Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:51529 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752148Ab1DTHca (ORCPT ); Wed, 20 Apr 2011 03:32:30 -0400 In-Reply-To: <4DAE8A27.3040007@cn.fujitsu.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 --- net/sctp/outqueue.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 3e9d8d2..1c88c89 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 -- 1.6.5.2