public IbvWC clone(){ IbvWC wc = new IbvWC(); wc.byte_len = this.byte_len; wc.diff = this.diff; wc.dlid_path_bits = this.dlid_path_bits; wc.err = this.err; wc.imm_data = this.imm_data; wc.isSend = this.isSend; wc.opcode = this.opcode; wc.pkey_index = this.pkey_index; wc.qp_num = this.qp_num; wc.sl = this.sl; wc.slid = this.slid; wc.wc_flags = this.wc_flags; wc.status = this.status; wc.wqIndex = this.wqIndex; wc.wr_id = this.wr_id; return wc; }
public RdmaCqProcessor(IbvContext context, int cqSize, int wrSize, long affinity, int clusterId, int timeout, boolean polling) throws IOException { super(context, cqSize); this.clusterId = clusterId; this.affinity = affinity; this.running = false; this.wrSize = Math.min(cqSize, wrSize); this.wcList = new IbvWC[this.wrSize]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC(); } this.blocking = !polling; this.ackCounter = 0; this.reqNotify = cq.reqNotification(false); this.poll = cq.poll(wcList, wcList.length); this.timeout = timeout; if (blocking){ reqNotify.execute(); } this.qpMap = new ConcurrentHashMap<Integer, C>(); this.thread = new Thread(this); }
private SVCPollCq getPollCqCall(int size) throws Exception{ if (!CachingON || pollCqCall == null || !pollCqCall.isValid()) { wcList = new IbvWC[size]; for (int i = 0; i < size; i++){ wcList[i] = new IbvWC(); } pollCqCall = cq.poll(wcList, size); } return pollCqCall; } }
@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); } IbvCQ cq = getCqProvider().getCQ(); this.wcList = new IbvWC[getCqProvider().getCqSize()]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC(); } this.poll = cq.poll(wcList, wcList.length); }
@Override public void init() throws IOException { super.init(); IbvCQ cq = getCqProvider().getCQ(); this.wcList = new IbvWC[getCqProvider().getCqSize()]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC(); } this.poll = cq.poll(wcList, wcList.length); }
@Override protected synchronized void init() throws IOException { super.init(); IbvCQ cq = getCqProvider().getCQ(); this.wcList = new IbvWC[getCqProvider().getCqSize()]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC(); } this.poll = cq.poll(wcList, wcList.length); for(int i = 0; i < pipelineLength; i++){ recvBufs[i] = ByteBuffer.allocateDirect(bufferSize); sendBufs[i] = ByteBuffer.allocateDirect(bufferSize); this.recvCall[i] = setupRecvTask(recvBufs[i], i); this.sendCall[i] = setupSendTask(sendBufs[i], i); } }
@Override protected synchronized void init() throws IOException { super.init(); IbvCQ cq = getCqProvider().getCQ(); this.wcList = new IbvWC[getCqProvider().getCqSize()]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC(); } this.poll = cq.poll(wcList, wcList.length); for(int i = 0; i < pipelineLength; i++){ recvBufs[i] = ByteBuffer.allocateDirect(bufferSize); sendBufs[i] = ByteBuffer.allocateDirect(bufferSize); this.recvCall[i] = setupRecvTask(recvBufs[i], i); this.sendCall[i] = setupSendTask(sendBufs[i], i); } this.installRecvs(pipelineLength); }
this.wcList = new IbvWC[getCqProvider().getCqSize()]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC();