[dpdk-dev] test/eventdev: fix compilation with crypto disabled

Message ID 20170406141337.14167-1-olivier.matz@6wind.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Olivier Matz April 6, 2017, 2:13 p.m. UTC
  There is a compilation error in the following case:

  make config T=x86_64-native-linuxapp-gcc
  sed -i 's,CONFIG_RTE_LIBRTE_CRYPTODEV=y,CONFIG_RTE_LIBRTE_CRYPTODEV=n,' \
    build/.config
  sed -i 's,CONFIG_RTE_APP_CRYPTO_PERF=y,CONFIG_RTE_APP_CRYPTO_PERF=n,' \
    build/.config
  make -j4
  make -j4 test-build

  test_eventdev.c:39:27: fatal error:
  rte_cryptodev.h: No such file or directory
  #include <rte_cryptodev.h>
                           ^

Removing the include induces a new error, (missing declaration of
rte_eal_vdev_init()), which is fixed by including rte_dev.h.

Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 test/test/test_eventdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jerin Jacob April 6, 2017, 3:09 p.m. UTC | #1
-----Original Message-----
> Date: Thu, 6 Apr 2017 16:13:37 +0200
> From: Olivier Matz <olivier.matz@6wind.com>
> To: dev@dpdk.org
> CC: jerin.jacob@caviumnetworks.com
> Subject: [PATCH] test/eventdev: fix compilation with crypto disabled
> X-Mailer: git-send-email 2.11.0
> 
> There is a compilation error in the following case:
> 
>   make config T=x86_64-native-linuxapp-gcc
>   sed -i 's,CONFIG_RTE_LIBRTE_CRYPTODEV=y,CONFIG_RTE_LIBRTE_CRYPTODEV=n,' \
>     build/.config
>   sed -i 's,CONFIG_RTE_APP_CRYPTO_PERF=y,CONFIG_RTE_APP_CRYPTO_PERF=n,' \
>     build/.config
>   make -j4
>   make -j4 test-build
> 
>   test_eventdev.c:39:27: fatal error:
>   rte_cryptodev.h: No such file or directory
>   #include <rte_cryptodev.h>
>                            ^
> 
> Removing the include induces a new error, (missing declaration of
> rte_eal_vdev_init()), which is fixed by including rte_dev.h.
> 
> Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> ---
>  test/test/test_eventdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
> index b568470a2..5bd46346d 100644
> --- a/test/test/test_eventdev.c
> +++ b/test/test/test_eventdev.c
> @@ -36,7 +36,7 @@
>  #include <rte_malloc.h>
>  #include <rte_memcpy.h>
>  #include <rte_eventdev.h>
> -#include <rte_cryptodev.h>
> +#include <rte_dev.h>
>  
>  #include "test.h"
>  
> -- 
> 2.11.0
>
  
Thomas Monjalon April 6, 2017, 3:35 p.m. UTC | #2
> > There is a compilation error in the following case:
> > 
> >   make config T=x86_64-native-linuxapp-gcc
> >   sed -i 's,CONFIG_RTE_LIBRTE_CRYPTODEV=y,CONFIG_RTE_LIBRTE_CRYPTODEV=n,' \
> >     build/.config
> >   sed -i 's,CONFIG_RTE_APP_CRYPTO_PERF=y,CONFIG_RTE_APP_CRYPTO_PERF=n,' \
> >     build/.config
> >   make -j4
> >   make -j4 test-build
> > 
> >   test_eventdev.c:39:27: fatal error:
> >   rte_cryptodev.h: No such file or directory
> >   #include <rte_cryptodev.h>
> >                            ^
> > 
> > Removing the include induces a new error, (missing declaration of
> > rte_eal_vdev_init()), which is fixed by including rte_dev.h.
> > 
> > Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")
> > 
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied, thanks
  

Patch

diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
index b568470a2..5bd46346d 100644
--- a/test/test/test_eventdev.c
+++ b/test/test/test_eventdev.c
@@ -36,7 +36,7 @@ 
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_eventdev.h>
-#include <rte_cryptodev.h>
+#include <rte_dev.h>
 
 #include "test.h"