public RdmaCmId getContext() { return super.getIdPriv(); }
public void allocateResources(C endpoint) throws Exception { endpoint.allocateResources(); }
@Override public void close() throws IOException, InterruptedException { super.close(); }
@Override protected synchronized void init() throws IOException { super.init(); for (int i = 0; i < RdmaConstants.STORAGE_RDMA_QUEUESIZE; i++){ SVCPostSend write = initWriteOp(); writeOps.add(write); SVCPostSend read = initReadOp(); readOps.add(read); } }
public IbvQP createQpProvider(C endpoint) throws IOException{ IbvContext context = endpoint.getIdPriv().getVerbs(); RdmaActiveCqProcessor<C> cqProcessor = cqMap.get(context.getCmd_fd()); IbvCQ cq = cqProcessor.getCQ(); IbvQPInitAttr attr = new IbvQPInitAttr(); attr.cap().setMax_recv_sge(maxSge); attr.cap().setMax_recv_wr(maxWR); attr.cap().setMax_send_sge(maxSge); attr.cap().setMax_send_wr(maxWR); attr.setQp_type(IbvQP.IBV_QPT_RC); attr.setRecv_cq(cq); attr.setSend_cq(cq); IbvQP qp = endpoint.getIdPriv().createQP(endpoint.getPd(), attr); logger.info("registering endpoint with cq"); cqProcessor.registerQP(qp.getQp_num(), endpoint); return qp; }
@Override public void dispatchCqEvent(C endpoint, IbvWC wc) throws IOException { endpoint.dispatchCqEvent(wc); } }
public String getAddress() throws IOException { return super.getDstAddr().toString(); }
public void init() throws IOException{ super.init();
@Override protected synchronized void init() throws IOException { super.init(); for (int i = 0; i < 3; i++){ mrlist[i] = registerMemory(buffers[i]).execute().free().getMr();
public RdmaCqProvider createCqProvider(C endpoint) throws IOException { logger.info("setting up cq processor"); IbvContext context = endpoint.getIdPriv().getVerbs(); if (context != null) { logger.info("setting up cq processor, context found"); RdmaActiveCqProcessor<C> cqProcessor = null; int key = context.getCmd_fd(); if (!cqMap.containsKey(key)) { cqProcessor = new RdmaActiveCqProcessor<C>(context, cqSize, maxWR, 0, 1, timeout, polling); cqMap.put(context.getCmd_fd(), cqProcessor); cqProcessor.start(); } cqProcessor = cqMap.get(context.getCmd_fd()); return cqProcessor; } else { throw new IOException("setting up cq processor, no context found"); } }
public void init() throws IOException{ super.init();
public void init() throws IOException{ super.init();
public void init() throws IOException{ super.init(); for (int i = 0; i < buffercount; i++){ mrlist[i] = registerMemory(buffers[i]).execute().free().getMr(); } this.dataBuf = buffers[0]; this.dataMr = mrlist[0]; this.sendBuf = buffers[1]; this.sendMr = mrlist[1]; this.recvBuf = buffers[2]; this.recvMr = mrlist[2]; sgeSend.setAddr(sendMr.getAddr()); sgeSend.setLength(sendMr.getLength()); sgeSend.setLkey(sendMr.getLkey()); sgeList.add(sgeSend); sendWR.setWr_id(2000); sendWR.setSg_list(sgeList); sendWR.setOpcode(IbvSendWR.IBV_WR_SEND); sendWR.setSend_flags(IbvSendWR.IBV_SEND_SIGNALED); wrList_send.add(sendWR); sgeRecv.setAddr(recvMr.getAddr()); sgeRecv.setLength(recvMr.getLength()); int lkey = recvMr.getLkey(); sgeRecv.setLkey(lkey); sgeListRecv.add(sgeRecv); recvWR.setSg_list(sgeListRecv); recvWR.setWr_id(2001); wrList_recv.add(recvWR); this.postRecv(wrList_recv).execute(); }