opal/mca/common/libfabric/libfabric/prov/usnic/src/usnic_direct/usd_ib_cmd.c
/*
 * Make the verbs call to destroy a CQ
 */
Make the verbs call to destroy a CQ
Make the verbs call to destroy a CQ
int
usd_ib_cmd_destroy_cq(
    struct usd_device *dev,
    struct usd_cq_impl *cq)
{
    struct ibv_destroy_cq cmd;
    struct ibv_destroy_cq *icp;
    int n;
    memset(&cmd, 0, sizeof(cmd));
    icp = &cmd;
    icp->command = IB_USER_VERBS_CMD_DESTROY_CQ;
    icp->in_words = sizeof(cmd) / 4;
    icp->out_words = 0;
    icp->cq_handle = cq->ucq_handle;
    n = write(dev->ud_ib_dev_fd, &cmd, sizeof(cmd));
    if (n != sizeof(cmd)) {
        return -errno;
    }
    return 0;
}
int usd_ib_cmd_destroy_cq ( struct usd_device * dev , struct usd_cq_impl * cq ) { struct ibv_destroy_cq cmd ; struct ibv_destroy_cq * icp ; int n ; memset ( & cmd , 0 , sizeof ( cmd ) ) ; icp = & cmd ; icp -> command = IB_USER_VERBS_CMD_DESTROY_CQ ; icp -> in_words = sizeof ( cmd ) / 4 ; icp -> out_words = 0 ; icp -> cq_handle = cq -> ucq_handle ; n = write ( dev -> ud_ib_dev_fd , & cmd , sizeof ( cmd ) ) ; if ( n != sizeof ( cmd ) ) { return - errno ; } return 0 ; }
Make the verbs call to destroy a CQ
Make the verbs call to destroy a CQ
/* Issue command to IB driver */