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 1/2] Squash to "selftests/bpf: Add mptcp subflow subtest"
Date: Tue, 20 Aug 2024 10:53:13 +0200 [thread overview]
Message-ID: <02ff5460-4170-48c1-a01a-b6842525efcd@kernel.org> (raw)
In-Reply-To: <1c6d49faee85ac8e046b79c3aa060a1170d4d54d.1724142917.git.tanggeliang@kylinos.cn>
Hi Geliang,
On 20/08/2024 10:44, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> Close client_fd as Martin suggested.
>
> Please update my email address of this patch squashed to as:
>
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> since BPF CI complained about it:
>
> WARNING: From:/Signed-off-by: email address mismatch: 'From: Geliang Tang <geliang@kernel.org>' != 'Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>'
Good point, I will try not to forget about that!
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> tools/testing/selftests/bpf/prog_tests/mptcp.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
> index 9d4e3c1d4e7b..69fdcb28249d 100644
> --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
> +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
> @@ -383,7 +383,7 @@ static void run_subflow(char *new)
> {
> int server_fd, client_fd, err;
> char cc[TCP_CA_NAME_MAX];
> - socklen_t len = sizeof(cc);
> + socklen_t len;
>
> server_fd = start_mptcp_server(AF_INET, ADDR_1, PORT_1, 0);
> if (!ASSERT_GE(server_fd, 0, "start_mptcp_server"))
> @@ -393,9 +393,12 @@ static void run_subflow(char *new)
> if (!ASSERT_GE(client_fd, 0, "connect to fd"))
> goto fail;
>
> + len = sizeof(cc);
> err = getsockopt(server_fd, SOL_TCP, TCP_CONGESTION, cc, &len);
> - if (!ASSERT_OK(err, "getsockopt(srv_fd, TCP_CONGESTION)"))
> + if (!ASSERT_OK(err, "getsockopt(server_fd, TCP_CONGESTION)")) {
> + close(client_fd);
Probably better to keep the traditional way of dealing with errors: by
having only one exit path. In other words, can you replace the 'goto
fail' here by another one: "goto close_client" (vs "goto close_server")?
> goto fail;
> + }
>
> send_byte(client_fd);
>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-08-20 8:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 8:44 [PATCH mptcp-next 0/2] fixes for "new MPTCP subflow subtest v4" Geliang Tang
2024-08-20 8:44 ` [PATCH mptcp-next 1/2] Squash to "selftests/bpf: Add mptcp subflow subtest" Geliang Tang
2024-08-20 8:53 ` Matthieu Baerts [this message]
2024-08-20 8:44 ` [PATCH mptcp-next 2/2] selftests/bpf: Add getsockopt to inspect mptcp subflow Geliang Tang
2024-08-20 9:48 ` Matthieu Baerts
2024-08-21 8:00 ` Geliang Tang
2024-08-21 9:37 ` Matthieu Baerts
2024-08-21 23:54 ` Martin KaFai Lau
2024-08-26 2:57 ` Geliang Tang
2024-08-26 8:44 ` Matthieu Baerts
2024-08-26 9:24 ` Geliang Tang
2024-08-26 9:49 ` Matthieu Baerts
2024-08-26 10:40 ` Geliang Tang
2024-08-27 5:22 ` Martin KaFai Lau
2024-09-04 10:20 ` Geliang Tang
2024-08-20 9:43 ` [PATCH mptcp-next 0/2] fixes for "new MPTCP subflow subtest v4" 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=02ff5460-4170-48c1-a01a-b6842525efcd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox