All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Paolo Abeni <pabeni@redhat.com>, Kishen Maloor <kishen.maloor@intel.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v3 7/8] mptcp: attempt to add listening sockets for announced addrs
Date: Tue, 1 Feb 2022 18:25:11 +0100	[thread overview]
Message-ID: <1b10e9d2-cc63-efe9-2488-29a66ebaaaad@tessares.net> (raw)
In-Reply-To: <2a4c2a567359b839aacd3d56d8a7734af5479747.camel@redhat.com>

Hi Paolo, Kishen,

On 01/02/2022 12:42, Paolo Abeni wrote:
> On Thu, 2022-01-27 at 19:38 -0500, 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 addr+port in the kernel for subsequently receiving
>> MP_JOINs. But if a listening socket for this address is already held
>> by the application then no action is taken.
>>
>> A listening socket is created (when there isn't a listener)
>> just prior to the addr advertisement. If it is desired to not create
>> a listening socket in the kernel for an address, then this can be
>> requested by including the MPTCP_PM_ADDR_FLAG_NO_LISTEN flag
>> with the address.
>>
>> When a listening socket is created, it is stored in
>> struct mptcp_pm_add_entry and released accordingly.
>>
>> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/203
>> Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
>> ---
>> v2: fixed formatting
>> v3: added new addr flag MPTCP_PM_ADDR_FLAG_NO_LISTEN to skip creating a
>> listening socket in the kernel during an ADD_ADDR request, use this flag
>> along the in-kernel PM flow for ADD_ADDR requests (Note: listening sockets
>> are always created for port-based endpoints as before), use the
>> lsk_list_find_or_create() helper
> 
> I think it's better introducing the opposite flag (e.g.
> 'MPTCP_PM_ADDR_FLAG_LISTEN') otherwise this will change the default
> behavior

Maybe it is fine to change the behaviour. Without changing the user
exposed API of course.

I mean: it all depends if we consider the fact that when the userspace
closes the listening socket to accept new "MPTCP" connections, it is not
normal (bug) to close the possibility to create new subflows → socket
controlled by the user vs socket controlled by the PM. If we do consider
this as a "bug", then that's OK to change the default behaviour, no?

I don't know if other people are sharing my view here.

For me, if an app closes the listening socket after having accepted a
new connection, it is just not to receive new "main" connections on this
socket but it is OK to accept new subflows as they are part of existing
connections (and managed by the PM).
We would then avoid people hitting issues like #203. If you hit this
issue, it is not easy to find the answer I think.

If people know they don't need/want the creation of a listening socket
only to accept new subflows, they can set the NO_LISTEN flag when adding
an address with "ip mptcp". But if the cost is minimal most of the time
because no additional listening sockets will be actually created, that's
fine to use a "NO_LISTEN" flag I think.

WDYT?

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

  reply	other threads:[~2022-02-01 17:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  0:38 [PATCH mptcp-next v3 0/8] mptcp: fixes and enhancements related to path management Kishen Maloor
2022-01-28  0:38 ` [PATCH mptcp-next v3 1/8] mptcp: do not restrict subflows with non-kernel PMs Kishen Maloor
2022-01-28  0:38 ` [PATCH mptcp-next v3 2/8] mptcp: store remote id from MP_JOIN SYN/ACK in local ctx Kishen Maloor
2022-01-28  0:38 ` [PATCH mptcp-next v3 3/8] mptcp: reflect remote port (not 0) in ANNOUNCED events Kishen Maloor
2022-01-28  4:07   ` Geliang Tang
2022-01-31 22:22     ` Kishen Maloor
2022-01-28  0:38 ` [PATCH mptcp-next v3 4/8] mptcp: establish subflows from either end of connection Kishen Maloor
2022-01-28  0:38 ` [PATCH mptcp-next v3 5/8] mptcp: netlink: store per namespace list of refcounted listen socks Kishen Maloor
2022-01-28  0:38 ` [PATCH mptcp-next v3 6/8] mptcp: netlink: store lsk ref in mptcp_pm_addr_entry Kishen Maloor
2022-02-01 11:31   ` Paolo Abeni
2022-02-01 21:19     ` Kishen Maloor
2022-01-28  0:38 ` [PATCH mptcp-next v3 7/8] mptcp: attempt to add listening sockets for announced addrs Kishen Maloor
2022-02-01 11:42   ` Paolo Abeni
2022-02-01 17:25     ` Matthieu Baerts [this message]
2022-02-01 21:21       ` Kishen Maloor
2022-02-02  1:18         ` Mat Martineau
2022-01-28  0:38 ` [PATCH mptcp-next v3 8/8] mptcp: expose server_side attribute in MPTCP netlink events Kishen Maloor

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=1b10e9d2-cc63-efe9-2488-29a66ebaaaad@tessares.net \
    --to=matthieu.baerts@tessares.net \
    --cc=kishen.maloor@intel.com \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /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.