Skip to contentSkip to conversation

virtio-can: define out of rage can-id and sdu

PATCH New Matias Ezequiel Vara Larsen 1 participant 1 message Jul 8, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 virtio-can: define out of rage can-id and sdu

Explain when a message is out of range.

---
v1 -> v2
* change to if VIRTIO_CAN_FLAGS_FD bit is set

---
 device-types/can/description.tex | 8 ++++++++
 1 file changed, 8 insertions(+)
device-types/can/description.tex +8 -0
index 2511d9c..ddf259c 100644
@@ -191,6 +191,14 @@ \subsubsection{Controller Mode}\label{sec:Device Types / CAN Device / Device Ope
 invalid state with VIRTIO_CAN_RESULT_NOT_OK in \field{result} and MUST
 NOT schedule the message for transmission.
 
+Note that the \field{can_id} field of a CAN frame is out of range when its
+length is more than 11 bits for standard frames or more than 29 bits for
+extended frames. The length of the \field{sdu} field is out of range when it
+uses more than 8 bytes for standard frames. If the VIRTIO_CAN_FLAGS_FD bit is
+set in the \field{flags}, the lenght of the \field{sdu} field is out of range
+when it uses more than 8 bytes and is not in the set [ 12, 16, 20, 24, 32, 48,
+64 ] bytes.
+
 If the parameters are valid the message is scheduled for transmission.
 
 If feature VIRTIO_CAN_F_CAN_LATE_TX_ACK has been negotiated the

base-commit: 37c6a406678a5ee891fdf5671298cb4fcfa517f2

Signature · 1 line
2.42.0