From: Guenter Roeck <linux@roeck-us.net>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, guoren@kernel.org, yury.norov@gmail.com
Subject: Re: [PATCH net] Revert "net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and}"
Date: Sat, 15 Oct 2022 20:49:59 -0700 [thread overview]
Message-ID: <20221016034959.GA2327678@roeck-us.net> (raw)
In-Reply-To: <20221014160746.553813-1-kuba@kernel.org>
On Fri, Oct 14, 2022 at 09:07:46AM -0700, Jakub Kicinski wrote:
> This reverts commit 854701ba4c39afae2362ba19a580c461cb183e4f.
>
> We have more violations around, which leads to:
>
> WARNING: CPU: 2 PID: 1 at include/linux/cpumask.h:110 __netif_set_xps_queue+0x14e/0x770
>
> Let's back this out and retry with a larger clean up in -next.
>
> Fixes: 854701ba4c39 ("net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and}")
> Link: https://lore.kernel.org/all/20221014030459.3272206-2-guoren@kernel.org/
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> include/linux/netdevice.h | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index a36edb0ec199..eddf8ee270e7 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -3663,8 +3663,9 @@ static inline bool netif_attr_test_online(unsigned long j,
> static inline unsigned int netif_attrmask_next(int n, const unsigned long *srcp,
> unsigned int nr_bits)
> {
> - /* n is a prior cpu */
> - cpu_max_bits_warn(n + 1, nr_bits);
> + /* -1 is a legal arg here. */
> + if (n != -1)
> + cpu_max_bits_warn(n, nr_bits);
>
> if (srcp)
> return find_next_bit(srcp, nr_bits, n + 1);
> @@ -3685,8 +3686,9 @@ static inline int netif_attrmask_next_and(int n, const unsigned long *src1p,
> const unsigned long *src2p,
> unsigned int nr_bits)
> {
> - /* n is a prior cpu */
> - cpu_max_bits_warn(n + 1, nr_bits);
> + /* -1 is a legal arg here. */
> + if (n != -1)
> + cpu_max_bits_warn(n, nr_bits);
>
> if (src1p && src2p)
> return find_next_and_bit(src1p, src2p, nr_bits, n + 1);
> --
> 2.37.3
>
prev parent reply other threads:[~2022-10-16 3:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 16:07 [PATCH net] Revert "net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and}" Jakub Kicinski
2022-10-15 10:20 ` patchwork-bot+netdevbpf
2022-10-16 3:49 ` Guenter Roeck [this message]
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=20221016034959.GA2327678@roeck-us.net \
--to=linux@roeck-us.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guoren@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yury.norov@gmail.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;
as well as URLs for NNTP newsgroup(s).