MPTCP Linux Development
 help / color / mirror / Atom feed
* [PATCH mptcp-net] mptcp: avoid printing warning once on client side
@ 2024-02-15 15:06 Matthieu Baerts (NGI0)
  2024-02-15 15:54 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Matthieu Baerts (NGI0) @ 2024-02-15 15:06 UTC (permalink / raw)
  To: mptcp; +Cc: Paolo Abeni, Matthieu Baerts (NGI0)

After the 'Fixes' commit mentioned below, the client side might print
the following warning once when a subflow is fully established at the
reception of any valid additional ack:

  MPTCP: bogus mpc option on established client sk

That's a normal situation, and no warning should be printed for that. We
can then skip the check when the label is used.

Fixes: e4a0fa47e816 ("mptcp: corner case locking for rx path fields initialization")
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Notes:
 - Should we convert this pr_warn_once() to a WARN_ONCE()? Or just in
   our tree? Or just in DEBUG mode?
---
 net/mptcp/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 23e317ffc901..27ca42c77b02 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -981,10 +981,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 	if (mp_opt->deny_join_id0)
 		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
 
-set_fully_established:
 	if (unlikely(!READ_ONCE(msk->pm.server_side)))
 		pr_warn_once("bogus mpc option on established client sk");
 
+set_fully_established:
 	mptcp_data_lock((struct sock *)msk);
 	__mptcp_subflow_fully_established(msk, subflow, mp_opt);
 	mptcp_data_unlock((struct sock *)msk);

---
base-commit: 52e05de42e1094a943053af93ea08c51a44091f7
change-id: 20240215-mptcp-fix-bogus-pr-warn-497a3537984b

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: mptcp: avoid printing warning once on client side: Tests Results
  2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
@ 2024-02-15 15:54 ` MPTCP CI
  2024-02-15 16:20 ` MPTCP CI
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: MPTCP CI @ 2024-02-15 15:54 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp

Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (GitHub Action) did some validations and here is its report:

- KVM Validation: normal:
  - Critical: 1 Call Trace(s) - Critical: Unexpected stop of the VM ❌:
  - Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7918253003

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/39cb90ad6cf5


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: mptcp: avoid printing warning once on client side: Tests Results
  2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
  2024-02-15 15:54 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
@ 2024-02-15 16:20 ` MPTCP CI
  2024-02-15 16:43 ` MPTCP CI
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: MPTCP CI @ 2024-02-15 16:20 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp

Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (Cirrus) did some validations with a debug kernel and here is its report:

- KVM Validation: debug (except selftest_mptcp_join):
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/5453570070282240
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5453570070282240/summary/summary.txt

- KVM Validation: debug (only selftest_mptcp_join):
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/6579469977124864
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/6579469977124864/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/39cb90ad6cf5


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: mptcp: avoid printing warning once on client side: Tests Results
  2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
  2024-02-15 15:54 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
  2024-02-15 16:20 ` MPTCP CI
@ 2024-02-15 16:43 ` MPTCP CI
  2024-02-15 23:25 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Mat Martineau
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: MPTCP CI @ 2024-02-15 16:43 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp

Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (GitHub Action) did some validations and here is its report:

- KVM Validation: normal:
  - Success! ✅:
  - Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7918253003

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/39cb90ad6cf5


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH mptcp-net] mptcp: avoid printing warning once on client side
  2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
                   ` (2 preceding siblings ...)
  2024-02-15 16:43 ` MPTCP CI
@ 2024-02-15 23:25 ` Mat Martineau
  2024-02-16 10:42   ` Matthieu Baerts
  2024-02-16  0:24 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Mat Martineau @ 2024-02-15 23:25 UTC (permalink / raw)
  To: Matthieu Baerts (NGI0); +Cc: mptcp, Paolo Abeni

On Thu, 15 Feb 2024, Matthieu Baerts (NGI0) wrote:

> After the 'Fixes' commit mentioned below, the client side might print
> the following warning once when a subflow is fully established at the
> reception of any valid additional ack:
>
>  MPTCP: bogus mpc option on established client sk
>
> That's a normal situation, and no warning should be printed for that. We
> can then skip the check when the label is used.
>
> Fixes: e4a0fa47e816 ("mptcp: corner case locking for rx path fields initialization")
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Looks good to me:

Reviewed-by: Mat Martineau <martineau@kernel.org>

> ---
> Notes:
> - Should we convert this pr_warn_once() to a WARN_ONCE()? Or just in
>   our tree? Or just in DEBUG mode?

I think it makes sense to keep this patch minimal for -net and stable 
(just moving the label).

Also given the consequences of panic_on_warn, would be better to make any 
changes to WARN_ONCE() in mptcp-next/net-next. I don't see extra 
complexity to modify this warning in our tree or debug mode as being worth 
it, do you think it would be valuable?

- Mat

