linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] sctp: check pl.raise_count separately from its increment
@ 2021-06-30  3:30 Xin Long
  2021-06-30 17:06 ` Marcelo Ricardo Leitner
  2021-07-01 18:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Xin Long @ 2021-06-30  3:30 UTC (permalink / raw)
  To: network dev, davem, kuba, Marcelo Ricardo Leitner, linux-sctp

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(-)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] sctp: check pl.raise_count separately from its increment
  2021-06-30  3:30 [PATCH net-next] sctp: check pl.raise_count separately from its increment Xin Long
@ 2021-06-30 17:06 ` Marcelo Ricardo Leitner
  2021-07-01 18:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Ricardo Leitner @ 2021-06-30 17:06 UTC (permalink / raw)
  To: Xin Long; +Cc: network dev, davem, kuba, linux-sctp

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] sctp: check pl.raise_count separately from its increment
  2021-06-30  3:30 [PATCH net-next] sctp: check pl.raise_count separately from its increment Xin Long
  2021-06-30 17:06 ` Marcelo Ricardo Leitner
@ 2021-07-01 18:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-01 18:50 UTC (permalink / raw)
  To: Xin Long; +Cc: netdev, davem, kuba, marcelo.leitner, linux-sctp

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-01 18:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30  3:30 [PATCH net-next] sctp: check pl.raise_count separately from its increment Xin Long
2021-06-30 17:06 ` Marcelo Ricardo Leitner
2021-07-01 18:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).