MPTCP Linux Development
 help / color / mirror / Atom feed
From: Martin KaFai Lau <martin.lau@linux.dev>
To: Matthieu Baerts <matttbe@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>,
	Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [PATCH mptcp-next 2/2] selftests/bpf: Add getsockopt to inspect mptcp subflow
Date: Wed, 21 Aug 2024 16:54:07 -0700	[thread overview]
Message-ID: <f8bc2ce4-e6c5-4a8a-82b0-b01495fc2f80@linux.dev> (raw)
In-Reply-To: <689e3694-d8f9-4511-8363-6f83a3bb1a1d@kernel.org>

On 8/21/24 2:37 AM, Matthieu Baerts wrote:
> Hi Geliang,
> 
> Thank you for your reply!
> 
> On 21/08/2024 10:00, Geliang Tang wrote:
>> On Tue, 2024-08-20 at 11:48 +0200, Matthieu Baerts wrote:
>>> On 20/08/2024 10:44, Geliang Tang wrote:
> (...)
> 
>>>> diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c
>>>> b/tools/testing/selftests/bpf/prog_tests/mptcp.c
>>>> index 69fdcb28249d..2178db94f764 100644
>>>> --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
>>>> +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
>>>> @@ -383,6 +383,7 @@ static void run_subflow(char *new)
>>>>   {
>>>>   	int server_fd, client_fd, err;
>>>>   	char cc[TCP_CA_NAME_MAX];
>>>> +	unsigned int mark;
>>>>   	socklen_t len;
>>>>   
>>>>   	server_fd = start_mptcp_server(AF_INET, ADDR_1, PORT_1,
>>>> 0);
>>>> @@ -407,6 +408,10 @@ static void run_subflow(char *new)
>>>>   	ASSERT_OK(ss_search(ADDR_1, new), "ss_search new cc");
>>>>   	ASSERT_OK(ss_search(ADDR_2, cc), "ss_search default cc");
>>> I guess the next steps is to remove these 'ss_search()', right?
>> We can keep it for double checks.
> I would not mind, even if 'ss | grep' is used in other BPF tests, but I
> understood from Martin he prefers not to depend on external tools as
> much as possible. It should indeed ease the maintenance.

I would prefer to avoid the 'ss | grep'. The other bpf selftests using this "ss 
| grep" should be in the .sh which is not in the test_progs and not run by bpf 
CI. They are there to loop-waiting for something. The ss usage hopefully will be 
removed when eventually migrating the .sh tests to test_progs. At least the one 
in test_tc_tunnel.sh should be doable once moved to test_progs. Haven't looked 
at the test_xdp_features.sh yet.

Thanks for trying the getsockopt approach and it turns out working well.

  reply	other threads:[~2024-08-21 23:54 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
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 [this message]
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=f8bc2ce4-e6c5-4a8a-82b0-b01495fc2f80@linux.dev \
    --to=martin.lau@linux.dev \
    --cc=geliang@kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=matttbe@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