> -----Original Message----- > From: Pei, Andy <andy....@intel.com> > Sent: Thursday, September 8, 2022 1:54 PM > To: dev@dpdk.org > Cc: Xia, Chenbo <chenbo....@intel.com>; Xu, Rosen <rosen...@intel.com>; > Huang, Wei <wei.hu...@intel.com>; Cao, Gang <gang....@intel.com>; > maxime.coque...@redhat.com; Huang Wei <wei_hu...@intel.com> > Subject: [PATCH v2 2/8] vdpa/ifc: add multi queue support
multi-queue > > Enable VHOST_USER_PROTOCOL_F_MQ feature. > ExposeIFCVF_MQ_OFFSET register to enable multi queue. Please rephase it in a better way, at least add a space before IFCVF_MP_OFFSET... > > Signed-off-by: Andy Pei <andy....@intel.com> > Signed-off-by: Huang Wei <wei_hu...@intel.com> > --- > drivers/vdpa/ifc/base/ifcvf.c | 5 +++++ > drivers/vdpa/ifc/base/ifcvf.h | 2 ++ > drivers/vdpa/ifc/ifcvf_vdpa.c | 1 + > 3 files changed, 8 insertions(+) > > diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c > index f1e1474..34c8226 100644 > --- a/drivers/vdpa/ifc/base/ifcvf.c > +++ b/drivers/vdpa/ifc/base/ifcvf.c > @@ -90,6 +90,11 @@ > if (!hw->lm_cfg) > WARNINGOUT("HW support live migration not support!\n"); > > + if (hw->mem_resource[4].addr) > + hw->mq_cfg = hw->mem_resource[4].addr + IFCVF_MQ_OFFSET; > + else > + hw->mq_cfg = NULL; Could you help me understand the logic here? There are two cases that BAR 4 mmap-able and not mmap-able? Thanks, Chenbo > + > if (hw->common_cfg == NULL || hw->notify_base == NULL || > hw->isr == NULL || hw->dev_cfg == NULL) { > DEBUGOUT("capability incomplete\n"); > diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h > index 7ede738..ad505f1 100644 > --- a/drivers/vdpa/ifc/base/ifcvf.h > +++ b/drivers/vdpa/ifc/base/ifcvf.h > @@ -50,6 +50,7 @@ > > #define IFCVF_LM_CFG_SIZE 0x40 > #define IFCVF_LM_RING_STATE_OFFSET 0x20 > +#define IFCVF_MQ_OFFSET 0x28 > > #define IFCVF_LM_LOGGING_CTRL 0x0 > > @@ -149,6 +150,7 @@ struct ifcvf_hw { > u16 *notify_base; > u16 *notify_addr[IFCVF_MAX_QUEUES * 2]; > u8 *lm_cfg; > + u8 *mq_cfg; > struct vring_info vring[IFCVF_MAX_QUEUES * 2]; > u8 nr_vring; > int device_type; > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c > index 61d0250..2d165c0 100644 > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > @@ -1248,6 +1248,7 @@ struct rte_vdpa_dev_info { > 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD | \ > 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | \ > 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD | \ > + 1ULL << VHOST_USER_PROTOCOL_F_MQ | \ > 1ULL << VHOST_USER_PROTOCOL_F_STATUS) > > #define VDPA_BLK_PROTOCOL_FEATURES \ > -- > 1.8.3.1