Beispiel #1
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);
}
Beispiel #2
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);
}
Beispiel #3
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;
}