Commit 90bbcc60 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: tcp: rename TCP_INC_STATS_BH

Rename TCP_INC_STATS_BH() to __TCP_INC_STATS()
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b540f9d7
...@@ -332,7 +332,7 @@ bool tcp_check_oom(struct sock *sk, int shift); ...@@ -332,7 +332,7 @@ bool tcp_check_oom(struct sock *sk, int shift);
extern struct proto tcp_prot; extern struct proto tcp_prot;
#define TCP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.tcp_statistics, field) #define TCP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.tcp_statistics, field)
#define TCP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field) #define __TCP_INC_STATS(net, field) SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field)
#define TCP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->mib.tcp_statistics, field) #define TCP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->mib.tcp_statistics, field)
#define TCP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val) #define TCP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val)
......
...@@ -3091,7 +3091,7 @@ void tcp_done(struct sock *sk) ...@@ -3091,7 +3091,7 @@ void tcp_done(struct sock *sk)
struct request_sock *req = tcp_sk(sk)->fastopen_rsk; struct request_sock *req = tcp_sk(sk)->fastopen_rsk;
if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV)
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS);
tcp_set_state(sk, TCP_CLOSE); tcp_set_state(sk, TCP_CLOSE);
tcp_clear_xmit_timers(sk); tcp_clear_xmit_timers(sk);
......
...@@ -5233,7 +5233,7 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, ...@@ -5233,7 +5233,7 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb,
if (th->syn) { if (th->syn) {
syn_challenge: syn_challenge:
if (syn_inerr) if (syn_inerr)
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_INERRS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS);
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSYNCHALLENGE); NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSYNCHALLENGE);
tcp_send_challenge_ack(sk, skb); tcp_send_challenge_ack(sk, skb);
goto discard; goto discard;
...@@ -5349,7 +5349,7 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb, ...@@ -5349,7 +5349,7 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
tcp_data_snd_check(sk); tcp_data_snd_check(sk);
return; return;
} else { /* Header too small */ } else { /* Header too small */
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_INERRS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS);
goto discard; goto discard;
} }
} else { } else {
...@@ -5456,8 +5456,8 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb, ...@@ -5456,8 +5456,8 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
return; return;
csum_error: csum_error:
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_CSUMERRORS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_CSUMERRORS);
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_INERRS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS);
discard: discard:
tcp_drop(sk, skb); tcp_drop(sk, skb);
......
...@@ -697,8 +697,8 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb) ...@@ -697,8 +697,8 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
&arg, arg.iov[0].iov_len); &arg, arg.iov[0].iov_len);
TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); __TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
TCP_INC_STATS_BH(net, TCP_MIB_OUTRSTS); __TCP_INC_STATS(net, TCP_MIB_OUTRSTS);
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
out: out:
...@@ -779,7 +779,7 @@ static void tcp_v4_send_ack(struct net *net, ...@@ -779,7 +779,7 @@ static void tcp_v4_send_ack(struct net *net,
ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
&arg, arg.iov[0].iov_len); &arg, arg.iov[0].iov_len);
TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); __TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
} }
static void tcp_v4_timewait_ack(struct sock *sk, struct sk_buff *skb) static void tcp_v4_timewait_ack(struct sock *sk, struct sk_buff *skb)
...@@ -1432,8 +1432,8 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) ...@@ -1432,8 +1432,8 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
return 0; return 0;
csum_err: csum_err:
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_CSUMERRORS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_CSUMERRORS);
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_INERRS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS);
goto discard; goto discard;
} }
EXPORT_SYMBOL(tcp_v4_do_rcv); EXPORT_SYMBOL(tcp_v4_do_rcv);
...@@ -1547,7 +1547,7 @@ int tcp_v4_rcv(struct sk_buff *skb) ...@@ -1547,7 +1547,7 @@ int tcp_v4_rcv(struct sk_buff *skb)
goto discard_it; goto discard_it;
/* Count it even if it's bad */ /* Count it even if it's bad */
TCP_INC_STATS_BH(net, TCP_MIB_INSEGS); __TCP_INC_STATS(net, TCP_MIB_INSEGS);
if (!pskb_may_pull(skb, sizeof(struct tcphdr))) if (!pskb_may_pull(skb, sizeof(struct tcphdr)))
goto discard_it; goto discard_it;
...@@ -1679,9 +1679,9 @@ int tcp_v4_rcv(struct sk_buff *skb) ...@@ -1679,9 +1679,9 @@ int tcp_v4_rcv(struct sk_buff *skb)
if (tcp_checksum_complete(skb)) { if (tcp_checksum_complete(skb)) {
csum_error: csum_error:
TCP_INC_STATS_BH(net, TCP_MIB_CSUMERRORS); __TCP_INC_STATS(net, TCP_MIB_CSUMERRORS);
bad_packet: bad_packet:
TCP_INC_STATS_BH(net, TCP_MIB_INERRS); __TCP_INC_STATS(net, TCP_MIB_INERRS);
} else { } else {
tcp_v4_send_reset(NULL, skb); tcp_v4_send_reset(NULL, skb);
} }
......
...@@ -545,7 +545,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -545,7 +545,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
newtp->rack.mstamp.v64 = 0; newtp->rack.mstamp.v64 = 0;
newtp->rack.advanced = 0; newtp->rack.advanced = 0;
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_PASSIVEOPENS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_PASSIVEOPENS);
} }
return newsk; return newsk;
} }
...@@ -729,7 +729,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb, ...@@ -729,7 +729,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
* "fourth, check the SYN bit" * "fourth, check the SYN bit"
*/ */
if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) { if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) {
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS);
goto embryonic_reset; goto embryonic_reset;
} }
......
...@@ -3042,7 +3042,7 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst, ...@@ -3042,7 +3042,7 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
th->window = htons(min(req->rsk_rcv_wnd, 65535U)); th->window = htons(min(req->rsk_rcv_wnd, 65535U));
tcp_options_write((__be32 *)(th + 1), NULL, &opts); tcp_options_write((__be32 *)(th + 1), NULL, &opts);
th->doff = (tcp_header_size >> 2); th->doff = (tcp_header_size >> 2);
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_OUTSEGS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
/* Okay, we have all we need - do the md5 hash if needed */ /* Okay, we have all we need - do the md5 hash if needed */
...@@ -3540,7 +3540,7 @@ int tcp_rtx_synack(const struct sock *sk, struct request_sock *req) ...@@ -3540,7 +3540,7 @@ int tcp_rtx_synack(const struct sock *sk, struct request_sock *req)
tcp_rsk(req)->txhash = net_tx_rndhash(); tcp_rsk(req)->txhash = net_tx_rndhash();
res = af_ops->send_synack(sk, NULL, &fl, req, NULL, TCP_SYNACK_NORMAL); res = af_ops->send_synack(sk, NULL, &fl, req, NULL, TCP_SYNACK_NORMAL);
if (!res) { if (!res) {
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_RETRANSSEGS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_RETRANSSEGS);
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSYNRETRANS); NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSYNRETRANS);
} }
return res; return res;
......
...@@ -825,9 +825,9 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32 ...@@ -825,9 +825,9 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
if (!IS_ERR(dst)) { if (!IS_ERR(dst)) {
skb_dst_set(buff, dst); skb_dst_set(buff, dst);
ip6_xmit(ctl_sk, buff, &fl6, NULL, tclass); ip6_xmit(ctl_sk, buff, &fl6, NULL, tclass);
TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); __TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
if (rst) if (rst)
TCP_INC_STATS_BH(net, TCP_MIB_OUTRSTS); __TCP_INC_STATS(net, TCP_MIB_OUTRSTS);
return; return;
} }
...@@ -1276,8 +1276,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) ...@@ -1276,8 +1276,8 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
kfree_skb(skb); kfree_skb(skb);
return 0; return 0;
csum_err: csum_err:
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_CSUMERRORS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_CSUMERRORS);
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_INERRS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS);
goto discard; goto discard;
...@@ -1359,7 +1359,7 @@ static int tcp_v6_rcv(struct sk_buff *skb) ...@@ -1359,7 +1359,7 @@ static int tcp_v6_rcv(struct sk_buff *skb)
/* /*
* Count it even if it's bad. * Count it even if it's bad.
*/ */
TCP_INC_STATS_BH(net, TCP_MIB_INSEGS); __TCP_INC_STATS(net, TCP_MIB_INSEGS);
if (!pskb_may_pull(skb, sizeof(struct tcphdr))) if (!pskb_may_pull(skb, sizeof(struct tcphdr)))
goto discard_it; goto discard_it;
...@@ -1472,9 +1472,9 @@ static int tcp_v6_rcv(struct sk_buff *skb) ...@@ -1472,9 +1472,9 @@ static int tcp_v6_rcv(struct sk_buff *skb)
if (tcp_checksum_complete(skb)) { if (tcp_checksum_complete(skb)) {
csum_error: csum_error:
TCP_INC_STATS_BH(net, TCP_MIB_CSUMERRORS); __TCP_INC_STATS(net, TCP_MIB_CSUMERRORS);
bad_packet: bad_packet:
TCP_INC_STATS_BH(net, TCP_MIB_INERRS); __TCP_INC_STATS(net, TCP_MIB_INERRS);
} else { } else {
tcp_v6_send_reset(NULL, skb); tcp_v6_send_reset(NULL, skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment