From: Xin Long <lucien.xin@gmail.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: network dev <netdev@vger.kernel.org>, davem <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
"linux-sctp @ vger . 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: Fri, 25 Jun 2021 12:23:41 -0400 [thread overview]
Message-ID: <CADvbK_dFw+FLV7yRd9R_xkUotWXe8=r2ptyaQmTjghvLQ9VE9Q@mail.gmail.com> (raw)
In-Reply-To: <YNUtWejWC4ftv0DA@horizon.localdomain>
On Thu, Jun 24, 2021 at 9:11 PM Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
>
> 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.
will change it to:
} else if (t->pl.state == SCTP_PL_COMPLETE) {
t->pl.raise_count++;
if (t->pl.raise_count == 30) {
Thanks.
>
> > + /* 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 16:23 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
2021-06-25 16:23 ` Xin Long [this message]
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='CADvbK_dFw+FLV7yRd9R_xkUotWXe8=r2ptyaQmTjghvLQ9VE9Q@mail.gmail.com' \
--to=lucien.xin@gmail.com \
--cc=davem@davemloft.net \
--cc=david.laight@aculab.com \
--cc=kuba@kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=marcelo.leitner@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).