All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>,
	MPTCP Upstream <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-next 4/4] selftests: mptcp: pm: get server-side flag
Date: Thu, 11 Sep 2025 10:35:09 +0200	[thread overview]
Message-ID: <1f62d970-631e-4031-a386-2b1db50642fb@kernel.org> (raw)
In-Reply-To: <20639f7f4b2616afaa4c4e511a13aa8ad49c8d90.camel@kernel.org>

Hi Geliang,

On 11/09/2025 10:16, Geliang Tang wrote:
> Hi Matt,
> 
> On Tue, 2025-09-09 at 18:30 +0200, Matthieu Baerts (NGI0) wrote:
>> server-side info linked to the MPTCP connect/established events can
>> now
>> come from the flags, in addition to the dedicated attribute.
>>
>> The attribute is now deprecated -- in favour of the new flag, and
>> will
>> be removed later on.
>>
>> Print this info only once.
>>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>> ---
>>  tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 9 ++++++++-
>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
>> b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
>> index
>> 93fea3442216c8fef43731a99c1d5710f234b150..d4981b76693bbddca74169437a5
>> 40ad6294cf1d5 100644
>> --- a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
>> +++ b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
>> @@ -2,6 +2,7 @@
>>  
>>  #include <errno.h>
>>  #include <error.h>
>> +#include <stdbool.h>
>>  #include <stdio.h>
>>  #include <stdlib.h>
>>  #include <string.h>
>> @@ -113,6 +114,8 @@ static int capture_events(int fd, int
>> event_group)
>>  		error(1, errno, "could not join the "
>> MPTCP_PM_EV_GRP_NAME " mcast group");
>>  
>>  	do {
>> +		bool server_side = false;
>> +
>>  		FD_ZERO(&rfds);
>>  		FD_SET(fd, &rfds);
>>  		res_len = NLMSG_ALIGN(sizeof(struct nlmsghdr)) +
>> @@ -187,18 +190,22 @@ static int capture_events(int fd, int
>> event_group)
>>  				else if (attrs->rta_type ==
>> MPTCP_ATTR_ERROR)
>>  					fprintf(stderr, ",error:%u",
>> *(__u8 *)RTA_DATA(attrs));
>>  				else if (attrs->rta_type ==
>> MPTCP_ATTR_SERVER_SIDE)
>> -					fprintf(stderr,
>> ",server_side:%u", *(__u8 *)RTA_DATA(attrs));
> 
> It is a little strange that server_side is displayed at the end. It
> changes the original display order.  It is better to display it in the
> original position, but check whether the server_side flag is false:

I'm not sure to understand why it is strange: the output is read by
scripts, the order should not matter, right?

Plus the order depends on what was received by the kernel, not where
they are printed here.

Do you really think it is worth it changing this patch and making longer
just to keep an order that we don't currently fully control here?

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2025-09-11  8:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 16:30 [PATCH mptcp-next 0/4] mptcp: pm: netlink: announce server-side flag Matthieu Baerts (NGI0)
2025-09-09 16:30 ` [PATCH mptcp-next 1/4] mptcp: pm: netlink: only add server-side attr when true Matthieu Baerts (NGI0)
2025-09-11  8:15   ` Geliang Tang
2025-09-11  8:20     ` Matthieu Baerts
2025-09-11  8:33       ` Geliang Tang
2025-09-11  8:37         ` Matthieu Baerts
2025-09-11  8:45           ` Geliang Tang
2025-09-11  9:28             ` Matthieu Baerts
2025-09-11  9:59               ` Geliang Tang
2025-09-09 16:30 ` [PATCH mptcp-next 2/4] mptcp: pm: netlink: announce server-side flag Matthieu Baerts (NGI0)
2025-09-09 16:30 ` [PATCH mptcp-next 3/4] mptcp: pm: netlink: deprecate server-side attribute Matthieu Baerts (NGI0)
2025-09-09 16:30 ` [PATCH mptcp-next 4/4] selftests: mptcp: pm: get server-side flag Matthieu Baerts (NGI0)
2025-09-11  8:16   ` Geliang Tang
2025-09-11  8:35     ` Matthieu Baerts [this message]
2025-09-11  9:04       ` Geliang Tang
2025-09-11  9:35         ` Matthieu Baerts
2025-09-11 10:05           ` Geliang Tang
2025-09-11 10:28             ` Matthieu Baerts
2025-09-09 18:58 ` [PATCH mptcp-next 0/4] mptcp: pm: netlink: announce " MPTCP CI
2025-09-11  8:14 ` Geliang Tang

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=1f62d970-631e-4031-a386-2b1db50642fb@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@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 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.