Skip to content

Commit 8cca39e

Browse files
matttbedavem330
authored andcommitted
mptcp: clarify when options can be used
RFC8684 doesn't seem to clearly specify which MPTCP options can be used together. Some options are mutually exclusive -- e.g. MP_CAPABLE and MP_JOIN --, some can be used together -- e.g. DSS + MP_PRIO --, some can but we prefer not to -- e.g. DSS + ADD_ADDR -- and some have to be used together at some points -- e.g. MP_FAIL and DSS. We need to clarify this as a base before allowing other modifications. For example, does it make sense to send a RM_ADDR with an MPC or MPJ? This remains open for possible future discussions. Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 902c8f8 commit 8cca39e

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

net/mptcp/options.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,8 +1267,27 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
12671267
const struct sock *ssk = (const struct sock *)tp;
12681268
struct mptcp_subflow_context *subflow;
12691269

1270-
/* DSS, MPC, MPJ, ADD_ADDR, FASTCLOSE and RST are mutually exclusive,
1271-
* see mptcp_established_options*()
1270+
/* Which options can be used together?
1271+
*
1272+
* X: mutually exclusive
1273+
* O: often used together
1274+
* C: can be used together in some cases
1275+
* P: could be used together but we prefer not to (optimisations)
1276+
*
1277+
* Opt: | MPC | MPJ | DSS | ADD | RM | PRIO | FAIL | FC |
1278+
* ------|------|------|------|------|------|------|------|------|
1279+
* MPC |------|------|------|------|------|------|------|------|
1280+
* MPJ | X |------|------|------|------|------|------|------|
1281+
* DSS | X | X |------|------|------|------|------|------|
1282+
* ADD | X | X | P |------|------|------|------|------|
1283+
* RM | C | C | C | P |------|------|------|------|
1284+
* PRIO | X | C | C | C | C |------|------|------|
1285+
* FAIL | X | X | C | X | X | X |------|------|
1286+
* FC | X | X | X | X | X | X | X |------|
1287+
* RST | X | X | X | X | X | X | O | O |
1288+
* ------|------|------|------|------|------|------|------|------|
1289+
*
1290+
* The same applies in mptcp_established_options() function.
12721291
*/
12731292
if (likely(OPTION_MPTCP_DSS & opts->suboptions)) {
12741293
struct mptcp_ext *mpext = &opts->ext_copy;

0 commit comments

Comments
 (0)