From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
davem@davemloft.net, kuba@kernel.org, linux-sctp@vger.kernel.org,
David Laight <david.laight@aculab.com>
Subject: Re: [PATCH net-next 1/2] sctp: do black hole detection in search complete state
Date: Thu, 24 Jun 2021 22:11:53 -0300 [thread overview]
Message-ID: <YNUtWejWC4ftv0DA@horizon.localdomain> (raw)
In-Reply-To: <08344e5d9b0eb31c1b777f44cd1b95ecdde5a3d6.1624549642.git.lucien.xin@gmail.com>
On Thu, Jun 24, 2021 at 11:48:08AM -0400, Xin Long wrote:
> @@ -333,13 +328,15 @@ void sctp_transport_pl_recv(struct sctp_transport *t)
> t->pl.probe_size += SCTP_PL_MIN_STEP;
> if (t->pl.probe_size >= t->pl.probe_high) {
> t->pl.probe_high = 0;
> + t->pl.raise_count = 0;
> t->pl.state = SCTP_PL_COMPLETE; /* Search -> Search Complete */
>
> t->pl.probe_size = t->pl.pmtu;
> t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t);
> sctp_assoc_sync_pmtu(t->asoc);
> }
> - } else if (t->pl.state == SCTP_PL_COMPLETE) {
> + } else if (t->pl.state == SCTP_PL_COMPLETE && ++t->pl.raise_count == 30) {
Please either break the condition into 2 lines or even in 2 if()s. The
++ operator here can easily go unnoticed otherwise.
> + /* 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
>
next prev parent reply other threads:[~2021-06-25 1:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 15:48 [PATCH net-next 0/2] sctp: make the PLPMTUD probe more effective and efficient Xin Long
2021-06-24 15:48 ` [PATCH net-next 1/2] sctp: do black hole detection in search complete state Xin Long
2021-06-25 1:11 ` Marcelo Ricardo Leitner [this message]
2021-06-25 16:23 ` Xin Long
2021-06-24 15:48 ` [PATCH net-next 2/2] sctp: send the next probe immediately once the last one is acked Xin Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YNUtWejWC4ftv0DA@horizon.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=davem@davemloft.net \
--cc=david.laight@aculab.com \
--cc=kuba@kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).