netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Felix Hüttner" <felix.huettner@mail.schwarz>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"dev@openvswitch.org" <dev@openvswitch.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Luca Czesla <Luca.Czesla@mail.schwarz>
Subject: Re: [PATCH] net: openvswitch: fix race on port output
Date: Mon, 3 Apr 2023 11:50:11 -0700	[thread overview]
Message-ID: <20230403115011.0d93298c@kernel.org> (raw)
In-Reply-To: <DU0PR10MB52446CAE57724A0B878BAA66EA929@DU0PR10MB5244.EURPRD10.PROD.OUTLOOK.COM>

On Mon, 3 Apr 2023 11:18:46 +0000 Felix Hüttner wrote:
> On Sat, 1 Apr 2023 6:25:00 +0000 Jakub Kicinski wrote:
> > On Fri, 31 Mar 2023 06:25:13 +0000 Felix Hüttner wrote:  
> > > diff --git a/net/core/dev.c b/net/core/dev.c
> > > index 253584777101..6628323b7bea 100644
> > > --- a/net/core/dev.c
> > > +++ b/net/core/dev.c
> > > @@ -3199,6 +3199,7 @@ static u16 skb_tx_hash(const struct net_device *dev,
> > >         }
> > >
> > >         if (skb_rx_queue_recorded(skb)) {
> > > +               BUG_ON(unlikely(qcount == 0));  
> >
> > DEBUG_NET_WARN_ON()
> >  
> 
> However if this condition triggers we will be permanently stuck in the loop below.
> From my understading this also means that future calls to `synchronize_net` will never finish (as the packet never finishes processing).
> So the user will quite probably need to restart his system.
> I find DEBUG_NET_WARN_ON_ONCE to offer too little visiblity as CONFIG_DEBUG_NET is not necessarily enabled per default.
> I as the user would see it as helpful to have this information available without additional config flags.
> I would propose to use WARN_ON_ONCE

skb_tx_hash() may get called a lot, we shouldn't slow it down on
production systems just to catch buggy drivers, IMO.

  reply	other threads:[~2023-04-03 18:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31  6:25 [PATCH] net: openvswitch: fix race on port output Felix Hüttner
2023-04-01  4:25 ` Jakub Kicinski
2023-04-03 11:18   ` Felix Hüttner
2023-04-03 18:50     ` Jakub Kicinski [this message]
2023-04-04  7:25       ` Felix Hüttner
  -- strict thread matches above, loose matches on Subject: below --
2023-03-31  8:19 Felix Huettner
2023-04-01  4:26 ` 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=20230403115011.0d93298c@kernel.org \
    --to=kuba@kernel.org \
    --cc=Luca.Czesla@mail.schwarz \
    --cc=dev@openvswitch.org \
    --cc=felix.huettner@mail.schwarz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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 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).