@@ -15,7 +15,8 @@
#define _HR_REG_CFG(type, h, l) _HR_REG_MASK(h, l), l
#define HR_REG_CFG(field) _HR_REG_CFG(field)
-static int hns_roce_fill_cq(struct sk_buff *msg,
+static int hns_roce_fill_cq(struct hns_roce_cq *hr_cq,
+ struct sk_buff *msg,
struct hns_roce_v2_cq_context *context)
{
static struct {
@@ -24,8 +25,11 @@ static int hns_roce_fill_cq(struct sk_buff *msg,
u32 l;
} reg[] = {
{ "cq_st", HR_REG_CFG(CQC_CQ_ST) },
+ { "arm_st", HR_REG_CFG(CQC_ARM_ST) },
+ { "shift", HR_REG_CFG(CQC_SHIFT) },
{ "ceqn", HR_REG_CFG(CQC_CEQN) },
{ "cqn", HR_REG_CFG(CQC_CQN) },
+ { "cqe_size", HR_REG_CFG(CQC_CQE_SIZE) },
{ "hopnum", HR_REG_CFG(CQC_CQE_HOP_NUM) },
{ "pi", HR_REG_CFG(CQC_CQ_PRODUCER_IDX) },
{ "ci", HR_REG_CFG(CQC_CQ_CONSUMER_IDX) },
@@ -43,6 +47,9 @@ static int hns_roce_fill_cq(struct sk_buff *msg,
(reg[i].l % 32)))
goto err;
+ if (rdma_nl_put_driver_u32_hex(msg, "soft_cq_ci", hr_cq->cons_index))
+ goto err;
+
return 0;
err:
@@ -68,7 +75,7 @@ int hns_roce_fill_res_cq_entry(struct sk_buff *msg, struct ib_cq *ibcq)
if (!table_attr)
return -EMSGSIZE;
- if (hns_roce_fill_cq(msg, &context))
+ if (hns_roce_fill_cq(hr_cq, msg, &context))
goto err_cancel_table;
nla_nest_end(msg, table_attr);
Add arm_st, shift and cqe_size of CQ. Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> --- drivers/infiniband/hw/hns/hns_roce_restrack.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)