docs: clarify absence of set_features in vhost-user
PATCH RESEND 1/1 docs: clarify absence of set_features in vhost-user
The previous wording was (at least to me) ambiguous about whether a backend should enable features immediately after they were set using VHOST_USER_SET_PROTOCOL_FEATURES, or wait for support for protocol features to be acknowledged if it hasn't been yet before enabling those features.
This patch attempts to make it clearer that VHOST_USER_SET_PROTOCOL_FEATURES should immediately enable features, even if support for protocol features has not yet been acknowledged, while still also making clear that the frontend SHOULD acknowledge support for protocol features.
Previous discussion begins here:
<https://lore.kernel.org/qemu-devel/[email protected]/>
--- docs/interop/vhost-user.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
docs/interop/vhost-user.rst +9 -5
@@ -871,9 +871,9 @@ Master message types ``VHOST_USER_GET_FEATURES``. .. Note:: - Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must - support this message even before ``VHOST_USER_SET_FEATURES`` was - called. + While QEMU should acknowledge ``VHOST_USER_F_PROTOCOL_FEATURES``, a + backend must allow ``VHOST_USER_GET_PROTOCOL_FEATURES`` even if + ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been acknowledged yet. ``VHOST_USER_SET_PROTOCOL_FEATURES`` :id: 16
@@ -886,8 +886,12 @@ Master message types ``VHOST_USER_GET_FEATURES``. .. Note:: - Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must support - this message even before ``VHOST_USER_SET_FEATURES`` was called. + While QEMU should acknowledge ``VHOST_USER_F_PROTOCOL_FEATURES``, a + backend must allow ``VHOST_USER_SET_PROTOCOL_FEATURES`` even if + ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been acknowledged yet. + The backend must not wait for ``VHOST_USER_SET_FEATURES`` before + enabling protocol features requested with + ``VHOST_USER_SET_PROTOCOL_FEATURES``. ``VHOST_USER_SET_OWNER`` :id: 3
Signature · 1 line
2.30.0
Quoted 6 lines · Alyssa Ross
The previous wording was (at least to me) ambiguous about whether a backend should enable features immediately after they were set using
VHOST_USER_SET_PROTOCOL_FEATURES, or wait for support for protocol features to be acknowledged if it hasn't been yet before enabling those features.
Quoted 8 lines
This patch attempts to make it clearer that
VHOST_USER_SET_PROTOCOL_FEATURESshould immediately enable features, even if support for protocol features has not yet been acknowledged, while still also making clear that the frontend SHOULD acknowledge support for protocol features.Previous discussion begins here:
<https://lore.kernel.org/qemu-devel/[email protected]/>
I totally missed this when I posted a similar attempt at clarification:
Subject: [PATCH v2] vhost-user.rst: add clarifying language about protocol negotiation
Date: Wed, 3 Mar 2021 14:50:11 +0000
Message-Id: <[email protected]>
Quoted 26 lines
Cc Michael S. Tsirkin <[email protected]>Signed-off-by Alyssa Ross <[email protected]>--- docs/interop/vhost-user.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)docs/interop/vhost-user.rst +3
-3@@ -871,9 +871,9 @@ Master message types ``VHOST_USER_GET_FEATURES``. .. Note:: - Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must - support this message even before ``VHOST_USER_SET_FEATURES`` was - called. + While QEMU should acknowledge ``VHOST_USER_F_PROTOCOL_FEATURES``, a + backend must allow ``VHOST_USER_GET_PROTOCOL_FEATURES`` even if + ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been acknowledged yet. ``VHOST_USER_SET_PROTOCOL_FEATURES`` :id: 16@@ -886,8 +886,12 @@ Master message types ``VHOST_USER_GET_FEATURES``.
docs/interop/vhost-user.rst Master message types · line 894
Quoted 10 lines
docs/interop/vhost-user.rst +6
-2.. Note:: - Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must support - this message even before ``VHOST_USER_SET_FEATURES`` was called. + While QEMU should acknowledge ``VHOST_USER_F_PROTOCOL_FEATURES``, a + backend must allow ``VHOST_USER_SET_PROTOCOL_FEATURES`` even if + ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been acknowledged yet. + The backend must not wait for ``VHOST_USER_SET_FEATURES`` before + enabling protocol features requested with + ``VHOST_USER_SET_PROTOCOL_FEATURES``.
I think this is perfectly fine clarification although I think there might be a patch in flight which changes some of the master slave terminology so with that resolved:
However there is still the edge case of what happens after the vhost pair have negotiated protocol features like REPLY_ACK should VHOST_USER_F_PROTOCOL_FEATURES still be acknowledged by VHOST_USER_SET_FEATURES.
Stefan's proposed wording which I incorporated in my patch made it clear that VHOST_USER_F_PROTOCOL_FEATURES is never exposed to the guest by the VMM due to it's UNUSED status. I would just like it explicit if it needs to be preserved between the two sides of the VHOST_USER_*_FEATURES for the negotiated protocol features to remain valid.
Perhaps you could incorporate some wording for that?
Quoted 3 lines
docs/interop/vhost-user.rst +0
-0``VHOST_USER_SET_OWNER`` :id: 3
Signature · 1 line
Alex Bennée
Quoted 71 lines · Alex Bennée
Quoted 6 lines · Alyssa Ross
The previous wording was (at least to me) ambiguous about whether a backend should enable features immediately after they were set using
VHOST_USER_SET_PROTOCOL_FEATURES, or wait for support for protocol features to be acknowledged if it hasn't been yet before enabling those features.Quoted 8 lines
This patch attempts to make it clearer that
VHOST_USER_SET_PROTOCOL_FEATURESshould immediately enable features, even if support for protocol features has not yet been acknowledged, while still also making clear that the frontend SHOULD acknowledge support for protocol features.Previous discussion begins here:
<https://lore.kernel.org/qemu-devel/[email protected]/>I totally missed this when I posted a similar attempt at clarification:
Subject: [PATCH v2]
vhost-user.rst: add clarifying language about protocol negotiation
Date: Wed, 3 Mar 2021 14:50:11 +0000
Message-Id: <[email protected]>Quoted 26 lines
Cc Michael S. Tsirkin <[email protected]>Signed-off-by Alyssa Ross <[email protected]>--- docs/interop/vhost-user.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)docs/interop/vhost-user.rst +3
-3@@ -871,9 +871,9 @@ Master message types ``VHOST_USER_GET_FEATURES``. .. Note:: - Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must - support this message even before ``VHOST_USER_SET_FEATURES`` was - called. + While QEMU should acknowledge ``VHOST_USER_F_PROTOCOL_FEATURES``, a + backend must allow ``VHOST_USER_GET_PROTOCOL_FEATURES`` even if + ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been acknowledged yet. ``VHOST_USER_SET_PROTOCOL_FEATURES`` :id: 16@@ -886,8 +886,12 @@ Master message types ``VHOST_USER_GET_FEATURES``.docs/interop/vhost-user.rst Master message types · line 894
Quoted 10 lines
docs/interop/vhost-user.rst +6
-2.. Note:: - Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must support - this message even before ``VHOST_USER_SET_FEATURES`` was called. + While QEMU should acknowledge ``VHOST_USER_F_PROTOCOL_FEATURES``, a + backend must allow ``VHOST_USER_SET_PROTOCOL_FEATURES`` even if + ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been acknowledged yet. + The backend must not wait for ``VHOST_USER_SET_FEATURES`` before + enabling protocol features requested with + ``VHOST_USER_SET_PROTOCOL_FEATURES``.I think this is perfectly fine clarification although I think there might be a patch in flight which changes some of the master slave terminology so with that resolved:
Reviewed-by Alex Bennée <[email protected]>However there is still the edge case of what happens after the vhost pair have negotiated protocol features like
REPLY_ACKshouldVHOST_USER_F_PROTOCOL_FEATURESstill be acknowledged byVHOST_USER_SET_FEATURES.
Quoted 11 lines
Stefan's proposed wording which I incorporated in my patch made it clear that
VHOST_USER_F_PROTOCOL_FEATURESis never exposed to the guest by the VMM due to it's UNUSED status. I would just like it explicit if it needs to be preserved between the two sides of the VHOST_USER_*_FEATURES for the negotiated protocol features to remain valid.Perhaps you could incorporate some wording for that?
Quoted 3 lines
docs/interop/vhost-user.rst +0
-0``VHOST_USER_SET_OWNER`` :id: 3
General ping to the vhost-user spec maintainers. This was also mentioned while merging:
https://github.com/rust-vmm/vhost/pull/24
Signature · 1 line
Alex Bennée
Quoted 83 lines · Alex Bennée
Quoted 80 lines · Alex Bennée
Quoted 6 lines · Alyssa Ross
The previous wording was (at least to me) ambiguous about whether a backend should enable features immediately after they were set using
VHOST_USER_SET_PROTOCOL_FEATURES, or wait for support for protocol features to be acknowledged if it hasn't been yet before enabling those features.Quoted 8 lines
This patch attempts to make it clearer that
VHOST_USER_SET_PROTOCOL_FEATURESshould immediately enable features, even if support for protocol features has not yet been acknowledged, while still also making clear that the frontend SHOULD acknowledge support for protocol features.Previous discussion begins here:
<https://lore.kernel.org/qemu-devel/[email protected]/>I totally missed this when I posted a similar attempt at clarification:
Subject: [PATCH v2]
vhost-user.rst: add clarifying language about protocol negotiation
Date: Wed, 3 Mar 2021 14:50:11 +0000
Message-Id: <[email protected]>Quoted 26 lines
Cc Michael S. Tsirkin <[email protected]>Signed-off-by Alyssa Ross <[email protected]>--- docs/interop/vhost-user.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)docs/interop/vhost-user.rst +3
-3@@ -871,9 +871,9 @@ Master message types ``VHOST_USER_GET_FEATURES``. .. Note:: - Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must - support this message even before ``VHOST_USER_SET_FEATURES`` was - called. + While QEMU should acknowledge ``VHOST_USER_F_PROTOCOL_FEATURES``, a + backend must allow ``VHOST_USER_GET_PROTOCOL_FEATURES`` even if + ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been acknowledged yet. ``VHOST_USER_SET_PROTOCOL_FEATURES`` :id: 16@@ -886,8 +886,12 @@ Master message types ``VHOST_USER_GET_FEATURES``.docs/interop/vhost-user.rst Master message types · line 894
Quoted 10 lines
docs/interop/vhost-user.rst +6
-2.. Note:: - Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must support - this message even before ``VHOST_USER_SET_FEATURES`` was called. + While QEMU should acknowledge ``VHOST_USER_F_PROTOCOL_FEATURES``, a + backend must allow ``VHOST_USER_SET_PROTOCOL_FEATURES`` even if + ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been acknowledged yet. + The backend must not wait for ``VHOST_USER_SET_FEATURES`` before + enabling protocol features requested with + ``VHOST_USER_SET_PROTOCOL_FEATURES``.I think this is perfectly fine clarification although I think there might be a patch in flight which changes some of the master slave terminology so with that resolved:
Reviewed-by Alex Bennée <[email protected]>However there is still the edge case of what happens after the vhost pair have negotiated protocol features like
REPLY_ACKshouldVHOST_USER_F_PROTOCOL_FEATURESstill be acknowledged byVHOST_USER_SET_FEATURES.Stefan's proposed wording which I incorporated in my patch made it clear that
VHOST_USER_F_PROTOCOL_FEATURESis never exposed to the guest by the VMM due to it's UNUSED status. I would just like it explicit if it needs to be preserved between the two sides of the VHOST_USER_*_FEATURES for the negotiated protocol features to remain valid.Perhaps you could incorporate some wording for that?
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
``VHOST_USER_SET_OWNER``
:id: 3General ping to the vhost-user spec maintainers. This was also mentioned while merging:
Alyssa or Alex: Please send another revision rebased on qemu.git/master. Michael Tsirkin is the vhost-user.rst maintainer but I can help with reviewing an updated patch.
Stefan