netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jeffrey Ji <jeffreyjilinux@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Brian Vazquez <brianvv@google.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	jeffreyji <jeffreyji@google.com>
Subject: Re: [PATCH net-next] net-core: add InMacErrors counter
Date: Fri, 21 Jan 2022 19:40:57 -0800	[thread overview]
Message-ID: <20220121194057.17079951@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> (raw)
In-Reply-To: <20220122000301.1872828-1-jeffreyji@google.com>

On Sat, 22 Jan 2022 00:03:01 +0000 Jeffrey Ji wrote:
> From: jeffreyji <jeffreyji@google.com>
> 
> Increment InMacErrors counter when packet dropped due to incorrect dest
> MAC addr.
> 
> example output from nstat:
> \~# nstat -z "*InMac*"
> \#kernel
> Ip6InMacErrors                  0                  0.0
> IpExtInMacErrors                1                  0.0
> 
> Tested: Created 2 netns, sent 1 packet using trafgen from 1 to the other
> with "{eth(daddr=$INCORRECT_MAC...}", verified that nstat showed the
> counter was incremented.
> 
> Signed-off-by: jeffreyji <jeffreyji@google.com>

How about we use the new kfree_skb_reason() instead to avoid allocating
per-netns memory the stats?

  reply	other threads:[~2022-01-22  3:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-22  0:03 [PATCH net-next] net-core: add InMacErrors counter Jeffrey Ji
2022-01-22  3:40 ` Jakub Kicinski [this message]
2022-01-24 17:13   ` Brian Vazquez
2022-01-24 17:29     ` Jakub Kicinski
2022-01-24 17:39       ` Eric Dumazet
2022-01-24 17:46         ` Jakub Kicinski
2022-01-24 20:19       ` Cong Wang
2022-01-24 20:21         ` Eric Dumazet
2022-01-24 22:24 ` kernel test robot
2022-01-24 22:24 ` kernel test robot

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=20220121194057.17079951@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net \
    --to=kuba@kernel.org \
    --cc=brianvv@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jeffreyji@google.com \
    --cc=jeffreyjilinux@gmail.com \
    --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).