Re: [PATCH v4 net-next] net-core: add InMacErrors counter

From: Jakub Kicinski
Date: Wed Jan 26 2022 - 21:55:57 EST


On Tue, 25 Jan 2022 23:24:24 +0000 Jeffrey Ji wrote:
> v3-4:
> Remove Change-Id
>
> v2:
> Use skb_free_reason() for tracing
> Add real-life example in patch msg
>
> Signed-off-by: jeffreyji <jeffreyji@xxxxxxxxxx>
> ---
> include/linux/skbuff.h | 1 +
> include/uapi/linux/snmp.h | 1 +
> net/ipv4/ip_input.c | 7 +++++--
> net/ipv4/proc.c | 1 +
> net/ipv6/ip6_input.c | 12 +++++++-----
> net/ipv6/proc.c | 1 +
> 6 files changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index bf11e1fbd69b..04a36352f677 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -320,6 +320,7 @@ enum skb_drop_reason {
> SKB_DROP_REASON_TCP_CSUM,
> SKB_DROP_REASON_TCP_FILTER,
> SKB_DROP_REASON_UDP_CSUM,
> + SKB_DROP_REASON_BAD_DEST_MAC,

Ah, sorry I missed that you pulled in the reason in v3, I thought you'd
leave it to Menglong. Either way is fine, but "BAD_DEST_MAC" is
probably not the most fortunate name for this reason code.
Menglong had OTHERHOST - that seems more intuitive to me, the MAC
address is not bad, it's just not the address of the local host.