Skip to content

Commit

Permalink
mptcp: clarify when options can be used
Browse files Browse the repository at this point in the history
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 <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matthieu Baerts authored and David S. Miller committed Feb 3, 2022
1 parent 902c8f8 commit 8cca39e
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions net/mptcp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -1267,8 +1267,27 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
const struct sock *ssk = (const struct sock *)tp;
struct mptcp_subflow_context *subflow;

/* DSS, MPC, MPJ, ADD_ADDR, FASTCLOSE and RST are mutually exclusive,
* see mptcp_established_options*()
/* Which options can be used together?
*
* X: mutually exclusive
* O: often used together
* C: can be used together in some cases
* P: could be used together but we prefer not to (optimisations)
*
* Opt: | MPC | MPJ | DSS | ADD | RM | PRIO | FAIL | FC |
* ------|------|------|------|------|------|------|------|------|
* MPC |------|------|------|------|------|------|------|------|
* MPJ | X |------|------|------|------|------|------|------|
* DSS | X | X |------|------|------|------|------|------|
* ADD | X | X | P |------|------|------|------|------|
* RM | C | C | C | P |------|------|------|------|
* PRIO | X | C | C | C | C |------|------|------|
* FAIL | X | X | C | X | X | X |------|------|
* FC | X | X | X | X | X | X | X |------|
* RST | X | X | X | X | X | X | O | O |
* ------|------|------|------|------|------|------|------|------|
*
* The same applies in mptcp_established_options() function.
*/
if (likely(OPTION_MPTCP_DSS & opts->suboptions)) {
struct mptcp_ext *mpext = &opts->ext_copy;
Expand Down

0 comments on commit 8cca39e

Please sign in to comment.