From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com,
"Dario Binacchi" <dario.binacchi@amarulasolutions.com>,
"Alexandra Winter" <wintera@linux.ibm.com>,
"Carolina Jubran" <cjubran@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Frank Li" <Frank.Li@nxp.com>, "Gal Pressman" <gal@nvidia.com>,
"Haibo Chen" <haibo.chen@nxp.com>, "Han Xu" <han.xu@nxp.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Kory Maincent" <kory.maincent@bootlin.com>,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
"Paolo Abeni" <pabeni@redhat.com>,
"Rob Herring" <robh@kernel.org>,
"Sabrina Dubroca" <sd@queasysnail.net>,
"Shannon Nelson" <shannon.nelson@amd.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Vincent Mailhol" <mailhol.vincent@wanadoo.fr>,
linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: [RFC PATCH 0/6] This series originates from some tests I ran on a CAN communication for
Date: Mon, 14 Oct 2024 17:24:15 +0200 [thread overview]
Message-ID: <20241014152431.2045377-1-dario.binacchi@amarulasolutions.com> (raw)
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.
Dario Binacchi (6):
can: dev: add generic function can_update_bus_error_stats()
can: flexcan: use can_update_bus_error_stats()
can: dev: add helper macros to setup an error frame
can: flexcan: use helper macros 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 | 28 ++++++++++++++++
include/uapi/linux/can/netlink.h | 6 ++++
4 files changed, 87 insertions(+), 21 deletions(-)
--
2.43.0
next reply other threads:[~2024-10-14 15:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 15:24 Dario Binacchi [this message]
2024-10-14 15:24 ` [RFC PATCH 1/6] can: dev: add generic function can_update_bus_error_stats() Dario Binacchi
2024-10-14 15:24 ` [RFC PATCH 2/6] can: flexcan: use can_update_bus_error_stats() Dario Binacchi
2024-10-14 15:24 ` [RFC PATCH 3/6] can: dev: add helper macros to setup an error frame Dario Binacchi
2024-10-14 20:00 ` Marc Kleine-Budde
2024-10-15 7:47 ` Dario Binacchi
2024-10-14 15:24 ` [RFC PATCH 4/6] can: flexcan: use helper macros to setup the " Dario Binacchi
2024-10-14 15:24 ` [RFC PATCH 5/6] can: netlink: extend stats to the error types (ack, CRC, form, ...) Dario Binacchi
2024-10-14 15:24 ` [RFC PATCH 6/6] can: dev: update the error types stats " Dario Binacchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241014152431.2045377-1-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=Frank.Li@nxp.com \
--cc=cjubran@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=haibo.chen@nxp.com \
--cc=han.xu@nxp.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=michael@amarulasolutions.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=sd@queasysnail.net \
--cc=shannon.nelson@amd.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=wintera@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox