protected synchronized IbvQP createQP(RdmaCmId id, IbvPd pd, IbvCQ cq) throws IOException{ IbvQPInitAttr attr = new IbvQPInitAttr(); attr.cap().setMax_recv_wr(recvQueueSize); attr.cap().setMax_send_wr(sendQueueSize); attr.cap().setMax_recv_sge(1); attr.cap().setMax_send_sge(1); attr.cap().setMax_inline_data(maxInline); attr.setQp_type(IbvQP.IBV_QPT_RC); attr.setRecv_cq(cq); attr.setSend_cq(cq); IbvQP qp = id.createQP(pd, attr); return qp; }
public RdmaCmEvent(int event, RdmaCmId listenId, RdmaCmId clientId) throws IOException { this.cm = RdmaCm.open(); this.event = event; this.status = -1; this.listenIdPriv = listenId; this.connIdPriv = clientId; this.conn = new RdmaConnParam(); }
private SVCReqNotify getReqNotifyCall() throws Exception{ if (!CachingON || reqNotifyCall == null || !reqNotifyCall.isValid()) { reqNotifyCall = cq.reqNotification(false); } return reqNotifyCall; }
/** * Register memory on this endpoint. * * @param buffer the buffer to be registered. The buffer needs to represent off-heap memory. * @return a stateful verb call (SVC) ready to execute the memory registration. * @throws Exception on failure */ public SVCRegMr registerMemory(ByteBuffer buffer) throws IOException { return pd.regMr(buffer, access); }
RdmaCmId createId(short rdmaPsTcp) throws IOException { RdmaCmId idPriv = cmChannel.createId(RdmaCm.RDMA_PS_TCP); return idPriv; } }
/** * Retrieves the version of jVerbs * @throws IOException */ public static int getVersion() { int version = 0; try { version = RdmaProvider.provider().getVersion(); } catch(Exception e){ } return version; }
public IbvPd(IbvContext context) throws IOException { this.verbs = RdmaVerbs.open(); this.context = context; this.isOpen = true; }
/** * Gets the dst addr of this endpoint. * * @return the dst addr * @throws Exception the exception */ public SocketAddress getDstAddr() throws IOException { return idPriv.getDestination(); }
/** * Gets the src addr of this endpoint. * * @return the src addr. * @throws Exception the exception */ public SocketAddress getSrcAddr() throws IOException{ return idPriv.getSource(); }
/** * Register memory on this endpoint. * * @param buffer the buffer to be registered. The buffer needs to represent off-heap memory. * @return a stateful verb call (SVC) ready to execute the memory registration. * @throws Exception on failure */ public SVCRegMr registerMemory(ByteBuffer buffer) throws IOException { return pd.regMr(buffer, access); }
public IbvQP(int qpnum) throws IOException { this.verbs = RdmaVerbs.open(); this.qp_num = qpnum; this.isOpen = true; }