vhost: introduce API to get vDPA device number
It's used to get number of available registered vDPA devices. Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com> Acked-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
65313f1a82
commit
0e0a7d3801
@ -84,4 +84,7 @@ rte_vdpa_find_device_id(struct rte_vdpa_dev_addr *addr);
|
||||
struct rte_vdpa_device * __rte_experimental
|
||||
rte_vdpa_get_device(int did);
|
||||
|
||||
/* Get current available vdpa device number */
|
||||
int __rte_experimental
|
||||
rte_vdpa_get_device_num(void);
|
||||
#endif /* _RTE_VDPA_H_ */
|
||||
|
@ -67,6 +67,7 @@ EXPERIMENTAL {
|
||||
rte_vdpa_unregister_device;
|
||||
rte_vdpa_find_device_id;
|
||||
rte_vdpa_get_device;
|
||||
rte_vdpa_get_device_num;
|
||||
rte_vhost_driver_attach_vdpa_device;
|
||||
rte_vhost_driver_detach_vdpa_device;
|
||||
rte_vhost_driver_get_vdpa_device_id;
|
||||
|
@ -113,3 +113,9 @@ rte_vdpa_get_device(int did)
|
||||
|
||||
return vdpa_devices[did];
|
||||
}
|
||||
|
||||
int
|
||||
rte_vdpa_get_device_num(void)
|
||||
{
|
||||
return vdpa_device_num;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user