From: David Laight <David.Laight@ACULAB.COM>
To: 'Leon Romanovsky' <leon@kernel.org>,
Krister Johansen <kjlx@templeofstupid.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Shay Agroskin <shayagr@amazon.com>,
Arthur Kiyanovski <akiyano@amazon.com>,
David Arinzon <darinzon@amazon.com>,
Noam Dagan <ndagan@amazon.com>, Saeed Bishara <saeedb@amazon.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: RE: [PATCH net] net: ena: fix shift-out-of-bounds in exponential backoff
Date: Thu, 13 Jul 2023 15:34:25 +0000 [thread overview]
Message-ID: <20412c4fb06147c3b2e4ae90ed26fdb7@AcuMS.aculab.com> (raw)
In-Reply-To: <20230711072603.GI41919@unreal>
From: Leon Romanovsky
> Sent: 11 July 2023 08:26
...
> > +#define ENA_MAX_BACKOFF_DELAY_EXP 16U
> > +
> > #define ENA_MIN_ADMIN_POLL_US 100
> >
> > #define ENA_MAX_ADMIN_POLL_US 5000
> > @@ -536,6 +538,7 @@ static int ena_com_comp_status_to_errno(struct ena_com_admin_queue *admin_queue,
> >
> > static void ena_delay_exponential_backoff_us(u32 exp, u32 delay_us)
> > {
> > + exp = min_t(u32, exp, ENA_MAX_BACKOFF_DELAY_EXP);
This shouldn't need to be a min_t()
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2023-07-13 15:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 1:36 [PATCH net] net: ena: fix shift-out-of-bounds in exponential backoff Krister Johansen
2023-07-11 7:26 ` Leon Romanovsky
2023-07-13 15:34 ` David Laight [this message]
2023-07-11 17:47 ` Shay Agroskin
2023-07-11 22:52 ` Krister Johansen
2023-07-13 7:46 ` Shay Agroskin
2023-07-14 0:05 ` Krister Johansen
2023-07-12 23:00 ` patchwork-bot+netdevbpf
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=20412c4fb06147c3b2e4ae90ed26fdb7@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=akiyano@amazon.com \
--cc=darinzon@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kjlx@templeofstupid.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ndagan@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedb@amazon.com \
--cc=shayagr@amazon.com \
/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