- for (i = 0; i < MAX_VHOST_DEVICE; i++) {
- dev = &vdpa_devices[i];
- if (dev->ops == NULL)
- continue;
-
- if (dev->device == rte_dev)
- return NULL;
+ /* Check mandatory ops are implemented */
+ if (!ops->get_queue_num || !ops->get_features ||
+ !ops->get_protocol_features || !ops->dev_conf ||
+ !ops->dev_close || !ops->set_vring_state ||
+ !ops->set_features) {
+ VHOST_LOG_CONFIG(ERR,
+ "Some mandatory vDPA ops aren't implemented\n");
+ return NULL;