[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ye8J7rMiiTwNNA6T@pop-os.localdomain>
Date: Mon, 24 Jan 2022 12:19:58 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Brian Vazquez <brianvv@...gle.com>,
Jeffrey Ji <jeffreyjilinux@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
"David S . Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
jeffreyji <jeffreyji@...gle.com>
Subject: Re: [PATCH net-next] net-core: add InMacErrors counter
On Mon, Jan 24, 2022 at 09:29:24AM -0800, Jakub Kicinski wrote:
> On Mon, 24 Jan 2022 09:13:12 -0800 Brian Vazquez wrote:
> > On Fri, Jan 21, 2022 at 7:41 PM Jakub Kicinski <kuba@...nel.org> wrote:
> > > On Sat, 22 Jan 2022 00:03:01 +0000 Jeffrey Ji wrote:
> > > > From: jeffreyji <jeffreyji@...gle.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@...gle.com>
> > >
> > > How about we use the new kfree_skb_reason() instead to avoid allocating
> > > per-netns memory the stats?
> >
> > I'm not too familiar with the new kfree_skb_reason , but my
> > understanding is that it needs either the drop_monitor or ebpf to get
> > the reason from the tracepoint, right? This is not too different from
> > using perf tool to find where the pkt is being dropped.
> >
> > The idea here was to have a high level metric that is easier to find
> > for users that have less expertise on using more advance tools.
>
> That much it's understood, but it's a trade off. This drop point
> existed for 20 years, why do we need to consume extra memory now?
kfree_skb_reason() is for tracing and tracing has overhead in
production, which is higher than just a percpu counter.
What memory overhead are you talking about? We have ~37 IP related
SNMP counters, this patch merely adds 1/37 memory overhead. So, what's the
point? :-/
Thanks.
Powered by blists - more mailing lists