From: Cong Wang <xiyou.wangcong@gmail.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH net] net: sched: reduce amount of log messages in act_mirred
Date: Thu, 2 Apr 2020 21:43:29 -0700 [thread overview]
Message-ID: <CAM_iQpUvn+ijyZtLmca3n+nZmHY9cMmPYwZMp5BTv10bLUhg3Q@mail.gmail.com> (raw)
In-Reply-To: <20200403011412.GA3629@localhost.localdomain>
On Thu, Apr 2, 2020 at 6:14 PM Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
>
> On Thu, Apr 02, 2020 at 06:04:17PM -0700, David Miller wrote:
> > From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > Date: Thu, 2 Apr 2020 19:26:12 -0300
> >
> > > @@ -245,8 +245,8 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
> > > }
> > >
> > > if (unlikely(!(dev->flags & IFF_UP))) {
> > > - net_notice_ratelimited("tc mirred to Houston: device %s is down\n",
> > > - dev->name);
> > > + pr_notice_once("tc mirred: device %s is down\n",
> > > + dev->name);
> >
> > This reduction is too extreme.
> >
> > If someone causes this problem, reconfigures everything thinking that the
> > problem will be fixed, they won't see this message the second time and
> > mistakenly think it's working.
>
> Fair point. Then what about removing it entirely? printk's are not the
> best way to debug packet drops anyway and the action already registers
> the drops in its stats.
>
> Or perhaps a marker in the message, stating that it is logged only
> once per boot. I'm leaning to the one above, to just remove it.
I think the reason why we print that is we do not handle
NETDEV_DOWN event in mirred_device_event() or check IFF_UP
in tcf_mirred_init(). I think if we can do both, we can remove
this message entirely. I am not sure whether the latter would break
existing expectations, as users may want to add a down device
as a target and bring it up afterward.
Thanks.
prev parent reply other threads:[~2020-04-03 4:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 22:26 [PATCH net] net: sched: reduce amount of log messages in act_mirred Marcelo Ricardo Leitner
2020-04-03 1:04 ` David Miller
2020-04-03 1:14 ` Marcelo Ricardo Leitner
2020-04-03 4:43 ` Cong Wang [this message]
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=CAM_iQpUvn+ijyZtLmca3n+nZmHY9cMmPYwZMp5BTv10bLUhg3Q@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=marcelo.leitner@gmail.com \
--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).