@@ -214,6 +214,11 @@ void NotifManager::RegisterEndpointByQpn(uint32_t qpn) {
214214 SYSCALL_RETURN_ZERO (epoll_ctl (epfd, EPOLL_CTL_ADD , ep->local .ibvHandle .compCh ->fd , &ev));
215215 }
216216
217+ // Skip notification setup if disabled
218+ if (!config.enableNotification ) {
219+ return ;
220+ }
221+
217222 std::lock_guard<std::mutex> lock (mu);
218223 if (qpNotifCtx.find (qpn) != qpNotifCtx.end ()) return ;
219224
@@ -260,6 +265,12 @@ void NotifManager::ProcessOneCqe(int qpn, const EpPair& ep) {
260265 while ((n = ibv_poll_cq (cq, batchSize, wc)) > 0 ) {
261266 for (int i = 0 ; i < n; ++i) {
262267 if (wc[i].opcode == IBV_WC_RECV ) {
268+ // Skip RECV processing if notification is disabled
269+ if (!config.enableNotification ) {
270+ MORI_IO_WARN (" Received unexpected RECV completion when notification is disabled" );
271+ continue ;
272+ }
273+
263274 std::lock_guard<std::mutex> lock (mu);
264275
265276 assert (qpNotifCtx.find (qpn) != qpNotifCtx.end ());
@@ -311,6 +322,9 @@ void NotifManager::ProcessOneCqe(int qpn, const EpPair& ep) {
311322 } else {
312323 statusPtr->SetMessage (ibv_wc_status_str (wc[i].status ));
313324 statusPtr->SetCode (StatusCode::ERR_RDMA_OP );
325+ MORI_IO_ERROR (" NotifManager receive cqe failed for task {} code {} status {}" ,
326+ msg->meta ->id , static_cast <uint32_t >(wc[i].status ),
327+ ibv_wc_status_str (wc[i].status ));
314328 // set status to nullptr indicate that transfer failed
315329 msg->meta ->status = nullptr ;
316330 }
@@ -597,7 +611,7 @@ void RdmaBackendSession::ReadWrite(size_t localOffset, size_t remoteOffset, size
597611 status->SetMessage (ret.message );
598612 status->SetCode (ret.code );
599613 }
600- if (!ret.Failed ()) {
614+ if (!ret.Failed () && config. enableNotification ) {
601615 RdmaOpRet notifRet = RdmaNotifyTransfer (eps, status, id);
602616 if (notifRet.Failed ()) {
603617 status->SetMessage (notifRet.message );
@@ -626,7 +640,7 @@ void RdmaBackendSession::BatchReadWrite(const SizeVec& localOffsets, const SizeV
626640 status->SetMessage (ret.message );
627641 status->SetCode (ret.code );
628642 }
629- if (!ret.Failed ()) {
643+ if (!ret.Failed () && config. enableNotification ) {
630644 RdmaOpRet notifRet = RdmaNotifyTransfer (eps, status, id);
631645 if (notifRet.Failed ()) {
632646 status->SetMessage (notifRet.message );
0 commit comments