[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text
> From: virtio-comment@lists.oasis-open.org <virtio-comment@lists.oasis- > open.org> On Behalf Of Parav Pandit > Sent: Monday, February 5, 2024 9:54 PM > To: Cornelia Huck <cohuck@redhat.com>; Michael S. Tsirkin > <mst@redhat.com> > Cc: virtio-comment@lists.oasis-open.org; Shahaf Shuler > <shahafs@nvidia.com>; xuanzhuo@linux.alibaba.com; > yuri.benditovich@daynix.com > Subject: RE: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer > size calculation text > > > > > 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. I will shortly post v4 with this as there is no objection for this one line change. Thanks.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]