[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-devel
Subject: Re: [PATCH v1 08/24] vfio-user: define socket receive functions
From: John Levon <levon () movementarian ! org>
Date: 2022-12-09 15:34:51
Message-ID: Y5NVm9JxpbVZEMKE () movementarian ! org
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic