uint16_t flags;
uint32_t data_offset;
struct smb_direct_io *io = NULL;
-
+ int try = 1;
errno = 0;
ret = ibv_get_cq_event(c->ibv.comp_channel,
&cq, &cq_context);
}
errno = 0;
+try_again:
+ DEBUG(0,("%s:%s: try[%d] ret[%d] errno[%d] status[%s]\n",
+ __location__, __FUNCTION__, try, ret, errno, nt_errstr(status)));
+ try++;
ZERO_STRUCT(wc);
ret = ibv_poll_cq(cq, 1, &wc);
+ if (ret == 0 && try > 1) {
+ /*
+ * The queue is empty...
+ */
+ return;
+ }
if (ret != 1) {
status = map_nt_error_from_unix_common(errno);
DEBUG(0,("%s:%s: ret[%d] errno[%d] status[%s]\n",
smb_direct_connection_disconnect(c, status);
return;
}
+ goto try_again;
return;
case IBV_WC_RECV:
smb_direct_connection_disconnect(c, status);
return;
}
+ goto try_again;
return;
} else if (data_offset == 0x18) {
if (io->data_length > (c->state.max_receive_size - data_offset)) {
smb_direct_connection_disconnect(c, status);
return;
}
+ goto try_again;
return;
case IBV_WC_RDMA_READ:
case IBV_WC_RDMA_WRITE:
default:
status = NT_STATUS_INVALID_NETWORK_RESPONSE;
- DEBUG(0,("%s:%s: ret[%d] errno[%d] status[%s]\n",
- __location__, __FUNCTION__, ret, errno, nt_errstr(status)));
+ DEBUG(0,("%s:%s: GOT OPCODE[%u] IO[%p] ret[%d] errno[%d] status[%s]\n",
+ __location__, __FUNCTION__, wc.opcode, io, ret, errno, nt_errstr(status)));
smb_direct_connection_disconnect(c, status);
return;
}