app/test: improve error message for disabled crypto
Improve error message if crypto PMD build is not enabled in config file Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
parent
79521c4383
commit
afd6aa6fd9
@ -182,6 +182,11 @@ testsuite_setup(void)
|
|||||||
|
|
||||||
/* Create 2 AESNI MB devices if required */
|
/* Create 2 AESNI MB devices if required */
|
||||||
if (gbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD) {
|
if (gbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD) {
|
||||||
|
#ifndef RTE_LIBRTE_PMD_AESNI_MB
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_AESNI_MB must be"
|
||||||
|
" enabled in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
#endif
|
||||||
nb_devs = rte_cryptodev_count_devtype(
|
nb_devs = rte_cryptodev_count_devtype(
|
||||||
RTE_CRYPTODEV_AESNI_MB_PMD);
|
RTE_CRYPTODEV_AESNI_MB_PMD);
|
||||||
if (nb_devs < 2) {
|
if (nb_devs < 2) {
|
||||||
@ -199,6 +204,11 @@ testsuite_setup(void)
|
|||||||
|
|
||||||
/* Create 2 AESNI GCM devices if required */
|
/* Create 2 AESNI GCM devices if required */
|
||||||
if (gbl_cryptodev_type == RTE_CRYPTODEV_AESNI_GCM_PMD) {
|
if (gbl_cryptodev_type == RTE_CRYPTODEV_AESNI_GCM_PMD) {
|
||||||
|
#ifndef RTE_LIBRTE_PMD_AESNI_GCM
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_AESNI_GCM must be"
|
||||||
|
" enabled in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
#endif
|
||||||
nb_devs = rte_cryptodev_count_devtype(
|
nb_devs = rte_cryptodev_count_devtype(
|
||||||
RTE_CRYPTODEV_AESNI_GCM_PMD);
|
RTE_CRYPTODEV_AESNI_GCM_PMD);
|
||||||
if (nb_devs < 2) {
|
if (nb_devs < 2) {
|
||||||
@ -214,6 +224,11 @@ testsuite_setup(void)
|
|||||||
|
|
||||||
/* Create 2 SNOW 3G devices if required */
|
/* Create 2 SNOW 3G devices if required */
|
||||||
if (gbl_cryptodev_type == RTE_CRYPTODEV_SNOW3G_PMD) {
|
if (gbl_cryptodev_type == RTE_CRYPTODEV_SNOW3G_PMD) {
|
||||||
|
#ifndef RTE_LIBRTE_PMD_SNOW3G
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_SNOW3G must be"
|
||||||
|
" enabled in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
#endif
|
||||||
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
|
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
|
||||||
if (nb_devs < 2) {
|
if (nb_devs < 2) {
|
||||||
for (i = nb_devs; i < 2; i++) {
|
for (i = nb_devs; i < 2; i++) {
|
||||||
@ -228,6 +243,11 @@ testsuite_setup(void)
|
|||||||
|
|
||||||
/* Create 2 KASUMI devices if required */
|
/* Create 2 KASUMI devices if required */
|
||||||
if (gbl_cryptodev_type == RTE_CRYPTODEV_KASUMI_PMD) {
|
if (gbl_cryptodev_type == RTE_CRYPTODEV_KASUMI_PMD) {
|
||||||
|
#ifndef RTE_LIBRTE_PMD_KASUMI
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_KASUMI must be"
|
||||||
|
" enabled in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
#endif
|
||||||
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_KASUMI_PMD);
|
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_KASUMI_PMD);
|
||||||
if (nb_devs < 2) {
|
if (nb_devs < 2) {
|
||||||
for (i = nb_devs; i < 2; i++) {
|
for (i = nb_devs; i < 2; i++) {
|
||||||
@ -242,6 +262,11 @@ testsuite_setup(void)
|
|||||||
|
|
||||||
/* Create 2 NULL devices if required */
|
/* Create 2 NULL devices if required */
|
||||||
if (gbl_cryptodev_type == RTE_CRYPTODEV_NULL_PMD) {
|
if (gbl_cryptodev_type == RTE_CRYPTODEV_NULL_PMD) {
|
||||||
|
#ifndef RTE_LIBRTE_PMD_NULL_CRYPTO
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO must be"
|
||||||
|
" enabled in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
#endif
|
||||||
nb_devs = rte_cryptodev_count_devtype(
|
nb_devs = rte_cryptodev_count_devtype(
|
||||||
RTE_CRYPTODEV_NULL_PMD);
|
RTE_CRYPTODEV_NULL_PMD);
|
||||||
if (nb_devs < 2) {
|
if (nb_devs < 2) {
|
||||||
@ -257,6 +282,14 @@ testsuite_setup(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef RTE_LIBRTE_PMD_QAT
|
||||||
|
if (gbl_cryptodev_type == RTE_CRYPTODEV_QAT_SYM_PMD) {
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_QAT must be enabled "
|
||||||
|
"in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
nb_devs = rte_cryptodev_count();
|
nb_devs = rte_cryptodev_count();
|
||||||
if (nb_devs < 1) {
|
if (nb_devs < 1) {
|
||||||
RTE_LOG(ERR, USER1, "No crypto devices found?");
|
RTE_LOG(ERR, USER1, "No crypto devices found?");
|
||||||
|
@ -299,6 +299,11 @@ testsuite_setup(void)
|
|||||||
|
|
||||||
/* Create 2 AESNI MB devices if required */
|
/* Create 2 AESNI MB devices if required */
|
||||||
if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_AESNI_MB_PMD) {
|
if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_AESNI_MB_PMD) {
|
||||||
|
#ifndef RTE_LIBRTE_PMD_AESNI_MB
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_AESNI_MB must be"
|
||||||
|
" enabled in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
#endif
|
||||||
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_AESNI_MB_PMD);
|
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_AESNI_MB_PMD);
|
||||||
if (nb_devs < 2) {
|
if (nb_devs < 2) {
|
||||||
for (i = nb_devs; i < 2; i++) {
|
for (i = nb_devs; i < 2; i++) {
|
||||||
@ -314,6 +319,11 @@ testsuite_setup(void)
|
|||||||
|
|
||||||
/* Create 2 AESNI GCM devices if required */
|
/* Create 2 AESNI GCM devices if required */
|
||||||
if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_AESNI_GCM_PMD) {
|
if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_AESNI_GCM_PMD) {
|
||||||
|
#ifndef RTE_LIBRTE_PMD_AESNI_GCM
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_AESNI_GCM must be"
|
||||||
|
" enabled in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
#endif
|
||||||
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_AESNI_GCM_PMD);
|
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_AESNI_GCM_PMD);
|
||||||
if (nb_devs < 2) {
|
if (nb_devs < 2) {
|
||||||
for (i = nb_devs; i < 2; i++) {
|
for (i = nb_devs; i < 2; i++) {
|
||||||
@ -329,6 +339,11 @@ testsuite_setup(void)
|
|||||||
|
|
||||||
/* Create 2 SNOW3G devices if required */
|
/* Create 2 SNOW3G devices if required */
|
||||||
if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_SNOW3G_PMD) {
|
if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_SNOW3G_PMD) {
|
||||||
|
#ifndef RTE_LIBRTE_PMD_SNOW3G
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_SNOW3G must be"
|
||||||
|
" enabled in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
#endif
|
||||||
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
|
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
|
||||||
if (nb_devs < 2) {
|
if (nb_devs < 2) {
|
||||||
for (i = nb_devs; i < 2; i++) {
|
for (i = nb_devs; i < 2; i++) {
|
||||||
@ -342,6 +357,14 @@ testsuite_setup(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef RTE_LIBRTE_PMD_QAT
|
||||||
|
if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_QAT_SYM_PMD) {
|
||||||
|
RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_QAT must be enabled "
|
||||||
|
"in config file to run this testsuite.\n");
|
||||||
|
return TEST_FAILED;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
nb_devs = rte_cryptodev_count();
|
nb_devs = rte_cryptodev_count();
|
||||||
if (nb_devs < 1) {
|
if (nb_devs < 1) {
|
||||||
RTE_LOG(ERR, USER1, "No crypto devices found?");
|
RTE_LOG(ERR, USER1, "No crypto devices found?");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user