[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABGWkvp=VdpOUGdHep8E6p8C+gFGsZyhMEtcjkx-zNaG-X_r3g@mail.gmail.com>
Date: Sun, 8 Dec 2024 17:59:23 +0100
From: Dario Binacchi <dario.binacchi@...rulasolutions.com>
To: linux-kernel@...r.kernel.org
Cc: linux-amarula@...rulasolutions.com, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Frank Li <Frank.Li@....com>,
Gal Pressman <gal@...dia.com>, Haibo Chen <haibo.chen@....com>, Han Xu <han.xu@....com>,
Jakub Kicinski <kuba@...nel.org>, Kory Maincent <kory.maincent@...tlin.com>,
Marc Kleine-Budde <mkl@...gutronix.de>, Paolo Abeni <pabeni@...hat.com>,
Rahul Rameshbabu <rrameshbabu@...dia.com>, Rob Herring <robh@...nel.org>,
Sabrina Dubroca <sd@...asysnail.net>, Shannon Nelson <shannon.nelson@....com>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>, linux-can@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [RFC PATCH v3 0/6] Add helpers for stats and error frames
On Tue, Oct 29, 2024 at 12:46 PM Dario Binacchi
<dario.binacchi@...rulasolutions.com> wrote:
>
> This series originates from some tests I ran on a CAN communication for
> one of my clients that reports sporadic errors. After enabling BERR
> reporting, I was surprised that the command:
>
> ip -details -statistics link show can0
>
> did not display the occurrence of different types of errors, but only the
> generic ones for reception and transmission. In trying to export this
> information, I felt that the code related to managing statistics and handling
> CAN errors (CRC, STUF, BIT, ACK, and FORM) was quite duplicated in the
> implementation of various drivers, and there wasn't a generic function like
> in the case of state changes (i. e. can_change_state). This led to the idea
> of adding can_update_bus_error_stats() and the helpers for setting up the
> CAN error frame.
>
> Regarding patch 5/6 ("can: netlink: extend stats to the error types (ack,
> CRC, form, ..."), I ran
>
> ./scripts/check-uapi.sh
>
> which found
>
> "error - 1/934 UAPI headers compatible with x86 appear _not_ to be backwards
> compatible."
>
> I included it in the series because I am currently interested in understanding
> whether the idea behind each of the submitted patches makes sense, and I can
> adjust them later if the response is positive, following your suggestions.
>
> Changes in v3:
> - Drop double assignement of "priv" variable.
> - Check "dev" parameter is not NULL.
> - Drop the check of "cf" parameter not NULL
>
> Changes in v2:
> - Replace macros with static inline functions
> - Update the commit message
> - Replace the macros with static inline funcions calls.
> - Update the commit message
>
> Dario Binacchi (6):
> can: dev: add generic function can_update_bus_error_stats()
> can: flexcan: use can_update_bus_error_stats()
> can: dev: add helpers to setup an error frame
> can: flexcan: use helpers to setup the error frame
> can: netlink: extend stats to the error types (ack, CRC, form, ...)
> can: dev: update the error types stats (ack, CRC, form, ...)
>
> drivers/net/can/dev/dev.c | 45 ++++++++++++++++++++++++++
> drivers/net/can/flexcan/flexcan-core.c | 29 +++++------------
> include/linux/can/dev.h | 38 ++++++++++++++++++++++
> include/uapi/linux/can/netlink.h | 6 ++++
> 4 files changed, 97 insertions(+), 21 deletions(-)
>
> --
> 2.43.0
>
A gentle ping to remind you of this series.
Could this series or some of its patches make sense to consider?
IMHO, if all the controllers indicate the type of error, I would expect
the user space to be aware of it as well.
Or is there something I might be missing?
Thanks and regards,
Dario
--
Dario Binacchi
Senior Embedded Linux Developer
dario.binacchi@...rulasolutions.com
__________________________________
Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@...rulasolutions.com
www.amarulasolutions.com
Powered by blists - more mailing lists