[v2,08/19] vhost: fix missing header includes

Message ID 20210115111052.16437-9-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series ensure headers have correct includes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Jan. 15, 2021, 11:10 a.m. UTC
  The vhost header files were missing definitions from headers to allow
them to be compiled up individually.

Fixes: d7280c9fffcb ("vhost: support selective datapath")
Fixes: a49f758d1170 ("vhost: split vDPA header file")
Fixes: 939066d96563 ("vhost/crypto: add public function implementation")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_vhost/rte_vdpa.h         | 2 ++
 lib/librte_vhost/rte_vdpa_dev.h     | 1 +
 lib/librte_vhost/rte_vhost_crypto.h | 7 +++++++
 3 files changed, 10 insertions(+)
  

Comments

Maxime Coquelin Jan. 21, 2021, 8:38 a.m. UTC | #1
On 1/15/21 12:10 PM, Bruce Richardson wrote:
> The vhost header files were missing definitions from headers to allow
> them to be compiled up individually.
> 
> Fixes: d7280c9fffcb ("vhost: support selective datapath")
> Fixes: a49f758d1170 ("vhost: split vDPA header file")
> Fixes: 939066d96563 ("vhost/crypto: add public function implementation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  lib/librte_vhost/rte_vdpa.h         | 2 ++
>  lib/librte_vhost/rte_vdpa_dev.h     | 1 +
>  lib/librte_vhost/rte_vhost_crypto.h | 7 +++++++
>  3 files changed, 10 insertions(+)
> 
> diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
> index f074ec0c4a..1437f400bf 100644
> --- a/lib/librte_vhost/rte_vdpa.h
> +++ b/lib/librte_vhost/rte_vdpa.h
> @@ -11,6 +11,8 @@
>   * Device specific vhost lib
>   */
>  
> +#include <stdint.h>
> +
>  /** Maximum name length for statistics counters */
>  #define RTE_VDPA_STATS_NAME_SIZE 64
>  
> diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h
> index a60183f780..bfada387b0 100644
> --- a/lib/librte_vhost/rte_vdpa_dev.h
> +++ b/lib/librte_vhost/rte_vdpa_dev.h
> @@ -8,6 +8,7 @@
>  #include <stdbool.h>
>  
>  #include "rte_vhost.h"
> +#include "rte_vdpa.h"
>  
>  #define RTE_VHOST_QUEUE_ALL UINT16_MAX
>  
> diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h
> index c809c46a21..2a27a35892 100644
> --- a/lib/librte_vhost/rte_vhost_crypto.h
> +++ b/lib/librte_vhost/rte_vhost_crypto.h
> @@ -5,6 +5,13 @@
>  #ifndef _VHOST_CRYPTO_H_
>  #define _VHOST_CRYPTO_H_
>  
> +#include <stdint.h>
> +#include <rte_compat.h>
> +
> +/* pre-declare structs to avoid including full headers */
> +struct rte_mempool;
> +struct rte_crypto_op;
> +
>  #define VHOST_CRYPTO_MBUF_POOL_SIZE		(8192)
>  #define VHOST_CRYPTO_MAX_BURST_SIZE		(64)
>  #define VHOST_CRYPTO_MAX_DATA_SIZE		(4096)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  

Patch

diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
index f074ec0c4a..1437f400bf 100644
--- a/lib/librte_vhost/rte_vdpa.h
+++ b/lib/librte_vhost/rte_vdpa.h
@@ -11,6 +11,8 @@ 
  * Device specific vhost lib
  */
 
+#include <stdint.h>
+
 /** Maximum name length for statistics counters */
 #define RTE_VDPA_STATS_NAME_SIZE 64
 
diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h
index a60183f780..bfada387b0 100644
--- a/lib/librte_vhost/rte_vdpa_dev.h
+++ b/lib/librte_vhost/rte_vdpa_dev.h
@@ -8,6 +8,7 @@ 
 #include <stdbool.h>
 
 #include "rte_vhost.h"
+#include "rte_vdpa.h"
 
 #define RTE_VHOST_QUEUE_ALL UINT16_MAX
 
diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h
index c809c46a21..2a27a35892 100644
--- a/lib/librte_vhost/rte_vhost_crypto.h
+++ b/lib/librte_vhost/rte_vhost_crypto.h
@@ -5,6 +5,13 @@ 
 #ifndef _VHOST_CRYPTO_H_
 #define _VHOST_CRYPTO_H_
 
+#include <stdint.h>
+#include <rte_compat.h>
+
+/* pre-declare structs to avoid including full headers */
+struct rte_mempool;
+struct rte_crypto_op;
+
 #define VHOST_CRYPTO_MBUF_POOL_SIZE		(8192)
 #define VHOST_CRYPTO_MAX_BURST_SIZE		(64)
 #define VHOST_CRYPTO_MAX_DATA_SIZE		(4096)