qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v1 08/24] vfio-user: define socket receive functions


From: John Levon
Subject: Re: [PATCH v1 08/24] vfio-user: define socket receive functions
Date: Fri, 9 Dec 2022 15:34:51 +0000

On Tue, Nov 08, 2022 at 03:13:30PM -0800, John Johnson wrote:

> Add infrastructure needed to receive incoming messages
> 
> +static void vfio_user_process(VFIOProxy *proxy, VFIOUserMsg *msg, bool 
> isreply)
> +{
> +
> +    /*
> +     * Replies signal a waiter, if none just check for errors
> +     * and free the message buffer.
> +     *
> +     * Requests get queued for the BH.
> +     */
> +    if (isreply) {
> +        msg->complete = true;
> +        if (msg->type == VFIO_MSG_WAIT) {
> +            qemu_cond_signal(&msg->cv);
> +        } else {
> +            if (msg->hdr->flags & VFIO_USER_ERROR) {
> +                error_printf("vfio_user_rcv:  error reply on async request 
> ");

nit, s/vfio_user_rcv/vfio_user_process/ , or even __func__ ?

> +    error_prepend(&local_err, "vfio_user_recv: ");

nit, same here

regards
john



reply via email to

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