diff options
author | Paolo Abeni <pabeni@redhat.com> | 2021-08-25 02:26:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-25 13:02:34 +0300 |
commit | 1bff1e43a30e2f7500a49d47fd26a425643a6a37 (patch) | |
tree | 709380b8d0f05236e65cff9552b847647b150bee /net/mptcp/protocol.h | |
parent | d484dc2b21a71642665159d2f7c33828e637ab91 (diff) | |
download | linux-1bff1e43a30e2f7500a49d47fd26a425643a6a37.tar.xz |
mptcp: optimize out option generation
Currently we have several protocol constraints on MPTCP options
generation (e.g. MPC and MPJ subopt are mutually exclusive)
and some additional ones required by our implementation
(e.g. almost all ADD_ADDR variant are mutually exclusive with
everything else).
We can leverage the above to optimize the out option generation:
we check DSS/MPC/MPJ presence in a mutually exclusive way,
avoiding many unneeded conditionals in the common cases.
Additionally extend the existing constraints on ADD_ADDR opt on
all subvariants, so that it becomes fully mutually exclusive with
the above and we can skip another conditional statement for the
common case.
This change is also needed by the next patch.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r-- | net/mptcp/protocol.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 7cd3d5979bcd..d276ce16f126 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -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_DSS BIT(11) /* MPTCP option subtypes */ #define MPTCPOPT_MP_CAPABLE 0 |