MP_FAIL support
Subsystems (3)
v2 cover MP_FAIL support
v2:
- MP_FAIL logic:
* Peer B send a DSS to peer A, and the data has been modify by the
middleboxes, then peer A detects the bad checksum.
* In the multiple subflows case, peer A sends MP_FAIL+RST back to peer B,
and peer A discards the data following the bad data sequence number. Peer B receives this MP_FAIL+RST, and close this subflow.
* In the single subflow case, using the simple implementation, peer A
sends MP_FAIL back to peer B, and peer A fallback to a regular TCP. Peer B receives this MP_FAIL, and fallback to a regular TCP.
- apply: export/20210624T054331
Geliang Tang (5):
mptcp: MP_FAIL suboption sending
mptcp: MP_FAIL suboption receiving
mptcp: send out MP_FAIL when data checksum fail
mptcp: add the mibs for MP_FAIL
selftests: mptcp: add MP_FAIL mibs check
include/net/mptcp.h | 1 + net/mptcp/mib.c | 2 + net/mptcp/mib.h | 2 + net/mptcp/options.c | 63 ++++++++++++++++++- net/mptcp/pm.c | 14 +++++ net/mptcp/protocol.h | 19 ++++++ net/mptcp/subflow.c | 16 +++++ .../testing/selftests/net/mptcp/mptcp_join.sh | 38 +++++++++++ 8 files changed, 154 insertions(+), 1 deletion(-)
Signature · 1 line
2.31.1
PATCH v2 1/5 mptcp: MP_FAIL suboption sending
This patch added the MP_FAIL suboption sending support.
Add a new flag named send_mp_fail in struct mptcp_subflow_context. If this flag is set, send out MP_FAIL suboption.
Add a new member fail_seq in struct mptcp_out_options to save the data sequence number to put into the MP_FAIL suboption.
--- include/net/mptcp.h | 1 + net/mptcp/options.c | 46 +++++++++++++++++++++++++++++++++++++++++++- net/mptcp/protocol.h | 3 +++ 3 files changed, 49 insertions(+), 1 deletion(-)
include/net/mptcp.h +1 -0
@@ -72,6 +72,7 @@ struct mptcp_out_options {u32 nonce;u64 thmac;u32 token; +u64 fail_seq;u8 hmac[20 ];struct mptcp_ext ext_copy;#endif
net/mptcp/options.c +45 -1
65 lines not on this page · raw message
net/mptcp/protocol.h +3 -0
@@ -26,6 +26,7 @@#define OPTION_MPTCP_FASTCLOSE BIT(8)#define OPTION_MPTCP_PRIO BIT(9)#define OPTION_MPTCP_RST BIT(10) +#define OPTION_MPTCP_FAIL BIT(11)/* MPTCP option subtypes */ #define MPTCPOPT_MP_CAPABLE 0
@@ -67,6 +68,7 @@#define TCPOLEN_MPTCP_PRIO_ALIGN 4#define TCPOLEN_MPTCP_FASTCLOSE 12#define TCPOLEN_MPTCP_RST 4 +#define TCPOLEN_MPTCP_FAIL 12#define TCPOLEN_MPTCP_MPC_ACK_DATA_CSUM (TCPOLEN_MPTCP_DSS_CHECKSUM + TCPOLEN_MPTCP_MPC_ACK_DATA)
@@ -417,6 +419,7 @@ struct mptcp_subflow_context { mpc_map : 1, backup : 1, send_mp_prio : 1, + send_mp_fail : 1, rx_eof : 1, can_ack : 1, /* only after processing the remote a key */ disposable : 1; /* ctx can be free at ulp release time */
Signature · 1 line
2.31.1
PATCH v2 2/5 mptcp: MP_FAIL suboption receiving
This patch added handling for receiving MP_FAIL suboption.
Add a new members mp_fail and fail_seq in struct mptcp_options_received. When MP_FAIL suboption is received, set mp_fail to 1 and save the sequence number to fail_seq.
Then invoke mptcp_pm_mp_fail_received to deal with the MP_FAIL suboption. In it, if there is no other established subflow, fallback to TCP.
--- net/mptcp/options.c | 16 ++++++++++++++++ net/mptcp/pm.c | 13 +++++++++++++ net/mptcp/protocol.h | 16 ++++++++++++++++ 3 files changed, 45 insertions(+)
net/mptcp/options.c +16 -0
@@ -336,6 +336,16 @@ static void mptcp_parse_option(const struct sk_buff *skb, mp_opt->reset_reason = *ptr;break ; +case MPTCPOPT_MP_FAIL : +if (opsize !=TCPOLEN_MPTCP_FAIL ) +break ; + + ptr +=2 ; + mp_opt->mp_fail =1 ; + mp_opt->fail_seq =get_unaligned_be64 (ptr); +pr_debug ("MP_FAIL: data_seq=%llu" , mp_opt->fail_seq); +break ; +default :break ; }
@@ -364,6 +374,7 @@ void mptcp_get_options(const struct sock *sk, mp_opt->reset =0 ; mp_opt->csum_reqd =READ_ONCE (msk->csum_enabled); mp_opt->deny_join_id0 =0 ; + mp_opt->mp_fail =0 ; length = (th->doff *4 ) -sizeof (struct tcphdr ); ptr = (const unsigned char *)(th +1 );
@@ -1123,6 +1134,11 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb) mp_opt.mp_prio =0 ; } +if (mp_opt.mp_fail) { +mptcp_pm_mp_fail_received (sk, mp_opt.fail_seq); + mp_opt.mp_fail =0 ; + } +if (mp_opt.reset) { subflow->reset_seen =1 ; subflow->reset_reason = mp_opt.reset_reason;
net/mptcp/pm.c +13 -0
@@ -247,6 +247,19 @@ void mptcp_pm_mp_prio_received(struct sock *sk, u8 bkup)mptcp_event (MPTCP_EVENT_SUB_PRIORITY ,mptcp_sk (subflow->conn), sk,GFP_ATOMIC ); } +void mptcp_pm_mp_fail_received (struct sock *sk,u64 fail_seq) +{ +struct mptcp_subflow_context *subflow =mptcp_subflow_ctx (sk); +struct mptcp_sock *msk =mptcp_sk (subflow->conn); + +pr_debug ("map_seq=%llu fail_seq=%llu" , subflow->map_seq, fail_seq); + +if (!mptcp_has_another_subflow_established (sk)) { +pr_fallback (msk); +__mptcp_do_fallback (msk); + } +} +/* path manager helpers */ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
net/mptcp/protocol.h +16 -0
@@ -139,6 +139,7 @@ struct mptcp_options_received { add_addr : 1, rm_addr : 1, mp_prio : 1, + mp_fail : 1, echo : 1, csum_reqd : 1, backup : 1,
@@ -160,6 +161,7 @@ struct mptcp_options_received {u64 ahmac; u8 reset_reason:4; u8 reset_transient:1; +u64 fail_seq; };static inline __be32 mptcp_option (u8 subopt,u8 len,u8 nib,u8 field)
@@ -591,6 +593,19 @@ static inline void mptcp_subflow_tcp_fallback(struct sock *sk,inet_csk (sk)->icsk_af_ops = ctx->icsk_af_ops; } +static inline bool mptcp_has_another_subflow_established (struct sock *ssk) +{ +struct mptcp_subflow_context *subflow =mptcp_subflow_ctx (ssk), *tmp; +struct mptcp_sock *msk =mptcp_sk (subflow->conn); + +mptcp_for_each_subflow (msk, tmp) { +if (tmp->fully_established && tmp != subflow) +return true; + } + +return false; +} +void __init mptcp_proto_init (void );#if IS_ENABLED (CONFIG_MPTCP_IPV6 )int __init mptcp_proto_v6_init (void );
@@ -703,6 +718,7 @@ void mptcp_pm_mp_prio_received(struct sock *sk, u8 bkup);int mptcp_pm_nl_mp_prio_send_ack (struct mptcp_sock *msk,struct mptcp_addr_info *addr,u8 bkup); +void mptcp_pm_mp_fail_received (struct sock *sk,u64 fail_seq);void mptcp_pm_free_anno_list (struct mptcp_sock *msk);bool mptcp_pm_sport_in_anno_list (struct mptcp_sock *msk,const struct sock *sk); struct mptcp_pm_add_entry *
Signature · 1 line
2.31.1
PATCH v2 3/5 mptcp: send out MP_FAIL when data checksum fail
When a bad checksum is detected, send out the MP_FAIL suboption.
--- net/mptcp/subflow.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
net/mptcp/subflow.c +15 -0
@@ -913,6 +913,7 @@ static enum mapping_status validate_data_csum(struct sock *ssk, struct sk_buff * csum =csum_partial (&header,sizeof (header), subflow->map_data_csum);if (unlikely (csum_fold (csum))) {MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_DATACSUMERR ); + subflow->send_mp_fail =1 ;return subflow->mp_join ?MAPPING_INVALID :MAPPING_DUMMY ; }
@@ -1159,6 +1160,20 @@ static bool subflow_check_data_avail(struct sock *ssk)return false; fallback: +if (subflow->send_mp_fail) { +if (mptcp_has_another_subflow_established (ssk)) { +mptcp_subflow_reset (ssk); +while ((skb =skb_peek (&ssk->sk_receive_queue))) +sk_eat_skb (ssk, skb); + }else { +pr_fallback (msk); +__mptcp_do_fallback (msk); + } + +WRITE_ONCE (subflow->data_avail,0 ); +return true; + } +/* RFC 8684 section 3.7. */ if (subflow->mp_join || subflow->fully_established) {/* fatal protocol error, close the socket.
Signature · 1 line
2.31.1
PATCH v2 4/5 mptcp: add the mibs for MP_FAIL
This patch added the mibs for MP_FAIL: MPTCP_MIB_MPFAILTX and MPTCP_MIB_MPFAILRX.
--- net/mptcp/mib.c | 2 ++ net/mptcp/mib.h | 2 ++ net/mptcp/options.c | 1 + net/mptcp/pm.c | 1 + net/mptcp/subflow.c | 1 + 5 files changed, 7 insertions(+)
net/mptcp/mib.c +2 -0
@@ -44,6 +44,8 @@ static const struct snmp_mib mptcp_snmp_list[] = {SNMP_MIB_ITEM ("RmSubflow" ,MPTCP_MIB_RMSUBFLOW ),SNMP_MIB_ITEM ("MPPrioTx" ,MPTCP_MIB_MPPRIOTX ),SNMP_MIB_ITEM ("MPPrioRx" ,MPTCP_MIB_MPPRIORX ), +SNMP_MIB_ITEM ("MPFailTx" ,MPTCP_MIB_MPFAILTX ), +SNMP_MIB_ITEM ("MPFailRx" ,MPTCP_MIB_MPFAILRX ), SNMP_MIB_SENTINEL };
net/mptcp/mib.h +2 -0
@@ -37,6 +37,8 @@ enum linux_mptcp_mib_field {MPTCP_MIB_RMSUBFLOW ,/* Remove a subflow */ MPTCP_MIB_MPPRIOTX ,/* Transmit a MP_PRIO */ MPTCP_MIB_MPPRIORX ,/* Received a MP_PRIO */ +MPTCP_MIB_MPFAILTX ,/* Transmit a MP_FAIL */ +MPTCP_MIB_MPFAILRX ,/* Received a MP_FAIL */ __MPTCP_MIB_MAX };
net/mptcp/options.c +1 -0
@@ -1136,6 +1136,7 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)if (mp_opt.mp_fail) {mptcp_pm_mp_fail_received (sk, mp_opt.fail_seq); +MPTCP_INC_STATS (sock_net (sk),MPTCP_MIB_MPFAILRX ); mp_opt.mp_fail =0 ; }
net/mptcp/pm.c +1 -0
@@ -9,6 +9,7 @@#include <net/tcp.h> #include <net/mptcp.h> #include "protocol.h" +#include "mib.h" /* path manager command handlers */
net/mptcp/subflow.c +1 -0
@@ -914,6 +914,7 @@ static enum mapping_status validate_data_csum(struct sock *ssk, struct sk_buff *if (unlikely (csum_fold (csum))) {MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_DATACSUMERR ); subflow->send_mp_fail =1 ; +MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_MPFAILTX );return subflow->mp_join ?MAPPING_INVALID :MAPPING_DUMMY ; }
Signature · 1 line
2.31.1
PATCH v2 5/5 selftests: mptcp: add MP_FAIL mibs check
This patch added a function chk_fail_nr to check the mibs for MP_FAIL.
--- .../testing/selftests/net/mptcp/mptcp_join.sh | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+)
tools/testing/selftests/net/mptcp/mptcp_join.sh +38 -0
@@ -541,6 +541,43 @@ chk_csum_nr() fi } +chk_fail_nr() +{ + local mp_fail_nr_tx=$1 + local mp_fail_nr_rx=$2 + local count + local dump_stats + + printf "%-39s %s" " " "ftx" + count=`ip netns exec $ns1 nstat -as | grep MPTcpExtMPFailTx | awk '{print $2}'` + [ -z "$count" ] && count=0 + if [ "$count" != "$mp_fail_nr_tx" ]; then + echo "[fail] got $count MP_FAIL[s] TX expected $mp_fail_nr_tx" + ret=1 + dump_stats=1 + else + echo -n "[ ok ]" + fi + + echo -n " - frx " + count=`ip netns exec $ns1 nstat -as | grep MPTcpExtMPFailRx | awk '{print $2}'` + [ -z "$count" ] && count=0 + if [ "$count" != "$mp_fail_nr_rx" ]; then + echo "[fail] got $count MP_FAIL[s] RX expected $mp_fail_nr_rx" + ret=1 + dump_stats=1 + else + echo "[ ok ]" + fi + + if [ "${dump_stats}" = 1 ]; then + echo Server ns stats + ip netns exec $ns1 nstat -as | grep MPTcp + echo Client ns stats + ip netns exec $ns2 nstat -as | grep MPTcp + fi +} + chk_join_nr() { local msg="$1"
@@ -590,6 +627,7 @@ chk_join_nr() fi if [ $checksum -eq 1 ]; then chk_csum_nr + chk_fail_nr 0 0 fi }
Signature · 1 line
2.31.1
Re: [MPTCP][PATCH v2 mptcp-next 4/5] mptcp: add the mibs for MP_FAIL
In reply to Geliang TangQuoted 67 lines · Geliang Tang
This patch added the mibs for
MP_FAIL:MPTCP_MIB_MPFAILTXandMPTCP_MIB_MPFAILRX.Signed-off-by Geliang Tang <[email protected]>---
net/mptcp/mib.c | 2 ++ net/mptcp/mib.h | 2 ++ net/mptcp/options.c | 1 + net/mptcp/pm.c | 1 + net/mptcp/subflow.c | 1 + 5 files changed, 7 insertions(+)net/mptcp/mib.c +2
-0@@ -44,6 +44,8 @@ static const struct snmp_mib mptcp_snmp_list[] = {SNMP_MIB_ITEM ("RmSubflow" ,MPTCP_MIB_RMSUBFLOW ),SNMP_MIB_ITEM ("MPPrioTx" ,MPTCP_MIB_MPPRIOTX ),SNMP_MIB_ITEM ("MPPrioRx" ,MPTCP_MIB_MPPRIORX ), +SNMP_MIB_ITEM ("MPFailTx" ,MPTCP_MIB_MPFAILTX ), +SNMP_MIB_ITEM ("MPFailRx" ,MPTCP_MIB_MPFAILRX ), SNMP_MIB_SENTINEL };net/mptcp/mib.h +2
-0@@ -37,6 +37,8 @@ enum linux_mptcp_mib_field {MPTCP_MIB_RMSUBFLOW ,/* Remove a subflow */ MPTCP_MIB_MPPRIOTX ,/* Transmit a MP_PRIO */ MPTCP_MIB_MPPRIORX ,/* Received a MP_PRIO */ +MPTCP_MIB_MPFAILTX ,/* Transmit a MP_FAIL */ +MPTCP_MIB_MPFAILRX ,/* Received a MP_FAIL */ __MPTCP_MIB_MAX };net/mptcp/options.c +1
-0@@ -1136,6 +1136,7 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)if (mp_opt.mp_fail) {mptcp_pm_mp_fail_received (sk, mp_opt.fail_seq); +MPTCP_INC_STATS (sock_net (sk),MPTCP_MIB_MPFAILRX ); mp_opt.mp_fail =0 ; }net/mptcp/pm.c +1
-0@@ -9,6 +9,7 @@#include <net/tcp.h> #include <net/mptcp.h> #include "protocol.h" +#include "mib.h" /* path manager command handlers */ net/mptcp/subflow.c +0
-0
net/mptcp/subflow.c static enum mapping_status validate_data_csum(struct sock *ssk, struct sk_buff * · line 917
Quoted 4 lines
net/mptcp/subflow.c +1
-0@@ -914,6 +914,7 @@ static enum mapping_status validate_data_csum(struct sock *ssk, struct sk_buff *if (unlikely (csum_fold (csum))) {MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_DATACSUMERR ); subflow->send_mp_fail =1 ; +MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_MPFAILTX );
Looks like MPTCP_MIB_DATACSUMERR and MPTCP_MIB_MPFAILTX will always be exactly the same, do we need the new one?
Quoted 8 lines
net/mptcp/subflow.c +0
-0return subflow->mp_join ?MAPPING_INVALID :MAPPING_DUMMY ; }Signature · 1 line
2.31.1
--
Mat Martineau
Intel
Re: [MPTCP][PATCH v2 mptcp-next 3/5] mptcp: send out MP_FAIL when data checksum fail
In reply to Geliang TangQuoted 23 lines · Geliang Tang
When a bad checksum is detected, send out the
MP_FAILsuboption.Signed-off-by Geliang Tang <[email protected]>---
net/mptcp/subflow.c| 15 +++++++++++++++1 file changed, 15 insertions(+)net/mptcp/subflow.c +1
-0@@ -913,6 +913,7 @@ static enum mapping_status validate_data_csum(struct sock *ssk, struct sk_buff * csum =csum_partial (&header,sizeof (header), subflow->map_data_csum);if (unlikely (csum_fold (csum))) {MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_DATACSUMERR ); + subflow->send_mp_fail =1 ;return subflow->mp_join ?MAPPING_INVALID :MAPPING_DUMMY ; }@@ -1159,6 +1160,20 @@ static bool subflow_check_data_avail(struct sock *ssk)return false;fallback:
net/mptcp/subflow.c static bool subflow_check_data_avail(struct sock *ssk) · line 1164
Quoted 2 lines
net/mptcp/subflow.c +2
-0+if (subflow->send_mp_fail) { +if (mptcp_has_another_subflow_established (ssk)) {
mptcp_has_another_subflow_established() can return false if there's another subflow that's not fully established yet. It's not clear what happens to such a join-in-progress subflow in the 'else' case below.
Probably safest to only do the "single subflow fallback" case when there are no other subflows at all.
net/mptcp/subflow.c static bool subflow_check_data_avail(struct sock *ssk) · line 1176
Quoted 12 lines
net/mptcp/subflow.c +12
-0+mptcp_subflow_reset (ssk); +while ((skb =skb_peek (&ssk->sk_receive_queue))) +sk_eat_skb (ssk, skb); + }else { +pr_fallback (msk); +__mptcp_do_fallback (msk); + } + +WRITE_ONCE (subflow->data_avail,0 ); +return true; + } +
Existing fallback code has only been implemented for not-fully-established connections, when the process is much simpler. This checksum-triggered MP_FAIL case could happen when more data is in-flight or queued in the MPTCP socket (ooo queue).
The RFC uses an "infinite mapping" to fallback after a checksum failure, which isn't implemented yet. The MP_FAIL section of the RFC has several requirements around this different type of fallback, including a sender knowing that all in-flight data is contiguous, and other requirements for clearing send buffers with subflow ACKs. This is probably the biggest task for MP_FAIL.
Quoted 5 lines
/* RFC 8684 section 3.7. */ if (subflow->mp_join || subflow->fully_established) { /* fatal protocol error, close the socket.Signature · 1 line
2.31.1
Thanks,
--
Mat Martineau
Intel
Re: [MPTCP][PATCH v2 mptcp-next 2/5] mptcp: MP_FAIL suboption receiving
In reply to Geliang TangQuoted 68 lines · Geliang Tang
This patch added handling for receiving
MP_FAILsuboption.Add a new members
mp_failandfail_seqin structmptcp_options_received. WhenMP_FAILsuboption is received, setmp_failto 1 and save the sequence number tofail_seq.Then invoke
mptcp_pm_mp_fail_receivedto deal with theMP_FAILsuboption. In it, if there is no other established subflow, fallback to TCP.Signed-off-by Geliang Tang <[email protected]>---
net/mptcp/options.c | 16 ++++++++++++++++ net/mptcp/pm.c | 13 +++++++++++++ net/mptcp/protocol.h | 16 ++++++++++++++++ 3 files changed, 45 insertions(+)net/mptcp/options.c +16
-0@@ -336,6 +336,16 @@ static void mptcp_parse_option(const struct sk_buff *skb, mp_opt->reset_reason = *ptr;break ; +case MPTCPOPT_MP_FAIL : +if (opsize !=TCPOLEN_MPTCP_FAIL ) +break ; + + ptr +=2 ; + mp_opt->mp_fail =1 ; + mp_opt->fail_seq =get_unaligned_be64 (ptr); +pr_debug ("MP_FAIL: data_seq=%llu" , mp_opt->fail_seq); +break ; +default :break ; }@@ -364,6 +374,7 @@ void mptcp_get_options(const struct sock *sk, mp_opt->reset =0 ; mp_opt->csum_reqd =READ_ONCE (msk->csum_enabled); mp_opt->deny_join_id0 =0 ; + mp_opt->mp_fail =0 ; length = (th->doff *4 ) -sizeof (struct tcphdr ); ptr = (const unsigned char *)(th +1 );@@ -1123,6 +1134,11 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb) mp_opt.mp_prio =0 ; } +if (mp_opt.mp_fail) { +mptcp_pm_mp_fail_received (sk, mp_opt.fail_seq); + mp_opt.mp_fail =0 ; + } +if (mp_opt.reset) { subflow->reset_seen =1 ; subflow->reset_reason = mp_opt.reset_reason;net/mptcp/pm.c +3
-0@@ -247,6 +247,19 @@ void mptcp_pm_mp_prio_received(struct sock *sk, u8 bkup)mptcp_event (MPTCP_EVENT_SUB_PRIORITY ,mptcp_sk (subflow->conn), sk,GFP_ATOMIC ); } +void mptcp_pm_mp_fail_received (struct sock *sk,u64 fail_seq) +{ +struct mptcp_subflow_context *subflow =mptcp_subflow_ctx (sk);
net/mptcp/pm.c void mptcp_pm_mp_prio_received(struct sock *sk, u8 bkup) · line 262
Quoted 10 lines
net/mptcp/pm.c +10
-0+struct mptcp_sock *msk =mptcp_sk (subflow->conn); + +pr_debug ("map_seq=%llu fail_seq=%llu" , subflow->map_seq, fail_seq); + +if (!mptcp_has_another_subflow_established (sk)) { +pr_fallback (msk); +__mptcp_do_fallback (msk); + } +} +
RFC 8684 also says the receiver of MP_FAIL should respond with MP_FAIL. That would also require some logic so only one MP_FAIL is sent in each direction.
I think there's some more fallback complexity too, see patch 3 reply.
-Mat
Quoted 50 lines
net/mptcp/pm.c +0
-0/* path manager helpers */ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,net/mptcp/protocol.h +16
-0@@ -139,6 +139,7 @@ struct mptcp_options_received { add_addr : 1, rm_addr : 1, mp_prio : 1, + mp_fail : 1, echo : 1, csum_reqd : 1, backup : 1,@@ -160,6 +161,7 @@ struct mptcp_options_received {u64 ahmac; u8 reset_reason:4; u8 reset_transient:1; +u64 fail_seq; };static inline __be32 mptcp_option (u8 subopt,u8 len,u8 nib,u8 field)@@ -591,6 +593,19 @@ static inline void mptcp_subflow_tcp_fallback(struct sock *sk,inet_csk (sk)->icsk_af_ops = ctx->icsk_af_ops; } +static inline bool mptcp_has_another_subflow_established (struct sock *ssk) +{ +struct mptcp_subflow_context *subflow =mptcp_subflow_ctx (ssk), *tmp; +struct mptcp_sock *msk =mptcp_sk (subflow->conn); + +mptcp_for_each_subflow (msk, tmp) { +if (tmp->fully_established && tmp != subflow) +return true; + } + +return false; +} +void __init mptcp_proto_init (void );#if IS_ENABLED (CONFIG_MPTCP_IPV6 )int __init mptcp_proto_v6_init (void );@@ -703,6 +718,7 @@ void mptcp_pm_mp_prio_received(struct sock *sk, u8 bkup);int mptcp_pm_nl_mp_prio_send_ack (struct mptcp_sock *msk,struct mptcp_addr_info *addr,u8 bkup); +void mptcp_pm_mp_fail_received (struct sock *sk,u64 fail_seq);void mptcp_pm_free_anno_list (struct mptcp_sock *msk);bool mptcp_pm_sport_in_anno_list (struct mptcp_sock *msk,const struct sock *sk);
Quoted 6 lines
struct
mptcp_pm_add_entry*Signature · 1 line
2.31.1
--
Mat Martineau
Intel