All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: David Wei <dw@davidwei.uk>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH net-next] netdevsim: implement peer queue flow control
Date: Wed, 2 Jul 2025 01:12:06 -0700	[thread overview]
Message-ID: <aGTp1oyDGPwErXNO@gmail.com> (raw)
In-Reply-To: <e87a5ba3-956e-401e-9a1e-fc40dadf3d87@davidwei.uk>

Hello David,

On Tue, Jul 01, 2025 at 03:26:07PM -0700, David Wei wrote:
> On 2025-07-01 11:10, Breno Leitao wrote:
> [...]> diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
> > index e36d3e846c2dc..43f31bc134b0a 100644
> > --- a/drivers/net/netdevsim/netdev.c
> > +++ b/drivers/net/netdevsim/netdev.c
> > @@ -351,6 +406,9 @@ static int nsim_rcv(struct nsim_rq *rq, int budget)
> >   			dev_dstats_rx_dropped(dev);
> >   	}
> > +	rcu_read_lock();
> > +	nsim_start_peer_tx_queue(dev, rq);
> > +	rcu_read_unlock();
> 
> Could the rcu_read_{un}lock() be moved into the
> nsim_start/stop_peer_tx_queue() functions to keep it together with
> rcu_dereference()?

Yes, for sure. In fact, I will update and move the locking primitives to
inside the functions.

Thanks for the feedback,
--breno

  reply	other threads:[~2025-07-02  8:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 18:10 [PATCH net-next] netdevsim: implement peer queue flow control Breno Leitao
2025-07-01 22:26 ` David Wei
2025-07-02  8:12   ` Breno Leitao [this message]
2025-07-02 21:07 ` Jakub Kicinski

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=aGTp1oyDGPwErXNO@gmail.com \
    --to=leitao@debian.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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.