Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b2156fa authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'tcp-fixes-in-timeout-and-retransmission-accounting'



Yuchung Cheng says:

====================
tcp: fixes in timeout and retransmission accounting

This patch set has assorted fixes of minor accounting issues in
timeout, window probe, and retransmission stats.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents c0f53771 e1561fe2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2920,7 +2920,7 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs)
		TCP_SKB_CB(skb)->sacked |= TCPCB_EVER_RETRANS;
		trace_tcp_retransmit_skb(sk, skb);
	} else if (err != -EBUSY) {
		NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL);
		NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL, segs);
	}
	return err;
}
+5 −5
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ static void tcp_probe_timer(struct sock *sk)
			return;
	}

	if (icsk->icsk_probes_out > max_probes) {
	if (icsk->icsk_probes_out >= max_probes) {
abort:		tcp_write_err(sk);
	} else {
		/* Only send another probe if we didn't close things up. */
@@ -484,11 +484,12 @@ void tcp_retransmit_timer(struct sock *sk)
		goto out_reset_timer;
	}

	__NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPTIMEOUTS);
	if (tcp_write_timeout(sk))
		goto out;

	if (icsk->icsk_retransmits == 0) {
		int mib_idx;
		int mib_idx = 0;

		if (icsk->icsk_ca_state == TCP_CA_Recovery) {
			if (tcp_is_sack(tp))
@@ -503,9 +504,8 @@ void tcp_retransmit_timer(struct sock *sk)
				mib_idx = LINUX_MIB_TCPSACKFAILURES;
			else
				mib_idx = LINUX_MIB_TCPRENOFAILURES;
		} else {
			mib_idx = LINUX_MIB_TCPTIMEOUTS;
		}
		if (mib_idx)
			__NET_INC_STATS(sock_net(sk), mib_idx);
	}