pub fn qp_connect(vid: usize, port: usize, path_rec: &sa_path_rec) -> KernelResult<Option<Arc<RC>>> {
    let remote_service_id = port as u64;
    let ctrl = get_global_rctrl(remote_service_id as usize);
    let ctx = ctrl.get_context();
    // create local qp
    let rc = RC::new_with_srq(
        Default::default(),
        ctx, null_mut(),
        null_mut(),
        ctrl.get_recv_cq(),
    );
    if rc.is_some() {
        let mut qp = rc.unwrap();
        let mrc = unsafe { Arc::get_mut_unchecked(&mut qp) };
        // connect handshake(param `vid` is useless)
        mrc.connect(vid as u64, *path_rec, remote_service_id)?;
        return Ok(Some(qp));
    }
    Ok(None)
}
/// Main func for qp connection in kernel space.
/// The runtime latency of this function should be profiled in a more detailed way.
Main func for qp connection in kernel space.
The runtime latency of this function should be profiled in a more detailed way.
Main func for qp connection in kernel space . The runtime latency of this function should be profiled in a more detailed way .
pub fn qp_connect(vid: usize, port: usize, path_rec: &sa_path_rec) -> KernelResult<Option<Arc<RC>>> {
    let remote_service_id = port as u64;
    let ctrl = get_global_rctrl(remote_service_id as usize);
    let ctx = ctrl.get_context();
    // create local qp
    let rc = RC::new_with_srq(
        Default::default(),
        ctx, null_mut(),
        null_mut(),
        ctrl.get_recv_cq(),
    );
    if rc.is_some() {
        let mut qp = rc.unwrap();
        let mrc = unsafe { Arc::get_mut_unchecked(&mut qp) };
        // connect handshake(param `vid` is useless)
        mrc.connect(vid as u64, *path_rec, remote_service_id)?;
        return Ok(Some(qp));
    }
    Ok(None)
}
pub fn qp_connect ( vid : usize , port : usize , path_rec : & sa_path_rec ) -> KernelResult < Option < Arc < RC > > > { let remote_service_id = port as u64 ; let ctrl = get_global_rctrl ( remote_service_id as usize ) ; let ctx = ctrl . get_context ( ) ; // create local qp let rc = RC :: new_with_srq ( Default :: default ( ) , ctx , null_mut ( ) , null_mut ( ) , ctrl . get_recv_cq ( ) , ) ; if rc . is_some ( ) { let mut qp = rc . unwrap ( ) ; let mrc = unsafe { Arc :: get_mut_unchecked ( & mut qp ) } ; // connect handshake(param `vid` is useless) mrc . connect ( vid as u64 , * path_rec , remote_service_id ) ? ; return Ok ( Some ( qp ) ) ; } Ok ( None ) }
Main func for qp connection in kernel space.
Main func for qp connection in kernel space .
vid
usize
port
usize
path_rec
&sa_path_rec