2022-02-08 23:36:46

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH v7 net-next] net-core: add InDropOtherhost counter

On Mon, 7 Feb 2022 23:57:14 +0000 Jeffrey Ji wrote:
> From: jeffreyji <[email protected]>
>
> Increment InDropOtherhost counter when packet dropped due to incorrect dest
> MAC addr.
>
> An example when this drop can occur is when manually crafting raw
> packets that will be consumed by a user space application via a tap
> device. For testing purposes local traffic was generated using trafgen
> for the client and netcat to start a server
>
> example output from nstat:
> \~# nstat -a | grep InMac
> Ip6InDropOtherhost 0 0.0
> IpExtInDropOtherhost 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.

As far as I can tell nobody objected to my suggestion of making this
a netdev counter, so please switch to working on that. Thanks.


2022-02-20 19:50:35

by Jeffrey Ji

[permalink] [raw]
Subject: Re: [PATCH v7 net-next] net-core: add InDropOtherhost counter

Hi Jakub, I'll remove the MIB counters & instead add counters to
rtnl_link_stats64 and rtnl_link_stats, does that sound right? But keep
the sbk_free_drop_reason


On Mon, Feb 7, 2022 at 7:51 PM Jakub Kicinski <[email protected]> wrote:
>
> On Mon, 7 Feb 2022 23:57:14 +0000 Jeffrey Ji wrote:
> > From: jeffreyji <[email protected]>
> >
> > Increment InDropOtherhost counter when packet dropped due to incorrect dest
> > MAC addr.
> >
> > An example when this drop can occur is when manually crafting raw
> > packets that will be consumed by a user space application via a tap
> > device. For testing purposes local traffic was generated using trafgen
> > for the client and netcat to start a server
> >
> > example output from nstat:
> > \~# nstat -a | grep InMac
> > Ip6InDropOtherhost 0 0.0
> > IpExtInDropOtherhost 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.
>
> As far as I can tell nobody objected to my suggestion of making this
> a netdev counter, so please switch to working on that. Thanks.

2022-02-20 23:58:44

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH v7 net-next] net-core: add InDropOtherhost counter

On Fri, 18 Feb 2022 13:31:03 -0800 Jeffrey Ji wrote:
> Hi Jakub, I'll remove the MIB counters & instead add counters to
> rtnl_link_stats64 and rtnl_link_stats, does that sound right?

Yup! I'd ignore rtnl_link_stats, actually since it's legacy and just
add it to the 64-bit version of the stats.

> But keep the sbk_free_drop_reason

sounds good