Add hooks to parse and format the MP_CAPABLE option. This option is handled according to MPTCP version 0 (RFC6824). MPTCP version 1 MP_CAPABLE (RFC6824bis/RFC8684) will be added later in coordination with related code changes.
Showing the changes to include/linux (1 of 7 files). Show all
Unified · Split
| @@ -78,6 +78,16 @@ struct tcp_sack_block { · 77 unmodified lines | |||
| 78 | #define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */ | 78 | #define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */ |
| 79 | #define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/ | 79 | #define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/ |
| 80 | 80 | ||
| 81 | #if IS_ENABLED(CONFIG_MPTCP) | ||
| 82 | struct mptcp_options_received { | ||
| 83 | u64 sndr_key; | ||
| 84 | u64 rcvr_key; | ||
| 85 | u8 mp_capable : 1, | ||
| 86 | mp_join : 1, | ||
| 87 | dss : 1; | ||
| 88 | }; | ||
| 89 | #endif | ||
| 90 | |||
| 81 | struct tcp_options_received { | 91 | struct tcp_options_received { |
| 82 | /* PAWS/RTTM data */ | 92 | /* PAWS/RTTM data */ |
| 83 | int ts_recent_stamp;/* Time we stored ts_recent (for aging) */ | 93 | int ts_recent_stamp;/* Time we stored ts_recent (for aging) */ |
| @@ -95,6 +105,9 @@ struct tcp_options_received { · 11 unmodified lines | |||
| 95 | u8 num_sacks; /* Number of SACK blocks */ | 105 | u8 num_sacks; /* Number of SACK blocks */ |
| 96 | u16 user_mss; /* mss requested by user in ioctl */ | 106 | u16 user_mss; /* mss requested by user in ioctl */ |
| 97 | u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ | 107 | u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ |
| 108 | #if IS_ENABLED(CONFIG_MPTCP) | ||
| 109 | struct mptcp_options_received mptcp; | ||
| 110 | #endif | ||
| 98 | }; | 111 | }; |
| 99 | 112 | ||
| 100 | static inline void tcp_clear_options(struct tcp_options_received *rx_opt) | 113 | static inline void tcp_clear_options(struct tcp_options_received *rx_opt) |
| @@ -104,6 +117,11 @@ static inline void tcp_clear_options(struct tcp_options_received *rx_opt) · 3 unmodified lines | |||
| 104 | #if IS_ENABLED(CONFIG_SMC) | 117 | #if IS_ENABLED(CONFIG_SMC) |
| 105 | rx_opt->smc_ok = 0; | 118 | rx_opt->smc_ok = 0; |
| 106 | #endif | 119 | #endif |
| 120 | #if IS_ENABLED(CONFIG_MPTCP) | ||
| 121 | rx_opt->mptcp.mp_capable = 0; | ||
| 122 | rx_opt->mptcp.mp_join = 0; | ||
| 123 | rx_opt->mptcp.dss = 0; | ||
| 124 | #endif | ||
| 107 | } | 125 | } |
| 108 | 126 | ||
| 109 | /* This is the max number of SACKS that we'll generate and process. It's safe | 127 | /* This is the max number of SACKS that we'll generate and process. It's safe |