diff options
author | Xin Long <lucien.xin@gmail.com> | 2021-06-30 05:30:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-01 20:46:44 +0200 |
commit | 650b2a846dddf33321489597287e6d825ec1d0ba (patch) | |
tree | 57b313d0e209abecdc0e5c98448c14748cf0cf20 /net/sctp | |
parent | net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear (diff) | |
download | linux-650b2a846dddf33321489597287e6d825ec1d0ba.tar.xz linux-650b2a846dddf33321489597287e6d825ec1d0ba.zip |
sctp: check pl.raise_count separately from its increment
As Marcelo's suggestion this will make code more clear to read.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/transport.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 5f23804f21c7..397a6244dd97 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c @@ -335,10 +335,13 @@ void sctp_transport_pl_recv(struct sctp_transport *t) t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t); sctp_assoc_sync_pmtu(t->asoc); } - } else if (t->pl.state == SCTP_PL_COMPLETE && ++t->pl.raise_count == 30) { - /* Raise probe_size again after 30 * interval in Search Complete */ - t->pl.state = SCTP_PL_SEARCH; /* Search Complete -> Search */ - t->pl.probe_size += SCTP_PL_MIN_STEP; + } else if (t->pl.state == SCTP_PL_COMPLETE) { + t->pl.raise_count++; + if (t->pl.raise_count == 30) { + /* Raise probe_size again after 30 * interval in Search Complete */ + t->pl.state = SCTP_PL_SEARCH; /* Search Complete -> Search */ + t->pl.probe_size += SCTP_PL_MIN_STEP; + } } } |