.topmsg: tcp: clean ext on tx recycle
Mat Martineau
PATCH 1/1 .topmsg: tcp: clean ext on tx recycle
Reworded since the tree contains very little MPTCP code at this point in the series.
--- .topmsg | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-)
.topmsg +11 -16
@@ -1,26 +1,21 @@ From: Paolo Abeni <pabeni(a)redhat.com> Subject: [PATCH] tcp: clean ext on tx recycle -Otherwise we will find stray/unexpected/old extensions -value on next iteration. +Otherwise we will find stray/unexpected/old extensions value on next +iteration. -On tcp_write_xmit() we can end-up splitting an already queued -skb in two parts, via tso_fragment(). The newly created skb -can be allocated via the tx cache and the mptcp stack will not -be aware of it, so nobody set properly the MPTCP ext. +On tcp_write_xmit() we can end-up splitting an already queued skb in two +parts, via tso_fragment(). The newly created skb can be allocated via +the tx cache and an upper layer will not be aware of it, so that upper +layer cannot set the ext properly. -End result, we transmit the skb using an hold MPTCP DSS map -and that confuses the rx side/corrupt the stream. It requires -some concurrent conditions, so it's not deterministic. +Resetting the ext on recycle ensures that stale data is not propagated +in to packet headers or elsewhere. -Resetting the ext on recycle fixes all the current mptcp self tests -issues. - -Apparently only MPTCP has issues with this kind of stray ext, -so an alternative would be add an additional mptcp hook in -tso_fragment() or in sk_stream_alloc_skb() to always init -the ext. +An alternative would be add an additional hook in tso_fragment() or in +sk_stream_alloc_skb() to init the ext for upper layers that need it. Co-developed-by: Florian Westphal <fw(a)strlen.de> Signed-off-by: Florian Westphal <fw(a)strlen.de> +Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com> Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
Signature · 1 line
2.24.1
Mat Martineau
PATCH 1/1 .topmsg: mptcp: Handle MPTCP TCP options
Make it clear that v1 changes come later in the series.
--- .topmsg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
.topmsg +4 -1
@@ -1,7 +1,9 @@ From: Peter Krystad <peter.krystad(a)linux.intel.com> Subject: [PATCH] mptcp: Handle MPTCP TCP options -Currently only MPTCP v0 is supported so ignore v1 MP_CAPABLE option. +These options are handled according to MPTCPv0 (RFC6824). +RFC6824bis/RFC8684 MPTCPv1 MP_CAPABLE is added later in coordination +with related code changes. Co-developed-by: Matthieu Baerts <matthieu.baerts(a)tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
@@ -9,4 +11,5 @@ Co-developed-by: Florian Westphal <fw(a)strlen.de> Signed-off-by: Florian Westphal <fw(a)strlen.de> Co-developed-by: Davide Caratti <dcaratti(a)redhat.com> Signed-off-by: Davide Caratti <dcaratti(a)redhat.com> +Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com> Signed-off-by: Peter Krystad <peter.krystad(a)linux.intel.com>
Signature · 1 line
2.24.1
Mat Martineau
PATCH 1/1 .topmsg mptcp: Associate MPTCP context with TCP socket
In reply to Mat MartineauClarify that the added bind and connect functions are related to the MPTCP subflow context code.
--- .topmsg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
.topmsg +5 -2
@@ -1,8 +1,10 @@ From: Peter Krystad <peter.krystad(a)linux.intel.com> Subject: [PATCH] mptcp: Associate MPTCP context with TCP socket -Use ULP to associate a subflow_context structure with each TCP -subflow socket. +Use ULP to associate a subflow_context structure with each TCP subflow +socket. Creating these sockets requires new bind and connect functions +to make sure ULP is set up immediately when the subflow sockets are +created. Co-developed-by: Florian Westphal <fw(a)strlen.de> Signed-off-by: Florian Westphal <fw(a)strlen.de>
@@ -12,4 +14,5 @@ Co-developed-by: Davide Caratti <dcaratti(a)redhat.com> Signed-off-by: Davide Caratti <dcaratti(a)redhat.com> Co-developed-by: Paolo Abeni <pabeni(a)redhat.com> Signed-off-by: Paolo Abeni <pabeni(a)redhat.com> +Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com> Signed-off-by: Peter Krystad <peter.krystad(a)linux.intel.com>
Signature · 1 line
2.24.1
Mat Martineau
PATCH 1/1 .topmsg: mptcp: Write MPTCP DSS headers to outgoing data packets
In reply to Mat MartineauUpdate information about DSS options appearing in segmented packets.
--- .topmsg | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
.topmsg +6 -5
@@ -3,11 +3,12 @@ Subject: [PATCH] mptcp: Write MPTCP DSS headers to outgoing data packets Per-packet metadata required to write the MPTCP DSS option is written to the skb_ext area. One write to the socket may contain more than one -packet of data, in which case the DSS option in the first packet will -have a mapping covering all of the data in that write. Packets after the -first do not have a DSS option. This is complicated to handle under -memory pressure, since the first packet (with the DSS mapping) is pushed -to the TCP core before the remaining skbs are allocated. +packet of data, which is copied to page fragments and mapped in to MPTCP +DSS segments with size determined by the available page fragments and +the maximum mapping length allowed by the MPTCP specification. If +do_tcp_sendpages() splits a DSS segment in to multiple skbs, that's ok - +the later skbs can either have duplicated DSS mapping information or +none at all, and the receiver can handle that. The current implementation uses the subflow frag cache and tcp sendpages to avoid excessive code duplication. More work is required to
Signature · 1 line
2.24.1
Mat Martineau
PATCH 1/1 .topmsg: mptcp: recvmsg() can drain data from multiple subflows
In reply to Mat MartineauRemove outdated message about refcounting and rephrase sentence about exit conditions.
--- .topmsg | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
.topmsg +3 -6
@@ -3,12 +3,9 @@ Subject: [PATCH] mptcp: recvmsg() can drain data from multiple subflows With the previous patch in place, the msk can detect which subflow has the current map with a simple walk, let's update the main -loop to always select the 'current' subflow. - -Additionally: -- changes the exit conditions to mirror closely tcp_recvmsg() -this should fix unexpected behavior with timeout and signals. -- avoid unneeded refcounting on ssk +loop to always select the 'current' subflow. The exit conditions now +closely mirror tcp_recvmsg() to get expected timeout and signal +behavior. Co-developed-by: Peter Krystad <peter.krystad(a)linux.intel.com> Signed-off-by: Peter Krystad <peter.krystad(a)linux.intel.com>
Signature · 1 line
2.24.1
Mat Martineau
PATCH 1/1 .topmsg: mptcp: parse and emit MP_CAPABLE option according to v1 spec
In reply to Mat MartineauUse newly assigned RFC number, fix up line wrapping.
--- .topmsg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
.topmsg +8 -8
@@ -1,16 +1,16 @@ From: Christoph Paasch <cpaasch(a)apple.com> -Subject: [PATCH] mptcp: parse and emit MP_CAPABLE option according to v1 spec. +Subject: [PATCH] mptcp: parse and emit MP_CAPABLE option according to v1 spec This implements MP_CAPABLE options parsing and writing according -to the RFC 6824 bis - MPTCP v1. +to RFC 6824 bis / RFC 8684: MPTCP v1. + Local key is sent on syn/ack, and both keys are sent on 3rd ack. -MP_CAPABLE messages len are updated accordingly. -We need the skbuff to emit correctly the above, so we push the skbuff -struct as an argument all the way from tcp code to the relevant mptcp -callbacks. +MP_CAPABLE messages len are updated accordingly. We need the skbuff to +correctly emit the above, so we push the skbuff struct as an argument +all the way from tcp code to the relevant mptcp callbacks. When processing incoming MP_CAPABLE + data, build a full blown DSS-like -map info, to simplify later processing. -On child socket creation, we need to record the remote key, if available. +map info, to simplify later processing. On child socket creation, we +need to record the remote key, if available. Signed-off-by: Christoph Paasch <cpaasch(a)apple.com>
Signature · 1 line
2.24.1
Mat Martineau
PATCH 1/1 .topmsg: mptcp: process MP_CAPABLE data option
In reply to Mat MartineauMention RFC 8684, minor spelling fixes and stuff.
--- .topmsg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
.topmsg +6 -6
@@ -1,12 +1,12 @@ From: Christoph Paasch <cpaasch(a)apple.com> -Subject: [PATCH] mptcp: process MP_CAPABLE data option. +Subject: [PATCH] mptcp: process MP_CAPABLE data option -This patch implement the handling of MP_CAPABLE + data option, as -per RFC 6824 bis - MPTCP v1. +This patch implements the handling of MP_CAPABLE + data option, as per +RFC 6824 bis / RFC 8684: MPTCP v1. On the server side we can receive the remote key after that the connection is established. We need to explicitly track the 'missing remote key' -status and avoid emtting mptcp ack till we get such info. +status and avoid emitting a mptcp ack until we get such info. When a late/retransmitted/OoO pkt carrying MP_CAPABLE[+data] option is received, we have to propagate the mptcp seq number info to
@@ -16,8 +16,8 @@ that in recvmsg(), where we own msk and subflow sock locks. The above also means that an established mp_capable subflow - still waiting for the remote key - can be 'downgraded' to plain TCP. -Such change could potentially block forever reader waiting for new -data - as they hook to msk, while later wake-up after the downgrade +Such change could potentially block a reader waiting for new data +forever - as they hook to msk, while later wake-up after the downgrade will be on subflow only. The above issue is not handled here, we likely have to get rid of
Signature · 1 line
2.24.1
Matthieu Baerts
Quoted 2 lines · Mat Martineau
Reworded since the tree contains very little MPTCP code at this point in the series.
Thank you for all the patches. I just applied all but I didn't modify the Signed-Off as I already did that. If I am not wrong, as a sender, your signed-off should be the last one, no?
- c7cb9c040948: "squahsed" patch 1/7 in "tcp: clean ext on tx recycle"
- 6719fc6e867d: "squashed" patch 2/7 in "mptcp: Handle MPTCP TCP options"
- d6a69af948b7: "squashed" patch 3/7 in "mptcp: Associate MPTCP context with TCP socket"
- 9e4d893cb81f: "squashed" patch 4/7 in "mptcp: Write MPTCP DSS headers to outgoing data packets"
- ae428c460335: "squashed" patch 5/7 in "mptcp: recvmsg() can drain data from multiple subflows"
- 0d182fc96c0b: "squashed" patch 6/7 in "mptcp: parse and emit MP_CAPABLE option according to v1 spec"
- 8d7da78ad705: "squashed" patch 7/7 in "mptcp: process MP_CAPABLE data option"
Cheers,
Matthieu
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium