public inbox for virtio-comment@lists.linux.dev
 help / color / mirror / Atom feed
From: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
To: Harald Mommer <harald.mommer@opensynergy.com>
Cc: Stefano Garzarella <sgarzare@redhat.com>,
	virtio-comment@lists.linux.dev,
	Matti Moell <Matti.Moell@opensynergy.com>
Subject: Re: [PATCH] virtio-can: define out of rage can-id
Date: Wed, 26 Jun 2024 13:22:33 +0200	[thread overview]
Message-ID: <Znv5+dEBYwgRZ2XE@fedora> (raw)
In-Reply-To: <b527d7c6-285e-4405-843a-6cbad306f8f4@opensynergy.com>

On Wed, Jun 26, 2024 at 01:07:17PM +0200, Harald Mommer wrote:
> 
> On 21.06.24 16:27, Matias Ezequiel Vara Larsen wrote:
> > On Wed, Jun 05, 2024 at 10:42:19AM +0200, Stefano Garzarella wrote:
> > > On Tue, May 21, 2024 at 04:11:42PM GMT, Matias Ezequiel Vara Larsen wrote:
> > > > Explain when a message is out of range.
> > > > 
> > > > Signed-off-by: Matias Ezequiel Vara Larsen<mvaralar@redhat.com>
> > > > ---
> > > > * This patch applies on top of virtio-1.4, which has not been released
> > > >   yet.
> > > > ---
> > > > device-types/can/description.tex | 3 +++
> > > > 1 file changed, 3 insertions(+)
> > > > 
> > > > diff --git a/device-types/can/description.tex b/device-types/can/description.tex
> > > > index 2511d9c..98b163b 100644
> > > > --- a/device-types/can/description.tex
> > > > +++ b/device-types/can/description.tex
> > > > @@ -191,6 +191,9 @@ \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 a message is out of range when a standard frame uses more than 11
> > > > +bits of \field{can_id} or when an extended frame uses more than 29 bits.
> > > > +
> > > 
> Non-extended CAN frame and can_id contains more than 11 bits (not in range
> 0..7FFH) => broken.
> 
> Extended CAN frame and can_id contains more than 29 bits (not in range
> 0..1FFFFFFFH) => broken.
> 
> See also 5.20.3 "Feature bits", there it's mentioned but not this
> prominently.
> 
> Classic CAN frame and sdu length > 8 bytes => broken.
> 
> Comes from ISO 11898-1:2015, should have been mentioned more clearly here as
> it was done in 5.20.3. There is not stated that the allowed value range is
> 0..8. Obvious for CAN people, not obvious for anybody else.
> 
> CAN FD frame and sdu length > 8 bytes and not in the set { 12, 16, 20, 24,
> 32, 48, 64 } bytes => broken.
> 
> Comes from ISO 11898-1:2015, is not obvious for people not too familiar with
> CAN FD and is missing in the virtio CAN specification.
> 
> This is what was meant. Now some good wording is needed.
> 
> 
Thanks Harald! I'll add it in v1.

Matias


      reply	other threads:[~2024-06-26 11:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 14:11 [PATCH] virtio-can: define out of rage can-id Matias Ezequiel Vara Larsen
2024-06-05  8:42 ` Stefano Garzarella
2024-06-21 14:27   ` Matias Ezequiel Vara Larsen
2024-06-24 13:44     ` Stefano Garzarella
2024-06-26 11:07     ` Harald Mommer
2024-06-26 11:22       ` Matias Ezequiel Vara Larsen [this message]

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=Znv5+dEBYwgRZ2XE@fedora \
    --to=mvaralar@redhat.com \
    --cc=Matti.Moell@opensynergy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox