netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	 David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Neil Spring <ntspring@fb.com>,
	 David Gibson <david@gibson.dropbear.id.au>,
	Stefano Brivio <sbrivio@redhat.com>
Subject: Re: [PATCH v2 net] tcp: fix mid stream window clamp.
Date: Tue, 5 Dec 2023 11:32:25 +0100	[thread overview]
Message-ID: <CANn89iL6FsYSjEMN_yLaZRDMQ3dUV2di6Va2aUH79p9RQhJSKA@mail.gmail.com> (raw)
In-Reply-To: <705dad54e6e6e9a010e571bf58e0b35a8ae70503.1701706073.git.pabeni@redhat.com>

On Mon, Dec 4, 2023 at 5:08 PM Paolo Abeni <pabeni@redhat.com> wrote:
>
> After the blamed commit below, if the user-space application performs
> window clamping when tp->rcv_wnd is 0, the TCP socket will never be
> able to announce a non 0 receive window, even after completely emptying
> the receive buffer and re-setting the window clamp to higher values.
>
> Refactor tcp_set_window_clamp() to address the issue: when the user
> decreases the current clamp value, set rcv_ssthresh according to the
> same logic used at buffer initialization, but ensuring reserved mem
> provisioning.
>
> To avoid code duplication factor-out the relevant bits from
> tcp_adjust_rcv_ssthresh() in a new helper and reuse it in the above
> scenario.
>
> When increasing the clamp value, give the rcv_ssthresh a chance to grow
> according to previously implemented heuristic.
>
> Fixes: 3aa7857fe1d7 ("tcp: enable mid stream window clamp")
> Reported-by: David Gibson <david@gibson.dropbear.id.au>
> Reported-by: Stefano Brivio <sbrivio@redhat.com>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Reviewed-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2023-12-05 10:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 16:08 [PATCH v2 net] tcp: fix mid stream window clamp Paolo Abeni
2023-12-05 10:32 ` Eric Dumazet [this message]
2023-12-06  4:20 ` patchwork-bot+netdevbpf

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=CANn89iL6FsYSjEMN_yLaZRDMQ3dUV2di6Va2aUH79p9RQhJSKA@mail.gmail.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=david@gibson.dropbear.id.au \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ntspring@fb.com \
    --cc=pabeni@redhat.com \
    --cc=sbrivio@redhat.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 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).