-
Notifications
You must be signed in to change notification settings - Fork 154
DAQIRI Engine Rename #1615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
DAQIRI Engine Rename #1615
Changes from all commits
583353d
92b710b
40d00b8
2396a75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| #if DAQIRI_MGR_DPDK | ||
| #if DAQIRI_ENGINE_DPDK | ||
| #include "default_bench_op_rx.h" | ||
| #include "default_bench_op_tx.h" | ||
| #endif | ||
|
|
@@ -29,35 +29,28 @@ class App : public holoscan::Application { | |
| using namespace holoscan; | ||
|
|
||
| const auto [rx_en, tx_en] = daqiri::get_rx_tx_configs_enabled(config()); | ||
| const auto mgr_type = daqiri::get_manager_type(); | ||
|
|
||
| HOLOSCAN_LOG_INFO("Using DAQIRI manager {}", daqiri::manager_type_to_string(mgr_type)); | ||
|
|
||
| if (mgr_type == daqiri::ManagerType::DPDK) { | ||
| #if DAQIRI_MGR_DPDK | ||
| if (rx_en) { | ||
| auto bench_rx = make_operator<ops::DaqiriRawEthernetBenchDefaultRxOp>( | ||
| "bench_rx", | ||
| from_config("bench_rx"), | ||
| make_condition<BooleanCondition>("is_alive", true)); | ||
| add_operator(bench_rx); | ||
| } | ||
| if (tx_en) { | ||
| auto bench_tx = make_operator<ops::DaqiriRawEthernetBenchDefaultTxOp>( | ||
| "bench_tx", | ||
| from_config("bench_tx"), | ||
| make_condition<BooleanCondition>("is_alive", true)); | ||
| add_operator(bench_tx); | ||
| } | ||
| // The raw Ethernet benchmark only runs on the DPDK engine, so there is no | ||
| // need to query or branch on the engine type at runtime. | ||
| #if DAQIRI_ENGINE_DPDK | ||
| if (rx_en) { | ||
| auto bench_rx = make_operator<ops::DaqiriRawEthernetBenchDefaultRxOp>( | ||
| "bench_rx", | ||
| from_config("bench_rx"), | ||
| make_condition<BooleanCondition>("is_alive", true)); | ||
| add_operator(bench_rx); | ||
| } | ||
| if (tx_en) { | ||
| auto bench_tx = make_operator<ops::DaqiriRawEthernetBenchDefaultTxOp>( | ||
| "bench_tx", | ||
| from_config("bench_tx"), | ||
| make_condition<BooleanCondition>("is_alive", true)); | ||
| add_operator(bench_tx); | ||
| } | ||
| #else | ||
| HOLOSCAN_LOG_ERROR("DPDK manager/backend is disabled"); | ||
| exit(1); | ||
| HOLOSCAN_LOG_ERROR("DPDK engine is disabled; rebuild with -DDAQIRI_ENGINE=dpdk"); | ||
| exit(1); | ||
| #endif | ||
|
Comment on lines
50
to
53
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Calling
Move the 🔄 Proposed fix: validate engine support before initialization int main(int argc, char** argv) {
using namespace holoscan;
+
+#if !DAQIRI_ENGINE_DPDK
+ HOLOSCAN_LOG_ERROR("DPDK engine is disabled; rebuild with -DDAQIRI_ENGINE=dpdk");
+ return 1;
+#endif
+
auto app = make_application<App>();
// Get the configurationAnd remove the void compose() override {
using namespace holoscan;
const auto [rx_en, tx_en] = daqiri::get_rx_tx_configs_enabled(config());
// The raw Ethernet benchmark only runs on the DPDK engine, so there is no
// need to query or branch on the engine type at runtime.
`#if` DAQIRI_ENGINE_DPDK
if (rx_en) {
auto bench_rx = make_operator<ops::DaqiriRawEthernetBenchDefaultRxOp>(
"bench_rx",
from_config("bench_rx"),
make_condition<BooleanCondition>("is_alive", true));
add_operator(bench_rx);
}
if (tx_en) {
auto bench_tx = make_operator<ops::DaqiriRawEthernetBenchDefaultTxOp>(
"bench_tx",
from_config("bench_tx"),
make_condition<BooleanCondition>("is_alive", true));
add_operator(bench_tx);
}
-#else
- HOLOSCAN_LOG_ERROR("DPDK engine is disabled; rebuild with -DDAQIRI_ENGINE=dpdk");
- exit(1);
`#endif`
}🧰 Tools🪛 Cppcheck (2.20.0)[error] 53-53: There is an unknown macro here somewhere. Configuration is required. If HOLOSCAN_OPERATOR_FORWARD_ARGS is a macro then please configure it. (unknownMacro) 🤖 Prompt for AI Agents |
||
|
|
||
| } else { | ||
| HOLOSCAN_LOG_ERROR("Unsupported DAQIRI manager/backend"); | ||
| exit(1); | ||
| } | ||
| } | ||
| }; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor
🧩 Analysis chain
🏁 Script executed:
Repository: nvidia-holoscan/holohub
Length of output: 1246
🏁 Script executed:
Repository: nvidia-holoscan/holohub
Length of output: 903
🏁 Script executed:
Repository: nvidia-holoscan/holohub
Length of output: 110
🏁 Script executed:
Repository: nvidia-holoscan/holohub
Length of output: 7079
🏁 Script executed:
Repository: nvidia-holoscan/holohub
Length of output: 9661
🏁 Script executed:
Repository: nvidia-holoscan/holohub
Length of output: 49
🏁 Script executed:
Repository: nvidia-holoscan/holohub
Length of output: 321
Fix CMake/CTest ENVIRONMENT formatting for
DAQIRI_ENGINE_LIST(semicolon vs whitespace)DAQIRI_ENGINE_LISTis built as a CMake list (separate_arguments(...)), but it’s passed to CTest asENVIRONMENT "DAQIRI_ENGINE_LIST=${DAQIRI_ENGINE_LIST}". CTest/set_tests_properties(ENVIRONMENT ...)treats semicolons as separators between environment variable entries, so multi-engine values likedpdk;socketwon’t reach Python as a singleDAQIRI_ENGINE_LISTstring. The Python test then doesos.environ.get(...).split()(whitespace), so it won’t parse semicolon-delimited engines correctly. This isn’t currently exercised because the test parametrizesengineas["dpdk"], but it will break as soon as other engines are added.Fix by joining the CMake list before exporting (e.g.,
list(JOIN DAQIRI_ENGINE_LIST_STR " " DAQIRI_ENGINE_LIST)thenENVIRONMENT "DAQIRI_ENGINE_LIST=${DAQIRI_ENGINE_LIST_STR}") or by updating Python to split on both;and whitespace.🤖 Prompt for AI Agents