Discussion of the VIRTIO specification
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Cyril Germond <cgermond@kalray.eu>
Cc: virtio-comment <virtio-comment@lists.oasis-open.org>
Subject: Re: [virtio-comment] [PATCH] Fix virtio_net_hdr struct size when VIRTIO_NET_F_HASH_REPORT is negociated.
Date: Tue, 30 Aug 2022 13:07:04 +0200	[thread overview]
Message-ID: <87sfledm7b.fsf@redhat.com> (raw)
In-Reply-To: <2054028663.18021.1661854125834.JavaMail.zimbra@kalray.eu>

On Tue, Aug 30 2022, Cyril Germond <cgermond@kalray.eu> wrote:

>>> diff --git a/content.tex b/content.tex
>>> index e863709..b900f35 100644
>>> --- a/content.tex
>>> +++ b/content.tex
>>> @@ -3620,8 +3620,7 @@ \subsubsection{Setting Up Receive
>>> Buffers}\label{sec:Device Types / Network Devi
>>>  features are used, the maximum incoming packet
>>>  will be to 65550 bytes long (the maximum size of a
>>>  TCP or UDP packet, plus the 14 byte ethernet header), otherwise
>>> -1514 bytes.  The 12-byte struct virtio_net_hdr is prepended to this,
>>> -making for 65562 or 1526 bytes.
>>> +1514 bytes.  The struct virtio_net_hdr (which length depends on
>>> VIRTIO_NET_F_HASH_REPORT feature negotiation) is prepended to this.
>> 
>> The normative statement right below also cites the 65562/1526 numbers; I
>> assume that we want to adjust them as well? In that case, I don't think
>> we can get around mentioning concrete numbers for all four cases
>> (with/without offloads x with/without HASH_REPORT).
>> 
>> Any other opinions?
> I agree this parts needs update. Amongst the  3 alternate proposals for updating the normative statements of 5.1.6.3.1 (in the case VIRTIO_NET_F_MRG_RXBUF is not negotiated), which one would suit better (or eventually another one) ?
>
> 1/
> -If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6 or VIRTIO_NET_F_GUEST_UFO are negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least 65570 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, 65562 bytes otherwise.
> – Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least 1534 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, 1526 bytes otherwise.
>
> 2/
> -If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6 or VIRTIO_NET_F_GUEST_UFO are negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least :
>       - 65570 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated
>       - 65562 bytes otherwise.
> – Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least 
>       - 1534 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated
>       - 1526 bytes otherwise.
>
> 3/
> – If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6 or VIRTIO_NET_F_GUEST_UFO are negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least 65550 bytes plus the size of the struct virtio_net_hdr.
> – Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least 1514 bytes plus the size of the struct virtio_net_hdr.

I'd probably go with option 1, if we do not expect more
header-size-changing features in the foreseeable future, option 2
otherwise (IMHO, 1 is easier to read, while 2 is easier to extend.)

I'll let the virtio-net folks decide on that one.


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


      reply	other threads:[~2022-08-30 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 12:18 [virtio-comment] [PATCH] Fix virtio_net_hdr struct size when VIRTIO_NET_F_HASH_REPORT is negociated Cyril Germond
2022-08-29 10:33 ` Cornelia Huck
2022-08-30 10:08   ` Cyril Germond
2022-08-30 11:07     ` Cornelia Huck [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=87sfledm7b.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=cgermond@kalray.eu \
    --cc=virtio-comment@lists.oasis-open.org \
    /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