From: Ilya Maximets Subject: Re: vhost: add virtio configuration space access socket messages Date: Mon, 25 Feb 2019 16:53:26 +0300 Message-ID: <06988862-778e-3ab4-880b-0dfb35fc4d4e@samsung.com> References: <1551081095-14286-1-git-send-email-changpeng.liu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: dariusz.stojaczyk@intel.com, maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com, Jason Wang To: Changpeng Liu , dev@dpdk.org Return-path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 9CDE02A6A for ; Mon, 25 Feb 2019 14:53:30 +0100 (CET) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190225135329euoutp02903f45b4f4d536b503943b535de301b8~Gn8mCLAUH0492404924euoutp02R for ; Mon, 25 Feb 2019 13:53:29 +0000 (GMT) In-Reply-To: <1551081095-14286-1-git-send-email-changpeng.liu@intel.com> Content-Language: en-GB List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > Reviewed-by: Darek Stojaczyk > --- > 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.