mptcp: consolidate in_opt sub-options fields in a bitmask
This makes input options processing more consistent with output ones and will simplify the next patch. Also avoid clearing the suboption field after processing it, since it's not needed. 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>
This commit is contained in:
committed by
David S. Miller
parent
a086aebae0
commit
74c7dfbee3
@@ -29,6 +29,13 @@
|
||||
#define OPTION_MPTCP_DSS BIT(11)
|
||||
#define OPTION_MPTCP_FAIL BIT(12)
|
||||
|
||||
#define OPTION_MPTCP_CSUMREQD BIT(13)
|
||||
|
||||
#define OPTIONS_MPTCP_MPC (OPTION_MPTCP_MPC_SYN | OPTION_MPTCP_MPC_SYNACK | \
|
||||
OPTION_MPTCP_MPC_ACK)
|
||||
#define OPTIONS_MPTCP_MPJ (OPTION_MPTCP_MPJ_SYN | OPTION_MPTCP_MPJ_SYNACK | \
|
||||
OPTION_MPTCP_MPJ_SYNACK)
|
||||
|
||||
/* MPTCP option subtypes */
|
||||
#define MPTCPOPT_MP_CAPABLE 0
|
||||
#define MPTCPOPT_MP_JOIN 1
|
||||
@@ -132,16 +139,7 @@ struct mptcp_options_received {
|
||||
u32 subflow_seq;
|
||||
u16 data_len;
|
||||
__sum16 csum;
|
||||
u16 mp_capable : 1,
|
||||
mp_join : 1,
|
||||
fastclose : 1,
|
||||
reset : 1,
|
||||
dss : 1,
|
||||
add_addr : 1,
|
||||
rm_addr : 1,
|
||||
mp_prio : 1,
|
||||
csum_reqd : 1,
|
||||
mp_fail : 1;
|
||||
u16 suboptions;
|
||||
u32 token;
|
||||
u32 nonce;
|
||||
u16 use_map:1,
|
||||
|
||||
Reference in New Issue
Block a user