@@ -39,9 +39,21 @@ static void print_cq_dim_setting(struct rd *rd, struct nlattr *attr)
print_on_off(rd, "adaptive-moderation", dim_setting);
}
+static bool resp_is_valid(struct nlattr **nla_line, bool raw)
+{
+ if (raw)
+ return nla_line[RDMA_NLDEV_ATTR_RES_RAW] ? true : false;
+
+ if (!nla_line[RDMA_NLDEV_ATTR_RES_CQE] ||
+ !nla_line[RDMA_NLDEV_ATTR_RES_USECNT])
+ return false;
+ return true;
+}
+
static int res_cq_line(struct rd *rd, const char *name, int idx,
struct nlattr **nla_line)
{
+ bool raw = rd->show_raw;
char *comm = NULL;
uint32_t pid = 0;
uint8_t poll_ctx = 0;
@@ -50,8 +62,7 @@ static int res_cq_line(struct rd *rd, const char *name, int idx,
uint64_t users;
uint32_t cqe;
- if (!nla_line[RDMA_NLDEV_ATTR_RES_CQE] ||
- !nla_line[RDMA_NLDEV_ATTR_RES_USECNT])
+ if (!resp_is_valid(nla_line, raw))
return MNL_CB_ERROR;
cqe = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_CQE]);
@@ -107,6 +118,7 @@ static int res_cq_line(struct rd *rd, const char *name, int idx,
print_comm(rd, comm, nla_line);
print_driver_table(rd, nla_line[RDMA_NLDEV_ATTR_DRIVER]);
+ print_raw_data(rd, nla_line);
newline(rd);
out: if (nla_line[RDMA_NLDEV_ATTR_RES_PID])