From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: Eric Dumazet <edumazet@google.com>, mptcp@lists.01.org
Subject: [RFC PATCH 0/2] tcp: factor out a couple of helpers
Date: Fri, 16 Oct 2020 12:51:06 +0200 [thread overview]
Message-ID: <cover.1602840570.git.pabeni@redhat.com> (raw)
Upcoming improvement in MPTCP subflows management will require to keep write
data enqueued at the MPTCP level. As a side effect, such data could be sent
via orphaned TCP subflows after close().
To implement the above MPTCP needs to cope directly with memory allocation
failures in do_tcp_sendpages(). The solution proposed in patch 1/2
is to factor-out the relevant slice of do_tcp_sendpages().
Other possible alternatives could be:
- duplicating the relevant code inside MPTCP (will require exposing a few
additional TCP helpers)
or
- add an explicit check for orphaned socket in do_tcp_sendpages()
Additionally, due to the above, we will need to dispose of already orphaned
TCP subflows, avoiding racing with tcp_done(). We need to check the
subflow status and destroy it atomically. The solution proposed in patch 2/2
is to factor-out the unlocked body of tcp_close().
These changes are part of a quite larger MPTCP series, with all the other
patches touching only MPTCP code. To hopefully simplify the review, such
patches are not included here. Please advice if you prefer otherwise
- e.g. the whole series as RFC.
Paolo Abeni (2):
tcp: factor out tcp_build_frag()
tcp: factor out __tcp_close() helper
include/net/tcp.h | 4 ++
net/ipv4/tcp.c | 128 +++++++++++++++++++++++++++-------------------
2 files changed, 78 insertions(+), 54 deletions(-)
--
2.26.2
next reply other threads:[~2020-10-16 10:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 10:51 Paolo Abeni [this message]
2020-10-16 10:51 ` [RFC PATCH 1/2] tcp: factor out tcp_build_frag() Paolo Abeni
2020-10-16 10:51 ` [RFC PATCH 2/2] tcp: factor out __tcp_close() helper Paolo Abeni
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=cover.1602840570.git.pabeni@redhat.com \
--to=pabeni@redhat.com \
--cc=edumazet@google.com \
--cc=mptcp@lists.01.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).