summaryrefslogtreecommitdiff
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2020-12-10 02:51:26 +0300
committerDavid S. Miller <davem@davemloft.net>2020-12-10 06:02:15 +0300
commit42842a425ad6d1ef1087b63486879a6d54b26893 (patch)
treef66a23e68caa7c99286bf64dd13ff3adb5141cae /net/mptcp/protocol.h
parent90a4aea8b6edff458977361be4b403779c84af80 (diff)
downloadlinux-42842a425ad6d1ef1087b63486879a6d54b26893.tar.xz
mptcp: drop rm_addr_signal flag
This patch reused add_addr_signal for the RM_ADDR announcing signal, by defining a new ADD_ADDR status named MPTCP_RM_ADDR_SIGNAL. Then the flag rm_addr_signal in PM could be dropped. Signed-off-by: Geliang Tang <geliangtang@gmail.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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index e880fa802cdf..f002c12beb98 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -173,6 +173,7 @@ enum mptcp_add_addr_status {
MPTCP_ADD_ADDR_ECHO,
MPTCP_ADD_ADDR_IPV6,
MPTCP_ADD_ADDR_PORT,
+ MPTCP_RM_ADDR_SIGNAL,
};
struct mptcp_pm_data {
@@ -183,7 +184,6 @@ struct mptcp_pm_data {
spinlock_t lock; /*protects the whole PM data */
u8 add_addr_signal;
- bool rm_addr_signal;
bool server_side;
bool work_pending;
bool accept_addr;
@@ -578,7 +578,7 @@ static inline bool mptcp_pm_should_add_signal_port(struct mptcp_sock *msk)
static inline bool mptcp_pm_should_rm_signal(struct mptcp_sock *msk)
{
- return READ_ONCE(msk->pm.rm_addr_signal);
+ return READ_ONCE(msk->pm.add_addr_signal) & BIT(MPTCP_RM_ADDR_SIGNAL);
}
static inline unsigned int mptcp_add_addr_len(int family, bool echo, bool port)