qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] vhost-user.rst: add clarifying language about protocol ne


From: Stefan Hajnoczi
Subject: Re: [PATCH v2] vhost-user.rst: add clarifying language about protocol negotiation
Date: Thu, 4 Mar 2021 17:23:16 +0000

On Wed, Mar 03, 2021 at 05:01:05PM -0500, Michael S. Tsirkin wrote:
> On Wed, Mar 03, 2021 at 02:50:11PM +0000, Alex Bennée wrote:
> Also, are we sure it's ok to send the messages and then send
> VHOST_USER_SET_FEATURES with VHOST_USER_F_PROTOCOL_FEATURES clear?
> Looks more like a violation to me ...

Looking again I agree it would be a violation to omit
VHOST_USER_F_PROTOCOL_FEATURES in VHOST_USER_SET_FEATURES.

Previously I only looked at VHOST_USER_SET_PROTOCOL_FEATURES where the
spec says:

  Only legal if feature bit ``VHOST_USER_F_PROTOCOL_FEATURES`` is present in
  ``VHOST_USER_GET_FEATURES``.

So negotiation is *not* necessary for sending
VHOST_USER_SET_PROTOCOL_FEATURES.

However, I missed that other features *do* require negotiation of
VHOST_USER_F_PROTOCOL_FEATURES according to the spec. For example:

  If ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been negotiated, the
  ring is initialized in an enabled state.

Now I think:

1. VHOST_USER_F_PROTOCOL_FEATURES *must* be included
   VHOST_USER_SET_FEATURES if the master supports it.

2. VHOST_USER_SET_PROTOCOL_FEATURES does not require negotiation,
   instead the master just needs to check that
   VHOST_USER_F_PROTOCOL_FEATURES is included in the
   VHOST_USER_GET_FEATURES reply. It's an exception.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]