[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 09/22] vhost: use a function for each call
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v4 09/22] vhost: use a function for each call |
Date: |
Mon, 21 Sep 2015 11:56:33 +0300 |
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
[Qemu-devel] [PATCH v4 12/22] vhost: only use shared log if in use by backend, marcandre . lureau, 2015/09/19