diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-11 22:07:19 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-11 22:07:19 +0000 |
commit | b79ff9a30db8d3975296e0b1fe8978691f774694 (patch) | |
tree | d7e60241b428cfa595a3f0e0d467ee67548c9488 /sys/netinet/tcp_usrreq.c | |
parent | 90c1837110aba860c5442bc9151ef6f8e60160a0 (diff) | |
download | FreeBSD-src-b79ff9a30db8d3975296e0b1fe8978691f774694.zip FreeBSD-src-b79ff9a30db8d3975296e0b1fe8978691f774694.tar.gz |
Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() and
TCPSTAT_INC(), rather than directly manipulating the fields across the
kernel. This will make it easier to change the implementation of
these statistics, such as using per-CPU versions of the data structures.
MFC after: 3 days
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 5a6d183..089ef1f 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1113,7 +1113,7 @@ tcp_connect(struct tcpcb *tp, struct sockaddr *nam, struct thread *td) tp->request_r_scale++; soisconnecting(so); - V_tcpstat.tcps_connattempt++; + TCPSTAT_INC(tcps_connattempt); tp->t_state = TCPS_SYN_SENT; tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); tp->iss = tcp_new_isn(tp); @@ -1177,7 +1177,7 @@ tcp6_connect(struct tcpcb *tp, struct sockaddr *nam, struct thread *td) tp->request_r_scale++; soisconnecting(so); - V_tcpstat.tcps_connattempt++; + TCPSTAT_INC(tcps_connattempt); tp->t_state = TCPS_SYN_SENT; tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); tp->iss = tcp_new_isn(tp); |