diff mbox series

[v2,10/12] examples/vdpa: use new wrappers instead of ops

Message ID 20200624122701.1369327-11-maxime.coquelin@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: Maxime Coquelin
Headers show
Series vDPA API and framework rework | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Maxime Coquelin June 24, 2020, 12:26 p.m. UTC
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>
---
 examples/vdpa/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Maxime Coquelin June 24, 2020, 1:42 p.m. UTC | #1
Sorry, this patch has been sent by mistake,
just discard it.

On 6/24/20 2:26 PM, Maxime Coquelin wrote:
> 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>
> ---
>  examples/vdpa/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c
> index 54f4940b31..d59c7fa9b4 100644
> --- a/examples/vdpa/main.c
> +++ b/examples/vdpa/main.c
> @@ -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);
>
diff mbox series

Patch

diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c
index 54f4940b31..d59c7fa9b4 100644
--- a/examples/vdpa/main.c
+++ b/examples/vdpa/main.c
@@ -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);