netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Leon Romanovsky <leon@kernel.org>,
	Victor Nogueira <victor@mojatatu.com>,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	netdev@vger.kernel.org, xiyou.wangcong@gmail.com,
	jiri@resnulli.us, kernel@mojatatu.com
Subject: Re: [PATCH net v2] net/sched: act_mirred: Add carrier check
Date: Mon, 24 Apr 2023 15:10:11 -0700	[thread overview]
Message-ID: <20230424151011.0f8cd8b3@hermes.local> (raw)
In-Reply-To: <CAM0EoM==4T=64FH7t4taURugM4d0Stv2oXFgr5+qNBNEe9bjwQ@mail.gmail.com>

On Mon, 24 Apr 2023 17:53:03 -0400
Jamal Hadi Salim <jhs@mojatatu.com> wrote:

> On Mon, Apr 24, 2023 at 5:36 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Mon, 24 Apr 2023 13:59:15 -0400 Jamal Hadi Salim wrote:  
> > > > Then fix the driver. It shouldn't hang.
> > > > Other drivers just drop packets if link is down.  
> > >
> > > We didnt do extensive testing of drivers but consider this a safeguard
> > > against buggy driver (its a huge process upgrading drivers in some
> > > environments). It may even make sense to move this to dev_queue_xmit()
> > > i.e the arguement is: why is the core sending a packet to hardware
> > > that has link down to begin with? BTW, I believe the bridge behaves
> > > this way ...  
> >
> > I'm with Stephen, even if the check makes sense in general we should
> > first drill down into the real bug, and squash it.  
> 
> Ok then, I guess in keeping up with the spirit of trivial patches
> generating the most discussion, these are two separate issues in my
> opinion: IOW, the driver bug should be fixed (we have reached out to
> the  vendor) - but the patch stands on its own.

There are many other ways packet could arrive at driver when link
is down. You are addressing only one small corner case by patching
mirred.

  reply	other threads:[~2023-04-24 22:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 17:08 [PATCH net v2] net/sched: act_mirred: Add carrier check Victor Nogueira
2023-04-24 17:36 ` Leon Romanovsky
2023-04-24 17:44   ` Stephen Hemminger
2023-04-24 17:59     ` Jamal Hadi Salim
2023-04-24 21:36       ` Jakub Kicinski
2023-04-24 21:53         ` Jamal Hadi Salim
2023-04-24 22:10           ` Stephen Hemminger [this message]
2023-04-24 22:22             ` Jamal Hadi Salim

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=20230424151011.0f8cd8b3@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kernel@mojatatu.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=victor@mojatatu.com \
    --cc=xiyou.wangcong@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).