All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [PATCH v3 12/13] mptcp: keep track of advertised windows right edge
Date: Fri, 02 Oct 2020 18:08:50 +0200	[thread overview]
Message-ID: <20201002160850.GC12773@breakpoint.cc> (raw)
In-Reply-To: 6e1d4bb3e0e972a65a7d9005ea633b239b4e3433.1601630384.git.pabeni@redhat.com

[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]

Paolo Abeni <pabeni(a)redhat.com> wrote:
> From: Florian Westphal <fw(a)strlen.de>
> 
> Before sending 'x' new bytes also check that the new snd_una would
> be within the permitted receive window.
> 
> For every ACK that also contains a DSS ack, check whether its tcp-level
> receive window would advance the current mptcp window right edge and
> update it if so.
> 
> Co-developed-by: Paolo Abeni <pabeni(a)redhat.com>
> Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
> Signed-off-by: Florian Westphal <fw(a)strlen.de>
> ---
>  net/mptcp/options.c  | 24 ++++++++++++++++++----
>  static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
>  			      struct mptcp_data_frag *dfrag,
>  			      struct mptcp_sendmsg_info *info)
>  {
>  	u64 data_seq = dfrag->data_seq + info->sent;
>  	struct mptcp_sock *msk = mptcp_sk(sk);
> +	bool zero_window_probe = false;
>  	struct mptcp_ext *mpext = NULL;
>  	struct sk_buff *skb, *tail;
>  	bool can_collapse = false;
> @@ -950,6 +976,14 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
>  			avail_size = info->size_goal - skb->len;
>  	}
>  
> +	/* Zero window and all data acked? Probe. */
> +	avail_size = mptcp_check_allowed_size(msk, data_seq, avail_size);
> +	if (avail_size == 0 && atomic64_read(&msk->snd_una) == msk->snd_nxt) {

This needs to check "!skb" (or !mpext) as well, now that this is not connected to
previous conditional anymore.

> @@ -973,6 +1007,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
>  	if (mpext && tail && mpext == skb_ext_find(tail, SKB_EXT_MPTCP)) {
>  		WARN_ON_ONCE(!can_collapse);
>  		mpext->data_len += ret;
> +		WARN_ON_ONCE(zero_window_probe);

I saw this trigger right now during a test run, should not happen
anymore after adding the check.

             reply	other threads:[~2020-10-02 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 16:08 Florian Westphal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-02 16:20 [MPTCP] Re: [PATCH v3 12/13] mptcp: keep track of advertised windows right edge Paolo Abeni
2020-10-02 23:13 Mat Martineau
2020-10-05  8:39 Matthieu Baerts

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=20201002160850.GC12773@breakpoint.cc \
    --to=unknown@example.com \
    /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.