From: Vincent Mailhol <mailhol@kernel.org>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
Oliver Hartkopp <socketcan@hartkopp.net>
Cc: "Vincent Mailhol" <mailhol@kernel.org>,
"Stéphane Grosjean" <stephane.grosjean@hms-networks.com>,
"Robert Nawrath" <mbro1689@gmail.com>,
"Minh Le" <minh.le.aj@renesas.com>,
"Duy Nguyen" <duy.nguyen.rh@renesas.com>,
linux-can@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 00/10] can: netlink: add CAN XL
Date: Tue, 21 Oct 2025 17:47:00 +0200 [thread overview]
Message-ID: <20251021-canxl-netlink-v2-0-8b8f58257ab6@kernel.org> (raw)
Following all the refactoring on the CAN netlink done in series [1],
[2] and [3], this is now time to finally introduce the CAN XL netlink
interface.
Similarly to how CAN FD reuses the bittiming logic of Classical CAN,
CAN XL also reuses the entirety of CAN FD features, and, on top of
that, adds new features which are specific to CAN XL.
Patch #1 is a small clean-up which makes can_calc_bittiming() use
NL_SET_ERR_MSG() instead of netdev_err().
Patch #2 adds a check in can_dev_dropped_skb() to drop CAN FD frames
when CAN FD is turned off.
Patch #3 adds CAN_CTRLMODE_RESTRICTED. Note that contrary to the other
CAN_CTRL_MODE_XL_* that are introduced in the later patches, this
control mode is not specific to CAN XL. The nuance is that because
this restricted mode was only added in ISO 11898-1:2024, it is made
mandatory for CAN XL devices but optional for other protocols. This is
why this patch is added as a preparation before introducing the core
CAN XL logic.
Patch #4 adds all the CAN XL features which are inherited from CAN FD:
the nominal bittiming, the data bittiming and the TDC.
Patch #5 and #6 add two new CAN control modes which are specific to
CAN XL: CAN_CTRLMODE_XL_TMS, CAN_CTRLMODE_XL_ERR_SIGNAL respectively.
Finally, patch #7 to #10 add the PWM logic.
[1] can: netlink: preparation before introduction of CAN XL
Link: https://lore.kernel.org/linux-can/20241112165118.586613-7-mailhol.vincent@wanadoo.fr/
[2] can: rework the CAN MTU logic (CAN XL preparation step 2/3)
Link: https://lore.kernel.org/linux-can/20250923-can-fix-mtu-v3-0-581bde113f52@kernel.org/
[3] can: netlink: preparation before introduction of CAN XL step 3/3
Link: https://lore.kernel.org/linux-can/20250923-canxl-netlink-prep-v4-0-e720d28f66fe@kernel.org/
---
Changes in v2:
- Add a new patch #1.
- In patch #9, add a return statement to can_calc_tdco() when
CONFIG_CAN_CALC_BITTIMING is not set. This fixes a warning as
reported by the kernel test robot:
Link: https://lore.kernel.org/linux-can/202510140553.qo3f0I9s-lkp@intel.com/
While at it, add an error message.
Link to v1: https://lore.kernel.org/r/20251013-canxl-netlink-v1-0-f422b7e2729f@kernel.org
Changes in v1:
- Add PWM
- Add the CAN_CTRLMODE_RESTRICTED, CAN_CTRLMODE_XL_TMS and
CAN_CTRLMODE_XL_ERR_SIGNAL control modes.
- A lot has changed since the original RFC was sent in November
last year. The preparation patches went in a separate series as
explained in the cover letter, and what used to be a single patch
to introduce CAN XL is now a full series. A few additional
details are added to the individual patches, but overall I did
not keep track of all the changes over the last year. You may as
well consider this as a new series.
Link to RFC: https://lore.kernel.org/linux-can/20241110155902.72807-16-mailhol.vincent@wanadoo.fr/
---
Vincent Mailhol (10):
can: bittiming: apply NL_SET_ERR_MSG() to can_calc_bittiming()
can: dev: can_dev_dropped_skb: drop CAN FD skbs if FD is off
can: netlink: add CAN_CTRLMODE_RESTRICTED
can: netlink: add initial CAN XL support
can: netlink: add CAN_CTRLMODE_XL_TMS flag
can: netlink: add CAN_CTRLMODE_XL_ERR_SIGNAL
can: bittiming: add PWM parameters
can: bittiming: add PWM validation
can: calc_bittiming: add PWM calculation
can: netlink: add PWM netlink interface
drivers/net/can/dev/bittiming.c | 63 +++++++
drivers/net/can/dev/calc_bittiming.c | 36 ++++
drivers/net/can/dev/dev.c | 20 +-
drivers/net/can/dev/netlink.c | 357 +++++++++++++++++++++++++++++++++--
include/linux/can/bittiming.h | 81 +++++++-
include/linux/can/dev.h | 49 +++--
include/uapi/linux/can/netlink.h | 35 ++++
7 files changed, 599 insertions(+), 42 deletions(-)
---
base-commit: ffee675aceb9f44b0502a8bec912abb0c4f4af62
change-id: 20241229-canxl-netlink-bc640af10673
Best regards,
--
Vincent Mailhol <mailhol@kernel.org>
next reply other threads:[~2025-10-21 15:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 15:47 Vincent Mailhol [this message]
2025-10-21 15:47 ` [PATCH v2 01/10] can: bittiming: apply NL_SET_ERR_MSG() to can_calc_bittiming() Vincent Mailhol
2025-10-21 15:47 ` [PATCH v2 02/10] can: dev: can_dev_dropped_skb: drop CAN FD skbs if FD is off Vincent Mailhol
2025-10-21 15:47 ` [PATCH v2 03/10] can: netlink: add CAN_CTRLMODE_RESTRICTED Vincent Mailhol
2025-10-21 15:47 ` [PATCH v2 04/10] can: netlink: add initial CAN XL support Vincent Mailhol
2025-10-21 15:47 ` [PATCH v2 05/10] can: netlink: add CAN_CTRLMODE_XL_TMS flag Vincent Mailhol
2025-11-06 8:42 ` Oliver Hartkopp
2025-11-09 14:28 ` Vincent Mailhol
2025-11-09 17:40 ` Oliver Hartkopp
2025-10-21 15:47 ` [PATCH v2 06/10] can: netlink: add CAN_CTRLMODE_XL_ERR_SIGNAL Vincent Mailhol
2025-11-06 8:50 ` Oliver Hartkopp
2025-11-09 14:54 ` Vincent Mailhol
2025-11-09 17:46 ` Oliver Hartkopp
2025-10-21 15:47 ` [PATCH v2 07/10] can: bittiming: add PWM parameters Vincent Mailhol
2025-10-21 15:47 ` [PATCH v2 08/10] can: bittiming: add PWM validation Vincent Mailhol
2025-10-21 15:47 ` [PATCH v2 09/10] can: calc_bittiming: add PWM calculation Vincent Mailhol
2025-10-21 15:47 ` [PATCH v2 10/10] can: netlink: add PWM netlink interface Vincent Mailhol
2025-10-31 21:17 ` [PATCH v2 00/10] can: netlink: add CAN XL Oliver Hartkopp
2025-11-02 22:11 ` Vincent Mailhol
2025-11-03 19:15 ` Oliver Hartkopp
2025-11-04 7:28 ` Marc Kleine-Budde
2025-11-04 8:01 ` Oliver Hartkopp
2025-11-04 13:13 ` Marc Kleine-Budde
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=20251021-canxl-netlink-v2-0-8b8f58257ab6@kernel.org \
--to=mailhol@kernel.org \
--cc=duy.nguyen.rh@renesas.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbro1689@gmail.com \
--cc=minh.le.aj@renesas.com \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
--cc=stephane.grosjean@hms-networks.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;
as well as URLs for NNTP newsgroup(s).