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