All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: "mengyuanlou@net-swift.com" <mengyuanlou@net-swift.com>
Cc: netdev@vger.kernel.org, jiawenwu@trustnetic.com,
	duanqiangwen@net-swift.com, linglingzhang@net-swift.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, hramamurthy@google.com,
	jacob.e.keller@intel.com, przemyslaw.kitszel@intel.com
Subject: Re: [PATCH net v8 2/2] net: wangxun: access queue counts consistently
Date: Wed, 25 Nov 2026 11:30:50 +0000	[thread overview]
Message-ID: <20261125113050.GS31322@horms.kernel.org> (raw)
In-Reply-To: <15430CE6-8AD6-43CF-AACF-1434B5EB666F@net-swift.com>

On Wed, Nov 25, 2026 at 09:36:46AM +0800, mengyuanlou@net-swift.com wrote:
> 
> 
> > 2026年11月24日 19:24,Simon Horman <horms@kernel.org> 写道:
> > 
> > On Wed, Nov 18, 2026 at 04:13:29PM +0800, Mengyuan Lou wrote:
> >> Queue-vector teardown clears wx->num_tx_queues and
> >> wx->num_rx_queues while the netdev can remain registered. Lockless
> >> readers may use these counts as ring-array loop bounds while teardown
> >> is clearing the ring slots. wx_xmit_frame() also uses the Tx count to
> >> select a ring and must not divide by zero during teardown.
> >> 
> >> Use READ_ONCE() to take a single count snapshot in the lockless readers,
> >> and use WRITE_ONCE() for queue-count updates during scheme setup,
> >> teardown, and allocation-error handling, including the VF queue setup
> >> callbacks. Keep the existing NULL checks so a reader that observed an
> >> old non-zero count can safely skip ring slots that have since been
> >> cleared. wx_xmit_frame() retains its zero-count guard before
> >> queue-index modulo.
> >> 
> >> Fixes: 3f703186113f ("net: libwx: Add irq flow functions")
> >> Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
> > 
> > This patch feels more like hardening for net-next than a fix for net.
> > But regardless the code changes look good to me.
> 
> I think so.
> Should I resend this patch?

Thanks,

IMHO, it would be best to split the series in two: one patch for net and
one for net-next. And resend both.

  reply	other threads:[~2026-11-25 11:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  8:13 [PATCH net v8 0/2] net: wangxun: protect ring accesses with RCU Mengyuan Lou
2026-11-18  8:13 ` [PATCH net v8 1/2] " Mengyuan Lou
2026-11-22  8:33   ` netdev-bot+sashiko
2026-11-23  6:21     ` mengyuanlou
2026-11-25 15:08       ` Paolo Abeni
2026-11-24 11:23   ` Simon Horman
2026-11-18  8:13 ` [PATCH net v8 2/2] net: wangxun: access queue counts consistently Mengyuan Lou
2026-11-24 11:24   ` Simon Horman
2026-11-25  1:36     ` mengyuanlou
2026-11-25 11:30       ` Simon Horman [this message]
2026-11-25 15:10         ` Paolo Abeni
2026-11-26  1:47           ` mengyuanlou
2026-11-18  8:18 ` [PATCH net v8 0/2] net: wangxun: protect ring accesses with RCU netdev-bot+sinfo
2026-11-18  9:29   ` mengyuanlou
2026-11-25 15:20 ` 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=20261125113050.GS31322@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=duanqiangwen@net-swift.com \
    --cc=edumazet@google.com \
    --cc=hramamurthy@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=kuba@kernel.org \
    --cc=linglingzhang@net-swift.com \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.