Disable TCP_DEBUG and FASTRETRANS_DEBUG by default
Subsystems (3)
PATCH 1/1 Disable TCP_DEBUG and FASTRETRANS_DEBUG by default
If these are truly debug options, they should be turned off by default and can be tweaked if necessary. Fix one usage of the flag to use #if instead of #ifdef so defining to zero is acceptable.
--- include/net/tcp.h | 4 ++-- net/ipv4/tcp_timer.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
include/net/tcp.h +2 -2
@@ -18,8 +18,8 @@#ifndef _TCP_H#define _TCP_H -#define TCP_DEBUG 1 -#define FASTRETRANS_DEBUG 1 +#define TCP_DEBUG 0 +#define FASTRETRANS_DEBUG 0#include <linux/list.h> #include <linux/tcp.h>
net/ipv4/tcp_timer.c +1 -1
@@ -334,7 +334,7 @@ void tcp_retransmit_timer(struct sock *sk)* connection. If the socket is an orphan, time it out, * we cannot allow such beasts to hang infinitely. */ -#ifdef TCP_DEBUG +#if TCP_DEBUG struct inet_sock *inet =inet_sk (sk);if (sk->sk_family ==AF_INET ) { LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",
Signature · 1 line
1.7.7
David Miller
maintainerFrom: Dan McGee <[email protected]>
Date: Mon, 17 Oct 2011 15:25:24 -0500
Quoted 5 lines
If these are truly debug options, they should be turned off by default and can be tweaked if necessary. Fix one usage of the flag to use #if instead of #ifdef so defining to zero is acceptable.
Signed-off-by Dan McGee <[email protected]>
Illegal window shrinks are a serious issue, and the fact that everyone will see those messages by default and sometimes report them has been tremendously useful.
Quoted 7 lines · On Mon, 17 Oct 2011 17:52:38 -0400 (EDT) David Miller <[email protected]>…
From: Dan McGee <[email protected]>
Date: Mon, 17 Oct 2011 15:25:24 -0500Quoted 4 lines
If these are truly debug options, they should be turned off by default and can be tweaked if necessary. Fix one usage of the flag to use #if instead of #ifdef so defining to zero is acceptable.
Quoted 6 lines
Quoted 1 line
Signed-off-by Dan McGee <[email protected]>Illegal window shrinks are a serious issue, and the fact that everyone will see those messages by default and sometimes report them has been tremendously useful.
Agreed. I recently got bug report because of that message. It is useful and doesn't disturbe when network is fine, so please don't remove it.
fbl
Quoted 12 lines · Flavio Leitner
Quoted 9 lines · On Mon, 17 Oct 2011 17:52:38 -0400 (EDT) David Miller <[email protected]>…
From: Dan McGee <[email protected]>
Date: Mon, 17 Oct 2011 15:25:24 -0500Quoted 5 lines
If these are truly debug options, they should be turned off by default and can be tweaked if necessary. Fix one usage of the flag to use #if instead of #ifdef so defining to zero is acceptable.
Signed-off-by Dan McGee <[email protected]>
Quoted 7 lines
Quoted 4 lines
Illegal window shrinks are a serious issue, and the fact that everyone will see those messages by default and sometimes report them has been tremendously useful.
Agreed. I recently got bug report because of that message. It is useful and doesn't disturbe when network is fine, so please don't remove it.
Can we kill TCP_DEBUG completely then? This is the only place it is used, and it clearly is mislabeled if this is a "serious" and "useful" feature.
Can anyone weigh in on FASTRETRANS_DEBUG and setting that to 0 by default?
-Dan
PATCH 1/1 TCP: remove TCP_DEBUG
It was enabled by default and the messages guarded by the define are useful.
--- include/net/tcp.h | 1 - net/ipv4/tcp.c | 2 -- net/ipv4/tcp_timer.c | 2 -- 3 files changed, 0 insertions(+), 5 deletions(-)
include/net/tcp.h +0 -1
@@ -18,7 +18,6 @@#ifndef _TCP_H#define _TCP_H -#define TCP_DEBUG 1#define FASTRETRANS_DEBUG 1#include <linux/list.h>
net/ipv4/tcp.c +0 -2
@@ -1193,13 +1193,11 @@ void tcp_cleanup_rbuf(struct sock *sk, int copied)struct tcp_sock *tp =tcp_sk (sk);int time_to_ack =0 ; -#if TCP_DEBUG struct sk_buff *skb =skb_peek (&sk->sk_receive_queue);WARN (skb && !before (tp->copied_seq,TCP_SKB_CB (skb)->end_seq),"cleanup rbuf bug: copied %X seq %X rcvnxt %X\n" , tp->copied_seq,TCP_SKB_CB (skb)->end_seq, tp->rcv_nxt); -#endif if (inet_csk_ack_scheduled (sk)) {const struct inet_connection_sock *icsk =inet_csk (sk);
net/ipv4/tcp_timer.c +0 -2
@@ -334,7 +334,6 @@ void tcp_retransmit_timer(struct sock *sk)* connection. If the socket is an orphan, time it out, * we cannot allow such beasts to hang infinitely. */ -#ifdef TCP_DEBUG struct inet_sock *inet =inet_sk (sk);if (sk->sk_family ==AF_INET ) { LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",
@@ -349,7 +348,6 @@ void tcp_retransmit_timer(struct sock *sk) inet->inet_num, tp->snd_una, tp->snd_nxt); }#endif -#endif if (tcp_time_stamp - tp->rcv_tstamp >TCP_RTO_MAX ) {tcp_write_err (sk); goto out;
Signature · 1 line
1.7.6
Re: [PATCH] TCP: remove TCP_DEBUG
From: Flavio Leitner <[email protected]>
Date: Mon, 24 Oct 2011 16:15:10 -0200
Quoted 4 lines
It was enabled by default and the messages guarded by the define are useful.
Signed-off-by Flavio Leitner <[email protected]>
Applied, thanks Flavio.