MPTCP Linux Development
 help / color / mirror / Atom feed
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: Geliang Tang <geliang.tang@suse.com>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v2 1/5] mptcp: update MIB_RMSUBFLOW in cmd_sf_destroy
Date: Mon, 13 Jun 2022 16:04:11 -0700 (PDT)	[thread overview]
Message-ID: <59e571be-7ce8-6af-4ebe-74c538446f29@linux.intel.com> (raw)
In-Reply-To: <982d63cf-8369-5f88-64bd-b59bc8c2f93f@tessares.net>

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

On Mon, 13 Jun 2022, Matthieu Baerts wrote:

> Hi Geliang,
>
> On 11/06/2022 16:54, Geliang Tang wrote:
>> This patch increases MPTCP_MIB_RMSUBFLOW mib counter in userspace pm
>> destroy subflow function mptcp_nl_cmd_sf_destroy() when removing subflow.
>>
>> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
>> ---
>>  net/mptcp/pm_userspace.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
>> index f56378e4f597..ebbab5200290 100644
>> --- a/net/mptcp/pm_userspace.c
>> +++ b/net/mptcp/pm_userspace.c
>> @@ -5,6 +5,7 @@
>>   */
>>
>>  #include "protocol.h"
>> +#include "mib.h"
>>
>>  void mptcp_free_local_addr_list(struct mptcp_sock *msk)
>>  {
>> @@ -418,6 +419,7 @@ int mptcp_nl_cmd_sf_destroy(struct sk_buff *skb, struct genl_info *info)
>>
>>  		mptcp_subflow_shutdown(sk, ssk, RCV_SHUTDOWN | SEND_SHUTDOWN);
>>  		mptcp_close_ssk(sk, ssk, subflow);
>> +		__MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_RMSUBFLOW);
>
> It looks like this instruction is causing quite a bit of issues
> according to the public CI:
>
> - KVM Validation: normal:
>  - Critical: 7 Call Trace(s) ❌:
>  - Task: https://cirrus-ci.com/task/5443636765655040
>  - Summary:
> https://api.cirrus-ci.com/v1/artifact/task/5443636765655040/summary/summary.txt
>
>
> I guess you should use MPTCP_INC_STATS() instead.

+1

>
>
> Side note: I don't know if it is a good idea to increment MIB counters
> from the PM code (any pm*.c files). I think this should only be done
> from "core" functions in protocol.c and subflow.c (+ options.c of
> course). Or from new helpers declared in protocol.h. WDYT?
>

Could you elaborate some more on this? There's some existing MIB counter 
code in the pm*.c files that doesn't seem too out of place - is the idea 
that moving calls to the core it would reduce duplicated code in 
pm_netlink.c and pm_userspace.c?


--
Mat Martineau
Intel

  reply	other threads:[~2022-06-13 23:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11 14:54 [PATCH mptcp-next v2 0/5] mptcp_join userspace pm tests Geliang Tang
2022-06-11 14:54 ` [PATCH mptcp-next v2 1/5] mptcp: update MIB_RMSUBFLOW in cmd_sf_destroy Geliang Tang
2022-06-13  7:25   ` Matthieu Baerts
2022-06-13 23:04     ` Mat Martineau [this message]
2022-06-15 12:36       ` Matthieu Baerts
2022-06-11 14:54 ` [PATCH mptcp-next v2 2/5] selftests: mptcp: userspace pm address tests Geliang Tang
2022-06-13 22:59   ` Mat Martineau
2022-06-11 14:54 ` [PATCH mptcp-next v2 3/5] selftests: mptcp: userspace pm subflow tests Geliang Tang
2022-06-11 14:54 ` [PATCH mptcp-next v2 4/5] selftests: mptcp: avoid Terminated messages in userspace_pm Geliang Tang
2022-06-11 14:54 ` [PATCH mptcp-next v2 5/5] selftests: mptcp: update pm_nl_ctl usage header Geliang Tang
2022-06-11 16:55   ` selftests: mptcp: update pm_nl_ctl usage header: Tests Results 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=59e571be-7ce8-6af-4ebe-74c538446f29@linux.intel.com \
    --to=mathew.j.martineau@linux.intel.com \
    --cc=geliang.tang@suse.com \
    --cc=matthieu.baerts@tessares.net \
    --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