Re: sctp: move chunk from retransmit queue to abandoned list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxx>
> ---
>  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,
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux