예제 #1
0
static void fi_tostr_protocol(char *buf, uint32_t protocol)
{
	switch (protocol) {
	CASEENUMSTR(FI_PROTO_UNSPEC);
	CASEENUMSTR(FI_PROTO_RDMA_CM_IB_RC);
	CASEENUMSTR(FI_PROTO_IWARP);
	CASEENUMSTR(FI_PROTO_IB_UD);
	CASEENUMSTR(FI_PROTO_PSMX);
	CASEENUMSTR(FI_PROTO_UDP);
	CASEENUMSTR(FI_PROTO_SOCK_TCP);
	CASEENUMSTR(FI_PROTO_IB_RDM);
	CASEENUMSTR(FI_PROTO_IWARP_RDM);
	CASEENUMSTR(FI_PROTO_GNI);
	CASEENUMSTR(FI_PROTO_RXM);
	CASEENUMSTR(FI_PROTO_RXD);
	CASEENUMSTR(FI_PROTO_MLX);
	CASEENUMSTR(FI_PROTO_NETWORKDIRECT);
	default:
		if (protocol & FI_PROV_SPECIFIC)
			strcatf(buf, "Provider specific");
		else
			strcatf(buf, "Unknown");
		break;
	}
}
예제 #2
0
static void fi_tostr_fabric_attr(char *buf, const struct fi_fabric_attr *attr,
				 const char *prefix)
{
	if (!attr) {
		strcatf(buf, "%sfi_fabric_attr: (null)\n", prefix);
		return;
	}

	strcatf(buf, "%sfi_fabric_attr:\n", prefix);
	strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name);
	strcatf(buf, "%s%sprov_name: %s\n", prefix, TAB, attr->prov_name);
	strcatf(buf, "%s%sprov_version: %d.%d\n", prefix, TAB,
		FI_MAJOR(attr->prov_version), FI_MINOR(attr->prov_version));
}
예제 #3
0
static void fi_tostr_atomic_op(char *buf, enum fi_op op)
{
	switch (op) {
	CASEENUMSTR(FI_MIN);
	CASEENUMSTR(FI_MAX);
	CASEENUMSTR(FI_SUM);
	CASEENUMSTR(FI_PROD);
	CASEENUMSTR(FI_LOR);
	CASEENUMSTR(FI_LAND);
	CASEENUMSTR(FI_BOR);
	CASEENUMSTR(FI_BAND);
	CASEENUMSTR(FI_LXOR);
	CASEENUMSTR(FI_BXOR);
	CASEENUMSTR(FI_ATOMIC_READ);
	CASEENUMSTR(FI_ATOMIC_WRITE);
	CASEENUMSTR(FI_CSWAP);
	CASEENUMSTR(FI_CSWAP_NE);
	CASEENUMSTR(FI_CSWAP_LE);
	CASEENUMSTR(FI_CSWAP_LT);
	CASEENUMSTR(FI_CSWAP_GE);
	CASEENUMSTR(FI_CSWAP_GT);
	CASEENUMSTR(FI_MSWAP);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #4
0
static void fi_tostr_addr_format(char *buf, uint32_t addr_format)
{
	switch (addr_format) {
	CASEENUMSTR(FI_FORMAT_UNSPEC);
	CASEENUMSTR(FI_SOCKADDR);
	CASEENUMSTR(FI_SOCKADDR_IN);
	CASEENUMSTR(FI_SOCKADDR_IN6);
	CASEENUMSTR(FI_SOCKADDR_IB);
	CASEENUMSTR(FI_ADDR_PSMX);
	default:
		if (addr_format & FI_PROV_SPECIFIC)
			strcatf(buf, "Provider specific");
		else
			strcatf(buf, "Unknown");
		break;
	}
}
예제 #5
0
static void fi_tostr_av_type(char *buf, enum fi_av_type type)
{
	switch (type) {
	CASEENUMSTR(FI_AV_MAP);
	CASEENUMSTR(FI_AV_TABLE);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #6
0
static void fi_tostr_progress(char *buf, enum fi_progress progress)
{
	switch (progress) {
	CASEENUMSTR(FI_PROGRESS_UNSPEC);
	CASEENUMSTR(FI_PROGRESS_AUTO);
	CASEENUMSTR(FI_PROGRESS_MANUAL);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #7
0
static void fi_tostr_mr_mode(char *buf, enum fi_mr_mode type)
{
	switch (type) {
	CASEENUMSTR(FI_MR_UNSPEC);
	CASEENUMSTR(FI_MR_BASIC);
	CASEENUMSTR(FI_MR_SCALABLE);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #8
0
static void fi_tostr_resource_mgmt(char *buf, enum fi_resource_mgmt rm)
{
	switch (rm) {
	CASEENUMSTR(FI_RM_UNSPEC);
	CASEENUMSTR(FI_RM_DISABLED);
	CASEENUMSTR(FI_RM_ENABLED);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #9
0
static void fi_tostr_ep_type(char *buf, enum fi_ep_type ep_type)
{
	switch (ep_type) {
	CASEENUMSTR(FI_EP_UNSPEC);
	CASEENUMSTR(FI_EP_MSG);
	CASEENUMSTR(FI_EP_DGRAM);
	CASEENUMSTR(FI_EP_RDM);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #10
0
static void fi_tostr_eq_event(char *buf, int type)
{
	switch (type) {
	CASEENUMSTR(FI_NOTIFY);
	CASEENUMSTR(FI_CONNREQ);
	CASEENUMSTR(FI_CONNECTED);
	CASEENUMSTR(FI_SHUTDOWN);
	CASEENUMSTR(FI_MR_COMPLETE);
	CASEENUMSTR(FI_AV_COMPLETE);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #11
0
static void fi_tostr_threading(char *buf, enum fi_threading threading)
{
	switch (threading) {
	CASEENUMSTR(FI_THREAD_UNSPEC);
	CASEENUMSTR(FI_THREAD_SAFE);
	CASEENUMSTR(FI_THREAD_FID);
	CASEENUMSTR(FI_THREAD_DOMAIN);
	CASEENUMSTR(FI_THREAD_COMPLETION);
	CASEENUMSTR(FI_THREAD_ENDPOINT);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #12
0
파일: netslow.c 프로젝트: shuowen/OpenNT
/*****************************************************************************

    DestroySession

*****************************************************************************/
APIERR DestroySession( const TCHAR * pszServer )
{
    APIERR           err;
    TCHAR            szShare[MAX_PATH];

    strcpyf( szShare, pszServer );
    strcatf( szShare, SZ("\\IPC$") );

    err = NetUseDel( NULL,
                     (LPTSTR)szShare,
                     USE_NOFORCE );

    return err;

}   // DestroySession
예제 #13
0
void
inspect_str(char* buf, view_params* view) {
    view_img* img = view->img;

    int ix = (int)round(((int)view->mouse_x - view->ox) / view->zoom);
    int iy = (int)round(((int)view->mouse_y - view->oy) / view->zoom);

    strcpy(buf, "");
    strcatf(buf, "img: %d x %d @ %d\n", img->w, img->h, img->nc);
    strcatf(buf, "mouse: %4d %4d\n", ix, iy);
    if (ix >= 0 && ix < img->w && iy >= 0 && iy < img->h) {
        float c[4] = { 0, 0, 0, 1 };
        int cb[4] = { 0, 0, 0, 255 };
        memcpy(c, img->pixels + (iy * img->w + ix) * img->nc,
               sizeof(float) * img->nc);
        cb[0] = ym_clamp(
            (int)(255 * pow(2, view->exposure) * pow(c[0], 1 / view->gamma)), 0,
            255);
        cb[1] = ym_clamp(
            (int)(255 * pow(2, view->exposure) * pow(c[1], 1 / view->gamma)), 0,
            255);
        cb[2] = ym_clamp(
            (int)(255 * pow(2, view->exposure) * pow(c[2], 1 / view->gamma)), 0,
            255);
        cb[3] = ym_clamp((int)(255 * c[3]), 0, 255);
        strcatf(buf, "r: %10.4f %3d\n", c[0], cb[0]);
        strcatf(buf, "g: %10.4f %3d\n", c[1], cb[1]);
        strcatf(buf, "b: %10.4f %3d\n", c[2], cb[2]);
        strcatf(buf, "a: %10.4f %3d\n", c[3], cb[3]);
    } else {
        strcatf(buf, "r: %s\n", "-");
        strcatf(buf, "g: %s\n", "-");
        strcatf(buf, "b: %s\n", "-");
        strcatf(buf, "a: %s\n", "-");
    }
}
예제 #14
0
static void fi_tostr_op_type(char *buf, int op_type)
{
	switch (op_type) {
	CASEENUMSTR(FI_OP_RECV);
	CASEENUMSTR(FI_OP_SEND);
	CASEENUMSTR(FI_OP_TRECV);
	CASEENUMSTR(FI_OP_TSEND);
	CASEENUMSTR(FI_OP_READ);
	CASEENUMSTR(FI_OP_WRITE);
	CASEENUMSTR(FI_OP_ATOMIC);
	CASEENUMSTR(FI_OP_FETCH_ATOMIC);
	CASEENUMSTR(FI_OP_COMPARE_ATOMIC);
	CASEENUMSTR(FI_OP_CNTR_SET);
	CASEENUMSTR(FI_OP_CNTR_ADD);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #15
0
static void fi_tostr_addr(char *buf, uint32_t addr_format,
		void *addr)
{
	char *p;
	p = buf + strlen(buf);

	if (addr == NULL) {
		strcatf(p, "(null)");
		return;
	}

	switch (addr_format) {
	case FI_SOCKADDR:
		/* translate and recurse... */
		switch (((struct sockaddr *)addr)->sa_family) {
		case AF_INET:
			fi_tostr_addr(p, FI_SOCKADDR_IN, addr);
			break;
		case AF_INET6:
			fi_tostr_addr(p, FI_SOCKADDR_IN6, addr);
			break;
		default:
			fi_tostr_addr(p, FI_FORMAT_UNSPEC, addr);
			break;
		}
		break;
	case FI_SOCKADDR_IN:
		inet_ntop(AF_INET, &((struct sockaddr_in *)addr)->sin_addr,
			p, 64);
		break;
	case FI_SOCKADDR_IN6:
		inet_ntop(AF_INET6, &((struct sockaddr_in6 *)addr)->sin6_addr,
			p, 64);
		break;
	case FI_ADDR_GNI:  /*TODO: eventually something better */
		sprintf(p, "0x%" PRIx64,*(uint64_t *)addr);
		break;
	default:
		sprintf(p, "%p", addr);
		break;
	}
}
예제 #16
0
static void fi_tostr_atomic_type(char *buf, enum fi_datatype type)
{
	switch (type) {
	CASEENUMSTR(FI_INT8);
	CASEENUMSTR(FI_UINT8);
	CASEENUMSTR(FI_INT16);
	CASEENUMSTR(FI_UINT16);
	CASEENUMSTR(FI_INT32);
	CASEENUMSTR(FI_UINT32);
	CASEENUMSTR(FI_INT64);
	CASEENUMSTR(FI_UINT64);
	CASEENUMSTR(FI_FLOAT);
	CASEENUMSTR(FI_DOUBLE);
	CASEENUMSTR(FI_FLOAT_COMPLEX);
	CASEENUMSTR(FI_DOUBLE_COMPLEX);
	CASEENUMSTR(FI_LONG_DOUBLE);
	CASEENUMSTR(FI_LONG_DOUBLE_COMPLEX);
	default:
		strcatf(buf, "Unknown");
		break;
	}
}
예제 #17
0
파일: netslow.c 프로젝트: shuowen/OpenNT
/*****************************************************************************

    SetupNormalSession

*****************************************************************************/
APIERR SetupNormalSession( const TCHAR * pszServer )
{
    APIERR           err;
    TCHAR            szShare[MAX_PATH];
    USE_INFO_1       ui1;

    strcpyf( szShare, pszServer );
    strcatf( szShare, SZ("\\IPC$") );

    ui1.ui1_local      = NULL;
    ui1.ui1_remote     = (LPTSTR)szShare;
    ui1.ui1_password   = NULL;
    ui1.ui1_asg_type   = USE_IPC;

    err = NetUseAdd( NULL,
                     1,
                     (LPBYTE)&ui1,
                     NULL );

    return err;

}   // SetupNormalSession
예제 #18
0
파일: netslow.c 프로젝트: shuowen/OpenNT
/*****************************************************************************

    SetupNullSession

*****************************************************************************/
APIERR SetupNullSession( const TCHAR * pszServer )
{
    APIERR           err;
    TCHAR            szShare[MAX_PATH];
    USE_INFO_2       ui2;

    strcpyf( szShare, pszServer );
    strcatf( szShare, SZ("\\IPC$") );

    ui2.ui2_local      = NULL;
    ui2.ui2_remote     = (LPTSTR)szShare;
    ui2.ui2_password   = (LPTSTR)L"";
    ui2.ui2_asg_type   = USE_IPC;
    ui2.ui2_username   = (LPTSTR)L"";
    ui2.ui2_domainname = (LPTSTR)L"";

    err = NetUseAdd( NULL,
                     2,
                     (LPBYTE)&ui2,
                     NULL );

    return err;

}   // SetupNullSession
예제 #19
0
char *DEFAULT_SYMVER_PRE(fi_tostr)(const void *data, enum fi_type datatype)
{
	static char *buf = NULL;
	uint64_t val64 = *(const uint64_t *) data;
	uint32_t val32 = *(const uint32_t *) data;
	int enumval = *(const int *) data;

	if (!data)
		return NULL;

	if (!buf) {
		buf = calloc(BUFSIZ, 1);
		if (!buf)
			return NULL;
	}
	buf[0] = '\0';

	switch (datatype) {
	case FI_TYPE_INFO:
		fi_tostr_info(buf, data);
		break;
	case FI_TYPE_EP_TYPE:
		fi_tostr_ep_type(buf, enumval);
		break;
	case FI_TYPE_CAPS:
		fi_tostr_caps(buf, val64);
		break;
	case FI_TYPE_OP_FLAGS:
		fi_tostr_flags(buf, val64);
		break;
	case FI_TYPE_ADDR_FORMAT:
		fi_tostr_addr_format(buf, val32);
		break;
	case FI_TYPE_TX_ATTR:
		fi_tostr_tx_attr(buf, data, "");
		break;
	case FI_TYPE_RX_ATTR:
		fi_tostr_rx_attr(buf, data, "");
		break;
	case FI_TYPE_EP_ATTR:
		fi_tostr_ep_attr(buf, data, "");
		break;
	case FI_TYPE_DOMAIN_ATTR:
		fi_tostr_domain_attr(buf, data, "");
		break;
	case FI_TYPE_FABRIC_ATTR:
		fi_tostr_fabric_attr(buf, data, "");
		break;
	case FI_TYPE_THREADING:
		fi_tostr_threading(buf, enumval);
		break;
	case FI_TYPE_PROGRESS:
		fi_tostr_progress(buf, enumval);
		break;
	case FI_TYPE_PROTOCOL:
		fi_tostr_protocol(buf, val32);
		break;
	case FI_TYPE_MSG_ORDER:
		fi_tostr_order(buf, val64);
		break;
	case FI_TYPE_MODE:
		fi_tostr_mode(buf, val64);
		break;
	case FI_TYPE_AV_TYPE:
		fi_tostr_av_type(buf, enumval);
		break;
	case FI_TYPE_ATOMIC_TYPE:
		fi_tostr_atomic_type(buf, enumval);
		break;
	case FI_TYPE_ATOMIC_OP:
		fi_tostr_atomic_op(buf, enumval);
		break;
	case FI_TYPE_VERSION:
		fi_tostr_version(buf);
		break;
	default:
		strcatf(buf, "Unknown type");
		break;
	}
	return buf;
}
예제 #20
0
static void fi_tostr_version(char *buf)
{
	strcatf(buf, VERSION);
}
예제 #21
0
static void fi_tostr_domain_attr(char *buf, const struct fi_domain_attr *attr,
				 const char *prefix)
{
	if (!attr) {
		strcatf(buf, "%sfi_domain_attr: (null)\n", prefix);
		return;
	}

	strcatf(buf, "%sfi_domain_attr:\n", prefix);

	strcatf(buf, "%s%sdomain: 0x%x\n", prefix, TAB, attr->domain);

	strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name);
	strcatf(buf, "%s%sthreading: ", prefix, TAB);
	fi_tostr_threading(buf, attr->threading);
	strcatf(buf, "\n");

	strcatf(buf, "%s%scontrol_progress: ", prefix,TAB);
	fi_tostr_progress(buf, attr->control_progress);
	strcatf(buf, "\n");
	strcatf(buf, "%s%sdata_progress: ", prefix, TAB);
	fi_tostr_progress(buf, attr->data_progress);
	strcatf(buf, "\n");
	strcatf(buf, "%s%sresource_mgmt: ", prefix, TAB);
	fi_tostr_resource_mgmt(buf, attr->resource_mgmt);
	strcatf(buf, "\n");
	strcatf(buf, "%s%sav_type: ", prefix, TAB);
	fi_tostr_av_type(buf, attr->av_type);
	strcatf(buf, "\n");
	strcatf(buf, "%s%smr_mode: [ ", prefix, TAB);
	fi_tostr_mr_mode(buf, attr->mr_mode);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%smr_key_size: %zd\n", prefix, TAB, attr->mr_key_size);
	strcatf(buf, "%s%scq_data_size: %zd\n", prefix, TAB, attr->cq_data_size);
	strcatf(buf, "%s%scq_cnt: %zd\n", prefix, TAB, attr->cq_cnt);
	strcatf(buf, "%s%sep_cnt: %zd\n", prefix, TAB, attr->ep_cnt);
	strcatf(buf, "%s%stx_ctx_cnt: %zd\n", prefix, TAB, attr->tx_ctx_cnt);
	strcatf(buf, "%s%srx_ctx_cnt: %zd\n", prefix, TAB, attr->rx_ctx_cnt);
	strcatf(buf, "%s%smax_ep_tx_ctx: %zd\n", prefix, TAB, attr->max_ep_tx_ctx);
	strcatf(buf, "%s%smax_ep_rx_ctx: %zd\n", prefix, TAB, attr->max_ep_rx_ctx);
	strcatf(buf, "%s%smax_ep_stx_ctx: %zd\n", prefix, TAB, attr->max_ep_stx_ctx);
	strcatf(buf, "%s%smax_ep_srx_ctx: %zd\n", prefix, TAB, attr->max_ep_srx_ctx);
	strcatf(buf, "%s%scntr_cnt: %zd\n", prefix, TAB, attr->cntr_cnt);
}
예제 #22
0
static void fi_tostr_info(char *buf, const struct fi_info *info)
{
	strcatf(buf, "fi_info:\n");
	strcatf(buf, "%scaps: [ ", TAB);
	fi_tostr_caps(buf, info->caps);
	strcatf(buf, " ]\n");

	strcatf(buf, "%smode: [ ", TAB);
	fi_tostr_mode(buf, info->mode);
	strcatf(buf, " ]\n");

	strcatf(buf, "%sep_type: ", TAB);
	fi_tostr_ep_type(buf, info->ep_type);
	strcatf(buf, "\n");
	strcatf(buf, "%sfi_addr_format: ", TAB);
	fi_tostr_addr_format(buf, info->addr_format);
	strcatf(buf, "\n");

	strcatf(buf, "%ssrc_addrlen: %zd\n", TAB, info->src_addrlen);
	strcatf(buf, "%sdest_addrlen: %zd\n", TAB, info->dest_addrlen);
	strcatf(buf, "%ssrc_addr: ", TAB);
	fi_tostr_addr(buf, info->addr_format, info->src_addr);
	strcatf(buf, "\n");
	strcatf(buf, "%sdest_addr: ", TAB);
	fi_tostr_addr(buf, info->addr_format, info->dest_addr);
	strcatf(buf, "\n");
	strcatf(buf, "%sconnreq: %s\n", TAB, info->connreq);

	fi_tostr_tx_attr(buf, info->tx_attr, TAB);
	fi_tostr_rx_attr(buf, info->rx_attr, TAB);
	fi_tostr_ep_attr(buf, info->ep_attr, TAB);
	fi_tostr_domain_attr(buf, info->domain_attr, TAB);
	fi_tostr_fabric_attr(buf, info->fabric_attr, TAB);
}
예제 #23
0
static void fi_tostr_domain_attr(char *buf, const struct fi_domain_attr *attr,
				 const char *prefix)
{
	if (!attr) {
		strcatf(buf, "%sfi_domain_attr: (null)\n", prefix);
		return;
	}

	strcatf(buf, "%sfi_domain_attr:\n", prefix);
	strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name);
	strcatf(buf, "%s%sthreading: ", prefix, TAB);
	fi_tostr_threading(buf, attr->threading);
	strcatf(buf, "\n");

	strcatf(buf, "%s%scontrol_progress: ", prefix,TAB);
	fi_tostr_progress(buf, attr->control_progress);
	strcatf(buf, "\n");
	strcatf(buf, "%s%sdata_progress: ", prefix, TAB);
	fi_tostr_progress(buf, attr->data_progress);
	strcatf(buf, "\n");

	strcatf(buf, "%s%smr_key_size: %zd\n", prefix, TAB, attr->mr_key_size);
	strcatf(buf, "%s%scq_data_size: %zd\n", prefix, TAB, attr->cq_data_size);
	strcatf(buf, "%s%sep_cnt: %zd\n", prefix, TAB, attr->ep_cnt);
	strcatf(buf, "%s%stx_ctx_cnt: %zd\n", prefix, TAB, attr->tx_ctx_cnt);
	strcatf(buf, "%s%srx_ctx_cnt: %zd\n", prefix, TAB, attr->rx_ctx_cnt);
	strcatf(buf, "%s%smax_ep_tx_ctx: %zd\n", prefix, TAB, attr->max_ep_tx_ctx);
	strcatf(buf, "%s%smax_ep_rx_ctx: %zd\n", prefix, TAB, attr->max_ep_rx_ctx);
}
예제 #24
0
static void fi_tostr_ep_attr(char *buf, const struct fi_ep_attr *attr, const char *prefix)
{
	if (!attr) {
		strcatf(buf, "%sfi_ep_attr: (null)\n", prefix);
		return;
	}

	strcatf(buf, "%sfi_ep_attr:\n", prefix);
	strcatf(buf, "%s%sprotocol: ", prefix, TAB);
	fi_tostr_protocol(buf, attr->protocol);
	strcatf(buf, "\n");
	strcatf(buf, "%s%smax_msg_size: %zd\n", prefix, TAB, attr->max_msg_size);
	strcatf(buf, "%s%sinject_size: %zd\n", prefix, TAB, attr->inject_size);
	strcatf(buf, "%s%stotal_buffered_recv: %zd\n", prefix, TAB, attr->total_buffered_recv);
	strcatf(buf, "%s%smax_order_raw_size: %zd\n", prefix, TAB, attr->max_order_raw_size);
	strcatf(buf, "%s%smax_order_war_size: %zd\n", prefix, TAB, attr->max_order_war_size);
	strcatf(buf, "%s%smax_order_waw_size: %zd\n", prefix, TAB, attr->max_order_waw_size);
	strcatf(buf, "%s%smem_tag_format: 0x%016llx\n", prefix, TAB, attr->mem_tag_format);

	strcatf(buf, "%s%smsg_order: [ ", prefix, TAB);
	fi_tostr_order(buf, attr->msg_order);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%stx_ctx_cnt: %zd\n", prefix, TAB, attr->tx_ctx_cnt);
	strcatf(buf, "%s%srx_ctx_cnt: %zd\n", prefix, TAB, attr->rx_ctx_cnt);
}
예제 #25
0
static void fi_tostr_rx_attr(char *buf, const struct fi_rx_attr *attr,
			     const char *prefix)
{
	if (!attr) {
		strcatf(buf, "%sfi_rx_attr: (null)\n", prefix);
		return;
	}

	strcatf(buf, "%sfi_rx_attr:\n", prefix);
	strcatf(buf, "%s%scaps: [ ", prefix, TAB);
	fi_tostr_caps(buf, attr->caps);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%sop_flags: [ ", prefix, TAB);
	fi_tostr_flags(buf, attr->op_flags);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%smsg_order: [ ", prefix, TAB);
	fi_tostr_order(buf, attr->msg_order);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%stotal_buffered_recv: %zd\n", prefix, TAB, attr->total_buffered_recv);
	strcatf(buf, "%s%ssize: %zd\n", prefix, TAB, attr->size);
	strcatf(buf, "%s%siov_limit: %zd\n", prefix, TAB, attr->iov_limit);
}
예제 #26
0
static void fi_tostr_tx_attr(char *buf, const struct fi_tx_attr *attr,
			     const char *prefix)
{
	if (!attr) {
		strcatf(buf, "%sfi_tx_attr: (null)\n", prefix);
		return;
	}

	strcatf(buf, "%sfi_tx_attr:\n", prefix);
	strcatf(buf, "%s%scaps: [ ", prefix, TAB);
	fi_tostr_caps(buf, attr->caps);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%smode: [ ", prefix, TAB);
	fi_tostr_mode(buf, attr->mode);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%sop_flags: [ ", prefix, TAB);
	fi_tostr_flags(buf, attr->op_flags);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%smsg_order: [ ", prefix, TAB);
	fi_tostr_order(buf, attr->msg_order);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%scomp_order: [ ", prefix, TAB);
	fi_tostr_order(buf, attr->comp_order);
	strcatf(buf, " ]\n");

	strcatf(buf, "%s%sinject_size: %zd\n", prefix, TAB, attr->inject_size);
	strcatf(buf, "%s%ssize: %zd\n", prefix, TAB, attr->size);
	strcatf(buf, "%s%siov_limit: %zd\n", prefix, TAB, attr->iov_limit);
	strcatf(buf, "%s%srma_iov_limit: %zd\n", prefix, TAB, attr->rma_iov_limit);
}
예제 #27
0
static void fi_tostr_ep_attr(char *buf, const struct fi_ep_attr *attr, const char *prefix)
{
	if (!attr) {
		strcatf(buf, "%sfi_ep_attr: (null)\n", prefix);
		return;
	}

	strcatf(buf, "%sfi_ep_attr:\n", prefix);
	strcatf(buf, "%s%stype: ", prefix, TAB);
	fi_tostr_ep_type(buf, attr->type);
	strcatf(buf, "\n");
	strcatf(buf, "%s%sprotocol: ", prefix, TAB);
	fi_tostr_protocol(buf, attr->protocol);
	strcatf(buf, "\n");
	strcatf(buf, "%s%sprotocol_version: %d\n", prefix, TAB, attr->protocol_version);
	strcatf(buf, "%s%smax_msg_size: %zd\n", prefix, TAB, attr->max_msg_size);
	strcatf(buf, "%s%smsg_prefix_size: %zd\n", prefix, TAB, attr->msg_prefix_size);
	strcatf(buf, "%s%smax_order_raw_size: %zd\n", prefix, TAB, attr->max_order_raw_size);
	strcatf(buf, "%s%smax_order_war_size: %zd\n", prefix, TAB, attr->max_order_war_size);
	strcatf(buf, "%s%smax_order_waw_size: %zd\n", prefix, TAB, attr->max_order_waw_size);
	strcatf(buf, "%s%smem_tag_format: 0x%016llx\n", prefix, TAB, attr->mem_tag_format);

	strcatf(buf, "%s%stx_ctx_cnt: %zd\n", prefix, TAB, attr->tx_ctx_cnt);
	strcatf(buf, "%s%srx_ctx_cnt: %zd\n", prefix, TAB, attr->rx_ctx_cnt);
}