All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kishen Maloor <kishen.maloor@intel.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>, <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-next 08/21] mptcp: attempt to add listening sockets for announced addrs
Date: Tue, 4 Jan 2022 19:37:05 -0800	[thread overview]
Message-ID: <b4adf3be-20ea-7a9e-7c01-c500ed7214ff@intel.com> (raw)
In-Reply-To: <1d349ddc-a3bc-7d74-f626-737576af8e9a@tessares.net>

On 12/29/21 6:03 AM, Matthieu Baerts wrote:
> On 21/12/2021 08:34, Kishen Maloor wrote:
>> On 12/17/21 8:34 AM, Matthieu Baerts wrote:
>>> Hi Kishen,
>>>
>>> On 16/12/2021 23:23, Kishen Maloor wrote:
>>>> When ADD_ADDR announcements use the port associated with an
>>>> active subflow, this change ensures that a listening socket is
>>>> bound to the announced address and port for subsequently
>>>> receiving MP_JOINs from the remote end. In case there's
>>>> a recorded lsk bound to that address+port, it is reused.
>>>> But if a listening socket for this address is already held by the
>>>> application then no further action is taken.
>>>
>>> Do you think we should add an option not to do that?
>>
>> I can't immediately see why that would be necessary. I would think that a machine that
>> wants to restrict MPJs could choose to not issue ADD_ADDR advertisements. 
>> So it could be more a matter of path management policy?
> 
> Yes but likely, the PM is a daemon separated from apps creating
> connections. Maybe some apps want to add restrictions on purpose and it
> would not be practical for the PM to check what kind of lsk has been
> created to know if it has to send an ADD_ADDR (+ create a new lsk) or
> not to respect restrictions set by the linked app.

Yes, the PM daemon operates independently of the application and within the scope
of its namespace. The PM daemon could be the enforcement point for any application-specific
restrictions.

It could expose an API that applications call into to set PM policy (e.g. don't
advertise addresses over this connection), or may be the he admin/app deployment configures 
the PM as such for that namespace? 

The kernel PM has an API to set "limits" and I'm not sure what's its usage model wrt address
advertisements (like who decides to not add_addr on a machine running a client application?).
So userspace PMs could be modeled similarly but with much more fine-grained controls.

> 
>> However, for PMs that do issue ADD_ADDR messages, this change merely attempts to create
>> or reuse a (previously established) lsk (which was stored in the kernel context).
>> But if the lsk is held by the application, then no action is taken.
> 
> I didn't look what was the cost exactly -- probably a look-up in a table
> without locks? -- but maybe on a busy server, you don't want to do extra
> actions if you know they are not needed.

When one end of a connection issues ADD_ADDR messages, an attempt is made to
create a lsk or reuse a previously created lsk.
If the application happens to be listening on the wildcard address (which may be most of
the cases), then no lsk is created. 
You could say that this change is at its core mostly covering corner cases that were previously
left out.

If an ADD_ADDR message is not issued (based on PM policy, for e.g.), then I think essentially 
nothing extra happens.

> 
>> There's a separate change in the series to allow subflows to be initiated from either
>> end of the connection. So in a scenario where a machine that happens to be running a MPTCP 
>> client application issues an ADD_ADDR message (and reusing the subflow port), an lsk would
>> be created as a consequence of this change.
> 
> Even if it looks very unusual to me to create subflows from the server
> side, it is good to have this option! Thanks for adding it!
> But we can also have an option for these two changes :)
> 
> Cheers,
> Matt


  reply	other threads:[~2022-01-05  3:37 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 22:22 [PATCH mptcp-next 00/21] mptcp: support userspace path management Kishen Maloor
2021-12-16 22:22 ` [PATCH mptcp-next 01/21] mptcp: do not restrict subflows with non-kernel PMs Kishen Maloor
2021-12-16 22:22 ` [PATCH mptcp-next 02/21] mptcp: store remote id from MP_JOIN SYN/ACK in local ctx Kishen Maloor
2021-12-16 22:22 ` [PATCH mptcp-next 03/21] mptcp: reflect remote port (not 0) in ANNOUNCED events Kishen Maloor
2021-12-16 22:22 ` [PATCH mptcp-next 04/21] mptcp: establish subflows from either end of connection Kishen Maloor
2021-12-17 17:41   ` Paolo Abeni
2021-12-21  7:35     ` Kishen Maloor
2021-12-16 22:22 ` [PATCH mptcp-next 05/21] mptcp: netlink: store per namespace list of refcounted listen socks Kishen Maloor
2021-12-17 16:24   ` Matthieu Baerts
2021-12-16 22:22 ` [PATCH mptcp-next 06/21] mptcp: netlink: store lsk ref in mptcp_pm_addr_entry Kishen Maloor
2021-12-17 16:25   ` Matthieu Baerts
2021-12-21  7:29     ` Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 07/21] mptcp: netlink: process IPv6 addrs in creating listening sockets Kishen Maloor
2021-12-17 16:29   ` Matthieu Baerts
2021-12-21  7:32     ` Kishen Maloor
2021-12-21  9:45       ` Paolo Abeni
2021-12-22 20:27         ` Kishen Maloor
2021-12-29 13:52       ` Matthieu Baerts
2022-01-05  3:35         ` Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 08/21] mptcp: attempt to add listening sockets for announced addrs Kishen Maloor
2021-12-17 16:34   ` Matthieu Baerts
2021-12-21  7:34     ` Kishen Maloor
2021-12-29 14:03       ` Matthieu Baerts
2022-01-05  3:37         ` Kishen Maloor [this message]
2021-12-17 18:04   ` Paolo Abeni
2021-12-18  1:17     ` Mat Martineau
2021-12-21  7:44       ` Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 09/21] mptcp: allow ADD_ADDR reissuance by userspace PMs Kishen Maloor
2021-12-17 18:38   ` Paolo Abeni
2021-12-21  7:33     ` Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 10/21] mptcp: handle local addrs announced " Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 11/21] mptcp: read attributes of addr entries managed " Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 12/21] mptcp: netlink: split mptcp_pm_parse_addr into two functions Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 13/21] mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE Kishen Maloor
2021-12-17 18:39   ` Paolo Abeni
2021-12-16 22:23 ` [PATCH mptcp-next 14/21] mptcp: selftests: support MPTCP_PM_CMD_ANNOUNCE Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 15/21] mptcp: netlink: Add MPTCP_PM_CMD_REMOVE Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 16/21] mptcp: selftests: support MPTCP_PM_CMD_REMOVE Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 17/21] mptcp: netlink: allow userspace-driven subflow establishment Kishen Maloor
2021-12-17  2:52   ` kernel test robot
2021-12-17  2:52     ` kernel test robot
2021-12-17  5:46   ` kernel test robot
2021-12-17  5:46     ` kernel test robot
2021-12-16 22:23 ` [PATCH mptcp-next 18/21] mptcp: selftests: support MPTCP_PM_CMD_SUBFLOW_CREATE Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 19/21] mptcp: selftests: support MPTCP_PM_CMD_SUBFLOW_DESTROY Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 20/21] mptcp: selftests: capture netlink events Kishen Maloor
2021-12-16 22:23 ` [PATCH mptcp-next 21/21] selftests: mptcp: functional tests for the userspace PM type Kishen Maloor
2021-12-16 22:44   ` selftests: mptcp: functional tests for the userspace PM type: Build Failure 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=b4adf3be-20ea-7a9e-7c01-c500ed7214ff@intel.com \
    --to=kishen.maloor@intel.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 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.