From: "Michael S. Tsirkin" <mst@redhat.com>
To: Thibaut Collet <thibaut.collet@6wind.com>
Cc: Linhaifeng <haifeng.lin@huawei.com>,
marcandre.lureau@redhat.com, Jason Wang <jasowang@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 09/22] vhost: use a function for each call
Date: Mon, 21 Sep 2015 11:56:33 +0300 [thread overview]
Message-ID: <20150921115543-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <CABUUfwNZ-=vazCOSRZ1622gKH5FHei_yRT32G+6SVPca=EkrGA@mail.gmail.com>
On Mon, Sep 21, 2015 at 09:33:04AM +0200, Thibaut Collet wrote:
> > +static int vhost_reset_owner(struct vhost_dev *dev)
> > +{
> > + VhostUserMsg msg = {
> > + .request = VHOST_USER_RESET_OWNER,
> > + .flags = VHOST_USER_VERSION,
> > + };
> > +
> > + vhost_user_write(dev, &msg, NULL, 0);
> > +
> > return 0;
> > }
> >
>
> If you define a specific function for each messages it can be
> interesting to add function for messages to get/set protocol features
> (VHOST_USER_GET_PROTOCOL_FEATURES and
> VHOST_USER_SET_PROTOCOL_FEATURES) and modify the vhost_user_init
> function to call these specific functions (this function can be
> already modified to use the specific function for
> VHOST_USER_GET_FEATURES message to avoid code duplication)
I'm not sure what this would buy us ... can be a patch on top.
--
MST
next prev parent reply other threads:[~2015-09-21 8:56 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-19 10:11 [Qemu-devel] [PATCH v4 00/22] vhost-user: add migration support marcandre.lureau
2015-09-19 10:11 ` [Qemu-devel] [PATCH v4 01/22] vhost-user: refactor ioctl translation marcandre.lureau
2015-09-19 10:11 ` [Qemu-devel] [PATCH v4 02/22] vhost-user: add protocol feature negotiation marcandre.lureau
2015-09-19 10:11 ` [Qemu-devel] [PATCH v4 03/22] vhost-user: unit test for new messages marcandre.lureau
2015-09-19 10:11 ` [Qemu-devel] [PATCH v4 04/22] configure: probe for memfd marcandre.lureau
2015-09-19 10:11 ` [Qemu-devel] [PATCH v4 05/22] util: add linux-only memfd fallback marcandre.lureau
2015-09-19 10:11 ` [Qemu-devel] [PATCH v4 06/22] util: add memfd helpers marcandre.lureau
2015-09-19 10:11 ` [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log marcandre.lureau
2015-09-21 8:44 ` Michael S. Tsirkin
2015-09-21 14:02 ` Marc-André Lureau
2015-09-21 19:29 ` Michael S. Tsirkin
2015-09-21 21:44 ` Marc-André Lureau
2015-09-22 10:12 ` Michael S. Tsirkin
2015-09-22 11:01 ` Marc-André Lureau
2015-09-22 11:41 ` Michael S. Tsirkin
2015-09-22 11:50 ` Marc-André Lureau
2015-09-22 11:54 ` Michael S. Tsirkin
2015-09-19 10:11 ` [Qemu-devel] [PATCH v4 08/22] vhost: document log resizing marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 09/22] vhost: use a function for each call marcandre.lureau
2015-09-21 7:33 ` Thibaut Collet
2015-09-21 8:56 ` Michael S. Tsirkin [this message]
2015-09-21 8:58 ` Michael S. Tsirkin
2015-09-21 14:05 ` Marc-André Lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 10/22] vhost-user: remove vhost_user_request_translate() marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 11/22] vhost-user: send log shm fd along with log_base marcandre.lureau
2015-09-21 8:49 ` Michael S. Tsirkin
2015-09-21 14:05 ` Marc-André Lureau
2015-09-21 19:30 ` Michael S. Tsirkin
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 12/22] vhost: only use shared log if in use by backend marcandre.lureau
2015-09-21 8:46 ` Michael S. Tsirkin
2015-09-21 14:03 ` Marc-André Lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 13/22] vhost-user: document migration log marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 14/22] net: add trace_vhost_user_event marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 15/22] vhost user: add support of live migration marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 16/22] vhost user: add rarp sending after live migration for legacy guest marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 17/22] vhost-user-test: move wait_for_fds() out marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 18/22] vhost-user-test: remove useless static check marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 19/22] vhost-user-test: wrap server in TestServer struct marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 20/22] vhost-user-test: learn to tweak various qemu arguments marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 21/22] vhost-user-test: add live-migration test marcandre.lureau
2015-09-19 10:12 ` [Qemu-devel] [PATCH v4 22/22] vhost-user-test: check ownership during migration marcandre.lureau
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=20150921115543-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=haifeng.lin@huawei.com \
--cc=jasowang@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thibaut.collet@6wind.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).