summaryrefslogtreecommitdiff
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-06-21 14:21:29 -0700
committerDavid S. Miller <davem@davemloft.net>2021-06-21 14:21:29 -0700
commit0d0f2a36e38a08809ebcf5b4786528a7ba03d2e4 (patch)
treed6fffc3cb4b32b847d684762438b4e4eb7de8679 /net/mptcp/protocol.h
parentd452d48b9f8b1a7f8152d33ef52cfd7fe1735b0a (diff)
parent5957a8901db44c03540505ccedd95031c21ef2f2 (diff)
downloadlinux-0d0f2a36e38a08809ebcf5b4786528a7ba03d2e4.tar.gz
linux-0d0f2a36e38a08809ebcf5b4786528a7ba03d2e4.tar.bz2
linux-0d0f2a36e38a08809ebcf5b4786528a7ba03d2e4.zip
Merge branch 'mptcp-sdeq-fixes'
Mat Martineau says: ==================== mptcp: 32-bit sequence number improvements MPTCP-level sequence numbers are 64 bits, but RFC 8684 allows use of 32-bit sequence numbers in the DSS option to save header space. Those 32-bit numbers are the least significant bits of the full 64-bit sequence number, so the receiver must infer the correct upper 32 bits. These two patches improve the logic for determining the full 64-bit sequence numbers when the 32-bit truncated version has wrapped around. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r--net/mptcp/protocol.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 385796f0ef19..5d7c44028e47 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -593,6 +593,14 @@ int mptcp_setsockopt(struct sock *sk, int level, int optname,
int mptcp_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *option);
+u64 __mptcp_expand_seq(u64 old_seq, u64 cur_seq);
+static inline u64 mptcp_expand_seq(u64 old_seq, u64 cur_seq, bool use_64bit)
+{
+ if (use_64bit)
+ return cur_seq;
+
+ return __mptcp_expand_seq(old_seq, cur_seq);
+}
void __mptcp_check_push(struct sock *sk, struct sock *ssk);
void __mptcp_data_acked(struct sock *sk);
void __mptcp_error_report(struct sock *sk);