examples/vdpa: use new wrappers instead of ops
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 26 Jun 2020 14:04:38 +0000 (16:04 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 12:52:30 +0000 (14:52 +0200)
Now that wrappers to query number of queues, Virtio
features and Vhost-user protocol features are available,
let's make the vDPA example to use them.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
examples/vdpa/main.c

index 54f4940..d59c7fa 100644 (file)
@@ -301,13 +301,13 @@ static void cmd_list_vdpa_devices_parsed(
                vdev = rte_vdpa_find_device_by_name(dev->name);
                if (!vdev)
                        continue;
-               if (vdev->ops->get_queue_num(vdev, &queue_num) < 0) {
+               if (rte_vdpa_get_queue_num(vdev, &queue_num) < 0) {
                        RTE_LOG(ERR, VDPA,
                                "failed to get vdpa queue number "
                                "for device %s.\n", dev->name);
                        continue;
                }
-               if (vdev->ops->get_features(vdev, &features) < 0) {
+               if (rte_vdpa_get_features(vdev, &features) < 0) {
                        RTE_LOG(ERR, VDPA,
                                "failed to get vdpa features "
                                "for device %s.\n", dev->name);