mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 22:15:13 +08:00
Revert "rdma: Fix res_print_uint() and add res_print_u64()"
This reverts commit 9d0badecea
.
This commit is contained in:
parent
9d0badecea
commit
a42dfaa46e
@ -112,7 +112,7 @@ static int res_cq_line(struct rd *rd, const char *name, int idx,
|
||||
print_dev(rd, idx, name);
|
||||
res_print_uint(rd, "cqn", cqn, nla_line[RDMA_NLDEV_ATTR_RES_CQN]);
|
||||
res_print_uint(rd, "cqe", cqe, nla_line[RDMA_NLDEV_ATTR_RES_CQE]);
|
||||
res_print_u64(rd, "users", users,
|
||||
res_print_uint(rd, "users", users,
|
||||
nla_line[RDMA_NLDEV_ATTR_RES_USECNT]);
|
||||
print_poll_ctx(rd, poll_ctx, nla_line[RDMA_NLDEV_ATTR_RES_POLL_CTX]);
|
||||
print_cq_dim_setting(rd, nla_line[RDMA_NLDEV_ATTR_DEV_DIM]);
|
||||
|
@ -77,7 +77,7 @@ static int res_mr_line(struct rd *rd, const char *name, int idx,
|
||||
print_key(rd, "rkey", rkey, nla_line[RDMA_NLDEV_ATTR_RES_RKEY]);
|
||||
print_key(rd, "lkey", lkey, nla_line[RDMA_NLDEV_ATTR_RES_LKEY]);
|
||||
print_key(rd, "iova", iova, nla_line[RDMA_NLDEV_ATTR_RES_IOVA]);
|
||||
res_print_u64(rd, "mrlen", mrlen, nla_line[RDMA_NLDEV_ATTR_RES_MRLEN]);
|
||||
res_print_uint(rd, "mrlen", mrlen, nla_line[RDMA_NLDEV_ATTR_RES_MRLEN]);
|
||||
res_print_uint(rd, "pdn", pdn, nla_line[RDMA_NLDEV_ATTR_RES_PDN]);
|
||||
res_print_uint(rd, "pid", pid, nla_line[RDMA_NLDEV_ATTR_RES_PID]);
|
||||
print_comm(rd, comm, nla_line);
|
||||
|
@ -65,7 +65,7 @@ static int res_pd_line(struct rd *rd, const char *name, int idx,
|
||||
res_print_uint(rd, "pdn", pdn, nla_line[RDMA_NLDEV_ATTR_RES_PDN]);
|
||||
print_key(rd, "local_dma_lkey", local_dma_lkey,
|
||||
nla_line[RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY]);
|
||||
res_print_u64(rd, "users", users,
|
||||
res_print_uint(rd, "users", users,
|
||||
nla_line[RDMA_NLDEV_ATTR_RES_USECNT]);
|
||||
print_key(rd, "unsafe_global_rkey", unsafe_global_rkey,
|
||||
nla_line[RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY]);
|
||||
|
15
rdma/res.c
15
rdma/res.c
@ -51,7 +51,7 @@ static int res_print_summary(struct rd *rd, struct nlattr **tb)
|
||||
|
||||
name = mnl_attr_get_str(nla_line[RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_NAME]);
|
||||
curr = mnl_attr_get_u64(nla_line[RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR]);
|
||||
res_print_u64(
|
||||
res_print_uint(
|
||||
rd, name, curr,
|
||||
nla_line[RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR]);
|
||||
}
|
||||
@ -208,22 +208,13 @@ void print_key(struct rd *rd, const char *name, uint64_t val,
|
||||
print_color_hex(PRINT_ANY, COLOR_NONE, name, " 0x%" PRIx64 " ", val);
|
||||
}
|
||||
|
||||
void res_print_uint(struct rd *rd, const char *name, uint32_t val,
|
||||
void res_print_uint(struct rd *rd, const char *name, uint64_t val,
|
||||
struct nlattr *nlattr)
|
||||
{
|
||||
if (!nlattr)
|
||||
return;
|
||||
print_color_uint(PRINT_ANY, COLOR_NONE, name, name, val);
|
||||
print_color_uint(PRINT_FP, COLOR_NONE, NULL, " %" PRIu32 " ", val);
|
||||
}
|
||||
|
||||
void res_print_u64(struct rd *rd, const char *name, uint64_t val,
|
||||
struct nlattr *nlattr)
|
||||
{
|
||||
if (!nlattr)
|
||||
return;
|
||||
print_color_u64(PRINT_ANY, COLOR_NONE, name, name, val);
|
||||
print_color_u64(PRINT_FP, COLOR_NONE, NULL, " %" PRIu64 " ", val);
|
||||
print_color_uint(PRINT_FP, COLOR_NONE, NULL, " %d ", val);
|
||||
}
|
||||
|
||||
RES_FUNC(res_no_args, RDMA_NLDEV_CMD_RES_GET, NULL, true, 0);
|
||||
|
@ -188,9 +188,7 @@ void print_link(struct rd *rd, uint32_t idx, const char *name, uint32_t port,
|
||||
struct nlattr **nla_line);
|
||||
void print_key(struct rd *rd, const char *name, uint64_t val,
|
||||
struct nlattr *nlattr);
|
||||
void res_print_uint(struct rd *rd, const char *name, uint32_t val,
|
||||
struct nlattr *nlattr);
|
||||
void res_print_u64(struct rd *rd, const char *name, uint64_t val,
|
||||
void res_print_uint(struct rd *rd, const char *name, uint64_t val,
|
||||
struct nlattr *nlattr);
|
||||
void print_comm(struct rd *rd, const char *str, struct nlattr **nla_line);
|
||||
const char *qp_types_to_str(uint8_t idx);
|
||||
|
@ -210,7 +210,7 @@ int res_get_hwcounters(struct rd *rd, struct nlattr *hwc_table, bool print)
|
||||
v = mnl_attr_get_u64(hw_line[RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_VALUE]);
|
||||
if (rd->pretty_output && !rd->json_output)
|
||||
newline_indent(rd);
|
||||
res_print_u64(rd, nm, v, hw_line[RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_NAME]);
|
||||
res_print_uint(rd, nm, v, hw_line[RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_NAME]);
|
||||
}
|
||||
|
||||
return MNL_CB_OK;
|
||||
@ -283,7 +283,7 @@ static int res_counter_line(struct rd *rd, const char *name, int index,
|
||||
print_color_uint(PRINT_ANY, COLOR_NONE, "cntn", "cntn %u ", cntn);
|
||||
if (nla_line[RDMA_NLDEV_ATTR_RES_TYPE])
|
||||
print_qp_type(rd, qp_type);
|
||||
res_print_u64(rd, "pid", pid, nla_line[RDMA_NLDEV_ATTR_RES_PID]);
|
||||
res_print_uint(rd, "pid", pid, nla_line[RDMA_NLDEV_ATTR_RES_PID]);
|
||||
print_comm(rd, comm, nla_line);
|
||||
res_get_hwcounters(rd, hwc_table, true);
|
||||
isfirst = true;
|
||||
|
Loading…
Reference in New Issue
Block a user