All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
To: virtio-comment@lists.linux.dev
Cc: harald.mommer@opensynergy.com, mvaralar@redhat.com, sgarzare@redhat.com
Subject: [PATCH v1] virtio-can: define out of rage can-id and sdu
Date: Thu, 27 Jun 2024 13:08:21 +0200	[thread overview]
Message-ID: <Zn1IJT/awG4NZijw@fedora> (raw)

Explain when a message is out of range.

Signed-off-by: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
---
v0 -> v1
    * Use length of the field wording to indicate out of range
    * Add when sdu length is out of range
---
 device-types/can/description.tex | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/device-types/can/description.tex b/device-types/can/description.tex
index 2511d9c..fa56abd 100644
--- a/device-types/can/description.tex
+++ b/device-types/can/description.tex
@@ -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_F_CAN_FD feature
+has been negotiated, 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
-- 
2.42.0


             reply	other threads:[~2024-06-27 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 11:08 Matias Ezequiel Vara Larsen [this message]
2024-06-27 13:16 ` [PATCH v1] virtio-can: define out of rage can-id and sdu Harald Mommer
2024-07-08 10:26   ` Matias Ezequiel Vara Larsen

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=Zn1IJT/awG4NZijw@fedora \
    --to=mvaralar@redhat.com \
    --cc=harald.mommer@opensynergy.com \
    --cc=sgarzare@redhat.com \
    --cc=virtio-comment@lists.linux.dev \
    /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.