All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Cambda Zhu <cambda@linux.alibaba.com>
Cc: netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	 Jason Xing <kerneljasonxing@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	 David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	 Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Dust Li <dust.li@linux.alibaba.com>,
	 Tony Lu <tonylu@linux.alibaba.com>,
	Jack Yang <mingliang@linux.alibaba.com>
Subject: Re: [PATCH net v3] tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
Date: Sat, 27 May 2023 11:03:43 +0200	[thread overview]
Message-ID: <CANn89iLHO7Cma9kdjVTkAy8Z3QvdG-8U4=ob=TSofA5nojWV+w@mail.gmail.com> (raw)
In-Reply-To: <20230527040317.68247-1-cambda@linux.alibaba.com>

On Sat, May 27, 2023 at 6:04 AM Cambda Zhu <cambda@linux.alibaba.com> wrote:
>
> This patch replaces the tp->mss_cache check in getting TCP_MAXSEG
> with tp->rx_opt.user_mss check for CLOSE/LISTEN sock. Since
> tp->mss_cache is initialized with TCP_MSS_DEFAULT, checking if
> it's zero is probably a bug.
>
> With this change, getting TCP_MAXSEG before connecting will return
> default MSS normally, and return user_mss if user_mss is set.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Reported-by: Jack Yang <mingliang@linux.alibaba.com>
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Link: https://lore.kernel.org/netdev/CANn89i+3kL9pYtkxkwxwNMzvC_w3LNUum_2=3u+UyLBmGmifHA@mail.gmail.com/#t
> Signed-off-by: Cambda Zhu <cambda@linux.alibaba.com>
> Link: https://lore.kernel.org/netdev/14D45862-36EA-4076-974C-EA67513C92F6@linux.alibaba.com/
> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
> ---

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

  reply	other threads:[~2023-05-27  9:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-27  4:03 [PATCH net v3] tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set Cambda Zhu
2023-05-27  9:03 ` Eric Dumazet [this message]
2023-05-30  5: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='CANn89iLHO7Cma9kdjVTkAy8Z3QvdG-8U4=ob=TSofA5nojWV+w@mail.gmail.com' \
    --to=edumazet@google.com \
    --cc=cambda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=dust.li@linux.alibaba.com \
    --cc=kerneljasonxing@gmail.com \
    --cc=kuba@kernel.org \
    --cc=mingliang@linux.alibaba.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=xuanzhuo@linux.alibaba.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.