summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2010-11-17 18:55:12 +0000
committergnn <gnn@FreeBSD.org>2010-11-17 18:55:12 +0000
commit67b3b6b168c800611c4683cb81384e4a678517c6 (patch)
treec215fe6cad187e004f1c275a1854ec9306dfb042 /sys/netinet/tcp_output.c
parentfa6fd32fc398ffee50fe04ddd692ad76c71ebfbf (diff)
downloadFreeBSD-src-67b3b6b168c800611c4683cb81384e4a678517c6.zip
FreeBSD-src-67b3b6b168c800611c4683cb81384e4a678517c6.tar.gz
Add new, per connection, statistics for TCP, including:
Retransmitted Packets Zero Window Advertisements Out of Order Receives These statistics are available via the -T argument to netstat(1). MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 7db0adb..bf42dac 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -803,6 +803,7 @@ send:
if ((tp->t_flags & TF_FORCEDATA) && len == 1)
TCPSTAT_INC(tcps_sndprobe);
else if (SEQ_LT(tp->snd_nxt, tp->snd_max) || sack_rxmit) {
+ tp->t_sndrexmitpack++;
TCPSTAT_INC(tcps_sndrexmitpack);
TCPSTAT_ADD(tcps_sndrexmitbyte, len);
} else {
@@ -1027,9 +1028,10 @@ send:
* to read more data than can be buffered prior to transmitting on
* the connection.
*/
- if (th->th_win == 0)
+ if (th->th_win == 0) {
+ tp->t_sndzerowin++;
tp->t_flags |= TF_RXWIN0SENT;
- else
+ } else
tp->t_flags &= ~TF_RXWIN0SENT;
if (SEQ_GT(tp->snd_up, tp->snd_nxt)) {
th->th_urp = htons((u_short)(tp->snd_up - tp->snd_nxt));
OpenPOWER on IntegriCloud