Re: [PATCH net-next] net-core: rx_otherhost_dropped to core_stats

From: Jakub Kicinski
Date: Thu Apr 07 2022 - 01:31:56 EST


On Wed, 6 Apr 2022 17:26:00 +0000 Jeffrey Ji wrote:
> From: Jeffrey Ji <jeffreyji@xxxxxxxxxx>
>
> Increment rx_otherhost_dropped counter when packet dropped due to
> mismatched 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
>
> Tested: Created 2 netns, sent 1 packet using trafgen from 1 to the other
> with "{eth(daddr=$INCORRECT_MAC...}", verified that iproute2 showed the
> counter was incremented. (Also had to modify iproute2 to show the stat,
> additional patch for that coming next.)
>
> Signed-off-by: Jeffrey Ji <jeffreyji@xxxxxxxxxx>

Acked-by: Jakub Kicinski <kuba@xxxxxxxxxx>