root/opal/mca/btl/uct/btl_uct_rdma.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. mca_btl_uct_get_rkey

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2014-2018 Los Alamos National Security, LLC. All rights
   4  *                         reserved.
   5  * $COPYRIGHT$
   6  *
   7  * Additional copyrights may follow
   8  *
   9  * $HEADER$
  10  */
  11 
  12 #if !defined(BTL_UCT_RDMA_H)
  13 #define BTL_UCT_RDMA_H
  14 
  15 #include "btl_uct.h"
  16 #include "btl_uct_endpoint.h"
  17 #include "btl_uct_frag.h"
  18 
  19 /**
  20  * @brief allocate a callback structure
  21  */
  22 mca_btl_uct_uct_completion_t *mca_btl_uct_uct_completion_alloc (mca_btl_uct_module_t *btl, mca_btl_base_endpoint_t *endpoint,
  23                                                                 void *local_address, mca_btl_base_registration_handle_t *local_handle,
  24                                                                 mca_btl_uct_device_context_t *dev_context, mca_btl_base_rdma_completion_fn_t cbfunc,
  25                                                                 void *cbcontext, void *cbdata);
  26 /**
  27  * @brief release a callback structure
  28  */
  29 void mca_btl_uct_uct_completion_release (mca_btl_uct_uct_completion_t *comp);
  30 
  31 void mca_btl_uct_uct_completion (uct_completion_t *uct_comp, ucs_status_t status);
  32 
  33 /**
  34  * @brief unpack the registration key and ensure the endpoint is connected
  35  *
  36  * @param[in]    module        uct btl module
  37  * @param[in]    context       device context to use
  38  * @param[in]    endpoint      btl endpoint
  39  * @param[in]    remote_handle buffer containing remote handle data
  40  * @param[inout] rkey          uct registration key bundle
  41  * @param[out]   ep_handle     uct endpoint handle
  42  */
  43 static inline int mca_btl_uct_get_rkey (mca_btl_uct_module_t *module,
  44                                         mca_btl_uct_device_context_t *context,
  45                                         mca_btl_base_endpoint_t *endpoint,
  46                                         mca_btl_base_registration_handle_t *remote_handle,
  47                                         uct_rkey_bundle_t *rkey,
  48                                         uct_ep_h *ep_handle)
  49 {
  50     ucs_status_t ucs_status;
  51     int rc;
  52 
  53     rc = mca_btl_uct_endpoint_check_rdma (module, endpoint, context, ep_handle);
  54     if (OPAL_SUCCESS != rc) {
  55         return rc;
  56     }
  57 
  58     ucs_status = uct_rkey_unpack ((void *) remote_handle, rkey);
  59     return (UCS_OK == ucs_status) ? OPAL_SUCCESS : OPAL_ERROR;
  60 }
  61 
  62 #endif /* !defined(BTL_UCT_RDMA_H) */

/* [<][>][^][v][top][bottom][index][help] */