diff options
-rw-r--r-- | sys/netinet/tcp_input.c | 1 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 1 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 1 | ||||
-rw-r--r-- | usr.bin/netstat/inet.c | 2 |
4 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 0fb62e0..64cbed9 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1785,6 +1785,7 @@ process_ACK: * we left off. */ if (tp->t_rxtshift == 1 && ticks < tp->t_badrxtwin) { + ++tcpstat.tcps_sndrexmitbad; tp->snd_cwnd = tp->snd_cwnd_prev; tp->snd_ssthresh = tp->snd_ssthresh_prev; tp->snd_nxt = tp->snd_max; diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 0fb62e0..64cbed9 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -1785,6 +1785,7 @@ process_ACK: * we left off. */ if (tp->t_rxtshift == 1 && ticks < tp->t_badrxtwin) { + ++tcpstat.tcps_sndrexmitbad; tp->snd_cwnd = tp->snd_cwnd_prev; tp->snd_ssthresh = tp->snd_ssthresh_prev; tp->snd_nxt = tp->snd_max; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index a58bdf5..51f9ae0 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -310,6 +310,7 @@ struct tcpstat { u_long tcps_sndbyte; /* data bytes sent */ u_long tcps_sndrexmitpack; /* data packets retransmitted */ u_long tcps_sndrexmitbyte; /* data bytes retransmitted */ + u_long tcps_sndrexmitbad; /* unnecessary packet retransmissions */ u_long tcps_sndacks; /* ack-only packets sent */ u_long tcps_sndprobe; /* window probes sent */ u_long tcps_sndurg; /* packets sent with URG only */ diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index b95bad7..f72fa98 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -381,6 +381,8 @@ tcp_stats(u_long off __unused, char *name, int af __unused) "\t\t%lu data packet%s (%lu byte%s)\n"); p2(tcps_sndrexmitpack, tcps_sndrexmitbyte, "\t\t%lu data packet%s (%lu byte%s) retransmitted\n"); + p(tcps_sndrexmitbad, + "\t\t%lu data packet%s unnecessarily retransmitted\n"); p(tcps_mturesent, "\t\t%lu resend%s initiated by MTU discovery\n"); p2a(tcps_sndacks, tcps_delack, "\t\t%lu ack-only packet%s (%lu delayed)\n"); |