Skip to content

can: support CAN XL

Oliver Hartkopp linux-can 9 versions – Applied

Status from this message: Applied to linux-can-next and included in my recent pull request.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest7 patches 2 repliesApplied
  2. v87 patches 16 repliesSuperseded
  3. v77 patches 6 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v6 RFC7 patches3 repliesSuperseded
v5 RFC5 patches23 repliesSuperseded
v4 RFC5 patches3 repliesSuperseded
v3 RFC5 patches5 repliesSuperseded
v2 RFC5 patches11 repliesSuperseded
v1 RFC5 patches29 repliesSuperseded

Changes in v9 from the cover letter

- rebased to latest can-next/net-next tree
- updated and extended public available CAN XL documenatation in cover letter
- renamed struct canxl_frame variable cfx to cxl as suggested by Vincent
- Added Acked-by: Vincent Mailhol <[email protected]> tag

Patches in v9 Applied

#Subject and filesSizeRepliesApplied
1/7can: skb: unify skb CAN frame identification helpersdrivers/net/can/dev/skb.c include/linux/can/skb.h net/can/af_can.c +4 more+45 -540 replies
2/7can: skb: add skb CAN frame data length helpersdrivers/net/can/dev/rx-offload.c drivers/net/can/dev/skb.c include/linux/can/skb.h+28 -100 replies
3/7can: set CANFD_FDF flag in all CAN FD frame structuresdrivers/net/can/ctucanfd/ctucanfd_base.c drivers/net/can/dev/skb.c include/uapi/linux/can.h +1 more+18 -30 replies
4/7can: canxl: introduce CAN XL data structureinclude/uapi/linux/can.h+51 -00 replies
5/7can: canxl: update CAN infrastructure for CAN XL framesdrivers/net/can/dev/skb.c include/linux/can/skb.h include/uapi/linux/if_ether.h +1 more+101 -200 replies
6/7can: dev: add CAN XL support to virtual CANdrivers/net/can/vcan.c drivers/net/can/vxcan.c include/linux/can/dev.h+15 -100 replies
7/7can: raw: add CAN XL supportinclude/uapi/linux/can/raw.h net/can/raw.c+44 -120 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchVincent Mailhol
1/7A-b
2/7A-b
3/7A-b
4/7A-b
5/7A-b
6/7A-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [PATCH v9 0/7] can: support CAN XL

The CAN with eXtended data Length (CAN XL) is a new CAN protocol with a 10Mbit/s data transfer with a new physical layer transceiver (for this data section). CAN XL allows up to 2048 byte of payload and shares the arbitration principle (11 bit priority) known from Classical CAN and CAN FD. RTR and 29 bit identifiers are not implemented in CAN XL.

A short introdution to CAN XL can be found here:
https://www.can-cia.org/can-knowledge/can/can-xl/
https://github.com/linux-can/can-doc/blob/master/presentations/CAN-XL-Intro.pdf

V2: Major rework after discussion and feedback on Linux-CAN ML

- rework of struct canxl_frame
- CANXL_XLF flag is now the switch between CAN XL and CAN/CANFD
- variable length in r/w operations for CAN XL frames
- write CAN XL frame to raw socket enforces size <-> canxl_frame.len sync

V3: Fix length for CAN XL frames inside the sk_buff

- extend the CAN_RAW sockopt to handle fixed/truncated read/write operations

V4: Fix patch 5 (can: raw: add CAN XL support)

- fix return value (move 'err = -EINVAL' in raw_sendmsg())
- add CAN XL frame handling in can_rcv()
- change comment for CAN_RAW_XL_[RT]X_DYN definition (allow -> enable)

V5: Remove CAN_RAW_XL_[RT]X_DYN definition again

- CAN_RAW_XL_[RT]X_DYN (truncated data) feature is now enabled by default
- use CANXL_MIN_DLEN instead of '1' in canxl_frame definition
- add missing 'err = -EINVAL' initialization in raw_sendmsg())

V6:

- rework an separate skb identification and length helpers
- add CANFD_FDF flag in all CAN FD frame structures
- simplify patches for infrastructure and raw sockets
- add vxcan support in virtual CAN interface patch

V7:

- fixed indention as remarked by Marc
- set CANFD_FDF flag when detecting CAN FD frames generated by PF_PACKET
- Allow to use variable CAN XL MTU sizes to enforce real time requirements on CAN XL segments (e.g. to support of CAN CiA segmentation concept)

V8:

- fixed typo as remarked by Vincent
- rebased to latest can-next/net-next tree

V9:

- rebased to latest can-next/net-next tree
- updated and extended public available CAN XL documenatation in cover letter
- renamed struct canxl_frame variable cfx to cxl as suggested by Vincent
- Added Acked-by: Vincent Mailhol <[email protected]> tag

Oliver Hartkopp (7):
can: skb: unify skb CAN frame identification helpers
can: skb: add skb CAN frame data length helpers
can: set CANFD_FDF flag in all CAN FD frame structures
can: canxl: introduce CAN XL data structure
can: canxl: update CAN infrastructure for CAN XL frames
can: dev: add CAN XL support to virtual CAN
can: raw: add CAN XL support

 drivers/net/can/ctucanfd/ctucanfd_base.c |   1 -
 drivers/net/can/dev/rx-offload.c         |   2 +-
 drivers/net/can/dev/skb.c                | 113 ++++++++++++++++-------
 drivers/net/can/vcan.c                   |  12 +--
 drivers/net/can/vxcan.c                  |   8 +-
 include/linux/can/dev.h                  |   5 +
 include/linux/can/skb.h                  |  57 +++++++++++-
 include/uapi/linux/can.h                 |  55 ++++++++++-
 include/uapi/linux/can/raw.h             |   1 +
 include/uapi/linux/if_ether.h            |   1 +
 net/can/af_can.c                         |  76 ++++++++-------
 net/can/bcm.c                            |   9 +-
 net/can/gw.c                             |   4 +-
 net/can/isotp.c                          |   2 +-
 net/can/j1939/main.c                     |   4 +
 net/can/raw.c                            |  55 ++++++++---
 16 files changed, 299 insertions(+), 106 deletions(-)
Signature · 1 line
2.30.2