On 11.09.22 09:53, Vincent Mailhol wrote:
On Tue. 2 Aug. 2022 at 04:02, Oliver Hartkopp <socketcan@xxxxxxxxxxxx> wrote:
(..)
+/* get length element value from can[|fd|xl]_frame structure */
static inline unsigned int can_skb_get_len_val(struct sk_buff *skb)
{
+ const struct canxl_frame *cfx = (struct canxl_frame *)skb->data;
const struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
Nitpick: what would be the acronyms for cfx and cfd? I thought that
cfd was for *C*AN-*FD* frame, and thus I would expect cxl instead of
cfx for *C*AN-*XL* frame.
On the contrary, if cfx stands for *C*AN *F*rame *X*L, then for
CAN-FD, the acronym should be cff (*C*AN *f*rame *F*D).
You need to start from the original
struct can_frame cf; *C*AN *F*RAME
Then CAN FD showed up and the naming moved from 'cf' to 'cfd' for *C*AN
*FD* FRAME where is was not forseable that there ever would be CAN XL.
For me it is more intuitive to generally name CAN frames 'cf<whatever>'.
cf -> cfd -> cfx
So it is about 'cf' with an extra attribute and not an abbreviation of
CAN variants.
Best regards,
Oliver