diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-16 23:22:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-16 23:22:25 -0400 |
commit | 63231bddf6514778792d3784f63822473d250fc0 (patch) | |
tree | d380f9ca00fa0ca2cd74142c5b51b97717ef1e9a /net/ipv4/tcp_ipv4.c | |
parent | 81cc8a75d944fa39fc333c2c329c8e8b3c62cada (diff) |
mib: add net to TCP_INC_STATS_BH
Same as before - the sock is always there to get the net from,
but there are also some places with the net already saved on
the stack.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index db3bf9be076f..e876312b950a 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -599,8 +599,8 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb) | |||
599 | ip_send_reply(net->ipv4.tcp_sock, skb, | 599 | ip_send_reply(net->ipv4.tcp_sock, skb, |
600 | &arg, arg.iov[0].iov_len); | 600 | &arg, arg.iov[0].iov_len); |
601 | 601 | ||
602 | TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); | 602 | TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); |
603 | TCP_INC_STATS_BH(TCP_MIB_OUTRSTS); | 603 | TCP_INC_STATS_BH(net, TCP_MIB_OUTRSTS); |
604 | } | 604 | } |
605 | 605 | ||
606 | /* The code following below sending ACKs in SYN-RECV and TIME-WAIT states | 606 | /* The code following below sending ACKs in SYN-RECV and TIME-WAIT states |
@@ -674,7 +674,7 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack, | |||
674 | ip_send_reply(net->ipv4.tcp_sock, skb, | 674 | ip_send_reply(net->ipv4.tcp_sock, skb, |
675 | &arg, arg.iov[0].iov_len); | 675 | &arg, arg.iov[0].iov_len); |
676 | 676 | ||
677 | TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); | 677 | TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); |
678 | } | 678 | } |
679 | 679 | ||
680 | static void tcp_v4_timewait_ack(struct sock *sk, struct sk_buff *skb) | 680 | static void tcp_v4_timewait_ack(struct sock *sk, struct sk_buff *skb) |
@@ -1494,7 +1494,7 @@ discard: | |||
1494 | return 0; | 1494 | return 0; |
1495 | 1495 | ||
1496 | csum_err: | 1496 | csum_err: |
1497 | TCP_INC_STATS_BH(TCP_MIB_INERRS); | 1497 | TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_INERRS); |
1498 | goto discard; | 1498 | goto discard; |
1499 | } | 1499 | } |
1500 | 1500 | ||
@@ -1514,7 +1514,7 @@ int tcp_v4_rcv(struct sk_buff *skb) | |||
1514 | goto discard_it; | 1514 | goto discard_it; |
1515 | 1515 | ||
1516 | /* Count it even if it's bad */ | 1516 | /* Count it even if it's bad */ |
1517 | TCP_INC_STATS_BH(TCP_MIB_INSEGS); | 1517 | TCP_INC_STATS_BH(net, TCP_MIB_INSEGS); |
1518 | 1518 | ||
1519 | if (!pskb_may_pull(skb, sizeof(struct tcphdr))) | 1519 | if (!pskb_may_pull(skb, sizeof(struct tcphdr))) |
1520 | goto discard_it; | 1520 | goto discard_it; |
@@ -1590,7 +1590,7 @@ no_tcp_socket: | |||
1590 | 1590 | ||
1591 | if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { | 1591 | if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { |
1592 | bad_packet: | 1592 | bad_packet: |
1593 | TCP_INC_STATS_BH(TCP_MIB_INERRS); | 1593 | TCP_INC_STATS_BH(net, TCP_MIB_INERRS); |
1594 | } else { | 1594 | } else { |
1595 | tcp_v4_send_reset(NULL, skb); | 1595 | tcp_v4_send_reset(NULL, skb); |
1596 | } | 1596 | } |
@@ -1611,7 +1611,7 @@ do_time_wait: | |||
1611 | } | 1611 | } |
1612 | 1612 | ||
1613 | if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { | 1613 | if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { |
1614 | TCP_INC_STATS_BH(TCP_MIB_INERRS); | 1614 | TCP_INC_STATS_BH(net, TCP_MIB_INERRS); |
1615 | inet_twsk_put(inet_twsk(sk)); | 1615 | inet_twsk_put(inet_twsk(sk)); |
1616 | goto discard_it; | 1616 | goto discard_it; |
1617 | } | 1617 | } |