Skip to contentSkip to conversation

vhost: make experimental API's stable

PATCH In review Stephen Hemminger 2 participants 2 messages Oct 24, 2023 – Nov 10, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost: make experimental API's stable

Transistion API's added from 2008 to 2022 to stable; except for async API's that are planned to be deprecated.

---
 lib/vhost/rte_vhost.h        |  5 -----
 lib/vhost/rte_vhost_async.h  |  4 ----
 lib/vhost/rte_vhost_crypto.h |  1 -
 lib/vhost/version.map        | 25 +++++++++++--------------
 4 files changed, 11 insertions(+), 24 deletions(-)
lib/vhost/rte_vhost.h +0 -5
index fec650b1dbba..db92f0534431 100644
@@ -509,7 +509,6 @@ rte_vhost_driver_get_vdpa_device(const char *path);
  * @return
  *  0 on success, -1 on failure
  */
-__rte_experimental
 int
 rte_vhost_driver_get_vdpa_dev_type(const char *path, uint32_t *type);
 
@@ -648,7 +647,6 @@ int rte_vhost_get_negotiated_features(int vid, uint64_t *features);
  * @return
  *  0 on success, -1 on failure
  */
-__rte_experimental
 int
 rte_vhost_get_negotiated_protocol_features(int vid,
 					   uint64_t *protocol_features);
@@ -960,7 +958,6 @@ int rte_vhost_vring_call(int vid, uint16_t vring_idx);
  * @return
  *  0 on success, -1 on failure, -EAGAIN for another retry
  */
-__rte_experimental
 int rte_vhost_vring_call_nonblock(int vid, uint16_t vring_idx);
 
 /**
@@ -987,7 +984,6 @@ uint32_t rte_vhost_rx_queue_count(int vid, uint16_t qid);
  * @return
  *  0 on success, -1 on failure
  */
-__rte_experimental
 int
 rte_vhost_get_monitor_addr(int vid, uint16_t queue_id,
 		struct rte_vhost_power_monitor_cond *pmc);
@@ -1102,7 +1098,6 @@ rte_vhost_get_vdpa_device(int vid);
  * @return
  *  0 on success, < 0 on failure
  */
-__rte_experimental
 int
 rte_vhost_backend_config_change(int vid, bool need_reply);
 
lib/vhost/rte_vhost_async.h +0 -4
index 8f190dd44b1b..d9395c8fea69 100644
@@ -95,7 +95,6 @@ int rte_vhost_async_channel_unregister_thread_unsafe(int vid,
  * @return
  *  num of packets enqueued
  */
-__rte_experimental
 uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
 		struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
 		uint16_t vchan_id);
@@ -120,7 +119,6 @@ uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
  * @return
  *  num of packets returned
  */
-__rte_experimental
 uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
 		struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
 		uint16_t vchan_id);
@@ -178,7 +176,6 @@ int rte_vhost_async_get_inflight_thread_unsafe(int vid, uint16_t queue_id);
  * @return
  *  Number of packets returned
  */
-__rte_experimental
 uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
 		struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
 		uint16_t vchan_id);
@@ -203,7 +200,6 @@ uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
  * @return
  *  Number of packets returned
  */
-__rte_experimental
 uint16_t rte_vhost_clear_queue(int vid, uint16_t queue_id,
 		struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
 		uint16_t vchan_id);
lib/vhost/rte_vhost_crypto.h +0 -1
index 2b01ecda0880..71a30ba202be 100644
@@ -40,7 +40,6 @@ enum rte_vhost_crypto_zero_copy {
  * @return
  *  0 on success, -1 on failure
  */
-__rte_experimental
 int
 rte_vhost_crypto_driver_start(const char *path);
 
lib/vhost/version.map +11 -14
index 5bc133dafda2..c3b677b9df05 100644
@@ -10,9 +10,13 @@ DPDK_24 {
 	rte_vdpa_get_stats_names;
 	rte_vdpa_reset_stats;
 	rte_vhost_avail_entries;
+	rte_vhost_backend_config_change;
+	rte_vhost_clear_queue;
+	rte_vhost_clear_queue_thread_unsafe;
 	rte_vhost_clr_inflight_desc_packed;
 	rte_vhost_clr_inflight_desc_split;
 	rte_vhost_crypto_create;
+	rte_vhost_crypto_driver_start;
 	rte_vhost_crypto_fetch_requests;
 	rte_vhost_crypto_finalize_requests;
 	rte_vhost_crypto_free;
@@ -26,6 +30,7 @@ DPDK_24 {
 	rte_vhost_driver_get_features;
 	rte_vhost_driver_get_protocol_features;
 	rte_vhost_driver_get_queue_num;
+	rte_vhost_driver_get_vdpa_dev_type;
 	rte_vhost_driver_get_vdpa_device;
 	rte_vhost_driver_register;
 	rte_vhost_driver_set_features;
@@ -38,8 +43,10 @@ DPDK_24 {
 	rte_vhost_get_ifname;
 	rte_vhost_get_log_base;
 	rte_vhost_get_mem_table;
+	rte_vhost_get_monitor_addr;
 	rte_vhost_get_mtu;
 	rte_vhost_get_negotiated_features;
+	rte_vhost_get_negotiated_protocol_features;
 	rte_vhost_get_numa_node;
 	rte_vhost_get_vdpa_device;
 	rte_vhost_get_vhost_ring_inflight;
@@ -49,14 +56,17 @@ DPDK_24 {
 	rte_vhost_get_vring_num;
 	rte_vhost_log_used_vring;
 	rte_vhost_log_write;
+	rte_vhost_poll_enqueue_completed;
 	rte_vhost_rx_queue_count;
 	rte_vhost_set_inflight_desc_packed;
 	rte_vhost_set_inflight_desc_split;
 	rte_vhost_set_last_inflight_io_packed;
 	rte_vhost_set_last_inflight_io_split;
 	rte_vhost_set_vring_base;
+	rte_vhost_submit_enqueue_burst;
 	rte_vhost_va_from_guest_pa;
 	rte_vhost_vring_call;
+	rte_vhost_vring_call_nonblock;
 	rte_vhost_vring_stats_get;
 	rte_vhost_vring_stats_get_names;
 	rte_vhost_vring_stats_reset;
@@ -67,24 +77,14 @@ DPDK_24 {
 EXPERIMENTAL {
 	global:
 
-	rte_vhost_crypto_driver_start;
-	rte_vhost_backend_config_change;
+	# added in 20.08
 	rte_vhost_async_channel_register;
 	rte_vhost_async_channel_unregister;
-	rte_vhost_submit_enqueue_burst;
-	rte_vhost_poll_enqueue_completed;
-
-	# added in 21.05
-	rte_vhost_get_negotiated_protocol_features;
 
 	# added in 21.08
 	rte_vhost_async_get_inflight;
 	rte_vhost_async_channel_register_thread_unsafe;
 	rte_vhost_async_channel_unregister_thread_unsafe;
-	rte_vhost_clear_queue_thread_unsafe;
-
-	# added in 21.11
-	rte_vhost_get_monitor_addr;
 
 	# added in 22.03
 	rte_vhost_async_dma_configure;
@@ -92,12 +92,9 @@ EXPERIMENTAL {
 	# added in 22.07
 	rte_vhost_async_get_inflight_thread_unsafe;
 	rte_vhost_async_try_dequeue_burst;
-	rte_vhost_driver_get_vdpa_dev_type;
-	rte_vhost_clear_queue;
 
 	# added in 22.11
 	rte_vhost_async_dma_unconfigure;
-	rte_vhost_vring_call_nonblock;
 
 	# added in 23.07
 	rte_vhost_driver_set_max_queue_num;
Signature · 1 line
2.39.2
#1 lore raw

Hi Stephen,

Quoted 2 lines · Stephen Hemminger

Transistion API's added from 2008 to 2022 to stable; except for async API's that are planned to be deprecated.

We don't know yet whether Vhost-async API will be deprecated, otherwise we would just drop it. But it may require some adaptations to be adopted, that's why we keep them experimental for now.

Quoted 4 lines
---
  lib/vhost/rte_vhost.h        |  5 -----
  lib/vhost/rte_vhost_async.h  |  4 ----

You still mark some of the async APIs to stable.

I posted a new version of your patch.

Maxime

Quoted 190 lines
  lib/vhost/rte_vhost_crypto.h |  1 -
  lib/vhost/version.map        | 25 +++++++++++--------------
  4 files changed, 11 insertions(+), 24 deletions(-)
lib/vhost/rte_vhost.h +0 -5
index fec650b1dbba..db92f0534431 100644
@@ -509,7 +509,6 @@ rte_vhost_driver_get_vdpa_device(const char *path);
   * @return
   *  0 on success, -1 on failure
   */
-__rte_experimental
  int
  rte_vhost_driver_get_vdpa_dev_type(const char *path, uint32_t *type);
 
@@ -648,7 +647,6 @@ int rte_vhost_get_negotiated_features(int vid, uint64_t *features);
   * @return
   *  0 on success, -1 on failure
   */
-__rte_experimental
  int
  rte_vhost_get_negotiated_protocol_features(int vid,
  					   uint64_t *protocol_features);
@@ -960,7 +958,6 @@ int rte_vhost_vring_call(int vid, uint16_t vring_idx);
   * @return
   *  0 on success, -1 on failure, -EAGAIN for another retry
   */
-__rte_experimental
  int rte_vhost_vring_call_nonblock(int vid, uint16_t vring_idx);
 
  /**
@@ -987,7 +984,6 @@ uint32_t rte_vhost_rx_queue_count(int vid, uint16_t qid);
   * @return
   *  0 on success, -1 on failure
   */
-__rte_experimental
  int
  rte_vhost_get_monitor_addr(int vid, uint16_t queue_id,
  		struct rte_vhost_power_monitor_cond *pmc);
@@ -1102,7 +1098,6 @@ rte_vhost_get_vdpa_device(int vid);
   * @return
   *  0 on success, < 0 on failure
   */
-__rte_experimental
  int
  rte_vhost_backend_config_change(int vid, bool need_reply);
 
lib/vhost/rte_vhost_async.h +0 -4
index 8f190dd44b1b..d9395c8fea69 100644
@@ -95,7 +95,6 @@ int rte_vhost_async_channel_unregister_thread_unsafe(int vid,
   * @return
   *  num of packets enqueued
   */
-__rte_experimental
  uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
  		struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
  		uint16_t vchan_id);
@@ -120,7 +119,6 @@ uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
   * @return
   *  num of packets returned
   */
-__rte_experimental
  uint16_t rte_vhost_poll_enqueue_completed(int vid, uint16_t queue_id,
  		struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
  		uint16_t vchan_id);
@@ -178,7 +176,6 @@ int rte_vhost_async_get_inflight_thread_unsafe(int vid, uint16_t queue_id);
   * @return
   *  Number of packets returned
   */
-__rte_experimental
  uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
  		struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
  		uint16_t vchan_id);
@@ -203,7 +200,6 @@ uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
   * @return
   *  Number of packets returned
   */
-__rte_experimental
  uint16_t rte_vhost_clear_queue(int vid, uint16_t queue_id,
  		struct rte_mbuf **pkts, uint16_t count, int16_t dma_id,
  		uint16_t vchan_id);
lib/vhost/rte_vhost_crypto.h +0 -1
index 2b01ecda0880..71a30ba202be 100644
@@ -40,7 +40,6 @@ enum rte_vhost_crypto_zero_copy {
   * @return
   *  0 on success, -1 on failure
   */
-__rte_experimental
  int
  rte_vhost_crypto_driver_start(const char *path);
 
lib/vhost/version.map +11 -14
index 5bc133dafda2..c3b677b9df05 100644
@@ -10,9 +10,13 @@ DPDK_24 {
  	rte_vdpa_get_stats_names;
  	rte_vdpa_reset_stats;
  	rte_vhost_avail_entries;
+	rte_vhost_backend_config_change;
+	rte_vhost_clear_queue;
+	rte_vhost_clear_queue_thread_unsafe;
  	rte_vhost_clr_inflight_desc_packed;
  	rte_vhost_clr_inflight_desc_split;
  	rte_vhost_crypto_create;
+	rte_vhost_crypto_driver_start;
  	rte_vhost_crypto_fetch_requests;
  	rte_vhost_crypto_finalize_requests;
  	rte_vhost_crypto_free;
@@ -26,6 +30,7 @@ DPDK_24 {
  	rte_vhost_driver_get_features;
  	rte_vhost_driver_get_protocol_features;
  	rte_vhost_driver_get_queue_num;
+	rte_vhost_driver_get_vdpa_dev_type;
  	rte_vhost_driver_get_vdpa_device;
  	rte_vhost_driver_register;
  	rte_vhost_driver_set_features;
@@ -38,8 +43,10 @@ DPDK_24 {
  	rte_vhost_get_ifname;
  	rte_vhost_get_log_base;
  	rte_vhost_get_mem_table;
+	rte_vhost_get_monitor_addr;
  	rte_vhost_get_mtu;
  	rte_vhost_get_negotiated_features;
+	rte_vhost_get_negotiated_protocol_features;
  	rte_vhost_get_numa_node;
  	rte_vhost_get_vdpa_device;
  	rte_vhost_get_vhost_ring_inflight;
@@ -49,14 +56,17 @@ DPDK_24 {
  	rte_vhost_get_vring_num;
  	rte_vhost_log_used_vring;
  	rte_vhost_log_write;
+	rte_vhost_poll_enqueue_completed;
  	rte_vhost_rx_queue_count;
  	rte_vhost_set_inflight_desc_packed;
  	rte_vhost_set_inflight_desc_split;
  	rte_vhost_set_last_inflight_io_packed;
  	rte_vhost_set_last_inflight_io_split;
  	rte_vhost_set_vring_base;
+	rte_vhost_submit_enqueue_burst;
  	rte_vhost_va_from_guest_pa;
  	rte_vhost_vring_call;
+	rte_vhost_vring_call_nonblock;
  	rte_vhost_vring_stats_get;
  	rte_vhost_vring_stats_get_names;
  	rte_vhost_vring_stats_reset;
@@ -67,24 +77,14 @@ DPDK_24 {
  EXPERIMENTAL {
  	global:
 
-	rte_vhost_crypto_driver_start;
-	rte_vhost_backend_config_change;
+	# added in 20.08
  	rte_vhost_async_channel_register;
  	rte_vhost_async_channel_unregister;
-	rte_vhost_submit_enqueue_burst;
-	rte_vhost_poll_enqueue_completed;
-
-	# added in 21.05
-	rte_vhost_get_negotiated_protocol_features;
 
  	# added in 21.08
  	rte_vhost_async_get_inflight;
  	rte_vhost_async_channel_register_thread_unsafe;
  	rte_vhost_async_channel_unregister_thread_unsafe;
-	rte_vhost_clear_queue_thread_unsafe;
-
-	# added in 21.11
-	rte_vhost_get_monitor_addr;
 
  	# added in 22.03
  	rte_vhost_async_dma_configure;
@@ -92,12 +92,9 @@ EXPERIMENTAL {
  	# added in 22.07
  	rte_vhost_async_get_inflight_thread_unsafe;
  	rte_vhost_async_try_dequeue_burst;
-	rte_vhost_driver_get_vdpa_dev_type;
-	rte_vhost_clear_queue;
 
  	# added in 22.11
  	rte_vhost_async_dma_unconfigure;
-	rte_vhost_vring_call_nonblock;
 
  	# added in 23.07
  	rte_vhost_driver_set_max_queue_num;