Commit 8cca39e2 authored by Matthieu Baerts's avatar Matthieu Baerts Committed by David S. Miller

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: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 902c8f86
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment