Skip to content

Shared control buffer proposal

Mat Martineau mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 32 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2skbuff: Add shared control bufferinclude/linux/skbuff.h net/core/skbuff.c+66 -1431 replies
2/2tcp: Let do_tcp_sendpages accept a pre-allocated initial skbinclude/net/tcp.h net/ipv4/tcp.c net/tls/tls_main.c+12 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [MPTCP] [PATCH 0/2] Shared control buffer proposal

Here's an implementation of the "shared control buffer" we recently discussed on this list. This uses a SKB_SHINFO_EXT flag for __alloc_skb to optionally allocate extra space following skb_shared_info. Regular (non-extended) skbs are not changed at all. The new skbs with extended shared info can be safely handled by existing code, although low-level operations that copy or reallocate skb data and shared info may strip the extended information if they are not aware of it.

The second patch allows users of do_tcp_sendpages to provide a skb with an extended control buffer to use for the first packet. In MPTCP, this would allow a DSS mapping for a large chunk of data to be sent in the first packet, with the rest of the mapped data sent in subsequent packets. It also conveniently ensures that the beginning of the provided data is not coalesced in to an existing skb so the DSS mapping and the beginning of the mapped data stay together.

I still need to verify how GSO and TSO handle these skbs. When I tested this code by using SKB_ALLOC_SHINFO_EXT with every TCP allocation, the extended information was available when TCP headers are written.

Mat Martineau (2):
skbuff: Add shared control buffer
tcp: Let do_tcp_sendpages accept a pre-allocated initial skb

 include/linux/skbuff.h | 24 +++++++++++++++++++++-
 include/net/tcp.h      |  2 +-
 net/core/skbuff.c      | 56 ++++++++++++++++++++++++++++++++++++++------------
 net/ipv4/tcp.c         | 12 ++++++++---
 net/tls/tls_main.c     |  3 ++-
 5 files changed, 78 insertions(+), 19 deletions(-)
Signature · 1 line
2.14.2