diff mbox series

[2/2] vhost-user: Make RESET_DEVICE a per device message

Message ID 20230628163927.108171-3-tom.lonergan@nutanix.com
State New
Headers show
Series vhost user one time message fixes | expand

Commit Message

Tom Lonergan June 28, 2023, 4:39 p.m. UTC
A device reset is issued per device, not per VQ. The legacy device reset
message, VHOST_USER_RESET_OWNER, is already a per device message. Therefore,
this change adds the proper message, VHOST_USER_RESET_DEVICE, to per device
messages.

Signed-off-by: Tom Lonergan <tom.lonergan@nutanix.com>
---
 hw/virtio/vhost-user.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Raphael Norwitz June 30, 2023, 12:16 p.m. UTC | #1
> On Jun 28, 2023, at 5:39 PM, Tom Lonergan <tom.lonergan@nutanix.com> wrote:
> 
> A device reset is issued per device, not per VQ. The legacy device reset
> message, VHOST_USER_RESET_OWNER, is already a per device message. Therefore,
> this change adds the proper message, VHOST_USER_RESET_DEVICE, to per device
> messages.
> 

Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>

> Signed-off-by: Tom Lonergan <tom.lonergan@nutanix.com>
> ---
> hw/virtio/vhost-user.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index 65d6299343..8dcf049d42 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -375,6 +375,7 @@ static bool vhost_user_per_device_request(VhostUserRequest request)
>     case VHOST_USER_SET_MEM_TABLE:
>     case VHOST_USER_GET_QUEUE_NUM:
>     case VHOST_USER_NET_SET_MTU:
> +    case VHOST_USER_RESET_DEVICE:
>     case VHOST_USER_ADD_MEM_REG:
>     case VHOST_USER_REM_MEM_REG:
>         return true;
> -- 
> 2.22.3
>
diff mbox series

Patch

diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 65d6299343..8dcf049d42 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -375,6 +375,7 @@  static bool vhost_user_per_device_request(VhostUserRequest request)
     case VHOST_USER_SET_MEM_TABLE:
     case VHOST_USER_GET_QUEUE_NUM:
     case VHOST_USER_NET_SET_MTU:
+    case VHOST_USER_RESET_DEVICE:
     case VHOST_USER_ADD_MEM_REG:
     case VHOST_USER_REM_MEM_REG:
         return true;