vhost: remove deprecated helpers

Those helpers have been marked as deprecated for a long time and have
documented equivalent helpers.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
This commit is contained in:
David Marchand 2022-09-27 13:36:08 +02:00 committed by Chenbo Xia
parent f7c8c36fde
commit 5b546fa718
4 changed files with 3 additions and 68 deletions

View File

@ -121,6 +121,9 @@ Removed Items
* ethdev: removed ``RTE_FLOW_ACTION_TYPE_PHY_PORT``;
use ``RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT``.
* vhost: Removed deprecated ``rte_vhost_gpa_to_vva`` and
``rte_vhost_get_queue_num`` helpers.
API Changes
-----------

View File

@ -354,44 +354,6 @@ struct rte_vhost_stat_name {
/**
* Convert guest physical address to host virtual address
*
* This function is deprecated because unsafe.
* New rte_vhost_va_from_guest_pa() should be used instead to ensure
* guest physical ranges are fully and contiguously mapped into
* process virtual address space.
*
* @param mem
* the guest memory regions
* @param gpa
* the guest physical address for querying
* @return
* the host virtual address on success, 0 on failure
*/
__rte_deprecated
static __rte_always_inline uint64_t
rte_vhost_gpa_to_vva(struct rte_vhost_memory *mem, uint64_t gpa)
{
struct rte_vhost_mem_region *reg;
uint32_t i;
for (i = 0; i < mem->nregions; i++) {
reg = &mem->regions[i];
if (gpa >= reg->guest_phys_addr &&
gpa < reg->guest_phys_addr + reg->size) {
return gpa - reg->guest_phys_addr +
reg->host_user_addr;
}
}
return 0;
}
/**
* Convert guest physical address to host virtual address safely
*
* This variant of rte_vhost_gpa_to_vva() takes care all the
* requested length is mapped and contiguous in process address
* space.
*
* @param mem
* the guest memory regions
* @param gpa
@ -696,23 +658,6 @@ int rte_vhost_get_mtu(int vid, uint16_t *mtu);
*/
int rte_vhost_get_numa_node(int vid);
/**
* @deprecated
* Get the number of queues the device supports.
*
* Note this function is deprecated, as it returns a queue pair number,
* which is vhost specific. Instead, rte_vhost_get_vring_num should
* be used.
*
* @param vid
* vhost device ID
*
* @return
* The number of queues, 0 on failure
*/
__rte_deprecated
uint32_t rte_vhost_get_queue_num(int vid);
/**
* Get the number of vrings the device supports.
*

View File

@ -41,14 +41,12 @@ DPDK_23 {
rte_vhost_get_mtu;
rte_vhost_get_negotiated_features;
rte_vhost_get_numa_node;
rte_vhost_get_queue_num;
rte_vhost_get_vdpa_device;
rte_vhost_get_vhost_ring_inflight;
rte_vhost_get_vhost_vring;
rte_vhost_get_vring_base;
rte_vhost_get_vring_base_from_inflight;
rte_vhost_get_vring_num;
rte_vhost_gpa_to_vva;
rte_vhost_log_used_vring;
rte_vhost_log_write;
rte_vhost_rx_queue_count;

View File

@ -859,17 +859,6 @@ rte_vhost_get_numa_node(int vid)
#endif
}
uint32_t
rte_vhost_get_queue_num(int vid)
{
struct virtio_net *dev = get_device(vid);
if (dev == NULL)
return 0;
return dev->nr_vring / 2;
}
uint16_t
rte_vhost_get_vring_num(int vid)
{