All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>, mst@redhat.com
Cc: Markus Armbruster <armbru@redhat.com>,
	Changchun Ouyang <changchun.ouyang@intel.com>,
	qemu-devel@nongnu.org, Changchun.ouyang@hotmail.com
Subject: Re: [Qemu-devel] [PATCH v11 6/7] vhost-user: add multiple queue support
Date: Thu, 24 Sep 2015 14:15:50 +0800	[thread overview]
Message-ID: <56039516.3070904@redhat.com> (raw)
In-Reply-To: <20150924055700.GA2326@yliu-dev.sh.intel.com>



On 09/24/2015 01:57 PM, Yuanhan Liu wrote:
> On Thu, Sep 24, 2015 at 01:34:31PM +0800, Jason Wang wrote:
>>
>> Some nitpicks and comments. If you plan to send another version, please
>> consider to fix them.
> I will, but I'd like to hold a while before getting more comments from
> Michael; I don't want to repost a whole new version too often for minor
> changes.
>
> BTW, Michael, is this patchset being ready for merge? If not, please
> kindly tell me what is wrong so that I can fix them. TBH, I'd really
> like to see it be merged soon, as I'm gonna have holidays soon for
> two weeks start from this Saturday. I could still reply emails, even
> make patches during that, but I guess I only have limited time for that.
>
>> Reviewed-by: Jason Wang <jasowang@redhat.com>
> Thank you!
>
>> Btw, it's better to extend current vhost-user unit test to support
>> multiqueue. Please consider this on top this series.
> Yeah, I will. But, may I do that later? (And if possible, after the
> merge?)
>

Yes, of course :)

>>> diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt
>>> index 43db9b4..cfc9d41 100644
>>> --- a/docs/specs/vhost-user.txt
>>> +++ b/docs/specs/vhost-user.txt
>>> @@ -135,6 +135,21 @@ As older slaves don't support negotiating protocol features,
>>>  a feature bit was dedicated for this purpose:
>>>  #define VHOST_USER_F_PROTOCOL_FEATURES 30
>>>  

[...]

>>>  
>>>  static void vhost_user_cleanup(NetClientState *nc)
>>>  {
>>>      VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
>>>  
>>> -    vhost_user_stop(s);
>>> +    if (s->vhost_net) {
>>> +        vhost_net_cleanup(s->vhost_net);
>>> +        s->vhost_net = NULL;
>>> +    }
>>> +
>>>      qemu_purge_queued_packets(nc);
>>>  }
>>>  
>>> @@ -95,59 +136,61 @@ static NetClientInfo net_vhost_user_info = {
>>>          .has_ufo = vhost_user_has_ufo,
>>>  };
>>>  
>>> -static void net_vhost_link_down(VhostUserState *s, bool link_down)
>>> -{
>>> -    s->nc.link_down = link_down;
>>> -
>>> -    if (s->nc.peer) {
>>> -        s->nc.peer->link_down = link_down;
>>> -    }
>>> -
>>> -    if (s->nc.info->link_status_changed) {
>>> -        s->nc.info->link_status_changed(&s->nc);
>>> -    }
>>> -
>>> -    if (s->nc.peer && s->nc.peer->info->link_status_changed) {
>>> -        s->nc.peer->info->link_status_changed(s->nc.peer);
>>> -    }
>>> -}
>>> -
>>>  static void net_vhost_user_event(void *opaque, int event)
>>>  {
>>> -    VhostUserState *s = opaque;
>>> +    const char *name = opaque;
>>> +    NetClientState *ncs[MAX_QUEUE_NUM];
>>> +    VhostUserState *s;
>>> +    Error *err = NULL;
>>> +    int queues;
>>>  
>>> +    queues = qemu_find_net_clients_except(name, ncs,
>>> +                                          NET_CLIENT_OPTIONS_KIND_NIC,
>>> +                                          MAX_QUEUE_NUM);
>>> +    s = DO_UPCAST(VhostUserState, nc, ncs[0]);
>>>      switch (event) {
>>>      case CHR_EVENT_OPENED:
>>> -        vhost_user_start(s);
>>> -        net_vhost_link_down(s, false);
>>> +        if (vhost_user_start(queues, ncs) < 0) {
>>> +            exit(1);
>> How about report a specific error instead of just abort here?
> There is an error report at vhost_user_start():
>
>                 error_report("you are asking more queues than "
>                              "supported: %d\n", max_queues);
>
> Or, do you mean something else?
>
>
> 	--yliu

Not sure, but we have error_abort and error_fatal. Markus may know more
about this.


[...]

  reply	other threads:[~2015-09-24  6:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23  4:19 [Qemu-devel] [PATCH v11 0/7] vhost-user multiple queue support Yuanhan Liu
2015-09-23  4:19 ` [Qemu-devel] [PATCH v11 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement Yuanhan Liu
2015-09-24 10:05   ` Marcel Apfelbaum
2015-09-24 10:18     ` Michael S. Tsirkin
2015-09-24 10:27       ` Marcel Apfelbaum
2015-09-23  4:19 ` [Qemu-devel] [PATCH v11 2/7] vhost-user: add protocol feature negotiation Yuanhan Liu
2015-09-24 10:13   ` Marcel Apfelbaum
2015-09-24 11:25     ` Yuanhan Liu
2015-09-24 11:29     ` Yuanhan Liu
2015-09-23  4:19 ` [Qemu-devel] [PATCH v11 3/7] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE Yuanhan Liu
2015-09-24 10:18   ` Marcel Apfelbaum
2015-09-23  4:19 ` [Qemu-devel] [PATCH v11 4/7] vhost-user: add VHOST_USER_GET_QUEUE_NUM message Yuanhan Liu
2015-09-24 10:25   ` Marcel Apfelbaum
2015-09-23  4:19 ` [Qemu-devel] [PATCH v11 5/7] vhost: introduce vhost_backend_get_vq_index method Yuanhan Liu
2015-09-23  4:20 ` [Qemu-devel] [PATCH v11 6/7] vhost-user: add multiple queue support Yuanhan Liu
2015-09-23  6:56   ` Yuanhan Liu
2015-09-24  5:34     ` Jason Wang
2015-09-24  5:57       ` Yuanhan Liu
2015-09-24  6:15         ` Jason Wang [this message]
2015-09-23  4:20 ` [Qemu-devel] [PATCH v11 7/7] vhost-user: add a new message to disable/enable a specific virt queue Yuanhan Liu
2015-09-24  5:43   ` Jason Wang
2015-09-24 10:03 ` [Qemu-devel] [PATCH v11 0/7] vhost-user multiple queue support Marcel Apfelbaum

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=56039516.3070904@redhat.com \
    --to=jasowang@redhat.com \
    --cc=Changchun.ouyang@hotmail.com \
    --cc=armbru@redhat.com \
    --cc=changchun.ouyang@intel.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yuanhan.liu@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.