> -----Original Message----- > From: Pei, Andy <andy....@intel.com> > Sent: Wednesday, April 27, 2022 4:30 PM > To: dev@dpdk.org > Cc: Xia, Chenbo <chenbo....@intel.com>; maxime.coque...@redhat.com; Cao, > Gang <gang....@intel.com>; Liu, Changpeng <changpeng....@intel.com> > Subject: [PATCH v7 08/18] vdpa/ifc: add get device type ops to ifc driver > > Add get device type ops to ifc driver. > > Signed-off-by: Andy Pei <andy....@intel.com> > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c > index 8a260b7..99a6ab0 100644 > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > @@ -1300,6 +1300,15 @@ struct rte_vdpa_dev_info { > return 0; > } > > +static int > +ifcvf_blk_get_device_type(struct rte_vdpa_device *vdev, > + uint32_t *type) > +{ > + RTE_SET_USED(vdev); > + *type = VDPA_DEVICE_TYPE_BLK; > + return 0;
This is not right. Remember net and blk are both using the driver? This will lead to using net also returns BLK. And I suggest the patch-set validated with both blk and net... Besides, ifcvf_blk_get_device_type should be ifcvf_get_device_type Thanks, Chenbo > +} > + > static struct rte_vdpa_dev_ops ifcvf_blk_ops = { > .get_queue_num = ifcvf_get_queue_num, > .get_features = ifcvf_get_vdpa_features, > @@ -1313,6 +1322,7 @@ struct rte_vdpa_dev_info { > .get_vfio_device_fd = ifcvf_get_vfio_device_fd, > .get_notify_area = ifcvf_get_notify_area, > .get_config = ifcvf_blk_get_config, > + .get_dev_type = ifcvf_blk_get_device_type, > }; > > struct rte_vdpa_dev_info dev_info[] = { > -- > 1.8.3.1