Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tcp: remove the hardcode in the definition of TCPF Macro

TCPF_ macro depends on the definition of TCP_ macro.
So it is better to define them with TCP_ marco.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yafang Shao and committed by
David S. Miller
a823fed0 53e20678

+13 -13
+13 -13
include/net/tcp_states.h
··· 32 32 33 33 #define TCP_STATE_MASK 0xF 34 34 35 - #define TCP_ACTION_FIN (1 << 7) 35 + #define TCP_ACTION_FIN (1 << TCP_CLOSE) 36 36 37 37 enum { 38 - TCPF_ESTABLISHED = (1 << 1), 39 - TCPF_SYN_SENT = (1 << 2), 40 - TCPF_SYN_RECV = (1 << 3), 41 - TCPF_FIN_WAIT1 = (1 << 4), 42 - TCPF_FIN_WAIT2 = (1 << 5), 43 - TCPF_TIME_WAIT = (1 << 6), 44 - TCPF_CLOSE = (1 << 7), 45 - TCPF_CLOSE_WAIT = (1 << 8), 46 - TCPF_LAST_ACK = (1 << 9), 47 - TCPF_LISTEN = (1 << 10), 48 - TCPF_CLOSING = (1 << 11), 49 - TCPF_NEW_SYN_RECV = (1 << 12), 38 + TCPF_ESTABLISHED = (1 << TCP_ESTABLISHED), 39 + TCPF_SYN_SENT = (1 << TCP_SYN_SENT), 40 + TCPF_SYN_RECV = (1 << TCP_SYN_RECV), 41 + TCPF_FIN_WAIT1 = (1 << TCP_FIN_WAIT1), 42 + TCPF_FIN_WAIT2 = (1 << TCP_FIN_WAIT2), 43 + TCPF_TIME_WAIT = (1 << TCP_TIME_WAIT), 44 + TCPF_CLOSE = (1 << TCP_CLOSE), 45 + TCPF_CLOSE_WAIT = (1 << TCP_CLOSE_WAIT), 46 + TCPF_LAST_ACK = (1 << TCP_LAST_ACK), 47 + TCPF_LISTEN = (1 << TCP_LISTEN), 48 + TCPF_CLOSING = (1 << TCP_CLOSING), 49 + TCPF_NEW_SYN_RECV = (1 << TCP_NEW_SYN_RECV), 50 50 }; 51 51 52 52 #endif /* _LINUX_TCP_STATES_H */