From: Paolo Abeni <pabeni at redhat.com>
To: mptcp at lists.01.org
Subject: [MPTCP] [RFC PATCH 0/2] mptcp: cope better with tcp_sendpage allocation
Date: Tue, 06 Oct 2020 13:18:05 +0200 [thread overview]
Message-ID: <cover.1601982978.git.pabeni@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
The current export branch suffers of the following issue:
https://github.com/multipath-tcp/mptcp_net-next/issues/97
To fix the above, MPTCP needs to be able to cope with memory allocation
failure in do_tcp_sendpages().
In this attempt, the relevant code is factored out of do_tcp_sendpages(),
in a smaller helper, so that mptcp_sendmsg_frag() can avoid touching
ssk->sk_socket.
There are other possible alternatives:
- add an explicit check in do_tcp_sendpages() for NULL sk->sk_socket
pro: very simple and little invasive
cons: hackysh?!?
- inline/open-code the relevant part of do_tcp_sendpages in mptcp_sendmsg_frag()
pro: no need to change core TCP code
cons: code duplication, need to change the scope for a couple of TCP internal
helpers (removing the 'static' keyword)
As a follow-up I would try to pre-allocate skbs and extensions, so that
push_pending could be called in BH context and we could avoid using the
work queue.
I'm looking for feedback on the less ugly/more upstreamable approach
Paolo Abeni (2):
tcp: factor out do_tcp_sendfrag()
mptcp: use do_tcp_sendfrag()
include/net/tcp.h | 3 ++
net/ipv4/tcp.c | 120 ++++++++++++++++++++++++-------------------
net/mptcp/protocol.c | 21 ++++----
3 files changed, 80 insertions(+), 64 deletions(-)
--
2.26.2
reply other threads:[~2020-10-06 11:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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.1601982978.git.pabeni@redhat.com \
--to=unknown@example.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.