Skip to contentSkip to conversation

crypto/scheduler: fix include of local headers

PATCH Applied Bruce Richardson 2 participants 3 messages Mar 28, 2017 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/scheduler: fix include of local headers

When a C file for a library/driver is including the public header files for that library, those need to be included as local includes using quotes rather than angle-brackets. Without doing so, parallel builds can fail, as the compiler will only look for those headers in the global include folder rather than locally, and the build system does not enforce that the headers for a lib are installed before the rest of the lib is compiled.

Fixes 097ab0bac017 ("crypto/scheduler: add API")
Fixes 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Fixes 31439ee72b2c ("crypto/scheduler: add API implementations")
---
 drivers/crypto/scheduler/rte_cryptodev_scheduler.c | 2 +-
 drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 2 +-
 drivers/crypto/scheduler/scheduler_pmd.c           | 2 +-
 drivers/crypto/scheduler/scheduler_pmd_private.h   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/scheduler/rte_cryptodev_scheduler.c +1 -1
index 11e8143..2f49ad4 100644
@@ -32,9 +32,9 @@
 #include <rte_reorder.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_scheduler.h>
 #include <rte_malloc.h>
 
+#include "rte_cryptodev_scheduler.h"
 #include "scheduler_pmd_private.h"
 
 /** update the scheduler pmd's capability with attaching device's
drivers/crypto/scheduler/rte_cryptodev_scheduler.h +1 -1
index 7ef44e7..98ab8f2 100644
@@ -34,7 +34,7 @@
 #ifndef _RTE_CRYPTO_SCHEDULER_H
 #define _RTE_CRYPTO_SCHEDULER_H
 
-#include <rte_cryptodev_scheduler_operations.h>
+#include "rte_cryptodev_scheduler_operations.h"
 
 #ifdef __cplusplus
 extern "C" {
drivers/crypto/scheduler/scheduler_pmd.c +1 -1
index eeafbe6..7efdc91 100644
@@ -37,8 +37,8 @@
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 #include <rte_reorder.h>
-#include <rte_cryptodev_scheduler.h>
 
+#include "rte_cryptodev_scheduler.h"
 #include "scheduler_pmd_private.h"
 
 struct scheduler_init_params {
drivers/crypto/scheduler/scheduler_pmd_private.h +1 -1
index ac4690e..9a1409c 100644
@@ -36,7 +36,7 @@
 
 #include <rte_hash.h>
 #include <rte_reorder.h>
-#include <rte_cryptodev_scheduler.h>
+#include "rte_cryptodev_scheduler.h"
 
 /**< Maximum number of bonded devices per devices */
 #ifndef MAX_SLAVES_NUM
Signature · 1 line
2.9.3
#1 lore raw
Quoted 11 lines · Bruce Richardson

When a C file for a library/driver is including the public header files for that library, those need to be included as local includes using quotes rather than angle-brackets. Without doing so, parallel builds can fail, as the compiler will only look for those headers in the global include folder rather than locally, and the build system does not enforce that the headers for a lib are installed before the rest of the lib is compiled.

Fixes 097ab0bac017 ("crypto/scheduler: add API")
Fixes 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Fixes 31439ee72b2c ("crypto/scheduler: add API implementations")
Quoted 9 lines
---
 drivers/crypto/scheduler/rte_cryptodev_scheduler.c | 2 +-
 drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 2 +-
 drivers/crypto/scheduler/scheduler_pmd.c           | 2 +-
 drivers/crypto/scheduler/scheduler_pmd_private.h   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Two follow-up points:

* Even though this is a crypto patch, I think it should go in main tree as builds are broken right now if you turn on the PMD and use a large -j setting. (i.e. it's broken for me!! :-) )
* Is there a reason why this PMD is disabled by default? It doesn't appear to have any external dependencies and if we turn it on by default we should be able to catch issues like this a lot quicker.

Regards,
/Bruce

#2 lore raw

2017-03-28 12:04, Bruce Richardson:

Quoted 21 lines · Bruce Richardson
Quoted 11 lines

When a C file for a library/driver is including the public header files for that library, those need to be included as local includes using quotes rather than angle-brackets. Without doing so, parallel builds can fail, as the compiler will only look for those headers in the global include folder rather than locally, and the build system does not enforce that the headers for a lib are installed before the rest of the lib is compiled.

Fixes 097ab0bac017 ("crypto/scheduler: add API")
Fixes 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Fixes 31439ee72b2c ("crypto/scheduler: add API implementations")
Quoted 9 lines
---
 drivers/crypto/scheduler/rte_cryptodev_scheduler.c | 2 +-
 drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 2 +-
 drivers/crypto/scheduler/scheduler_pmd.c           | 2 +-
 drivers/crypto/scheduler/scheduler_pmd_private.h   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
Quoted 5 lines

Two follow-up points:

* Even though this is a crypto patch, I think it should go in main tree as builds are broken right now if you turn on the PMD and use a large -j setting. (i.e. it's broken for me!! :-) )

Applied, thanks for catching

Quoted 3 lines

* Is there a reason why this PMD is disabled by default? It doesn't appear to have any external dependencies and if we turn it on by default we should be able to catch issues like this a lot quicker.

I forgot to check this PMD. I was not compiling it either.
I agree it should be enabled by default, or at least enabled in test-build.sh.