From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Cc: linux-can@vger.kernel.org, Robert Nawrath <mbro1689@gmail.com>
Subject: Re: [RFC PATCH 12/14] can: netlink: add CAN XL support
Date: Thu, 5 Dec 2024 09:16:44 +0100 [thread overview]
Message-ID: <aeb667e7-9a5b-4d6f-8220-ac06dbdcfe80@hartkopp.net> (raw)
In-Reply-To: <20241204-mauve-asp-of-fortitude-e75174-mkl@pengutronix.de>
On 04.12.24 12:44, Marc Kleine-Budde wrote:
> On 04.12.2024 12:35:43, Oliver Hartkopp wrote:
>>>>> Also, the main reason for not creating the nest was that I thought
>>>>> that the current bittiming API was stable. I was not aware of the
>>>>> current flaw on how to divide tseg1_min. Maybe we should first discuss
>>>>> how to solve this issue for CAN FD?
>>>>
>>>> I like the current way how you added the CAN XL support.
>>>> It maintains the known usage pattern - and the way how CAN XL bit timings
>>>> are defined is identical to CAN FD (including TDC).
>>>>
>>>> Is the separation of propseg and tseg1 that relevant?
>>>> Does it really need to be exposed to the user?
>>>
>>> There are IIRC at least 2 CAN-FD cores where the prop segment and phase
>>> segment 1 for the data bit timing have not the same width. This means we
>>> have to change the bittiming_const in the kernel.
Sure?
In the end (almost) every CAN controller has the tseg1 register which
contains prop_seg + phase_seg1 as a sum of these.
The relevant point is behind prop_seg + phase_seg1 and I'm pretty sure
these "2 CAN-FD cores" will add the values internally too.
I'm a bit concerned that after 40 years someone shows up with the idea
to spend two registers for the tseg1 value instead of one.
As a both values rely on the same tq can't we just split the tseg1 into
prop_seg + phase_seg1 values with some common e.g. 70:30 pattern?
IMO changing the bittiming API has no value for the user just to satisfy
the "2 CAN-FD cores" that came late to the party.
>>> A struct in netlink means we cannot change it.
>>
>> But are we not already in this situation with CAN FD that we can not change
>> the bittiming (const) in the userspace API?
>
> Yes, we have to support it. But we can add a new nested type that
> serializes the individual members of an improved struct bittiming_const.
> The old user space tools will just keep working, iproute2 can be updated
> to use the new bittiming_const if it's available and fall back to the
> existing one.
Ok. Nice - but maybe obsolete due to my question above ;-)
Best regards,
Oliver
next prev parent reply other threads:[~2024-12-05 8:16 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-10 15:55 [RFC PATCH 00/14] can: netlink: add CAN XL Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 01/14] can: dev: add struct data_bittiming_params to group FD parameters Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 02/14] can: netlink: replace tabulation by space in assignement Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 03/14] can: bittiming: rename CAN_CTRLMODE_TDC_MASK into CAN_CTRLMODE_FD_TDC_MASK Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 04/14] can: bittiming: rename can_tdc_is_enabled() into can_fd_tdc_is_enabled() Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 05/14] can: netlink: can_changelink(): rename tdc_mask into fd_tdc_flag_provided Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 06/14] can: netlink: make can_tdc_changelink() FD agnostic Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 07/14] can: netlink: add can_dtb_changelink() Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 08/14] can: netlink: add can_validate_tdc() Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 09/14] can: netlink: make can_tdc_get_size() FD agnostic Vincent Mailhol
2024-11-10 15:55 ` [RFC PATCH 10/14] can: netlink: make can_tdc_fill_info() " Vincent Mailhol
2024-11-10 15:56 ` [RFC PATCH 11/14] can: netlink: document which symbols are FD specific Vincent Mailhol
2024-11-10 15:56 ` [RFC PATCH 12/14] can: netlink: add CAN XL support Vincent Mailhol
2024-11-12 8:09 ` Marc Kleine-Budde
2024-11-12 8:31 ` Vincent Mailhol
2024-11-12 8:41 ` Marc Kleine-Budde
2024-12-04 10:56 ` Oliver Hartkopp
2024-12-04 11:15 ` Marc Kleine-Budde
2024-12-04 11:35 ` Oliver Hartkopp
2024-12-04 11:44 ` Marc Kleine-Budde
2024-12-05 8:16 ` Oliver Hartkopp [this message]
2024-12-05 9:15 ` Marc Kleine-Budde
2024-12-09 13:13 ` Oliver Hartkopp
2024-12-10 11:58 ` Marc Kleine-Budde
2024-12-15 8:05 ` Vincent Mailhol
2024-11-10 15:56 ` [RFC PATCH 13/14] can: netlink: add userland error messages Vincent Mailhol
2024-11-10 15:56 ` [RFC PATCH 14/14] !!! DO NOT MERGE !!! can: add dummyxl driver Vincent Mailhol
2024-11-11 14:08 ` [RFC PATCH 00/14] can: netlink: add CAN XL Oliver Hartkopp
2024-11-11 15:17 ` Vincent Mailhol
2024-11-11 15:32 ` Oliver Hartkopp
2024-11-21 20:10 ` Oliver Hartkopp
2024-12-01 11:32 ` Oliver Hartkopp
2024-12-03 9:45 ` Vincent Mailhol
2024-12-04 7:56 ` Oliver Hartkopp
2024-12-15 9:21 ` Vincent Mailhol
2024-12-17 9:53 ` Oliver Hartkopp
2024-12-17 18:17 ` Vincent Mailhol
2024-12-17 20:03 ` Oliver Hartkopp
2024-12-18 9:13 ` Oliver Hartkopp
2025-01-30 5:42 ` Vincent Mailhol
2025-01-30 7:34 ` Marc Kleine-Budde
2024-11-12 8:53 ` Marc Kleine-Budde
2024-11-12 9:24 ` Vincent Mailhol
2024-11-12 10:12 ` 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=aeb667e7-9a5b-4d6f-8220-ac06dbdcfe80@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mbro1689@gmail.com \
--cc=mkl@pengutronix.de \
/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