diff options
author | Geliang Tang <geliang.tang@suse.com> | 2022-04-22 23:55:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-23 12:51:05 +0200 |
commit | 1e39e5a32ad7fdd82d6e071aa14ecd511eedc1f7 (patch) | |
tree | 43ea9946d71f5d469772114d960f1f4e529f88f2 /net/mptcp/protocol.h | |
parent | mptcp: track and update contiguous data status (diff) | |
download | linux-1e39e5a32ad7fdd82d6e071aa14ecd511eedc1f7.tar.xz linux-1e39e5a32ad7fdd82d6e071aa14ecd511eedc1f7.zip |
mptcp: infinite mapping sending
This patch adds the infinite mapping sending logic.
Add a new flag send_infinite_map in struct mptcp_subflow_context. Set
it true when a single contiguous subflow is in use and the
allow_infinite_fallback flag is true in mptcp_pm_mp_fail_received().
In mptcp_sendmsg_frag(), if this flag is true, call the new function
mptcp_update_infinite_map() to set the infinite mapping.
Add a new flag infinite_map in struct mptcp_ext, set it true in
mptcp_update_infinite_map(), and check this flag in a new helper
mptcp_check_infinite_map().
In mptcp_update_infinite_map(), set data_len to 0, and clear the
send_infinite_map flag, then do fallback.
In mptcp_established_options(), use the helper mptcp_check_infinite_map()
to let the infinite mapping DSS can be sent out in the fallback mode.
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
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.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 88d292374599..61d600693ffd 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -441,6 +441,7 @@ struct mptcp_subflow_context { send_mp_prio : 1, send_mp_fail : 1, send_fastclose : 1, + send_infinite_map : 1, rx_eof : 1, can_ack : 1, /* only after processing the remote a key */ disposable : 1, /* ctx can be free at ulp release time */ @@ -877,6 +878,17 @@ static inline void mptcp_do_fallback(struct sock *sk) #define pr_fallback(a) pr_debug("%s:fallback to TCP (msk=%p)", __func__, a) +static inline bool mptcp_check_infinite_map(struct sk_buff *skb) +{ + struct mptcp_ext *mpext; + + mpext = skb ? mptcp_get_ext(skb) : NULL; + if (mpext && mpext->infinite_map) + return true; + + return false; +} + static inline bool subflow_simultaneous_connect(struct sock *sk) { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); |