> ---
> net/mptcp/options.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index 23e317ffc901..27ca42c77b02 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -981,10 +981,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
> 	if (mp_opt->deny_join_id0)
> 		WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
>
> -set_fully_established:
> 	if (unlikely(!READ_ONCE(msk->pm.server_side)))
> 		pr_warn_once("bogus mpc option on established client sk");
>
> +set_fully_established:
> 	mptcp_data_lock((struct sock *)msk);
> 	__mptcp_subflow_fully_established(msk, subflow, mp_opt);
> 	mptcp_data_unlock((struct sock *)msk);
>
> ---
> base-commit: 52e05de42e1094a943053af93ea08c51a44091f7
> change-id: 20240215-mptcp-fix-bogus-pr-warn-497a3537984b
>
> Best regards,
> -- 
> Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: mptcp: avoid printing warning once on client side: Tests Results
  2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
                   ` (3 preceding siblings ...)
  2024-02-15 23:25 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Mat Martineau
@ 2024-02-16  0:24 ` MPTCP CI
  2024-02-16  0:45 ` MPTCP CI
  2024-02-16 10:46 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts
  6 siblings, 0 replies; 12+ messages in thread
From: MPTCP CI @ 2024-02-16  0:24 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp

Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (GitHub Action) did some validations and here is its report:

- KVM Validation: normal:
  - Unstable: 1 failed test(s): packetdrill_regressions 🔴:
  - Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/7923753742

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/70f039ef7f55


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: mptcp: avoid printing warning once on client side: Tests Results
  2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
                   ` (4 preceding siblings ...)
  2024-02-16  0:24 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
@ 2024-02-16  0:45 ` MPTCP CI
  2024-02-16 10:46 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts
  6 siblings, 0 replies; 12+ messages in thread
From: MPTCP CI @ 2024-02-16  0:45 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp

Hi Matthieu,

Thank you for your modifications, that's great!

Our CI (Cirrus) did some validations with a debug kernel and here is its report:

- KVM Validation: debug (except selftest_mptcp_join):
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/5597464493817856
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5597464493817856/summary/summary.txt

- KVM Validation: debug (only selftest_mptcp_join):
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/6723364400660480
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/6723364400660480/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/70f039ef7f55


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH mptcp-net] mptcp: avoid printing warning once on client side
  2024-02-15 23:25 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Mat Martineau
@ 2024-02-16 10:42   ` Matthieu Baerts
  2024-02-16 11:23     ` Paolo Abeni
  0 siblings, 1 reply; 12+ messages in thread
From: Matthieu Baerts @ 2024-02-16 10:42 UTC (permalink / raw)
  To: Mat Martineau; +Cc: mptcp, Paolo Abeni

Hi Mat,

On 16/02/2024 00:25, Mat Martineau wrote:
> On Thu, 15 Feb 2024, Matthieu Baerts (NGI0) wrote:
> 
>> After the 'Fixes' commit mentioned below, the client side might print
>> the following warning once when a subflow is fully established at the
>> reception of any valid additional ack:
>>
>>  MPTCP: bogus mpc option on established client sk
>>
>> That's a normal situation, and no warning should be printed for that. We
>> can then skip the check when the label is used.
>>
>> Fixes: e4a0fa47e816 ("mptcp: corner case locking for rx path fields
>> initialization")
>> Suggested-by: Paolo Abeni <pabeni@redhat.com>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> 
> Looks good to me:
> 
> Reviewed-by: Mat Martineau <martineau@kernel.org>

Thank you for the review!

>> ---
>> Notes:
>> - Should we convert this pr_warn_once() to a WARN_ONCE()? Or just in
>>   our tree? Or just in DEBUG mode?
> 
> I think it makes sense to keep this patch minimal for -net and stable
> (just moving the label).
> 
> Also given the consequences of panic_on_warn, would be better to make
> any changes to WARN_ONCE() in mptcp-next/net-next. I don't see extra
> complexity to modify this warning in our tree or debug mode as being
> worth it, do you think it would be valuable?

Sorry, I'm a bit confused by your reply. For the moment, our CI
complains when a "Call Trace:" is printed, but it doesn't complain when
there is a pr_warn().

If the warning here can be caused by interactions with a buggy host, it
makes sense not to have a WARN() when used in production, but it would
be good for our CI can catch that. If the warning can only be caused by
an internal bug, then easier to use a WARN_ONCE().

So I think here, we could maybe convert it to a DEBUG_NET_WARN_ON_ONCE()
and upstream that. WDYT?

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH mptcp-net] mptcp: avoid printing warning once on client side
  2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
                   ` (5 preceding siblings ...)
  2024-02-16  0:45 ` MPTCP CI
@ 2024-02-16 10:46 ` Matthieu Baerts
  6 siblings, 0 replies; 12+ messages in thread
