[dpdk-dev] [PATCH v2 13/14] vhost: remove vDPA device count API

Adrian Moreno amorenoz at redhat.com
Fri Jun 26 13:16:15 CEST 2020



On 6/24/20 2:27 PM, Maxime Coquelin wrote:
> This API is no more useful, this patch removes it.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
>  lib/librte_vhost/rte_vdpa.h            | 13 -------------
>  lib/librte_vhost/rte_vhost_version.map |  1 -
>  lib/librte_vhost/vdpa.c                |  9 ---------
>  3 files changed, 23 deletions(-)
> 
> diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
> index eda56dd556..776ed67c16 100644
> --- a/lib/librte_vhost/rte_vdpa.h
> +++ b/lib/librte_vhost/rte_vdpa.h
> @@ -175,19 +175,6 @@ __rte_experimental
>  struct rte_device *
>  rte_vdpa_get_rte_device(struct rte_vdpa_device *vdpa_dev);
>  
> -/**
> - * @warning
> - * @b EXPERIMENTAL: this API may change without prior notice
> - *
> - * Get current available vdpa device number
> - *
> - * @return
> - *  available vdpa device number
> - */
> -__rte_experimental
> -int
> -rte_vdpa_get_device_num(void);
> -
>  /**
>   * @warning
>   * @b EXPERIMENTAL: this API may change without prior notice
> diff --git a/lib/librte_vhost/rte_vhost_version.map b/lib/librte_vhost/rte_vhost_version.map
> index 7a919102cf..299576a494 100644
> --- a/lib/librte_vhost/rte_vhost_version.map
> +++ b/lib/librte_vhost/rte_vhost_version.map
> @@ -36,7 +36,6 @@ EXPERIMENTAL {
>  	rte_vdpa_register_device;
>  	rte_vdpa_unregister_device;
>  	rte_vdpa_find_device_id;
> -	rte_vdpa_get_device_num;
>  	rte_vdpa_get_stats_names;
>  	rte_vdpa_get_stats;
>  	rte_vdpa_reset_stats;
> diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c
> index d7f9839eb2..864770d506 100644
> --- a/lib/librte_vhost/vdpa.c
> +++ b/lib/librte_vhost/vdpa.c
> @@ -25,7 +25,6 @@ TAILQ_HEAD(vdpa_device_list, rte_vdpa_device);
>  static struct vdpa_device_list vdpa_device_list =
>  		TAILQ_HEAD_INITIALIZER(vdpa_device_list);
>  static rte_spinlock_t vdpa_device_list_lock = RTE_SPINLOCK_INITIALIZER;
> -static uint32_t vdpa_device_num;
>  
>  
>  /* Unsafe, needs to be called with vdpa_device_list_lock held */
> @@ -92,7 +91,6 @@ rte_vdpa_register_device(struct rte_device *rte_dev,
>  	dev->device = rte_dev;
>  	dev->ops = ops;
>  	TAILQ_INSERT_TAIL(&vdpa_device_list, dev, next);
> -	vdpa_device_num++;
>  out_unlock:
>  	rte_spinlock_unlock(&vdpa_device_list_lock);
>  
> @@ -112,7 +110,6 @@ rte_vdpa_unregister_device(struct rte_vdpa_device *dev)
>  
>  		TAILQ_REMOVE(&vdpa_device_list, dev, next);
>  		rte_free(dev);
> -		vdpa_device_num--;
>  		ret = 0;
>  		break;
>  	}
> @@ -121,12 +118,6 @@ rte_vdpa_unregister_device(struct rte_vdpa_device *dev)
>  	return ret;
>  }
>  
> -int
> -rte_vdpa_get_device_num(void)
> -{
> -	return vdpa_device_num;
> -}
> -
>  int
>  rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
>  {
> 

Acked-by: Adrián Moreno <amorenoz at redhat.com>

-- 
Adrián Moreno



More information about the dev mailing list