qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vhost-user: pass message as a pointer to proces


From: Maxime Coquelin
Subject: Re: [Qemu-devel] [PATCH] vhost-user: pass message as a pointer to process_message_reply()
Date: Wed, 24 May 2017 10:42:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0



On 05/24/2017 10:40 AM, Marc-André Lureau wrote:


On Wed, May 24, 2017 at 11:35 AM Maxime Coquelin <address@hidden <mailto:address@hidden>> wrote:

    process_message_reply() was recently updated to get full message
    content instead of only its request field.

    There is no need to copy all the struct content into the stack,
    so just pass its pointer.

    Cc: Zhiyong Yang <address@hidden
    <mailto:address@hidden>>
    Fixes: 60cd11024f41 ("hw/virtio: fix vhost user fails to startup
    when MQ")
    Signed-off-by: Maxime Coquelin <address@hidden
    <mailto:address@hidden>>
    ---
      hw/virtio/vhost-user.c | 12 ++++++------
      1 file changed, 6 insertions(+), 6 deletions(-)

    diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
    index b87a176..baf2487 100644
    --- a/hw/virtio/vhost-user.c
    +++ b/hw/virtio/vhost-user.c
    @@ -162,11 +162,11 @@ fail:
      }

      static int process_message_reply(struct vhost_dev *dev,
    -                                 VhostUserMsg msg)
    +                                 VhostUserMsg *msg)


Can you make it const?
Sure!

Thanks,
Maxime



reply via email to

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