From: Matthieu Baerts @ 2024-02-16 10:46 UTC (permalink / raw)
  To: mptcp, Mat Martineau; +Cc: Paolo Abeni

Hi Mat,

On 15/02/2024 16:06, Matthieu Baerts (NGI0) wrote:
> After the 'Fixes' commit mentioned below, the client side might print
> the following warning once when a subflow is fully established at the
> reception of any valid additional ack:
> 
>   MPTCP: bogus mpc option on established client sk
> 
> That's a normal situation, and no warning should be printed for that. We
> can then skip the check when the label is used.
> 
> Fixes: e4a0fa47e816 ("mptcp: corner case locking for rx path fields initialization")
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Thank you for the review!

Now in our tree (fixes for -net):

New patches for t/upstream-net and t/upstream:
- 738c16c9c6f1: mptcp: avoid printing warning once on client side
- Results: 8acc1a7e7787..f2ba4d61dbc4 (export-net)
- Results: 8cc4e9d608dd..0b8245446c36 (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export-net/20240216T104440
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20240216T104440

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH mptcp-net] mptcp: avoid printing warning once on client side
  2024-02-16 10:42   ` Matthieu Baerts
@ 2024-02-16 11:23     ` Paolo Abeni
  2024-02-16 11:33       ` Matthieu Baerts
  0 siblings, 1 reply; 12+ messages in thread
From: Paolo Abeni @ 2024-02-16 11:23 UTC (permalink / raw)
  To: Matthieu Baerts, Mat Martineau; +Cc: mptcp

On Fri, 2024-02-16 at 11:42 +0100, Matthieu Baerts wrote:
> Hi Mat,
> 
> On 16/02/2024 00:25, Mat Martineau wrote:
> > On Thu, 15 Feb 2024, Matthieu Baerts (NGI0) wrote:
> > 
> > > After the 'Fixes' commit mentioned below, the client side might print
> > > the following warning once when a subflow is fully established at the
> > > reception of any valid additional ack:
> > > 
> > >  MPTCP: bogus mpc option on established client sk
> > > 
> > > That's a normal situation, and no warning should be printed for that. We
> > > can then skip the check when the label is used.
> > > 
> > > Fixes: e4a0fa47e816 ("mptcp: corner case locking for rx path fields
> > > initialization")
> > > Suggested-by: Paolo Abeni <pabeni@redhat.com>
> > > Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> > 
> > Looks good to me:
> > 
> > Reviewed-by: Mat Martineau <martineau@kernel.org>
> 
> Thank you for the review!
> 
> > > ---
> > > Notes:
> > > - Should we convert this pr_warn_once() to a WARN_ONCE()? Or just in
> > >   our tree? Or just in DEBUG mode?
> > 
> > I think it makes sense to keep this patch minimal for -net and stable
> > (just moving the label).
> > 
> > Also given the consequences of panic_on_warn, would be better to make
> > any changes to WARN_ONCE() in mptcp-next/net-next. I don't see extra
> > complexity to modify this warning in our tree or debug mode as being
> > worth it, do you think it would be valuable?
> 
> Sorry, I'm a bit confused by your reply. For the moment, our CI
> complains when a "Call Trace:" is printed, but it doesn't complain when
> there is a pr_warn().
> 
> If the warning here can be caused by interactions with a buggy host, it
> makes sense not to have a WARN() when used in production, but it would
> be good for our CI can catch that. If the warning can only be caused by
> an internal bug, then easier to use a WARN_ONCE().

We can trigger the warning due to either:
* local S/W bug
* bugged/malicious peer.

I think we should avoid a WARN there.

> So I think here, we could maybe convert it to a DEBUG_NET_WARN_ON_ONCE()
> and upstream that. WDYT?

DEBUG_NET is quite lightweight and could be enabled even in production,
that should be an export-branch only change.

Cheers,

Paolo




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH mptcp-net] mptcp: avoid printing warning once on client side
  2024-02-16 11:23     ` Paolo Abeni
@ 2024-02-16 11:33       ` Matthieu Baerts
  2024-02-16 19:59         ` Mat Martineau
  0 siblings, 1 reply; 12+ messages in thread
From: Matthieu Baerts @ 2024-02-16 11:33 UTC (permalink / raw)
  To: Paolo Abeni, Mat Martineau; +Cc: mptcp

Hi Paolo,

Thank you for your reply!

On 16/02/2024 12:23, Paolo Abeni wrote:
> On Fri, 2024-02-16 at 11:42 +0100, Matthieu Baerts wrote:
>> On 16/02/2024 00:25, Mat Martineau wrote:
>>> On Thu, 15 Feb 2024, Matthieu Baerts (NGI0) wrote:

(...)

