All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol@kernel.org>
To: Oliver Hartkopp <socketcan@hartkopp.net>, linux-can@vger.kernel.org
Subject: Re: RFC remove CAN_CTRLMODE_XL_ERR_SIGNAL
Date: Mon, 10 Nov 2025 22:22:11 +0100	[thread overview]
Message-ID: <ee2ecbeb-eb88-45a5-b13d-0616383e0987@kernel.org> (raw)
In-Reply-To: <84cb473f-be5b-464b-a5d9-10c6f643f145@hartkopp.net>

Hi Oliver,

On 09/11/2025 at 22:07, Oliver Hartkopp wrote:
> Hi Vincent,
> 
> I've been playing with the PEAK CAN XL bitrate tool again and it gave me a new
> idea:
> 
> There were settings for different bitrates and the belonging/resulting flags for
> TMS and ES (error-signalling).
> 
> Staring at the options we have only three options for the CAN XL support aka "xl
> on":
> 
> 1. Providing CC/FD/XL bitrates => ES on, TMS off (mixed-mode)
> 
> 2. Providing only CC/XL bitrates => ES off, TMS off (CANXL-only)
> 
> 3. Providing only CC/XL bitrates => ES off, TMS on (CANXL-only)

Why isn't

  4. Providing only CC/XL bitrates => ES on, TMS off

a valid option?

> Therefore we only need "tms" as an additional option when xl is on.
> 
> The error signalling "on" automatically results from the availability of "fd on"
> and the FD bitrate.
> 
> Examples:
> 
> 1. Providing CC/FD/XL bitrates => ES on, TMS off
> 
> ip link set can0 type can bitrate 500000 fd on dbitrate 2000000 xl on xbitrate
> 4000000
> 
> 2. Providing only CC/XL bitrates => ES off, TMS off
> 
> ip link set can0 type can bitrate 500000 xl on xbitrate 4000000
> 
> 3. Providing only CC/XL bitrates => ES off, TMS on
> 
> ip link set can0 type can bitrate 500000 xl on xbitrate 10000000 tms on
> 
> That's simple and provides only the needed switches, which makes
> CAN_CTRLMODE_XL_ERR_SIGNAL obsolete in the netlink API.
> 
> What do you think about this approach?

What really bothers me here is that the ISO standard explicitly state that error
signaling is a configurable option. Making this an implicit option would result
in a somehow non-compliant implementation.

I appreciate that for most of the use cases the error signaling can be inferred
from the other values, and this is what I tried to implement (c.f. the table of
default values which I put in my patch).

But I want to leave room so that people who wants to push the standard to its
limits can.

I see this a bit like the can_frame->len8_dlc thing. Should you use DLCs greater
than 8 in production code? Hell no! But I still want the implementation to give
me this option so that I can do my weird tests.


Yours sincerely,
Vincent Mailhol


  reply	other threads:[~2025-11-10 21:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-09 21:07 RFC remove CAN_CTRLMODE_XL_ERR_SIGNAL Oliver Hartkopp
2025-11-10 21:22 ` Vincent Mailhol [this message]
2025-11-11 14:12   ` Oliver Hartkopp
2025-11-14 15:17     ` Stéphane Grosjean
2025-11-14 18:20       ` Oliver Hartkopp
2025-11-15 13:06     ` Vincent Mailhol
2025-11-15 13:52       ` Oliver Hartkopp
2025-11-16 21:34         ` Vincent Mailhol
2025-11-17 11:25           ` Oliver Hartkopp

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=ee2ecbeb-eb88-45a5-b13d-0616383e0987@kernel.org \
    --to=mailhol@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.