diff options
author | Yuchung Cheng <ycheng@google.com> | 2016-09-21 16:16:14 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-22 03:33:01 -0400 |
commit | de1d657816c6fbb70f07b01d50ec669dff0d4e60 (patch) | |
tree | 4cd1dc2e2dd168547e147e2d2d699c8f24a66deb /net/ipv4 | |
parent | ba1ba25d3159573ffdc9e79e5c3dfcf9c5742964 (diff) | |
download | linux-de1d657816c6fbb70f07b01d50ec669dff0d4e60.tar.gz linux-de1d657816c6fbb70f07b01d50ec669dff0d4e60.tar.bz2 linux-de1d657816c6fbb70f07b01d50ec669dff0d4e60.zip |
tcp: fix under-accounting retransmit SNMP counters
This patch fixes these under-accounting SNMP rtx stats
LINUX_MIB_TCPFORWARDRETRANS
LINUX_MIB_TCPFASTRETRANS
LINUX_MIB_TCPSLOWSTARTRETRANS
when retransmitting TSO packets
Fixes: 10d3be569243 ("tcp-tso: do not split TSO packets at retransmit time")
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index f53d0cca5fa4..e15ec82a6319 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2831,7 +2831,7 @@ begin_fwd: if (tcp_retransmit_skb(sk, skb, segs)) return; - NET_INC_STATS(sock_net(sk), mib_idx); + NET_ADD_STATS(sock_net(sk), mib_idx, tcp_skb_pcount(skb)); if (tcp_in_cwnd_reduction(sk)) tp->prr_out += tcp_skb_pcount(skb); |