public inbox for mptcp@lists.linux.dev
 help / color / mirror / Atom feed
From: Geliang Tang <geliang@kernel.org>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
	MPTCP Upstream <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-next 11/11] selftests: mptcp: connect cleanup TFO setup
Date: Sun, 28 Dec 2025 10:59:02 +0800	[thread overview]
Message-ID: <052b88ccb1d8a3ebb64b196a75db3a616023f606.camel@kernel.org> (raw)
In-Reply-To: <20251226-mptcp-issue-603-v1-11-bb30e331b839@kernel.org>

Hi Matt,

Thanks for this patch.

On Fri, 2025-12-26 at 07:40 +0100, Matthieu Baerts (NGI0) wrote:
> To the TFO, only the file descriptor is needed, the family is not.
> 
> Also, the error can be handled the same way when 'sendto()' or
> 'connect()' are used. Only the printed error message is different.
> 
> This avoids a bit of confusions.
> 
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

LGTM!

    Reviewed-by: Geliang Tang <geliang@kernel.org>

-Geliang

> ---
>  tools/testing/selftests/net/mptcp/mptcp_connect.c | 17 +++++++------
> ----
>  1 file changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c
> b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> index 27a93a25b142..6d2eb5cf8539 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> @@ -258,7 +258,7 @@ static void set_transparent(int fd, int pf)
>  	}
>  }
>  
> -static void set_mptfo(int fd, int pf)
> +static void set_mptfo(int fd)
>  {
>  	int qlen = 25;
>  
> @@ -335,7 +335,7 @@ static int sock_listen_mptcp(const char * const
> listenaddr,
>  			set_transparent(sock, pf);
>  
>  		if (cfg_sockopt_types.mptfo)
> -			set_mptfo(sock, pf);
> +			set_mptfo(sock);
>  
>  		if (bind(sock, a->ai_addr, a->ai_addrlen) == 0)
>  			break; /* success */
> @@ -406,21 +406,18 @@ static int sock_connect_mptcp(const char *
> const remoteaddr,
>  				*peer = a;
>  				break; /* success */
>  			}
> +			perror("sendto()");
>  		} else {
>  			if (connect(sock, a->ai_addr, a->ai_addrlen)
> == 0) {
>  				*peer = a;
>  				break; /* success */
>  			}
> -		}
> -		if (cfg_sockopt_types.mptfo) {
> -			perror("sendto()");
> -			close(sock);
> -			sock = -1;
> -		} else {
>  			perror("connect()");
> -			close(sock);
> -			sock = -1;
>  		}
> +
> +		/* error */
> +		close(sock);
> +		sock = -1;
>  	}
>  
>  	freeaddrinfo(addr);

  reply	other threads:[~2025-12-28  2:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-26  6:40 [PATCH mptcp-next 00/11] mptcp: avoid dup events + error + misc Matthieu Baerts (NGI0)
2025-12-26  6:40 ` [PATCH mptcp-next 01/11] mptcp: avoid dup SUB_CLOSED events after disconnect Matthieu Baerts (NGI0)
2026-01-04  3:15   ` Geliang Tang
2025-12-26  6:40 ` [PATCH mptcp-next 02/11] selftests: mptcp: check no dup close events after error Matthieu Baerts (NGI0)
2026-01-04  3:17   ` Geliang Tang
2025-12-26  6:40 ` [PATCH mptcp-next 03/11] mptcp: only reset subflow errors when propagated Matthieu Baerts (NGI0)
2026-01-04  3:30   ` Geliang Tang
2026-01-04  4:00     ` Geliang Tang
2025-12-26  6:40 ` [PATCH mptcp-next 04/11] selftests: mptcp: check subflow errors in close events Matthieu Baerts (NGI0)
2025-12-26  6:40 ` [PATCH mptcp-next 05/11] selftests: mptcp: join: wait for estab event instead of MPJ Matthieu Baerts (NGI0)
2025-12-28  2:41   ` Geliang Tang
2025-12-26  6:40 ` [PATCH mptcp-next 06/11] selftests: mptcp: join: fix wait_mpj helper Matthieu Baerts (NGI0)
2025-12-26  6:40 ` [PATCH mptcp-next 07/11] selftests: mptcp: join: userspace: wait for new events Matthieu Baerts (NGI0)
2025-12-28  2:48   ` Geliang Tang
2026-01-26 18:59     ` Matthieu Baerts
2025-12-26  6:40 ` [PATCH mptcp-next 08/11] selftests: mptcp: join chk_stale_nr: avoid dup stats Matthieu Baerts (NGI0)
2025-12-28  2:25   ` Geliang Tang
2025-12-28  4:43     ` Geliang Tang
2025-12-26  6:40 ` [PATCH mptcp-next 09/11] selftests: mptcp: join: avoid declaring i if not used Matthieu Baerts (NGI0)
2025-12-28  2:51   ` Geliang Tang
2025-12-26  6:40 ` [PATCH mptcp-next 10/11] selftests: mptcp: connect: fix maybe-uninitialize warn Matthieu Baerts (NGI0)
2025-12-28  2:54   ` Geliang Tang
2026-01-26 19:02     ` Matthieu Baerts
2025-12-26  6:40 ` [PATCH mptcp-next 11/11] selftests: mptcp: connect cleanup TFO setup Matthieu Baerts (NGI0)
2025-12-28  2:59   ` Geliang Tang [this message]
2025-12-26  7:51 ` [PATCH mptcp-next 00/11] mptcp: avoid dup events + error + misc MPTCP CI

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=052b88ccb1d8a3ebb64b196a75db3a616023f606.camel@kernel.org \
    --to=geliang@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    /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