cangen: auto mix of CC/FD/XL frames#608
Merged
hartkopp merged 2 commits intolinux-can:masterfrom Dec 3, 2025
Merged
Conversation
Member
hartkopp
commented
Nov 27, 2025
- automatically detect which CAN frame types can be send in the mix mode (-m option)
- handle the CAN XL-only case when the CAN_RAW socket rejects unsupported CC/FD frames
Automatically create FD/XL content in mixed mode when the CAN interface is capable to deal with it. Suggested-by: Vincent Mailhol <mailhol@kernel.org> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
The mixed mode is able to automatically detect the potential supported CAN frame types CAN CC/FD/XL by checking the CAN device MTU at startup. Usually the MTU shows which CAN frame types can be sent but in the case of CAN XL in CANXL-only mode CC and FD frames can not be sent on the CAN_RAW socket. Since this patch [1] the CAN_RAW socket rejects unsupported CAN frames and returns -EINVAL as error code. With this change in cangen the CC and FD frame generation can be disabled in mixed mode at runtime. [1] https://lore.kernel.org/linux-can/20251125123859.3924-17-socketcan@hartkopp.net/T/#u Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.