瀏覽代碼

TCP: remove TCP_DEBUG

It was enabled by default and the messages guarded
by the define are useful.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Flavio Leitner 13 年之前
父節點
當前提交
78d81d15b7
共有 3 個文件被更改,包括 0 次插入5 次删除
  1. 0 1
      include/net/tcp.h
  2. 0 2
      net/ipv4/tcp.c
  3. 0 2
      net/ipv4/tcp_timer.c

+ 0 - 1
include/net/tcp.h

@@ -18,7 +18,6 @@
 #ifndef _TCP_H
 #ifndef _TCP_H
 #define _TCP_H
 #define _TCP_H
 
 
-#define TCP_DEBUG 1
 #define FASTRETRANS_DEBUG 1
 #define FASTRETRANS_DEBUG 1
 
 
 #include <linux/list.h>
 #include <linux/list.h>

+ 0 - 2
net/ipv4/tcp.c

@@ -1193,13 +1193,11 @@ void tcp_cleanup_rbuf(struct sock *sk, int copied)
 	struct tcp_sock *tp = tcp_sk(sk);
 	struct tcp_sock *tp = tcp_sk(sk);
 	int time_to_ack = 0;
 	int time_to_ack = 0;
 
 
-#if TCP_DEBUG
 	struct sk_buff *skb = skb_peek(&sk->sk_receive_queue);
 	struct sk_buff *skb = skb_peek(&sk->sk_receive_queue);
 
 
 	WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq),
 	WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq),
 	     "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
 	     "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
 	     tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt);
 	     tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt);
-#endif
 
 
 	if (inet_csk_ack_scheduled(sk)) {
 	if (inet_csk_ack_scheduled(sk)) {
 		const struct inet_connection_sock *icsk = inet_csk(sk);
 		const struct inet_connection_sock *icsk = inet_csk(sk);

+ 0 - 2
net/ipv4/tcp_timer.c

@@ -334,7 +334,6 @@ void tcp_retransmit_timer(struct sock *sk)
 		 * connection. If the socket is an orphan, time it out,
 		 * connection. If the socket is an orphan, time it out,
 		 * we cannot allow such beasts to hang infinitely.
 		 * we cannot allow such beasts to hang infinitely.
 		 */
 		 */
-#ifdef TCP_DEBUG
 		struct inet_sock *inet = inet_sk(sk);
 		struct inet_sock *inet = inet_sk(sk);
 		if (sk->sk_family == AF_INET) {
 		if (sk->sk_family == AF_INET) {
 			LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",
 			LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",
@@ -348,7 +347,6 @@ void tcp_retransmit_timer(struct sock *sk)
 			       &np->daddr, ntohs(inet->inet_dport),
 			       &np->daddr, ntohs(inet->inet_dport),
 			       inet->inet_num, tp->snd_una, tp->snd_nxt);
 			       inet->inet_num, tp->snd_una, tp->snd_nxt);
 		}
 		}
-#endif
 #endif
 #endif
 		if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) {
 		if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) {
 			tcp_write_err(sk);
 			tcp_write_err(sk);