MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v1 5/6] mptcp: pm: add remote parameter for set_flags
Date: Thu, 27 Feb 2025 13:26:25 +0100	[thread overview]
Message-ID: <ab65f523-302e-4a06-a990-1bc90eb49560@kernel.org> (raw)
In-Reply-To: <10ce66a82baec7e37fcde50554c1a0f0f2a9da6a.1740638334.git.tanggeliang@kylinos.cn>

Hi Geliang,

On 27/02/2025 07:43, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> The remote address of set_flags() interface is useful for userspace PM,
> but unused in in-kernel PM.
> 
> But an additional "changed" parameter needs to be passed to set_flags() of
> in-kernel PM. One option is to add a "u8 changed" parameter to set_flags()
> interface:
> 
> 	set_flags(struct mptcp_pm_addr_entry *local,
> 		  struct mptcp_addr_info *remote,
> 		  u8 changed)
> 
> A better option is to add a struct mptcp_pm_addr_entry "remote" parameter
> for set_flags(), so that "remote->addr" can be used for userspace PM, and
> "remote->flags" can be used for in-kernel PM to replace the additional
> "changed" parameter.

I don't think I understand why we need this modification.

The 'set_flags' netlink command is there to change the behaviour of the
in-kernel PM and the userspace PM. It will certainly not be useful for a
BPF PM because all its configurations will be done via BPF, not via
Netlink. If the userspace send this Netlink command when a BPF PM will
be used, nothing will happen:
- if a token is specified, the userspace PM should not do anything if it
is not the designated PM for this connection.
- if not, the in-kernel PM will only modify the connections handled by
the in-kernel PM.

The in-kernel and userspace PMs use the same command, but for different
things, hence requiring different parameters: e.g. the userspace one
requires the token because the modification will be only for one
connection, while the in-kernel will be for a specific endpoint.

So the current code looks OK: in the common part (pm.c), only the common
attributes are parsed. On the userspace side, extra parameter will be
parsed, that's fine. On the in-kernel side, 'changed' will be looked at
simply because there is no need to iterate over all the connections if
nothing has changed on the corresponding endpoint side. In other words,
I don't think the code should be changed, no?

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


  reply	other threads:[~2025-02-27 12:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-27  6:43 [PATCH mptcp-next v1 0/6] BPF path manager, part 5 Geliang Tang
2025-02-27  6:43 ` [PATCH mptcp-next v1 1/6] mptcp: pm: use pm variable instead of msk->pm Geliang Tang
2025-02-27  6:43 ` [PATCH mptcp-next v1 2/6] mptcp: pm: userspace: drop is_userspace in free_local_addr_list Geliang Tang
2025-02-27 11:44   ` Matthieu Baerts
2025-02-27  6:43 ` [PATCH mptcp-next v1 3/6] mptcp: pm: drop is_kernel in alloc_anno_list Geliang Tang
2025-02-27  6:43 ` [PATCH mptcp-next v1 4/6] mptcp: pm: in-kernel: drop is_userspace in remove_id_zero Geliang Tang
2025-02-27 12:10   ` Matthieu Baerts
2025-02-27  6:43 ` [PATCH mptcp-next v1 5/6] mptcp: pm: add remote parameter for set_flags Geliang Tang
2025-02-27 12:26   ` Matthieu Baerts [this message]
2025-02-27  6:43 ` [PATCH mptcp-next v1 6/6] mptcp: pm: in-kernel: drop changed parameter of set_flags Geliang Tang
2025-02-27 12:30   ` Matthieu Baerts
2025-02-28  7:56   ` kernel test robot
2025-02-27  7:04 ` [PATCH mptcp-next v1 0/6] BPF path manager, part 5 MPTCP CI
2025-02-27  7:48 ` 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=ab65f523-302e-4a06-a990-1bc90eb49560@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=tanggeliang@kylinos.cn \
    /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