예제 #1
0
파일: sock_ep_rdm.c 프로젝트: Slbomber/ompi
int sock_rdm_fi_info(void *src_addr, void *dest_addr, struct fi_info *hints,
		     struct fi_info **info)
{
	*info = sock_fi_info(FI_EP_RDM, hints, src_addr, dest_addr);
	if (!*info)
		return -FI_ENOMEM;
	
	*(*info)->tx_attr = sock_rdm_tx_attr;
	*(*info)->rx_attr = sock_rdm_rx_attr;
	*(*info)->ep_attr = sock_rdm_ep_attr;

	if (hints && hints->ep_attr) {
		if (hints->ep_attr->rx_ctx_cnt)
			(*info)->ep_attr->rx_ctx_cnt = hints->ep_attr->rx_ctx_cnt;
		if (hints->ep_attr->tx_ctx_cnt)
			(*info)->ep_attr->tx_ctx_cnt = hints->ep_attr->tx_ctx_cnt;
	}

	if (hints && hints->rx_attr) {
		(*info)->rx_attr->op_flags |= hints->rx_attr->op_flags;
	}

	if (hints && hints->tx_attr) {
		(*info)->tx_attr->op_flags |= hints->tx_attr->op_flags;
	}

	(*info)->caps = SOCK_EP_RDM_CAP |
			(*info)->rx_attr->caps | (*info)->tx_attr->caps;
	return 0;
}
예제 #2
0
파일: sock_ep_rdm.c 프로젝트: ORNL/ompi
int sock_rdm_fi_info(void *src_addr, void *dest_addr, struct fi_info *hints,
		     struct fi_info **info)
{
	*info = sock_fi_info(FI_EP_RDM, hints, src_addr, dest_addr);
	if (!*info)
		return -FI_ENOMEM;
	
	*(*info)->tx_attr = sock_rdm_tx_attr;
	*(*info)->rx_attr = sock_rdm_rx_attr;
	*(*info)->ep_attr = sock_rdm_ep_attr;

	(*info)->caps = SOCK_EP_RDM_CAP |
			(*info)->rx_attr->caps | (*info)->tx_attr->caps;
	return 0;
}
예제 #3
0
static struct fi_info *sock_msg_fi_info(struct fi_info *hints, 
					  void *src_addr, void *dest_addr)
{
	struct fi_info *_info = sock_fi_info(FI_EP_MSG, hints, 
					     src_addr, dest_addr);
	if (!_info)
		return NULL;
	
	_info->caps = SOCK_EP_MSG_CAP;
	*(_info->tx_attr) = sock_msg_tx_attr;
	*(_info->rx_attr) = sock_msg_rx_attr;
	*(_info->ep_attr) = sock_msg_ep_attr;

	_info->caps |= (_info->rx_attr->caps | _info->tx_attr->caps);
	return _info;
}
예제 #4
0
static struct fi_info * sock_ep_msg_process_info(struct sock_conn_req *req)
{
	req->info.src_addr = &req->src_addr;
	req->info.dest_addr = &req->dest_addr;
	req->info.tx_attr = &req->tx_attr;
	req->info.rx_attr = &req->rx_attr;
	req->info.ep_attr = &req->ep_attr;
	req->info.domain_attr = &req->domain_attr;
	req->info.fabric_attr = &req->fabric_attr;
	req->info.domain_attr->name = NULL;
	req->info.fabric_attr->name = NULL;
	req->info.fabric_attr->prov_name = NULL;
	if (sock_verify_info(&req->info)) {
		SOCK_LOG_INFO("incoming conn_req not supported\n");
		errno = EINVAL;
		return NULL;
	}

	return sock_fi_info(FI_EP_MSG, &req->info, 
			    req->info.dest_addr, req->info.src_addr);
}