All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Mailhol <vincent.mailhol@gmail.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>, linux-can@vger.kernel.org
Subject: Re: [PATCH v8 4/7] can: canxl: introduce CAN XL data structure
Date: Sun, 11 Sep 2022 23:00:52 +0900	[thread overview]
Message-ID: <CAMZ6RqLmSVQycDJeZ20P_oVE0GwyM3NoGbbuVHRsMzYXODvarA@mail.gmail.com> (raw)
In-Reply-To: <1d8be592-5f4c-8036-8050-22aec73a3eb4@hartkopp.net>

On Sun. 11 Sept. 2022 at 21:11, Oliver Hartkopp <socketcan@hartkopp.net> wrote:
> Hi Vincent,
>
> On 11.09.22 09:50, Vincent Mailhol wrote:
> > On Thu. 8 Sep. 2022 at 16:24, Oliver Hartkopp <socketcan@hartkopp.net> wrote:
> (..)
>
> >>> The CAN-ID was (due to its arbitration nature) always also a priority
> >>> field.
> >
> > The CAN-(FD) ID holds two roles: priority and ID. For CAN XL, it is
> > only ID.
>
> Typo? It is only the priority ;-)

Yes, typo ^^;

> > While I agree that both have the priority attributes, my
> > concerns are on the semantics. The type is canid_t, not canprio_t. I
> > just want to point that it is weird to had ID in the type when that
> > field doesn't have an ID property anymore.
>
> CAN XL moves away from the two roles combined in the CAN(FD) Identifier.
> The main focus is on arbitration now (CAN XL is like CAN arbitration
> with Ethernet data).
>
> But in the end the CAN bitstream at the beginning of the frame including
> the arbitration is completely identical for all CAN variants.
>
> Even when this arbitration field is now named priority for CAN XL it is
> still the exact mechanism of the CAN identifier (what we introduces
> canid_t for).
>
> Therefore having canid_t for can_id and prio seems appropriate.

I guess you have a better insight. Thanks for the details.

> >>> So nothing changed here. There is no RTR and no 29-bit priority anymore
> >>> now. The RTR flag has already been disabled for CAN FD (see presentation
> >>> at the end of this mail).
> >>>
> >>> Therefore it makes sense to handle the SFF 11-bit prio analogue to the
> >>> former CAN-ID - and also use canid_t to simply keep the entire CAN
> >>> filter handling in af_can.c !
> >
> > This is a good argument to keep using the canid_t. If we make it a
> > u16, we lose the alignment (unless we add dirty endianness
> > preprocessing macros).
>
> Yep.
>
> (..)
>
> >>> Btw. I uploaded a presentation which shows the way from classical CAN to
> >>> CAN XL which might depict some relations of the bits in a clearer way:
> >>>
> >>> https://github.com/linux-can/can-doc/blob/master/presentations/CAN-XL-Intro.pdf
> >
> > Thanks. With the Bosch PDF now returning error 404, I suggest
> > replacing the link in the cover letter with your link (or the CIA
> > knowledge page).
>
> Ok, will do.

Yours sincerely,
Vincent Mailhol

  reply	other threads:[~2022-09-11 14:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 19:00 [PATCH v8 0/7] can: support CAN XL Oliver Hartkopp
2022-08-01 19:00 ` [PATCH v8 1/7] can: skb: unify skb CAN frame identification helpers Oliver Hartkopp
2022-08-01 19:00 ` [PATCH v8 2/7] can: skb: add skb CAN frame data length helpers Oliver Hartkopp
2022-08-01 19:00 ` [PATCH v8 3/7] can: set CANFD_FDF flag in all CAN FD frame structures Oliver Hartkopp
2022-09-11  7:51   ` Vincent Mailhol
2022-09-11 12:23     ` Oliver Hartkopp
2022-09-11 13:57       ` Vincent Mailhol
2022-08-01 19:00 ` [PATCH v8 4/7] can: canxl: introduce CAN XL data structure Oliver Hartkopp
2022-09-02  6:19   ` Vincent Mailhol
2022-09-02 13:56     ` Oliver Hartkopp
2022-09-08  7:24       ` Oliver Hartkopp
2022-09-11  7:50         ` Vincent Mailhol
2022-09-11 12:11           ` Oliver Hartkopp
2022-09-11 14:00             ` Vincent Mailhol [this message]
2022-08-01 19:00 ` [PATCH v8 5/7] can: canxl: update CAN infrastructure for CAN XL frames Oliver Hartkopp
2022-09-11  7:53   ` Vincent Mailhol
2022-09-11 12:35     ` Oliver Hartkopp
2022-09-11 14:10       ` Vincent Mailhol
2022-09-12 17:09         ` Oliver Hartkopp
2022-08-01 19:00 ` [PATCH v8 6/7] can: dev: add CAN XL support to virtual CAN Oliver Hartkopp
2022-08-01 19:00 ` [PATCH v8 7/7] can: raw: add CAN XL support Oliver Hartkopp
2022-08-31 11:56 ` [PATCH v8 0/7] can: support CAN XL Oliver Hartkopp
2022-09-11  8:08   ` Vincent MAILHOL
2022-09-11 12:42     ` 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=CAMZ6RqLmSVQycDJeZ20P_oVE0GwyM3NoGbbuVHRsMzYXODvarA@mail.gmail.com \
    --to=vincent.mailhol@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --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.