>>>> Notes:
>>>> - Should we convert this pr_warn_once() to a WARN_ONCE()? Or just in
>>>>   our tree? Or just in DEBUG mode?
>>>
>>> I think it makes sense to keep this patch minimal for -net and stable
>>> (just moving the label).
>>>
>>> Also given the consequences of panic_on_warn, would be better to make
>>> any changes to WARN_ONCE() in mptcp-next/net-next. I don't see extra
>>> complexity to modify this warning in our tree or debug mode as being
>>> worth it, do you think it would be valuable?
>>
>> Sorry, I'm a bit confused by your reply. For the moment, our CI
>> complains when a "Call Trace:" is printed, but it doesn't complain when
>> there is a pr_warn().
>>
>> If the warning here can be caused by interactions with a buggy host, it
>> makes sense not to have a WARN() when used in production, but it would
>> be good for our CI can catch that. If the warning can only be caused by
>> an internal bug, then easier to use a WARN_ONCE().
> 
> We can trigger the warning due to either:
> * local S/W bug
> * bugged/malicious peer.
> 
> I think we should avoid a WARN there.
> 
>> So I think here, we could maybe convert it to a DEBUG_NET_WARN_ON_ONCE()
>> and upstream that. WDYT?
> 
> DEBUG_NET is quite lightweight and could be enabled even in production,

Ah OK, I didn't know that!

> that should be an export-branch only change.

Fine by me! I appreciate your suggestion.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH mptcp-net] mptcp: avoid printing warning once on client side
  2024-02-16 11:33       ` Matthieu Baerts
@ 2024-02-16 19:59         ` Mat Martineau
  0 siblings, 0 replies; 12+ messages in thread
From: Mat Martineau @ 2024-02-16 19:59 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: Paolo Abeni, mptcp

[-- Attachment #1: Type: text/plain, Size: 2061 bytes --]

On Fri, 16 Feb 2024, Matthieu Baerts wrote:

> Hi Paolo,
>
> Thank you for your reply!
>
> On 16/02/2024 12:23, Paolo Abeni wrote:
>> On Fri, 2024-02-16 at 11:42 +0100, Matthieu Baerts wrote:
>>> On 16/02/2024 00:25, Mat Martineau wrote:
>>>> On Thu, 15 Feb 2024, Matthieu Baerts (NGI0) wrote:
>
> (...)
>
>>>>> Notes:
>>>>> - Should we convert this pr_warn_once() to a WARN_ONCE()? Or just in
>>>>>   our tree? Or just in DEBUG mode?
>>>>
>>>> I think it makes sense to keep this patch minimal for -net and stable
>>>> (just moving the label).
>>>>
>>>> Also given the consequences of panic_on_warn, would be better to make
>>>> any changes to WARN_ONCE() in mptcp-next/net-next. I don't see extra
>>>> complexity to modify this warning in our tree or debug mode as being
>>>> worth it, do you think it would be valuable?
>>>
>>> Sorry, I'm a bit confused by your reply. For the moment, our CI
>>> complains when a "Call Trace:" is printed, but it doesn't complain when
>>> there is a pr_warn().
>>>

Ok, I didn't realize our CI ignored pr_warn() output so didn't really see 
the motivation for switching to the WARN() macro - but did want to make 
sure (at a minimum) that you weren't proposing WARN() for a -net patch.

>>> If the warning here can be caused by interactions with a buggy host, it
>>> makes sense not to have a WARN() when used in production, but it would
>>> be good for our CI can catch that. If the warning can only be caused by
>>> an internal bug, then easier to use a WARN_ONCE().

This makes sense - I agree it's better for CI to catch it.

>>
>> We can trigger the warning due to either:
>> * local S/W bug
>> * bugged/malicious peer.
>>
>> I think we should avoid a WARN there.
>>
>>> So I think here, we could maybe convert it to a DEBUG_NET_WARN_ON_ONCE()
>>> and upstream that. WDYT?
>>
>> DEBUG_NET is quite lightweight and could be enabled even in production,
>
> Ah OK, I didn't know that!
>
>> that should be an export-branch only change.
>

+1

> Fine by me! I appreciate your suggestion.
>

Thanks Paolo and Matthieu


- Mat

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-02-16 19:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 15:06 [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts (NGI0)
2024-02-15 15:54 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
2024-02-15 16:20 ` MPTCP CI
2024-02-15 16:43 ` MPTCP CI
2024-02-15 23:25 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Mat Martineau
2024-02-16 10:42   ` Matthieu Baerts
2024-02-16 11:23     ` Paolo Abeni
2024-02-16 11:33       ` Matthieu Baerts
2024-02-16 19:59         ` Mat Martineau
2024-02-16  0:24 ` mptcp: avoid printing warning once on client side: Tests Results MPTCP CI
2024-02-16  0:45 ` MPTCP CI
2024-02-16 10:46 ` [PATCH mptcp-net] mptcp: avoid printing warning once on client side Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox