提交 089c3482 编写于 作者: S Shan Wei 提交者: David S. Miller

tcp: Remove debug macro of TCP_CHECK_TIMER

Now, TCP_CHECK_TIMER is not used for debuging, it does nothing.
And, it has been there for several years, maybe 6 years.

Remove it to keep code clearer.
Signed-off-by: NShan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 81146ec1
...@@ -1068,8 +1068,6 @@ static inline int tcp_paws_reject(const struct tcp_options_received *rx_opt, ...@@ -1068,8 +1068,6 @@ static inline int tcp_paws_reject(const struct tcp_options_received *rx_opt,
return 1; return 1;
} }
#define TCP_CHECK_TIMER(sk) do { } while (0)
static inline void tcp_mib_init(struct net *net) static inline void tcp_mib_init(struct net *net)
{ {
/* See RFC 2012 */ /* See RFC 2012 */
......
...@@ -873,9 +873,7 @@ int tcp_sendpage(struct sock *sk, struct page *page, int offset, ...@@ -873,9 +873,7 @@ int tcp_sendpage(struct sock *sk, struct page *page, int offset,
flags); flags);
lock_sock(sk); lock_sock(sk);
TCP_CHECK_TIMER(sk);
res = do_tcp_sendpages(sk, &page, offset, size, flags); res = do_tcp_sendpages(sk, &page, offset, size, flags);
TCP_CHECK_TIMER(sk);
release_sock(sk); release_sock(sk);
return res; return res;
} }
...@@ -916,7 +914,6 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -916,7 +914,6 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
long timeo; long timeo;
lock_sock(sk); lock_sock(sk);
TCP_CHECK_TIMER(sk);
flags = msg->msg_flags; flags = msg->msg_flags;
timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
...@@ -1104,7 +1101,6 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -1104,7 +1101,6 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
out: out:
if (copied) if (copied)
tcp_push(sk, flags, mss_now, tp->nonagle); tcp_push(sk, flags, mss_now, tp->nonagle);
TCP_CHECK_TIMER(sk);
release_sock(sk); release_sock(sk);
return copied; return copied;
...@@ -1123,7 +1119,6 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -1123,7 +1119,6 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
goto out; goto out;
out_err: out_err:
err = sk_stream_error(sk, flags, err); err = sk_stream_error(sk, flags, err);
TCP_CHECK_TIMER(sk);
release_sock(sk); release_sock(sk);
return err; return err;
} }
...@@ -1415,8 +1410,6 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -1415,8 +1410,6 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
lock_sock(sk); lock_sock(sk);
TCP_CHECK_TIMER(sk);
err = -ENOTCONN; err = -ENOTCONN;
if (sk->sk_state == TCP_LISTEN) if (sk->sk_state == TCP_LISTEN)
goto out; goto out;
...@@ -1767,12 +1760,10 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -1767,12 +1760,10 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
/* Clean up data we have read: This will do ACK frames. */ /* Clean up data we have read: This will do ACK frames. */
tcp_cleanup_rbuf(sk, copied); tcp_cleanup_rbuf(sk, copied);
TCP_CHECK_TIMER(sk);
release_sock(sk); release_sock(sk);
return copied; return copied;
out: out:
TCP_CHECK_TIMER(sk);
release_sock(sk); release_sock(sk);
return err; return err;
......
...@@ -1556,12 +1556,10 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) ...@@ -1556,12 +1556,10 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */ if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */
sock_rps_save_rxhash(sk, skb->rxhash); sock_rps_save_rxhash(sk, skb->rxhash);
TCP_CHECK_TIMER(sk);
if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len)) { if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len)) {
rsk = sk; rsk = sk;
goto reset; goto reset;
} }
TCP_CHECK_TIMER(sk);
return 0; return 0;
} }
...@@ -1583,13 +1581,10 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) ...@@ -1583,13 +1581,10 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
} else } else
sock_rps_save_rxhash(sk, skb->rxhash); sock_rps_save_rxhash(sk, skb->rxhash);
TCP_CHECK_TIMER(sk);
if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len)) { if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len)) {
rsk = sk; rsk = sk;
goto reset; goto reset;
} }
TCP_CHECK_TIMER(sk);
return 0; return 0;
reset: reset:
......
...@@ -259,7 +259,6 @@ static void tcp_delack_timer(unsigned long data) ...@@ -259,7 +259,6 @@ static void tcp_delack_timer(unsigned long data)
tcp_send_ack(sk); tcp_send_ack(sk);
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_DELAYEDACKS); NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_DELAYEDACKS);
} }
TCP_CHECK_TIMER(sk);
out: out:
if (tcp_memory_pressure) if (tcp_memory_pressure)
...@@ -481,7 +480,6 @@ static void tcp_write_timer(unsigned long data) ...@@ -481,7 +480,6 @@ static void tcp_write_timer(unsigned long data)
tcp_probe_timer(sk); tcp_probe_timer(sk);
break; break;
} }
TCP_CHECK_TIMER(sk);
out: out:
sk_mem_reclaim(sk); sk_mem_reclaim(sk);
...@@ -589,7 +587,6 @@ static void tcp_keepalive_timer (unsigned long data) ...@@ -589,7 +587,6 @@ static void tcp_keepalive_timer (unsigned long data)
elapsed = keepalive_time_when(tp) - elapsed; elapsed = keepalive_time_when(tp) - elapsed;
} }
TCP_CHECK_TIMER(sk);
sk_mem_reclaim(sk); sk_mem_reclaim(sk);
resched: resched:
......
...@@ -1636,10 +1636,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) ...@@ -1636,10 +1636,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
opt_skb = skb_clone(skb, GFP_ATOMIC); opt_skb = skb_clone(skb, GFP_ATOMIC);
if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */ if (sk->sk_state == TCP_ESTABLISHED) { /* Fast path */
TCP_CHECK_TIMER(sk);
if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len)) if (tcp_rcv_established(sk, skb, tcp_hdr(skb), skb->len))
goto reset; goto reset;
TCP_CHECK_TIMER(sk);
if (opt_skb) if (opt_skb)
goto ipv6_pktoptions; goto ipv6_pktoptions;
return 0; return 0;
...@@ -1667,10 +1665,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) ...@@ -1667,10 +1665,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
} }
} }
TCP_CHECK_TIMER(sk);
if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len)) if (tcp_rcv_state_process(sk, skb, tcp_hdr(skb), skb->len))
goto reset; goto reset;
TCP_CHECK_TIMER(sk);
if (opt_skb) if (opt_skb)
goto ipv6_pktoptions; goto ipv6_pktoptions;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册