public inbox for virtio-comment@lists.linux.dev
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: virtio-comment@lists.linux.dev, Jason Wang <jasowang@redhat.com>,
	Parav Pandit <parav@nvidia.com>,
	devel@daynix.com
Subject: Re: [PATCH v4] virtio-net: Ignore num_buffers when unused
Date: Thu, 29 May 2025 02:50:49 -0400	[thread overview]
Message-ID: <20250529024047-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20250526-reserved-v4-1-70231a8edc79@daynix.com>

On Mon, May 26, 2025 at 02:15:19PM +0900, Akihiko Odaki wrote:
> If VIRTIO_NET_F_MRG_RXBUF has not been negotiated, vhost_net of Linux
> prior to 6.14 and QEMU prior to 10.0.0 leave num_buffers uninitialized
> while the specification tells to set it to one.
> 
> Let drivers ignore this field to make them compatible with old
> vhost_net/QEMU, similar to the hdr_len field, which is also marked as
> unreliable due to implementation bugs.
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> Reviewed-by: Parav Pandit <parav@nvidia.com>
> ---
> Changes in v4:
> - Noted that the mentioned bugs are fixed with newer implementation
>   versions in the patch message.
> - Noted that the bugs are of devices. (Parav Pandit)
> - Link to v3: https://lore.kernel.org/r/20250110-reserved-v3-1-2ade0a5d2090@daynix.com
> 
> Changes in v3:
> - s/MUST/SHOULD/ (Michael S. Tsirkin)
> - Link to v2: https://lore.kernel.org/r/20241227-reserved-v2-1-de9f9b0a808d@daynix.com
> 
> Changes in v2:
> - Corrected the change description to tell vhost_net and QEMU leaves
>   num_buffers uninitialized where it used to tell they set it to zero.
> - Restored statements that require devices to set num_buffers to one.
> - Link to v1: https://lore.kernel.org/r/20241226-reserved-v1-1-39ca566889c0@daynix.com
> ---
>  device-types/net/description.tex | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/device-types/net/description.tex b/device-types/net/description.tex
> index 76585b0..4a2df5a 100644
> --- a/device-types/net/description.tex
> +++ b/device-types/net/description.tex
> @@ -863,6 +863,12 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network
>  This is due to various bugs in implementations.
>  \end{note}
>  
> +If VIRTIO_NET_F_MRG_RXBUF has not been negotiated, the driver SHOULD ignore
> +\field{num_buffers}.
> +\begin{note}
> +This is due to bugs in device implementations.
> +\end{note}
> +
>  If neither VIRTIO_NET_HDR_F_NEEDS_CSUM nor
>  VIRTIO_NET_HDR_F_DATA_VALID is set, the driver MUST NOT
>  rely on the packet checksum being correct.

Acked-by: Michael S. Tsirkin <mst@redhat.com>


> ---
> base-commit: b495841a8e80d12c1130f8868f4128866291142d
> change-id: 20241226-reserved-d5960f173223
> 
> Best regards,
> -- 
> Akihiko Odaki <akihiko.odaki@daynix.com>


      parent reply	other threads:[~2025-05-29  6:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26  5:15 [PATCH v4] virtio-net: Ignore num_buffers when unused Akihiko Odaki
2025-05-27  4:21 ` Jason Wang
2025-05-29  6:50 ` Michael S. Tsirkin [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=20250529024047-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=devel@daynix.com \
    --cc=jasowang@redhat.com \
    --cc=parav@nvidia.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