All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [RFC PATCH 0/2] mptcp: cope better with tcp_sendpage allocation
@ 2020-10-06 11:18 Paolo Abeni
  0 siblings, 0 replies; only message in thread
From: Paolo Abeni @ 2020-10-06 11:18 UTC (permalink / raw)
  To: mptcp 

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-06 11:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-06 11:18 [MPTCP] [RFC PATCH 0/2] mptcp: cope better with tcp_sendpage allocation Paolo Abeni

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.