From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v3 2/2] mptcp: add TCP_MAXSEG sockopt support
Date: Wed, 30 Apr 2025 11:06:11 +0200 [thread overview]
Message-ID: <d514f88c-cead-4975-9dd2-55a7b4ba8bcf@kernel.org> (raw)
In-Reply-To: <cdc5f6389f230f8c1eec4332c27efbf51c734a51.1745991978.git.geliang@kernel.org>
On 30/04/2025 07:49, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> The TCP_MAXSEG socket option is currently not supported by MPTCP, mainly
> because it has never been requested before. But there are still valid
> use-cases, e.g. with HAProxy.
>
> This patch adds its support in MPTCP by propagating the value to all
> subflows.
>
> Similar to mptcp_setsockopt_first_sf_only(), a generic helper
> mptcp_setsockopt_all_subflows() is added to set sockopt for each
> subflows of the mptcp socket.
>
> Add a new member for struct mptcp_sock to store the TCP_MAXSEG value,
> and return this value in getsockopt.
>
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/515
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> net/mptcp/protocol.h | 1 +
> net/mptcp/sockopt.c | 25 +++++++++++++++++++++++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 64aa091cb685..91aaed17fe56 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -327,6 +327,7 @@ struct mptcp_sock {
> int keepalive_cnt;
> int keepalive_idle;
> int keepalive_intvl;
> + int maxseg;
> struct work_struct work;
> struct sk_buff *ooo_last_skb;
> struct rb_root out_of_order_queue;
> diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
> index afa54fba51e2..5a002dd05cc9 100644
> --- a/net/mptcp/sockopt.c
> +++ b/net/mptcp/sockopt.c
> @@ -798,6 +798,22 @@ static int mptcp_setsockopt_first_sf_only(struct mptcp_sock *msk, int level, int
> return ret;
> }
>
> +static int mptcp_setsockopt_all_subflows(struct mptcp_sock *msk, int level, int optname,
Checkpatch was complaining about this line because we were over 80
chars. I just did a modification to avoid that, and while at it, I also
use 'mptcp_setsockopt_all_sf', similar to 'first_sf_only' and what was
suggested there:
https://patchwork.kernel.org/project/mptcp/patch/20230707-mptcp-unify-sockopt-issue-353-v1-5-693e15c06646@tessares.net/
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-04-30 9:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 5:49 [PATCH mptcp-next v3 0/2] Add TCP_MAXSEG socket option support Geliang Tang
2025-04-30 5:49 ` [PATCH mptcp-next v3 1/2] tcp: add tcp_sock_set_maxseg Geliang Tang
2025-04-30 5:49 ` [PATCH mptcp-next v3 2/2] mptcp: add TCP_MAXSEG sockopt support Geliang Tang
2025-04-30 8:55 ` Matthieu Baerts
2025-05-06 2:36 ` Geliang Tang
2025-04-30 9:06 ` Matthieu Baerts [this message]
2025-04-30 5:49 ` [PATCH mptcp-next] mptcp: validate maxseg sockopt Geliang Tang
2025-04-30 7:15 ` MPTCP CI
2025-04-30 7:31 ` MPTCP CI
2025-04-30 9:42 ` Matthieu Baerts
2025-05-08 7:21 ` Geliang Tang
2025-05-08 9:05 ` 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=d514f88c-cead-4975-9dd2-55a7b4ba8bcf@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=tanggeliang@kylinos.cn \
/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.