Linux CAN drivers development
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Vincent Mailhol <mailhol@kernel.org>, linux-can@vger.kernel.org
Cc: "Stéphane Grosjean" <stephane.grosjean@hms-networks.com>
Subject: Re: [RFC PATCH v5 2/2] can: reject CAN FD content when disabled on CAN XL interfaces
Date: Sat, 20 Sep 2025 19:38:30 +0200	[thread overview]
Message-ID: <e845bb4d-32db-4a73-a4c0-2e43af3bc861@hartkopp.net> (raw)
In-Reply-To: <4430c1a1-5c03-45bb-a687-66e0a41050f6@kernel.org>



On 18.09.25 11:18, Vincent Mailhol wrote:
> On 18/09/2025 at 06:29, Oliver Hartkopp wrote:


>> Will the user defined MTU for CAN XL survive the settings when xl is set to off
>> and then set to on again?
> 
> Unfortunately no. Or at least not without adding one additional field to save
> the old value.
> 
> But after turning FD or XL off, none on the bittiming parameters would survive
> either. So I think it is coherent to say that the user has to set everything
> again each time XL is switched on.
> 

Ok. IMO setting the CAN XL MTU lower than CANXL_MTU_MAX is a power user 
feature anyway. So setting the bitrates and the MTU in one sequence 
should be no problem.


>> To sum it up for myself:
>>
>> 1. Setting the MTU from user space is only relevant for virtual CAN interfaces
>> and CAN XL interfaces for values between CANXL_MIN_MTU and CANXL_MAX_MTU.
> 
> Ack.
> 
>> 2. Usually the MTU is set automatically by the netlink configuration process
>> when fd/xl on/off are set.
> 
> Ack.
> 
> As you will see, I found some bug because a few drivers forgot to set their
> can_change_mtu() and addressed the issue here:
> 
> https://lore.kernel.org/linux-can/20250918-can-fix-mtu-v1-0-0d1cada9393b@kernel.org/
> 
> That series is just to fix things and is meant to be back ported to stable.

Nice cleanup!

> I will send a couple more patches as an RFC which will implement the actual
> logic which we discussed here.

Fine!

I assume we will miss this merge window for the CAN XL support then.
With all the things that need to be looked at carefully the next merge 
window is probably the better choice.

Best regards,
Oliver


  reply	other threads:[~2025-09-20 17:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09  9:24 [RFC PATCH v5 1/2] can: skb: enforce CANFD_FDF check in can_is_canfd_skb() Oliver Hartkopp
2025-09-09  9:24 ` [RFC PATCH v5 2/2] can: reject CAN FD content when disabled on CAN XL interfaces Oliver Hartkopp
2025-09-09 16:36   ` Oliver Hartkopp
2025-09-10  5:13     ` Vincent Mailhol
2025-09-10  7:27       ` Oliver Hartkopp
2025-09-10  7:40         ` Vincent Mailhol
2025-09-10  8:48           ` Oliver Hartkopp
2025-09-10 16:19             ` Vincent Mailhol
2025-09-10 20:12               ` Oliver Hartkopp
2025-09-15 10:55                 ` Vincent Mailhol
2025-09-15 13:59                   ` Vincent Mailhol
2025-09-15 18:08                     ` Oliver Hartkopp
2025-09-15 18:54                       ` Vincent Mailhol
2025-09-16  9:14                         ` Oliver Hartkopp
2025-09-16 13:17                           ` Vincent Mailhol
2025-09-17 21:29                             ` Oliver Hartkopp
2025-09-18  9:18                               ` Vincent Mailhol
2025-09-20 17:38                                 ` Oliver Hartkopp [this message]
2025-09-20 17:57                                   ` Vincent Mailhol

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=e845bb4d-32db-4a73-a4c0-2e43af3bc861@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --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