qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jens Freimann <jfreimann@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: qemu-devel@nongnu.org, maxime.coquelin@redhat.com,
	victork@redhat.com, stefanha@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/4] libvhost-user: quit when no more data received
Date: Fri, 21 Jul 2017 13:39:08 +0200	[thread overview]
Message-ID: <20170721113908.qm3fqbwsm2zao3a4@dhcp-192-218.str.redhat.com> (raw)
In-Reply-To: <CAJ+F1CJsCQWVeaGNwVz5ZNjv0b=mGR=ttOJQn9w5K3mUu4VLeQ@mail.gmail.com>

On Fri, Jul 21, 2017 at 10:59:23AM +0000, Marc-André Lureau wrote:
>On Fri, Jul 21, 2017 at 11:58 AM Jens Freimann <jfreimann@redhat.com> wrote:
>
>> From: Jens Freimann <jfreiman@redhat.com>
>>
>> End processing of messages when VHOST_USER_NO_MESSAGE
>> is received.
>>
>>
>What is VHOST_USER_NO_MESSAGE?

I meant VHOST_USER_NONE. Will fix in next versionn. 
>
>> Without this we run into a vubr_panic() call and get
>> "PANIC: Unhandled request: 0"
>>
>> Signed-off-by: Jens Freimann <jfreiman@redhat.com>
>>
>
>---
>>  contrib/libvhost-user/libvhost-user.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/contrib/libvhost-user/libvhost-user.c
>> b/contrib/libvhost-user/libvhost-user.c
>> index 9efb9da..85523ca 100644
>> --- a/contrib/libvhost-user/libvhost-user.c
>> +++ b/contrib/libvhost-user/libvhost-user.c
>> @@ -161,7 +161,7 @@ vu_message_read(VuDev *dev, int conn_fd, VhostUserMsg
>> *vmsg)
>>          rc = recvmsg(conn_fd, &msg, 0);
>>      } while (rc < 0 && (errno == EINTR || errno == EAGAIN));
>>
>> -    if (rc <= 0) {
>> +    if (rc < 0) {
>>
>
>that's looks fine
>
>
>>          vu_panic(dev, "Error while recvmsg: %s", strerror(errno));
>>          return false;
>>      }
>> @@ -806,6 +806,8 @@ vu_process_message(VuDev *dev, VhostUserMsg *vmsg)
>>          return vu_get_queue_num_exec(dev, vmsg);
>>      case VHOST_USER_SET_VRING_ENABLE:
>>          return vu_set_vring_enable_exec(dev, vmsg);
>> +    case VHOST_USER_NONE:
>> +        return true;
>>
>
>return true means 'reply_requested', is that what you want so
>vu_message_write() is called? If so, please explain in commit message.

No reply needed. I'll change it to return false. 

Thanks for the review!

regards,
Jens

  reply	other threads:[~2017-07-21 11:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21  9:55 [Qemu-devel] [PATCH 0/4] tests/pxe-test: add testcase using vhost-user-bridge Jens Freimann
2017-07-21  9:55 ` [Qemu-devel] [PATCH 1/4] tests/vhost-user-bridge: disable debug output by default Jens Freimann
2017-07-21  9:55 ` [Qemu-devel] [PATCH 2/4] net: fix -netdev socket, fd= for UDP sockets Jens Freimann
2017-07-25 13:14   ` Michael S. Tsirkin
2017-07-25 13:15   ` Michael S. Tsirkin
2017-07-21  9:55 ` [Qemu-devel] [PATCH 3/4] libvhost-user: quit when no more data received Jens Freimann
2017-07-21 10:59   ` Marc-André Lureau
2017-07-21 11:39     ` Jens Freimann [this message]
2017-07-21  9:55 ` [Qemu-devel] [PATCH 4/4] tests/pxe-test: add testcase using vhost-user-bridge Jens Freimann
2017-07-24 13:42   ` Stefan Hajnoczi
2017-07-25 19:43     ` Jens Freimann
2017-07-24 22:06   ` Michael S. Tsirkin
2017-07-25  9:17     ` Jens Freimann
2017-07-27 12:57 ` [Qemu-devel] [PATCH 0/4] " no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170721113908.qm3fqbwsm2zao3a4@dhcp-192-218.str.redhat.com \
    --to=jfreimann@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=victork@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).