Commit b8492112 authored by Aya Levin's avatar Aya Levin Committed by Saeed Mahameed

net/mlx5e: Enhance ICOSQ data on RX reporter's diagnose

When the RQ is in striding RQ mode, it uses the ICOSQ as a helper queue.
In this mode, RX reporter dumps more info about the ICOSQ and its
related CQ.

$ devlink health diagnose pci/0000:00:0b.0 reporter rx
Common config:
    RQ:
      type: 2 stride size: 2048 size: 8
      CQ:
        stride size: 64 size: 1024
RQs:
    channel ix: 0 rqn: 2413 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7
    CQ:
      cqn: 1032 HW status: 0 ci: 0 size: 1024
    EQ:
      eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048
    ICOSQ:
      sqn: 2411 HW state: 1 cc: 74 pc: 74 WQE size: 128
      CQ:
        cqn: 1029 cc: 8 size: 128
    channel ix: 1 rqn: 2418 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7
    CQ:
      cqn: 1036 HW status: 0 ci: 0 size: 1024
    EQ:
      eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048
    ICOSQ:
      sqn: 2416 HW state: 1 cc: 74 pc: 74 WQE size: 128
      CQ:
        cqn: 1033 cc: 8 size: 128
Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 56837c2a
......@@ -177,6 +177,59 @@ static int mlx5e_rx_reporter_recover(struct devlink_health_reporter *reporter,
mlx5e_health_recover_channels(priv);
}
static int mlx5e_reporter_icosq_diagnose(struct mlx5e_icosq *icosq, u8 hw_state,
struct devlink_fmsg *fmsg)
{
int err;
err = mlx5e_health_fmsg_named_obj_nest_start(fmsg, "ICOSQ");
if (err)
return err;
err = devlink_fmsg_u32_pair_put(fmsg, "sqn", icosq->sqn);
if (err)
return err;
err = devlink_fmsg_u8_pair_put(fmsg, "HW state", hw_state);
if (err)
return err;
err = devlink_fmsg_u32_pair_put(fmsg, "cc", icosq->cc);
if (err)
return err;
err = devlink_fmsg_u32_pair_put(fmsg, "pc", icosq->pc);
if (err)
return err;
err = devlink_fmsg_u32_pair_put(fmsg, "WQE size",
mlx5_wq_cyc_get_size(&icosq->wq));
if (err)
return err;
err = mlx5e_health_fmsg_named_obj_nest_start(fmsg, "CQ");
if (err)
return err;
err = devlink_fmsg_u32_pair_put(fmsg, "cqn", icosq->cq.mcq.cqn);
if (err)
return err;
err = devlink_fmsg_u32_pair_put(fmsg, "cc", icosq->cq.wq.cc);
if (err)
return err;
err = devlink_fmsg_u32_pair_put(fmsg, "size", mlx5_cqwq_get_size(&icosq->cq.wq));
if (err)
return err;
err = mlx5e_health_fmsg_named_obj_nest_end(fmsg);
if (err)
return err;
return mlx5e_health_fmsg_named_obj_nest_end(fmsg);
}
static int mlx5e_rx_reporter_build_diagnose_output(struct mlx5e_rq *rq,
struct devlink_fmsg *fmsg)
{
......@@ -234,15 +287,15 @@ static int mlx5e_rx_reporter_build_diagnose_output(struct mlx5e_rq *rq,
if (err)
return err;
err = devlink_fmsg_u8_pair_put(fmsg, "ICOSQ HW state", icosq_hw_state);
err = mlx5e_health_cq_diag_fmsg(&rq->cq, fmsg);
if (err)
return err;
err = mlx5e_health_cq_diag_fmsg(&rq->cq, fmsg);
err = mlx5e_health_eq_diag_fmsg(rq->cq.mcq.eq, fmsg);
if (err)
return err;
err = mlx5e_health_eq_diag_fmsg(rq->cq.mcq.eq, fmsg);
err = mlx5e_reporter_icosq_diagnose(icosq, icosq_hw_state, fmsg);
if (err)
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment