-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: implement delayed seq generation for passive fastopen
With fastopen in place, the first subflow socket is created before the MPC handshake completes, and we need to properly initialize the sequence numbers at MPC ACK reception. Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Dmytro Shytyi <dmytro@shytyi.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
- Loading branch information
Dmytro Shytyi
authored and
Jakub Kicinski
committed
Nov 30, 2022
1 parent
b3ea6b2
commit dfc8d06
Showing
6 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* MPTCP Fast Open Mechanism | ||
* | ||
* Copyright (c) 2021-2022, Dmytro SHYTYI | ||
*/ | ||
|
||
#include "protocol.h" | ||
|
||
void mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow, | ||
const struct mptcp_options_received *mp_opt) | ||
{ | ||
struct sock *sk = (struct sock *)msk; | ||
struct sk_buff *skb; | ||
|
||
mptcp_data_lock(sk); | ||
skb = skb_peek_tail(&sk->sk_receive_queue); | ||
if (skb) { | ||
WARN_ON_ONCE(MPTCP_SKB_CB(skb)->end_seq); | ||
pr_debug("msk %p moving seq %llx -> %llx end_seq %llx -> %llx", sk, | ||
MPTCP_SKB_CB(skb)->map_seq, MPTCP_SKB_CB(skb)->map_seq + msk->ack_seq, | ||
MPTCP_SKB_CB(skb)->end_seq, MPTCP_SKB_CB(skb)->end_seq + msk->ack_seq); | ||
MPTCP_SKB_CB(skb)->map_seq += msk->ack_seq; | ||
MPTCP_SKB_CB(skb)->end_seq += msk->ack_seq; | ||
} | ||
|
||
pr_debug("msk=%p ack_seq=%llx", msk, msk->ack_seq); | ||
mptcp_data_unlock(sk); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters