Skip to content
Commit 794c24e9 authored by Jeffrey Ji's avatar Jeffrey Ji Committed by Jakub Kicinski
Browse files

net-core: rx_otherhost_dropped to core_stats



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: default avatarJeffrey Ji <jeffreyji@google.com>
Reviewed-by: default avatarBrian Vazquez <brianvv@google.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220406172600.1141083-1-jeffreyjilinux@gmail.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4d242a19
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment