[v2,02/15] vhost: hide inflight async structure

Message ID 20211026162904.482987-3-maxime.coquelin@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series vhost: clean-up and simplify async implementation |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Maxime Coquelin Oct. 26, 2021, 4:28 p.m. UTC
  This patch moves async_inflight_info struct to internal
header since it should not be part of the API.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/rte_vhost_async.h | 9 ---------
 lib/vhost/vhost.h           | 9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)
  

Comments

Chenbo Xia Oct. 28, 2021, 12:07 p.m. UTC | #1
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Wednesday, October 27, 2021 12:29 AM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; Hu, Jiayu
> <jiayu.hu@intel.com>; Wang, YuanX <yuanx.wang@intel.com>; Ma, WenwuX
> <wenwux.ma@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>;
> Mcnamara, John <john.mcnamara@intel.com>
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [PATCH v2 02/15] vhost: hide inflight async structure
> 
> This patch moves async_inflight_info struct to internal
> header since it should not be part of the API.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  lib/vhost/rte_vhost_async.h | 9 ---------
>  lib/vhost/vhost.h           | 9 +++++++++
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/lib/vhost/rte_vhost_async.h b/lib/vhost/rte_vhost_async.h
> index ad71555a7f..789b80f5a0 100644
> --- a/lib/vhost/rte_vhost_async.h
> +++ b/lib/vhost/rte_vhost_async.h
> @@ -83,15 +83,6 @@ struct rte_vhost_async_channel_ops {
>  		uint16_t max_packets);
>  };
> 
> -/**
> - * inflight async packet information
> - */
> -struct async_inflight_info {
> -	struct rte_mbuf *mbuf;
> -	uint16_t descs; /* num of descs inflight */
> -	uint16_t nr_buffers; /* num of buffers inflight for packed ring */
> -};
> -
>  /**
>   *  async channel features
>   */
> diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
> index a556d61063..8c1c33c852 100644
> --- a/lib/vhost/vhost.h
> +++ b/lib/vhost/vhost.h
> @@ -119,6 +119,15 @@ struct vring_used_elem_packed {
>  	uint32_t count;
>  };
> 
> +/**
> + * inflight async packet information
> + */
> +struct async_inflight_info {
> +	struct rte_mbuf *mbuf;
> +	uint16_t descs; /* num of descs inflight */
> +	uint16_t nr_buffers; /* num of buffers inflight for packed ring */
> +};
> +
>  struct vhost_async {
>  	/* operation callbacks for DMA */
>  	struct rte_vhost_async_channel_ops ops;
> --
> 2.31.1

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
  

Patch

diff --git a/lib/vhost/rte_vhost_async.h b/lib/vhost/rte_vhost_async.h
index ad71555a7f..789b80f5a0 100644
--- a/lib/vhost/rte_vhost_async.h
+++ b/lib/vhost/rte_vhost_async.h
@@ -83,15 +83,6 @@  struct rte_vhost_async_channel_ops {
 		uint16_t max_packets);
 };
 
-/**
- * inflight async packet information
- */
-struct async_inflight_info {
-	struct rte_mbuf *mbuf;
-	uint16_t descs; /* num of descs inflight */
-	uint16_t nr_buffers; /* num of buffers inflight for packed ring */
-};
-
 /**
  *  async channel features
  */
diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
index a556d61063..8c1c33c852 100644
--- a/lib/vhost/vhost.h
+++ b/lib/vhost/vhost.h
@@ -119,6 +119,15 @@  struct vring_used_elem_packed {
 	uint32_t count;
 };
 
+/**
+ * inflight async packet information
+ */
+struct async_inflight_info {
+	struct rte_mbuf *mbuf;
+	uint16_t descs; /* num of descs inflight */
+	uint16_t nr_buffers; /* num of buffers inflight for packed ring */
+};
+
 struct vhost_async {
 	/* operation callbacks for DMA */
 	struct rte_vhost_async_channel_ops ops;