On 25.02.2019 10:51, Changpeng Liu wrote: > This patch adds new vhost user messages GET_CONFIG and SET_CONFIG > used to get/set virtio device's PCI configuration space. > > Signed-off-by: Changpeng Liu <changpeng....@intel.com> > Reviewed-by: Darek Stojaczyk <dariusz.stojac...@intel.com> > --- > lib/librte_vhost/rte_vhost.h | 8 ++++++++ > lib/librte_vhost/vhost_user.c | 44 > +++++++++++++++++++++++++++++++++++++++++++ > lib/librte_vhost/vhost_user.h | 16 ++++++++++++++++ > 3 files changed, 68 insertions(+) > > diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h > index 2753670..ab710ce 100644 > --- a/lib/librte_vhost/rte_vhost.h > +++ b/lib/librte_vhost/rte_vhost.h > @@ -63,6 +63,10 @@ > #define VHOST_USER_PROTOCOL_F_PAGEFAULT 8 > #endif > > +#ifndef VHOST_USER_PROTOCOL_F_CONFIG > +#define VHOST_USER_PROTOCOL_F_CONFIG 9 > +#endif > + > #ifndef VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD > #define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10 > #endif > @@ -173,6 +177,10 @@ struct vhost_device_ops { > > int (*vring_state_changed)(int vid, uint16_t queue_id, int enable); > /**< triggered when a vring is enabled or disabled */ > > + int (*get_config)(int vid, uint8_t *config, uint32_t config_len); > + int (*set_config)(int vid, uint8_t *config, uint32_t offset, > + uint32_t len, uint32_t flags);
'struct vhost_device_ops' is user visible. This changes API and ABI. You need to update docs/rel_notes and bump the library version accordingly. Best regards, Ilya Maximets.