Re: [PATCH net-next 6/7] can: add drop reasons in the receive path of AF_CAN
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-06-10 22:50:40
Also in:
linux-can
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-06-10 22:50:40
Also in:
linux-can
On Tue, 10 Jun 2025 11:46:21 +0200 Marc Kleine-Budde wrote:
Besides the existing pr_warn_once(), use skb drop reasons in case AF_CAN
layer drops non-conformant CAN{,FD,XL} frames, or conformant frames
received by "wrong" devices, so that it's possible to debug (and count)
such events using existing tracepoints:Hm, I wonder if the protocol is really the most useful way to categorize. Does it actually help to identify problems on production systems? AFAIU we try to categorize by drop condition. So given the condition is: if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || !can_is_canfd_skb(skb))) my intuition would be to split this into two: "not a CAN device" and "invalid CAN frame". The latter not split by proto - user can dig into the stack traces of the relevant drop for more details. But drop reasons are not uAPI so we can re-align later.