summaryrefslogtreecommitdiff
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-04-15 16:44:54 -0700
committerDavid S. Miller <davem@davemloft.net>2021-04-16 15:23:10 -0700
commitdf00b087da24c0b5341178bbd5353101c7cef98f (patch)
tree8a9549390250f02c0ab83927b1a6f62c23432081 /net/mptcp/protocol.h
parent7896248983ef4eec18c8bd301a81d8672dbc9955 (diff)
mptcp: tag sequence_seq with socket state
Paolo Abeni suggested to avoid re-syncing new subflows because they inherit options from listener. In case options were set on listener but are not set on mptcp-socket there is no need to do any synchronisation for new subflows. This change sets sockopt_seq of new mptcp sockets to the seq of the mptcp listener sock. Subflow sequence is set to the embedded tcp listener sk. Add a comment explaing why sk_state is involved in sockopt_seq generation. Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r--net/mptcp/protocol.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 0186aad3108a..df269c26f145 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -256,6 +256,8 @@ struct mptcp_sock {
u64 time; /* start time of measurement window */
u64 rtt_us; /* last maximum rtt of subflows */
} rcvq_space;
+
+ u32 setsockopt_seq;
};
#define mptcp_lock_sock(___sk, cb) do { \
@@ -414,6 +416,8 @@ struct mptcp_subflow_context {
long delegated_status;
struct list_head delegated_node; /* link into delegated_action, protected by local BH */
+ u32 setsockopt_seq;
+
struct sock *tcp_sock; /* tcp sk backpointer */
struct sock *conn; /* parent mptcp_sock */
const struct inet_connection_sock_af_ops *icsk_af_ops;