}
c->sock.fd = -1;
c->sock.tmp_fd = -1;
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
talloc_set_destructor(c, smb_direct_connection_destructor);
c->state.max_send_size = 1364;
c->state.max_receive_size = SMB_DIRECT_IO_MAX_DATA;
c->state.max_fragmented_size = 1048576;
c->state.max_read_write_size = 0;
- c->state.receive_credit_max = 128;//255;
+ c->state.receive_credit_max = 10;//255;
c->state.send_credit_target = 255;
c->state.keep_alive_internal = 5;
return NULL;
}
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return c;
}
int ret;
uint16_t i;
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
c->ibv.pd = ibv_alloc_pd(c->rdma.cm_id->verbs);
if (c->ibv.pd == NULL) {
TALLOC_FREE(c);
return NULL;
}
DLIST_ADD_END(c->r2s.idle, io);
-DEBUG(0,("%s:%s: SETUP r2s here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: SETUP r2s here...\n", __location__, __func__));
}
for (i = 0; i < c->state.send_credit_target; i++) {
return NULL;
}
DLIST_ADD_END(c->s2r.idle, io);
-DEBUG(0,("%s:%s: SETUP s2r here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: SETUP s2r here...\n", __location__, __func__));
}
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return c;
}
struct ibv_recv_wr *bad_recv_wr = NULL;
int ret;
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
smb_direct_connection_debug_credits(c, __location__, __func__);
if (c->r2s.idle == NULL) {
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return 0;
}
break;
}
+DEBUG(0,("%s:%s: POST RECV[%p]\n", __location__, __func__, io));
io->recv_wr.next = &io->next->recv_wr;
}
DLIST_CONCATENATE(c->r2s.posted, c->r2s.idle);
c->r2s.idle = NULL;
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return 0;
}
struct ibv_send_wr *bad_send_wr = NULL;
int ret;
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
smb_direct_connection_debug_credits(c, __location__, __func__);
if (c->s2r.ready == NULL) {
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+DEBUG(0,("%s:%s: none READY\n", __location__, __func__));
return 0;
}
if (c->state.send_credits == 0) {
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+DEBUG(0,("%s:%s: no credits\n", __location__, __func__));
return 0;
}
next = io->next;
if (c->state.send_credits == 0) {
-smb_direct_connection_debug_credits(c, __location__, __func__);
+//smb_direct_connection_debug_credits(c, __location__, __func__);
break;
}
granted -= c->state.receive_credits;
granted = MIN(granted, c->state.receive_credit_target);
c->state.receive_credits += granted;
-smb_direct_connection_debug_credits(c, __location__, __func__);
+//smb_direct_connection_debug_credits(c, __location__, __func__);
// if (c->state.receive_credits == 0) {
// granted = 1;
int ret;
DEBUG(0,("%s:%s: KEEP posted[%p] ready[%p] idle[%p]\n",
- __location__, __func__, ));
+ __location__, __func__, c->s2r.posted, c->s2r.ready, c->s2r.idle));
if (c->s2r.posted != NULL) {
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
// return 0;
}
if (c->s2r.ready != NULL) {
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return 0;
}
if (c->s2r.idle == NULL) {
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return 0;
}
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
io = c->s2r.idle;
DLIST_REMOVE(c->s2r.idle, io);
__location__, __FUNCTION__, ret, errno, nt_errstr(status)));
return ret;
}
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return 0;
}
case RDMA_CM_EVENT_ESTABLISHED:
errno = 0;
ret = 0;
- DEBUG(0,("%s:%s: ret[%d] errno[%d]\n",
- __location__, __FUNCTION__, ret, errno));
+ //DEBUG(0,("%s:%s: ret[%d] errno[%d]\n",
+ // __location__, __FUNCTION__, ret, errno));
c->rdma.expected_event = RDMA_CM_EVENT_DISCONNECTED;
TALLOC_FREE(c->rdma.fde_channel);
ibv_ack_cq_events(cq, 1);
if (cq_context != c) {
- status = NT_STATUS_INTERNAL_ERROR;;
+ status = NT_STATUS_INTERNAL_ERROR;
DEBUG(0,("%s:%s: ret[%d] errno[%d] status[%s]\n",
__location__, __FUNCTION__, ret, errno, nt_errstr(status)));
tevent_req_nterror(req, status);
switch (wc.opcode) {
case IBV_WC_SEND:
- DEBUG(0,("%s:%s: GOT SEND[%p] ret[%d] errno[%d]\n",
- __location__, __FUNCTION__, io, ret, errno));
+ DEBUG(0,("%s:%s: GOT SEND[%p] next[%p] ret[%d] errno[%d]\n",
+ __location__, __FUNCTION__, io, io->send_wr.next, ret, errno));
TALLOC_FREE(io);
break;
case IBV_WC_RDMA_READ:
- DEBUG(0,("%s:%s: GOT RDMA_READ[%p] ret[%d] errno[%d]\n",
- __location__, __FUNCTION__, io, ret, errno));
+ DEBUG(0,("%s:%s: GOT RDMA_READ[%p] next[%p] ret[%d] errno[%d]\n",
+ __location__, __FUNCTION__, io, io->send_wr.next, ret, errno));
TALLOC_FREE(io);
break;
case IBV_WC_RECV:
- DEBUG(0,("%s:%s: GOT RECV[%p] ret[%d] errno[%d]\n",
- __location__, __FUNCTION__, io, ret, errno));
+ DEBUG(0,("%s:%s: GOT RECV[%p] next[%p] ret[%d] errno[%d]\n",
+ __location__, __FUNCTION__, io, io->recv_wr.next, ret, errno));
dump_data(0, io->data, wc.byte_len);
if (wc.byte_len < 0x20) {
status = NT_STATUS_INVALID_NETWORK_RESPONSE;
state->ev = ev;
state->c = c;
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
subreq = smb_direct_connection_rdma_connect_send(state, ev, c, src, dst, NULL, NULL);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
smb_direct_connection_connect_done_rdma,
req);
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
return req;
}
struct smb_direct_connection_connect_state);
NTSTATUS status;
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
status = smb_direct_connection_rdma_connect_recv(subreq);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
}
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
subreq = smb_direct_connection_negotiate_connect_send(state, state->ev, state->c);
if (tevent_req_nomem(subreq, req)) {
return;
tevent_req_set_callback(subreq,
smb_direct_connection_connect_done_negotiate,
req);
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
}
static void smb_direct_connection_connect_done_negotiate(struct tevent_req *subreq)
struct tevent_req);
NTSTATUS status;
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
status = smb_direct_connection_negotiate_connect_recv(subreq);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
}
-DEBUG(0,("%s:%s: here...\n", __location__, __func__));
+//DEBUG(0,("%s:%s: here...\n", __location__, __func__));
tevent_req_done(req);
}