diff mbox series

[net-next] sctp: check pl.raise_count separately from its increment

Message ID 727028cb5f9354809a397cf83d72e71b4c97ab85.1625023836.git.lucien.xin@gmail.com
State New
Headers show
Series [net-next] sctp: check pl.raise_count separately from its increment | expand

Commit Message

Xin Long June 30, 2021, 3:30 a.m. UTC
As Marcelo's suggestion this will make code more clear to read.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 net/sctp/transport.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Marcelo Ricardo Leitner June 30, 2021, 5:06 p.m. UTC | #1
On Tue, Jun 29, 2021 at 11:30:36PM -0400, Xin Long wrote:
> 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>
patchwork-bot+netdevbpf@kernel.org July 1, 2021, 6:50 p.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue, 29 Jun 2021 23:30:36 -0400 you wrote:
> As Marcelo's suggestion this will make code more clear to read.

> 

> Signed-off-by: Xin Long <lucien.xin@gmail.com>

> ---

>  net/sctp/transport.c | 11 +++++++----

>  1 file changed, 7 insertions(+), 4 deletions(-)


Here is the summary with links:
  - [net-next] sctp: check pl.raise_count separately from its increment
    https://git.kernel.org/netdev/net/c/650b2a846ddd

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

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;
+		}
 	}
 }