linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: linux-sctp@vger.kernel.org
Subject: Re: sctp: move chunk from retransmit queue to abandoned list
Date: Fri, 15 Jan 2010 15:31:04 +0000	[thread overview]
Message-ID: <4B508A38.2010703@hp.com> (raw)
In-Reply-To: <4B4FE548.9070705@cn.fujitsu.com>



Wei Yongjun wrote:
> 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.

I think it might be better to move this to sctp_outq_flush_rtx().
Then we can reduce this to just the sctp_chunk_abandoned() check.

Remember, retransmit_mark is not executed that often.  Also, if
we have move then one chunk on the retransmit queue, some part of
the queue may expire without us ever running retransmit_mark() again.
However, when we flush the queue, we should check for timed out chunks
just like when we flush the outqueue.

-vlad

> 
> 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,

  reply	other threads:[~2010-01-15 15:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-15  3:47 sctp: move chunk from retransmit queue to abandoned list Wei Yongjun
2010-01-15 15:31 ` Vlad Yasevich [this message]
2010-01-18  4:51 ` Wei Yongjun
2010-01-19 19:50 ` Vlad Yasevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B508A38.2010703@hp.com \
    --to=vladislav.yasevich@hp.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).