Commit bc079e9e authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

tcp: cleanup ca_state mess in tcp_timer

Redundant checks made indentation impossible to follow.
However, it might be useful to make this ca_state+is_sack
indexed array.
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7363a5b2
...@@ -328,19 +328,16 @@ static void tcp_retransmit_timer(struct sock *sk) ...@@ -328,19 +328,16 @@ static void tcp_retransmit_timer(struct sock *sk)
if (icsk->icsk_retransmits == 0) { if (icsk->icsk_retransmits == 0) {
int mib_idx; int mib_idx;
if (icsk->icsk_ca_state == TCP_CA_Disorder || if (icsk->icsk_ca_state == TCP_CA_Disorder) {
icsk->icsk_ca_state == TCP_CA_Recovery) { if (tcp_is_sack(tp))
if (tcp_is_sack(tp)) { mib_idx = LINUX_MIB_TCPSACKFAILURES;
if (icsk->icsk_ca_state == TCP_CA_Recovery) else
mib_idx = LINUX_MIB_TCPSACKRECOVERYFAIL; mib_idx = LINUX_MIB_TCPRENOFAILURES;
else } else if (icsk->icsk_ca_state == TCP_CA_Recovery) {
mib_idx = LINUX_MIB_TCPSACKFAILURES; if (tcp_is_sack(tp))
} else { mib_idx = LINUX_MIB_TCPSACKRECOVERYFAIL;
if (icsk->icsk_ca_state == TCP_CA_Recovery) else
mib_idx = LINUX_MIB_TCPRENORECOVERYFAIL; mib_idx = LINUX_MIB_TCPRENORECOVERYFAIL;
else
mib_idx = LINUX_MIB_TCPRENOFAILURES;
}
} else if (icsk->icsk_ca_state == TCP_CA_Loss) { } else if (icsk->icsk_ca_state == TCP_CA_Loss) {
mib_idx = LINUX_MIB_TCPLOSSFAILURES; mib_idx = LINUX_MIB_TCPLOSSFAILURES;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment