All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: linux-sctp@vger.kernel.org
Subject: Re: undetected closed apps
Date: Fri, 20 Dec 2013 18:44:55 +0000	[thread overview]
Message-ID: <52B49027.9030508@mojatatu.com> (raw)
In-Reply-To: <52AC7375.6010505@mojatatu.com>

On 12/19/13 13:16, Vlad Yasevich wrote:


I can confirm this fixes the issue. Thanks!

Tested-by: Jamal Hadi Salim <jhs@mojatatu.com>

cheers,
jamal

> diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
> index b6b09f3..31c8124 100644
> --- a/net/sctp/outqueue.c
> +++ b/net/sctp/outqueue.c
> @@ -721,6 +721,7 @@ static int sctp_outq_flush(struct sctp_outq *q, int
> rtx_timeout)
>   	int error = 0;
>   	int start_timer = 0;
>   	int one_packet = 0;
> +	int empty = 1;
>
>   	/* These transports have chunks to send. */
>   	struct list_head transport_list;
> @@ -1064,8 +1065,6 @@ static int sctp_outq_flush(struct sctp_outq *q,
> int rtx_timeout)
>
>   			sctp_transport_reset_timers(transport);
>
> -			q->empty = 0;
> -
>   			/* Only let one DATA chunk get bundled with a
>   			 * COOKIE-ECHO chunk.
>   			 */
> @@ -1081,12 +1080,13 @@ static int sctp_outq_flush(struct sctp_outq *q,
> int rtx_timeout)
>
>   sctp_flush_out:
>
> +	empty = (list_empty(&q->out_chunk_list) &&
> +		 list_empty(&q->retransmit));
> +
>   	/* Before returning, examine all the transports touched in
> -	 * this call.  Right now, we bluntly force clear all the
> -	 * transports.  Things might change after we implement Nagle.
> -	 * But such an examination is still required.
> -	 *
> -	 * --xguo
> +	 * this call.  If anything is still in the packet of the transport,
> +	 * flush it now.  Also, make sure that if we sent any DATA, we
> +	 * correctly track the queue empty state.
>   	 */
>   	while ((ltransport = sctp_list_dequeue(&transport_list)) != NULL ) {
>   		struct sctp_transport *t = list_entry(ltransport,
> @@ -1098,7 +1098,11 @@ sctp_flush_out:
>
>   		/* Clear the burst limited state, if any */
>   		sctp_transport_burst_reset(t);
> +
> +		if (empty)
> +			empty = empty && list_empty(&t->transmitted);
>   	}
> +	q->empty = empty;
>
>   	return error;
>   }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


      parent reply	other threads:[~2013-12-20 18:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-14 15:04 undetected closed apps Jamal Hadi Salim
2013-12-14 15:16 ` Jamal Hadi Salim
2013-12-14 15:27 ` Jamal Hadi Salim
2013-12-14 17:06 ` Michael Tuexen
2013-12-14 17:21 ` Jamal Hadi Salim
2013-12-14 17:23 ` Michael Tuexen
2013-12-14 17:36 ` Jamal Hadi Salim
2013-12-14 18:35 ` Jamal Hadi Salim
2013-12-14 18:47 ` Michael Tuexen
2013-12-14 19:09 ` Jamal Hadi Salim
2013-12-14 19:27 ` Jamal Hadi Salim
2013-12-14 20:06 ` Michael Tuexen
2013-12-15 15:21 ` Jamal Hadi Salim
2013-12-15 15:32 ` Michael Tuexen
2013-12-15 19:08 ` Jamal Hadi Salim
2013-12-16 15:19 ` Vlad Yasevich
2013-12-17 13:49 ` Jamal Hadi Salim
2013-12-17 15:11 ` Vlad Yasevich
2013-12-18 12:30 ` Jamal Hadi Salim
2013-12-18 17:58 ` Vlad Yasevich
2013-12-19 14:26 ` Jamal Hadi Salim
2013-12-19 17:24 ` Vlad Yasevich
2013-12-19 18:16 ` Vlad Yasevich
2013-12-20 12:23 ` Jamal Hadi Salim
2013-12-20 12:29 ` Jamal Hadi Salim
2013-12-20 17:00 ` Jamal Hadi Salim
2013-12-20 18:44 ` Jamal Hadi Salim [this message]

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=52B49027.9030508@mojatatu.com \
    --to=jhs@mojatatu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.