@Override public void dispatchCqEvent(IbvWC wc) throws IOException { if (wc.getStatus() == 0){ RdmaActiveFuture future = futureMap.remove(wc.getWr_id()); if (future != null){ future.signal(); if (future.isWrite()){ sendQueueAvailable.release(2); } else { sendQueueAvailable.release(); } } else { throw new IOException("cannot find future object for wrid " + wc.getWr_id() + ", status " + wc.getStatus() + ", opcount " + opcount + ", wc.qpnum " + wc.getQp_num() + ", this.qp.num " + this.qp.getQp_num() + ", connstate " + this.getConnState() + ", futureMap.size " + futureMap.size()); } } else if (wc.getStatus() == 5){ } else { throw new IOException("error in wc, status " + wc.getStatus()); } }
public void dispatchCqEvent(IbvWC wc) throws IOException { if (wc.getStatus() == 5){ //flush return; } else if (wc.getStatus() != 0){ throw new IOException("Faulty operation! wc.status " + wc.getStatus()); } if (wc.getOpcode() == 128){ //receiving a message int index = (int) wc.getWr_id(); ByteBuffer recvBuffer = recvBufs[index]; int ticket = recvBuffer.getInt(0); recvBuffer.position(4); dispatchReceive(recvBuffer, ticket, index); } else if (wc.getOpcode() == 0) { //send completion int index = (int) wc.getWr_id(); ByteBuffer sendBuffer = sendBufs[index]; int ticket = sendBuffer.getInt(0); dispatchSend(ticket); } else { throw new IOException("Unkown opcode " + wc.getOpcode()); } }
private void dispatchCqEvent(IbvWC wc) throws IOException { if (wc.getStatus() == 5){ // logger.info("flush wc"); } else if (wc.getStatus() != 0){ LOG.info("faulty request, status " + wc.getStatus()); } else { RdmaPassiveFuture future = futureMap.remove(wc.getWr_id()); if (future != null){ future.signal(wc.getStatus()); if (future.isWrite()){ sendQueueAvailable.release(2); } else { sendQueueAvailable.release(); } } else { throw new IOException("cannot find future object for wrid " + wc.getWr_id() + ", status " + wc.getStatus() + ", opcount " + opcount + ", ep " + this.getEndpointId() + ", wc.qpnum " + wc.getQp_num() + ", this.qp.num " + this.qp.getQp_num() + ", connstate " + this.getConnState() + ", futureMap.size " + futureMap.size()); } } }
System.out.println("SimpleClient::message sent, wr_id " + wc.getWr_id());