From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 89D96A051C;
	Fri, 26 Jun 2020 16:08:01 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 0D90E1C01B;
	Fri, 26 Jun 2020 16:06:32 +0200 (CEST)
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id CC0111BFC3
 for <dev@dpdk.org>; Fri, 26 Jun 2020 16:06:30 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1593180390;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=aWIlol7MEDPlqSYPOShjpFbfzuF6vOwJdASgPivRwKw=;
 b=HJmAoEylNU5IStEmbpwOh/xpLkbNRAQqnY9FVi3fN/ho4dBN7A/2bvl940verjfzZHffwW
 bqKl35D92fbsrTeVrQ5wqgolJF0rvbOsStojoQLoJ9HPOjizJ6GtUN4bokag5rYGm0uXys
 SW3nsgCWJj0cWUZwrCXrRrV78aCX6+g=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-384-bF2f5fmRMTOPuDgdKpov2Q-1; Fri, 26 Jun 2020 10:06:23 -0400
X-MC-Unique: bF2f5fmRMTOPuDgdKpov2Q-1
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
 [10.5.11.15])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D9783107ACF7;
 Fri, 26 Jun 2020 14:06:21 +0000 (UTC)
Received: from localhost.localdomain (unknown [10.36.110.7])
 by smtp.corp.redhat.com (Postfix) with ESMTP id EE7F95BAE1;
 Fri, 26 Jun 2020 14:06:18 +0000 (UTC)
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: matan@mellanox.com, xiao.w.wang@intel.com, zhihong.wang@intel.com,
 chenbo.xia@intel.com, david.marchand@redhat.com, amorenoz@redhat.com,
 viacheslavo@mellanox.com, hemant.agrawal@nxp.com, sachin.saxena@nxp.com,
 grive@u256.net, dev@dpdk.org
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 26 Jun 2020 16:04:40 +0200
Message-Id: <20200626140441.1441763-14-maxime.coquelin@redhat.com>
In-Reply-To: <20200626140441.1441763-1-maxime.coquelin@redhat.com>
References: <20200626140441.1441763-1-maxime.coquelin@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH v3 13/14] vhost: remove vDPA device count API
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

This API is no more useful, this patch removes it.

Acked-by: Adrián Moreno <amorenoz@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@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 8810bf3b36..e41c73eb9a 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)
 {
-- 
2.26.2