All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-next v3] selftests: mptcp: print stats before socket closure
Date: Tue, 8 Sep 2026 19:52:37 +0200	[thread overview]
Message-ID: <735a6655-b3ac-4352-8a35-0e54ac2c7ffd@kernel.org> (raw)
In-Reply-To: <24e7da3ea0b33d5dca970449cf615a4c95ecceb8.camel@kernel.org>

Hi Geliang,

On 05/09/2026 10:26, Geliang Tang wrote:
> Hi Matt,
> 
> On Sat, 2026-08-15 at 00:28 +0200, Matthieu Baerts (NGI0) wrote:
>> In case of poll timeout, it might be too late to print the stats
>> after
>> the socket closure.
>>
>> Now, in case of poll timeout, 'ss' and 'nstat' are invoked from
>> mptcp_connect to print the stats before exiting. This should help
>> debugging poll timeout issues.
>>
>> Note: for this "workaround", system() is used for debugging purposes
> 
> This print_err_stats() implementation is basically the same as
> mptcp_lib_pr_err_stats() in the shell, right?

Correct.

> I think it's better to use mptcp_lib_pr_err_stats() in the shell to
> print the information. In mptcp_connect.c, when a poll timeout occurs,
> we send a signal to the shell and don't close the socket immediately -
> we wait for the shell to finish printing the information before closing
> it. What do you think of this approach? There's a reference
> implementation in the attachment, but I haven't tested it.
Thank you for your review. I agree that what you suggested is better for
a tool that would be used in production. But here with the selftests, I
don't think we need your long patch with a higher complexity, just for
the selftests. I think it is fine to have some "system()" calls with the
same ss/nstat commands compared to a patch of 50+ lines to get the same
result. No?

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


  reply	other threads:[~2026-09-08 17:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 22:28 [PATCH mptcp-next v3] selftests: mptcp: print stats before socket closure Matthieu Baerts (NGI0)
2026-08-14 23:30 ` MPTCP CI
2026-09-05  8:26 ` Geliang Tang
2026-09-08 17:52   ` Matthieu Baerts [this message]
2026-09-21  7:52     ` 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=735a6655-b3ac-4352-8a35-0e54ac2c7ffd@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.