virtio-comment.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Parav Pandit <parav@nvidia.com>, "Michael S. Tsirkin" <mst@redhat.com>
Cc: "virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	Shahaf Shuler <shahafs@nvidia.com>,
	"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
	"yuri.benditovich@daynix.com" <yuri.benditovich@daynix.com>
Subject: RE: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text
Date: Tue, 06 Feb 2024 18:02:29 +0100	[thread overview]
Message-ID: <87bk8til0a.fsf@redhat.com> (raw)
In-Reply-To: <PH0PR12MB548197C15EB3731B7012F9F1DC472@PH0PR12MB5481.namprd12.prod.outlook.com>

On Mon, Feb 05 2024, Parav Pandit <parav@nvidia.com> wrote:

>> From: Cornelia Huck <cohuck@redhat.com>
>> Sent: Monday, February 5, 2024 8:50 PM
>> 
>> On Tue, Jan 16 2024, "Michael S. Tsirkin" <mst@redhat.com> wrote:
>> 
>> > On Tue, Jan 16, 2024 at 01:18:59PM +0000, Parav Pandit wrote:
>> >>
>> >> > From: Cornelia Huck <cohuck@redhat.com>
>> >> > Sent: Tuesday, January 16, 2024 6:08 PM
>> >> > To: Parav Pandit <parav@nvidia.com>;
>> >> > virtio-comment@lists.oasis-open.org;
>> >> > mst@redhat.com
>> >> > Cc: Shahaf Shuler <shahafs@nvidia.com>; xuanzhuo@linux.alibaba.com;
>> >> > yuri.benditovich@daynix.com
>> >> > Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size
>> >> > calculation text
>> >> >
>> >> > On Tue, Jan 16 2024, Parav Pandit <parav@nvidia.com> wrote:
>> >> >
>> >> > >> From: Cornelia Huck <cohuck@redhat.com>
>> >> > >> Sent: Tuesday, January 16, 2024 4:33 PM
>> >> > >> To: Parav Pandit <parav@nvidia.com>;
>> >> > >> virtio-comment@lists.oasis-open.org;
>> >> > >> mst@redhat.com
>> >> > >> Cc: Shahaf Shuler <shahafs@nvidia.com>;
>> >> > >> xuanzhuo@linux.alibaba.com; yuri.benditovich@daynix.com
>> >> > >> Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size
>> >> > >> calculation text
>> >> > >>
>> >> > >> On Tue, Jan 16 2024, Parav Pandit <parav@nvidia.com> wrote:
>> >> > >>
>> >> > >> >> From: Cornelia Huck <cohuck@redhat.com>
>> >> > >> >> Sent: Monday, January 15, 2024 10:14 PM
>> >> > >> >
>> >> > >> >> On Mon, Jan 15 2024, Parav Pandit <parav@nvidia.com> wrote:
>> >> > >> >> > +The driver MUST consider size of field \field{struct
>> >> > >> >> > +virtio_net_hdr}
>> >> > >> >> > +20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12
>> >> > >> >> > +bytes if
>> >> > >> >> not.
>> >> > >> >> > +
>> >> > >> >>
>> >> > >> >> Requiring the driver to consider the size of something to be
>> >> > >> >> its actual size seems a bit odd :) I don't think we need
>> >> > >> >> this, as the
>> 
>> My comment here still holds.
>>
> It is a variable length data structure with few trailing fields as not valid.
> The "actual size" depends on negotiated feature bit, which is what is written here.
>  
> How about below?
>
> When calculating the size of \field{struct virtio_net_hdr}, the driver must consider all the fields
> inclusive up to \field{padding_reserved}, i.e. 20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated,
> and 12 bytes if not.

It's up to padding_reserved with F_HASH_REPORT and up to num_buffers if
not, isn't it?


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:[~2024-02-06 17:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15  9:31 [virtio-comment] [PATCH v2 0/2] virtio-net: Clarify virtio_net_hdr size and rx buffer size Parav Pandit
2024-01-15  9:31 ` [virtio-comment] [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text Parav Pandit
2024-01-15 16:44   ` [virtio-comment] " Cornelia Huck
2024-01-16  3:45     ` [virtio-comment] " Parav Pandit
2024-01-16 11:02       ` Cornelia Huck
2024-01-16 11:23         ` Parav Pandit
2024-01-16 12:38           ` Cornelia Huck
2024-01-16 13:18             ` Parav Pandit
2024-01-16 13:29               ` [virtio-comment] " Michael S. Tsirkin
2024-01-19 12:25                 ` [virtio-comment] " Parav Pandit
2024-02-01  5:57                   ` Parav Pandit
2024-02-05 11:16                     ` Parav Pandit
2024-02-05 15:19                 ` [virtio-comment] " Cornelia Huck
2024-02-05 16:24                   ` Parav Pandit
2024-02-06 17:02                     ` Cornelia Huck [this message]
2024-02-06 17:57                       ` Parav Pandit
2024-02-09 11:46                     ` Parav Pandit
2024-01-15  9:31 ` [virtio-comment] [PATCH v2 2/2] virtio-net: Clarify the size of the struct virtio_net_hdr for tx Parav Pandit
2024-01-16  3:34   ` [virtio-comment] " Xuan Zhuo
2024-01-16  4:04     ` [virtio-comment] " Parav Pandit

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=87bk8til0a.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=mst@redhat.com \
    --cc=parav@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=yuri.benditovich@daynix.com \
    /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;
as well as URLs for NNTP newsgroup(s).