mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited
Use the more common dynamic_debug capable net_dbg_ratelimited and remove the LIMIT_NETDEBUG macro. All messages are still ratelimited. Some KERN_<LEVEL> uses are changed to KERN_DEBUG. This may have some negative impact on messages that were emitted at KERN_INFO that are not not enabled at all unless DEBUG is defined or dynamic_debug is enabled. Even so, these messages are now _not_ emitted by default. This also eliminates the use of the net_msg_warn sysctl "/proc/sys/net/core/warnings". For backward compatibility, the sysctl is not removed, but it has no function. The extern declaration of net_msg_warn is removed from sock.h and made static in net/core/sysctl_net_core.c Miscellanea: o Update the sysctl documentation o Remove the embedded uses of pr_fmt o Coalesce format fragments o Realign arguments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5b61c4db49
commit
ba7a46f16d
23 changed files with 105 additions and 116 deletions
|
@ -374,17 +374,19 @@ void tcp_retransmit_timer(struct sock *sk)
|
|||
*/
|
||||
struct inet_sock *inet = inet_sk(sk);
|
||||
if (sk->sk_family == AF_INET) {
|
||||
LIMIT_NETDEBUG(KERN_DEBUG pr_fmt("Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n"),
|
||||
&inet->inet_daddr,
|
||||
ntohs(inet->inet_dport), inet->inet_num,
|
||||
tp->snd_una, tp->snd_nxt);
|
||||
net_dbg_ratelimited("Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",
|
||||
&inet->inet_daddr,
|
||||
ntohs(inet->inet_dport),
|
||||
inet->inet_num,
|
||||
tp->snd_una, tp->snd_nxt);
|
||||
}
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
else if (sk->sk_family == AF_INET6) {
|
||||
LIMIT_NETDEBUG(KERN_DEBUG pr_fmt("Peer %pI6:%u/%u unexpectedly shrunk window %u:%u (repaired)\n"),
|
||||
&sk->sk_v6_daddr,
|
||||
ntohs(inet->inet_dport), inet->inet_num,
|
||||
tp->snd_una, tp->snd_nxt);
|
||||
net_dbg_ratelimited("Peer %pI6:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",
|
||||
&sk->sk_v6_daddr,
|
||||
ntohs(inet->inet_dport),
|
||||
inet->inet_num,
|
||||
tp->snd_una, tp->snd_nxt);
|
||||
}
|
||||
#endif
|
||||
if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue