All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <stfomichev@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Breno Leitao <leitao@debian.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>, David Wei <dw@davidwei.uk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	paulmck@kernel.org, kernel-team@meta.com, stable@vger.kernel.org
Subject: Re: [PATCH net] netdevsim: disable local BH when scheduling NAPI
Date: Wed, 12 Feb 2025 14:05:15 -0800	[thread overview]
Message-ID: <Z60bG180MW5gQ9oy@mini-arch> (raw)
In-Reply-To: <CANn89iKnqeDCrEsa4=vf1XV4N6+FUbfB8S6tXG6n8V+LKGfBEg@mail.gmail.com>

On 02/12, Eric Dumazet wrote:
> On Wed, Feb 12, 2025 at 7:34 PM Breno Leitao <leitao@debian.org> wrote:
> >
> > The netdevsim driver was getting NOHZ tick-stop errors during packet
> > transmission due to pending softirq work when calling napi_schedule().
> >
> > This is showing the following message when running netconsole selftest.
> >
> >         NOHZ tick-stop error: local softirq work is pending, handler #08!!!
> >
> > Add local_bh_disable()/enable() around the napi_schedule() call to
> > prevent softirqs from being handled during this xmit.
> >
> > Cc: stable@vger.kernel.org
> > Fixes: 3762ec05a9fb ("netdevsim: add NAPI support")
> > Suggested-by: Jakub Kicinski <kuba@kernel.org>
> > Signed-off-by: Breno Leitao <leitao@debian.org>
> > ---
> >  drivers/net/netdevsim/netdev.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
> > index 42f247cbdceecbadf27f7090c030aa5bd240c18a..6aeb081b06da226ab91c49f53d08f465570877ae 100644
> > --- a/drivers/net/netdevsim/netdev.c
> > +++ b/drivers/net/netdevsim/netdev.c
> > @@ -87,7 +87,9 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)
> >         if (unlikely(nsim_forward_skb(peer_dev, skb, rq) == NET_RX_DROP))
> >                 goto out_drop_cnt;
> >
> > +       local_bh_disable();
> >         napi_schedule(&rq->napi);
> > +       local_bh_enable();
> >
> 
> I thought all ndo_start_xmit() were done under local_bh_disable()
> 
> Could you give more details ?

Not 100% sure this patch is the culprit, but looks related:

https://netdev-3.bots.linux.dev/vmksft-net-drv-dbg/results/989901/5-netcons-fragmented-msg-sh/stderr

---
pw-bot: cr

  reply	other threads:[~2025-02-12 22:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 18:34 [PATCH net] netdevsim: disable local BH when scheduling NAPI Breno Leitao
2025-02-12 18:55 ` Eric Dumazet
2025-02-12 22:05   ` Stanislav Fomichev [this message]
2025-02-14 13:01   ` Breno Leitao

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=Z60bG180MW5gQ9oy@mini-arch \
    --to=stfomichev@gmail.com \
    --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=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=stable@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 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.