Netdev List
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Davide Caratti <dcaratti@redhat.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net/sched: act_mirred: avoid printout in the traffic path
Date: Sun, 24 Jul 2022 10:32:18 -0700	[thread overview]
Message-ID: <Yt2CIl7iCoahCPoU@pop-os.localdomain> (raw)
In-Reply-To: <c2ef23da1d9a4eb62f4e7b7c4540f9bafb553c15.1658420239.git.dcaratti@redhat.com>

On Thu, Jul 21, 2022 at 06:19:22PM +0200, Davide Caratti wrote:
> @@ -251,16 +258,8 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
>  	m_eaction = READ_ONCE(m->tcfm_eaction);
>  	retval = READ_ONCE(m->tcf_action);
>  	dev = rcu_dereference_bh(m->tcfm_dev);
> -	if (unlikely(!dev)) {
> -		pr_notice_once("tc mirred: target device is gone\n");
> +	if (unlikely(!dev || !(dev->flags & IFF_UP)))
>  		goto out;
> -	}
> -
> -	if (unlikely(!(dev->flags & IFF_UP))) {
> -		net_notice_ratelimited("tc mirred to Houston: device %s is down\n",
> -				       dev->name);
> -		goto out;
> -	}

I have no objection, just want to point it out users could still figure
out this drop by tracing kfree_skb(). _Maybe_ we could pass a reason to
kfree_skb_reason() too but it is definitely harder.

Thanks!

      parent reply	other threads:[~2022-07-24 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 16:19 [PATCH net-next] net/sched: act_mirred: avoid printout in the traffic path Davide Caratti
2022-07-22 22:08 ` Jakub Kicinski
2022-07-22 22:27 ` Jamal Hadi Salim
2022-07-24 17:32 ` 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=Yt2CIl7iCoahCPoU@pop-os.localdomain \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox