From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Changchun Ouyang <changchun.ouyang@intel.com>,
qemu-devel@nongnu.org, Changchun.ouyang@hotmail.com,
mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support
Date: Wed, 23 Sep 2015 10:16:48 +0800 [thread overview]
Message-ID: <20150923021648.GE2339@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <56020A7A.8030801@redhat.com>
On Wed, Sep 23, 2015 at 10:12:10AM +0800, Jason Wang wrote:
>
>
> On 09/23/2015 09:57 AM, Yuanhan Liu wrote:
> > On Tue, Sep 22, 2015 at 06:14:14PM +0800, Jason Wang wrote:
> >>
> > [...]
> >>> -static void net_vhost_link_down(VhostUserState *s, bool link_down)
> >>> +static void net_vhost_link_down(int queues, NetClientState *ncs[],
> >>> + bool link_down)
> >>> {
> >>> - s->nc.link_down = link_down;
> >>> + NetClientState *nc;
> >>> + int i;
> >>>
> >>> - if (s->nc.peer) {
> >>> - s->nc.peer->link_down = link_down;
> >>> - }
> >>> + for (i = 0; i < queues; i++) {
> >>> + nc = ncs[i];
> >>>
> >>> - if (s->nc.info->link_status_changed) {
> >>> - s->nc.info->link_status_changed(&s->nc);
> >>> - }
> >>> + nc->link_down = link_down;
> >>> +
> >>> + if (nc->peer) {
> >>> + nc->peer->link_down = link_down;
> >>> + }
> >>> +
> >>> + if (nc->info->link_status_changed) {
> >>> + nc->info->link_status_changed(nc);
> >>> + }
> >>>
> >>> - if (s->nc.peer && s->nc.peer->info->link_status_changed) {
> >>> - s->nc.peer->info->link_status_changed(s->nc.peer);
> >>> + if (nc->peer && nc->peer->info->link_status_changed) {
> >>> + nc->peer->info->link_status_changed(nc->peer);
> >>> + }
> >>> }
> >>> }
> >> The semantics is a little bit difference with qmp_set_link. What's the
> >> reason for this? If there's no specific reason, probably, we could just
> >> reuse qmp_set_link() (or part of) here?
> > I did this just because I refactored the vhost_user init code, making
> > the char dev handler to initiate all ncs. Hence I turned net_vhost_link_down()
> > to handle all ncs, just like what I did for vhost_user_start().
> >
> > And TBH, I'm not aware of qmp_set_link() before, and after reading the
> > code, I do think we can simply invoke it instead. And thanks for the
> > info.
> >
> >> Other looks good to me.
> > Thanks for the review. May I add your reviewed-by if I fix above issue?
> >
> > --yliu
>
> I prefer to add it myself :)
Fair enough; I meant to save your effort :-)
--yliu
next prev parent reply other threads:[~2015-09-23 2:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 14:58 [Qemu-devel] [PATCH v10 0/7] vhost-user multiple queue support Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 2/7] vhost-user: add protocol feature negotiation Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 3/7] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 4/7] vhost-user: add VHOST_USER_GET_QUEUE_NUM message Yuanhan Liu
2015-09-22 9:56 ` Jason Wang
2015-09-23 2:06 ` Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 5/7] vhost: introduce vhost_backend_get_vq_index method Yuanhan Liu
2015-09-22 10:01 ` Jason Wang
2015-09-23 12:26 ` Eric Blake
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support Yuanhan Liu
2015-09-22 10:14 ` Jason Wang
2015-09-23 1:57 ` Yuanhan Liu
2015-09-23 2:12 ` Jason Wang
2015-09-23 2:16 ` Yuanhan Liu [this message]
2015-09-22 11:53 ` Michael S. Tsirkin
2015-09-22 14:44 ` Eric Blake
2015-09-22 18:52 ` Eduardo Habkost
2015-09-23 1:48 ` Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 7/7] vhost-user: add a new message to disable/enable a specific virt queue Yuanhan Liu
2015-09-22 14:47 ` Eric Blake
2015-09-23 2:05 ` Yuanhan Liu
2015-09-23 2:06 ` Eric Blake
2015-09-23 2:12 ` Yuanhan Liu
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=20150923021648.GE2339@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=Changchun.ouyang@hotmail.com \
--cc=changchun.ouyang@intel.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.