17/12/2021 10:20, Anoob Joseph:
> Print more info when command timeout happens. Print software and
> hardware queue information.
> 
> Signed-off-by: Anoob Joseph <ano...@marvell.com>
> Signed-off-by: Tejasree Kondoj <ktejas...@marvell.com>
> ---
> +void
> +cnxk_cpt_dump_on_err(struct cnxk_cpt_qp *qp)
> +{
> +     struct pending_queue *pend_q = &qp->pend_q;
> +     uint64_t inflight, enq_ptr, deq_ptr, insts;
> +     union cpt_lf_q_inst_ptr inst_ptr;
> +     union cpt_lf_inprog lf_inprog;
> +
> +     plt_print("Lcore ID: %d, LF/QP ID: %d", rte_lcore_id(), qp->lf.lf_id);
> +     plt_print("");
> +     plt_print("S/w pending queue:");
> +     plt_print("\tHead: %ld", pend_q->head);
> +     plt_print("\tTail: %ld", pend_q->tail);
> +     plt_print("\tMask: 0x%lx", pend_q->pq_mask);
> +     plt_print("\tInflight count: %ld",
> +               pending_queue_infl_cnt(pend_q->head, pend_q->tail,
> +                                      pend_q->pq_mask));
> +
> +     plt_print("");
> +     plt_print("H/w pending queue:");
> +
> +     lf_inprog.u = plt_read64(qp->lf.rbase + CPT_LF_INPROG);
> +     inflight = lf_inprog.s.inflight;
> +     plt_print("\tInflight in engines: %ld", inflight);
> +
> +     inst_ptr.u = plt_read64(qp->lf.rbase + CPT_LF_Q_INST_PTR);
> +
> +     enq_ptr = inst_ptr.s.nq_ptr;
> +     deq_ptr = inst_ptr.s.dq_ptr;
> +
> +     if (enq_ptr >= deq_ptr)
> +             insts = enq_ptr - deq_ptr;
> +     else
> +             insts = (enq_ptr + pend_q->pq_mask + 1 + 320 + 40) - deq_ptr;
> +
> +     plt_print("\tNQ ptr: 0x%lx", enq_ptr);
> +     plt_print("\tDQ ptr: 0x%lx", deq_ptr);
> +     plt_print("Insts waiting in CPT: %ld", insts);
> +
> +     plt_print("");
> +     roc_cpt_afs_print(qp->lf.roc_cpt);
> +}

This functions is wrong. You cannot print 64-bit values with %l.
In 32-bit mode, compilation will fail.
Please use PRIx64.

Note: this mistake is warned by the script devtools/checkpatches.sh
  Warning in drivers/crypto/cnxk/cnxk_cryptodev_ops.c:
  Using %l format, prefer %PRI*64 if type is [u]int64_t

I will wait for the next-crypto tree to be fixed.


Reply via email to