Repository navigation
Description
Summary
Building with DAQIRI_ENGINE=dpdk (i.e. without ibverbs/RDMA) fails to compile the always-built daqiri_socket target. The socket engine keeps a std::unique_ptr<RdmaEngine> member (for its RoCE delegation path), but that member declaration — and a set of rdma_* connection methods that dereference it — were left unguarded, while the #include of the rdma engine header and make_unique<RdmaEngine>() are all wrapped in #if DAQIRI_ENGINE_RDMA. With ibverbs absent, DAQIRI_ENGINE_RDMA is undefined, the rdma header is not included, RdmaEngine stays incomplete, and unique_ptr<RdmaEngine>'s destructor (instantiated in SocketEngine::~SocketEngine()) fails its complete-type static_assert.
The default DAQIRI_ENGINE="dpdk ibverbs" build is unaffected (RdmaEngine is complete there). This is strictly a dpdk-only / ibverbs-absent regression introduced by #156 (the manager→engine rename, which made the socket engine always-on).
Reproduce
IMAGE_TAG=daqiri:main-dpdk-repro BASE_TARGET=dpdk DAQIRI_ENGINE=dpdk DAQIRI_BUILD_PYTHON=OFF BUILD_SHARED_LIBS=ON scripts/build-container.sh
libdaqiri_dpdk.so builds fine; only the always-on daqiri_socket target fails.
Exact compiler error
src/engines/socket/daqiri_socket_engine.cpp:1455:22: error: invalid use of incomplete type 'class daqiri::RdmaEngine'
src/engines/socket/daqiri_socket_engine.h:36:7: note: forward declaration of 'class daqiri::RdmaEngine'
... (repeated for the other rdma_* methods at lines 1463/1470/1478/1487/1496) ...
/usr/include/c++/13/bits/unique_ptr.h: In instantiation of 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = daqiri::RdmaEngine]':
required from 'std::unique_ptr<...>::~unique_ptr()'
required from here
src/engines/socket/daqiri_socket_engine.cpp:77:29 [SocketEngine::~SocketEngine()]
/usr/include/c++/13/bits/unique_ptr.h:97:23: error: invalid application of 'sizeof' to incomplete type 'daqiri::RdmaEngine'
97 | static_assert(sizeof(_Tp)>0, ...
Root cause
src/engines/socket/daqiri_socket_engine.h:36—class RdmaEngine;(forward decl only)src/engines/socket/daqiri_socket_engine.h:212—std::unique_ptr<RdmaEngine> roce_engine_;— unconditional, NOT behind#if DAQIRI_ENGINE_RDMA. The unique_ptr destructor needs a completeRdmaEngine.src/engines/socket/daqiri_socket_engine.cpp:1450-1497— therdma_connect_to_server/rdma_get_port_queue/rdma_get_server_conn_id/rdma_set_header/rdma_get_opcodedefinitions dereferenceroce_engine_but are not wrapped in#if DAQIRI_ENGINE_RDMA(unlike every other use in the file).
Proposed fix
Guard the roce_engine_ member behind #if DAQIRI_ENGINE_RDMA, and guard the unguarded rdma_* method bodies so they short-circuit (return the "not initialized" status / INVALID opcode) when RDMA is not built — matching the #if DAQIRI_ENGINE_RDMA convention already used throughout the .cpp.
Activity
#170 - remove coming soon labels from docs site
#170 - remove coming soon labels from docs site (#169)
#170 - Guard socket engine RdmaEngine member behind DAQIRI_ENGINE_RDMA (