[dpdk-dev] vhost: add virtio configuration space access socket messages

Liu, Changpeng changpeng.liu at intel.com
Tue Feb 26 08:02:58 CET 2019



> -----Original Message-----
> From: Ilya Maximets [mailto:i.maximets at samsung.com]
> Sent: Monday, February 25, 2019 9:53 PM
> To: Liu, Changpeng <changpeng.liu at intel.com>; dev at dpdk.org
> Cc: Stojaczyk, Dariusz <dariusz.stojaczyk at intel.com>;
> maxime.coquelin at redhat.com; Bie, Tiwei <tiwei.bie at intel.com>; Wang,
> Zhihong <zhihong.wang at intel.com>; Jason Wang <jasowang at redhat.com>
> Subject: Re: vhost: add virtio configuration space access socket messages
> 
> 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.liu at intel.com>
> > Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk at 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.
Sounds good.
> 
> Best regards, Ilya Maximets.


More information about the dev mailing list