Move MPTCP #defines to internal header
Subsystems (3)
Peter Krystad
cover Move MPTCP #defines to internal header
Like it says...
Peter Krystad (4):
mptcp: Move TCPOLEN #defines to protocol.h
mptcp: Move TCPOLEN #defines to protocol.h
mptcp: Move TCPOLEN #defines to protocol.h
mptcp: make flag field naming consistent
include/net/tcp.h | 9 --------- net/mptcp/options.c | 4 ++-- net/mptcp/protocol.h | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 14 deletions(-)
Signature · 1 line
2.17.2
Peter Krystad
PATCH 1/4 mptcp: Move TCPOLEN #defines to protocol.h
squashto: Handle MPTCP TCP options
--- include/net/tcp.h | 3 --- net/mptcp/protocol.h | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-)
include/net/tcp.h +0 -3
@@ -212,9 +212,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOLEN_MD5SIG_ALIGNED 20#define TCPOLEN_MSS_ALIGNED 4#define TCPOLEN_EXP_SMC_BASE_ALIGNED 8 -#define TCPOLEN_MPTCP_MPC_SYN 12 -#define TCPOLEN_MPTCP_MPC_SYNACK 20 -#define TCPOLEN_MPTCP_MPC_ACK 20#define TCPOLEN_MPTCP_DSS_BASE 4#define TCPOLEN_MPTCP_DSS_ACK32 4#define TCPOLEN_MPTCP_DSS_ACK64 8
net/mptcp/protocol.h +5 -0
@@ -20,6 +20,11 @@#define MPTCPOPT_MP_FAIL 6#define MPTCPOPT_MP_FASTCLOSE 7 +/* MPTCP suboption lengths */ +#define TCPOLEN_MPTCP_MPC_SYN 12 +#define TCPOLEN_MPTCP_MPC_SYNACK 20 +#define TCPOLEN_MPTCP_MPC_ACK 20 +#define MPTCPOPT_VERSION_MASK 0x0F/* MPTCP handshake flags */
Signature · 1 line
2.17.2
Peter Krystad
PATCH 2/4 mptcp: Move TCPOLEN #defines to protocol.h
In reply to Peter Krystadsquashto: Write MTPCP DSS headers....
--- include/net/tcp.h | 4 ---- net/mptcp/protocol.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)
include/net/tcp.h +0 -4
@@ -212,12 +212,8 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOLEN_MD5SIG_ALIGNED 20#define TCPOLEN_MSS_ALIGNED 4#define TCPOLEN_EXP_SMC_BASE_ALIGNED 8 -#define TCPOLEN_MPTCP_DSS_BASE 4#define TCPOLEN_MPTCP_DSS_ACK32 4 -#define TCPOLEN_MPTCP_DSS_ACK64 8#define TCPOLEN_MPTCP_DSS_MAP32 10 -#define TCPOLEN_MPTCP_DSS_MAP64 14 -#define TCPOLEN_MPTCP_DSS_CHECKSUM 2/* Flags in tp->nonagle */ #define TCP_NAGLE_OFF 1/* Nagle's algo is disabled */
net/mptcp/protocol.h +4 -0
@@ -24,6 +24,10 @@#define TCPOLEN_MPTCP_MPC_SYN 12#define TCPOLEN_MPTCP_MPC_SYNACK 20#define TCPOLEN_MPTCP_MPC_ACK 20 +#define TCPOLEN_MPTCP_DSS_BASE 4 +#define TCPOLEN_MPTCP_DSS_ACK64 8 +#define TCPOLEN_MPTCP_DSS_MAP64 14 +#define TCPOLEN_MPTCP_DSS_CHECKSUM 2#define MPTCPOPT_VERSION_MASK 0x0F
Signature · 1 line
2.17.2
Peter Krystad
PATCH 3/4 mptcp: Move TCPOLEN #defines to protocol.h
In reply to Peter Krystadsquashto: Implement MTPCP receive path
--- include/net/tcp.h | 2 -- net/mptcp/protocol.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)
include/net/tcp.h +0 -2
@@ -212,8 +212,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOLEN_MD5SIG_ALIGNED 20#define TCPOLEN_MSS_ALIGNED 4#define TCPOLEN_EXP_SMC_BASE_ALIGNED 8 -#define TCPOLEN_MPTCP_DSS_ACK32 4 -#define TCPOLEN_MPTCP_DSS_MAP32 10/* Flags in tp->nonagle */ #define TCP_NAGLE_OFF 1/* Nagle's algo is disabled */
net/mptcp/protocol.h +2 -0
@@ -25,7 +25,9 @@#define TCPOLEN_MPTCP_MPC_SYNACK 20#define TCPOLEN_MPTCP_MPC_ACK 20#define TCPOLEN_MPTCP_DSS_BASE 4 +#define TCPOLEN_MPTCP_DSS_ACK32 4#define TCPOLEN_MPTCP_DSS_ACK64 8 +#define TCPOLEN_MPTCP_DSS_MAP32 10#define TCPOLEN_MPTCP_DSS_MAP64 14#define TCPOLEN_MPTCP_DSS_CHECKSUM 2
Signature · 1 line
2.17.2
Peter Krystad
PATCH 4/4 mptcp: make flag field naming consistent
In reply to Peter Krystadsquashto: Handle MPTCP TCP options
--- net/mptcp/options.c | 4 ++-- net/mptcp/protocol.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-)
net/mptcp/options.c +2 -2
@@ -29,7 +29,7 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize, opsize != TCPOLEN_MPTCP_MPC_SYNACK)break ; - mp_opt->version = *ptr++ &MPTCPOPT_VERSION_MASK ; + mp_opt->version = *ptr++ &MPTCP_VERSION_MASK ;if (mp_opt->version !=0 )break ;
@@ -430,7 +430,7 @@ void mptcp_write_options(__be32 *ptr, struct mptcp_out_options *opts) *ptr++ =htonl ((TCPOPT_MPTCP <<24 ) | (len <<16 ) | (MPTCPOPT_MP_CAPABLE <<12 ) | - ((MPTCPOPT_VERSION_MASK &0 ) <<8 ) | + ((MPTCP_VERSION_MASK &0 ) <<8 ) |MPTCP_CAP_HMAC_SHA1 );put_unaligned_be64 (opts->sndr_key, ptr); ptr +=2 ;
net/mptcp/protocol.h +2 -3
@@ -31,9 +31,8 @@#define TCPOLEN_MPTCP_DSS_MAP64 14#define TCPOLEN_MPTCP_DSS_CHECKSUM 2 -#define MPTCPOPT_VERSION_MASK 0x0F - -/* MPTCP handshake flags */ +/* MPTCP MP_CAPABLE flags */ +#define MPTCP_VERSION_MASK (0x0F)#define MPTCP_CAP_CHECKSUM_REQD BIT(7)#define MPTCP_CAP_EXTENSIBILITY BIT(6)#define MPTCP_CAP_HMAC_SHA1 BIT(0)
Signature · 1 line
2.17.2
Paolo Abeni
Hi,
Quoted 8 lines · Peter Krystad
Like it says...
Peter Krystad (4):
mptcp: Move TCPOLEN #defines toprotocol.h
mptcp: Move TCPOLEN #defines toprotocol.h
mptcp: Move TCPOLEN #defines toprotocol.h
mptcp: make flag field naming consistent
Quoted 4 lines
include/net/tcp.h | 9 --------- net/mptcp/options.c | 4 ++-- net/mptcp/protocol.h | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 14 deletions(-)
Thank you for following-up so fastly! I like how you split the changes to hopefully simplify the merge.
LGTM,
Thanks!
Paolo
Matthieu Baerts
Hi Peter, Paolo,
Quoted 7 lines · Peter Krystad
Like it says...
Peter Krystad (4):
mptcp: Move TCPOLEN #defines toprotocol.h
mptcp: Move TCPOLEN #defines toprotocol.h
mptcp: Move TCPOLEN #defines toprotocol.h
mptcp: make flag field naming consistent
Thank you for the patches and the review!
1)
- 04315cde541a: "squash" in "mptcp: Handle MPTCP TCP options" (with a
small conflict)
- 24d7971f53d8: conflict
- 952528707b4d: conflict
2)
- c8bd7a330237: "squash" in "mptcp: Write MPTCP DSS headers to
outgoing data packets"
- 7f26de3a2add: conflict
3)
- cd98bf4f67da: "squash" in "mptcp: Implement MPTCP receive path"
- no conflict
4)
- c7a47030a18b: "squash" in "mptcp: Handle MPTCP TCP options"
- no conflict
9ff7aba894d0..f9b94b899a7f: result
All signed-off were already there.
Tests are all OK.
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium