From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net v2] mptcp: pr_debug: add missing \n at the end
Date: Wed, 21 Aug 2024 12:39:04 +0200 [thread overview]
Message-ID: <d6e10c7e-2ff1-4fcb-bae8-294d3d203882@kernel.org> (raw)
In-Reply-To: <ec12d8bb1e760327228fe9a08573ea0428daf8b2.camel@kernel.org>
Hi Geliang,
On 21/08/2024 08:46, Geliang Tang wrote:
> Hi Matt,
>
> On Mon, 2024-08-19 at 10:01 +0200, Matthieu Baerts (NGI0) wrote:
>> pr_debug() have been added in various places in MPTCP code to help
>> developers to debug some situations. With the dynamic debug feature,
>> it
>> is easy to enable all or some of them, and asks users to reproduce
>> issues with extra debug.
>>
>> Many of these pr_debug() don't end with a new line, while no
>> 'pr_cont()'
>> are used in MPTCP code. So the goal was not to display multiple debug
>> messages on one line: they were then not missing the '\n' on purpose.
>> Not having the new line at the end causes these messages to be
>> printed
>> with a delay, when something else needs to be printed. This issue is
>> not
>> visible when many messages need to be printed, but it is annoying and
>> confusing when only specific messages are expected, e.g.
>>
>> # echo "func mptcp_pm_add_addr_echoed +fmp" >
>> /sys/kernel/debug/dynamic_debug/control
>> # ./mptcp_join.sh "signal address"; \
>> echo "$(awk '{print $1}' /proc/uptime) - end"; \
>> sleep 5s; \
>> echo "$(awk '{print $1}' /proc/uptime) - restart"; \
>> ./mptcp_join.sh "signal address"
>> 013 signal address
>> (...)
>> 551.75 - end
>> 556.76 - restart
>> 013 signal address
>> [ 551.367935] mptcp:mptcp_pm_add_addr_echoed: MPTCP:
>> msk=000000000740d23c
>> (...)
>>
>> ## => a delay of 5 seconds.
>>
>> The 'Fixes' tag here below points to the first pr_debug() used
>> without
>> '\n' in net/mptcp. This patch could be split in many small ones, with
>> different Fixes tag, but it doesn't seem worth it, because it is easy
>> to
>> re-generate this patch with this simple 'sed' command:
>>
>> git grep -l pr_debug -- net/mptcp |
>> xargs sed -i "s/\(pr_debug(\".*[^n]\)\(\"[,)]\)/\1\\\n\2/g"
>>
>> So in case of conflicts, simply drop the modifications, and launch
>> this
>> command.
>>
>> Fixes: f870fa0b5768 ("mptcp: Add MPTCP socket stubs")
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
> Thanks for this v2. LGTM!
>
> Reviewed-by: Geliang Tang <geliang@kernel.org>
Thank you for the review!
New patches for t/upstream-net and t/upstream:
- adcccec8d800: mptcp: pr_debug: add missing \n at the end
- Results: 76f6fba9ef6b..ab5c53816256 (export-net)
- Results: 80d8c6b850fb..624d90dc5dca (export)
Tests are now in progress:
- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/d0a1f54fb2f9a9a0e2b6ea85fae9670ac4818469/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/f81bdeae843224cb42ef2613e833d46675d9e8c9/checks
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
prev parent reply other threads:[~2024-08-21 10:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 8:01 [PATCH mptcp-net v2] mptcp: pr_debug: add missing \n at the end Matthieu Baerts (NGI0)
2024-08-19 8:54 ` MPTCP CI
2024-08-19 10:21 ` MPTCP CI
2024-08-21 6:46 ` Geliang Tang
2024-08-21 10:39 ` Matthieu Baerts [this message]
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=d6e10c7e-2ff1-4fcb-bae8-294d3d203882@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox