From: Wojciech Drewek <wojciech.drewek@intel.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: <sgoutham@marvell.com>, <gakula@marvell.com>,
<sbhatta@marvell.com>, <hkelam@marvell.com>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>
Subject: Re: [PATCH net v1 2/2] octeontx2-pf: Fix holes in error code
Date: Fri, 27 Oct 2023 12:09:35 +0200 [thread overview]
Message-ID: <46cbc7d8-7d1b-4307-95b2-d8f62dd57824@intel.com> (raw)
In-Reply-To: <20231027021953.1819959-2-rkannoth@marvell.com>
On 27.10.2023 04:19, Ratheesh Kannoth wrote:
> Error code strings are not getting printed properly
> due to holes. Print error code as well.
>
> Fixes: 51afe9026d0c ("octeontx2-pf: NIX TX overwrites SQ_CTX_HW_S[SQ_INT]")
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
>
> ---
> ChangeLog:
>
> v0 -> v1: Splitted patch into two
> ---
> .../ethernet/marvell/octeontx2/nic/otx2_pf.c | 80 +++++++++++--------
> 1 file changed, 46 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> index 6daf4d58c25d..125fe231702a 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> @@ -1193,31 +1193,32 @@ static char *nix_mnqerr_e_str[NIX_MNQERR_MAX] = {
> };
>
> static char *nix_snd_status_e_str[NIX_SND_STATUS_MAX] = {
> - "NIX_SND_STATUS_GOOD",
> - "NIX_SND_STATUS_SQ_CTX_FAULT",
> - "NIX_SND_STATUS_SQ_CTX_POISON",
> - "NIX_SND_STATUS_SQB_FAULT",
> - "NIX_SND_STATUS_SQB_POISON",
> - "NIX_SND_STATUS_HDR_ERR",
> - "NIX_SND_STATUS_EXT_ERR",
> - "NIX_SND_STATUS_JUMP_FAULT",
> - "NIX_SND_STATUS_JUMP_POISON",
> - "NIX_SND_STATUS_CRC_ERR",
> - "NIX_SND_STATUS_IMM_ERR",
> - "NIX_SND_STATUS_SG_ERR",
> - "NIX_SND_STATUS_MEM_ERR",
> - "NIX_SND_STATUS_INVALID_SUBDC",
> - "NIX_SND_STATUS_SUBDC_ORDER_ERR",
> - "NIX_SND_STATUS_DATA_FAULT",
> - "NIX_SND_STATUS_DATA_POISON",
> - "NIX_SND_STATUS_NPC_DROP_ACTION",
> - "NIX_SND_STATUS_LOCK_VIOL",
> - "NIX_SND_STATUS_NPC_UCAST_CHAN_ERR",
> - "NIX_SND_STATUS_NPC_MCAST_CHAN_ERR",
> - "NIX_SND_STATUS_NPC_MCAST_ABORT",
> - "NIX_SND_STATUS_NPC_VTAG_PTR_ERR",
> - "NIX_SND_STATUS_NPC_VTAG_SIZE_ERR",
> - "NIX_SND_STATUS_SEND_STATS_ERR",
> + [NIX_SND_STATUS_GOOD] = "NIX_SND_STATUS_GOOD",
> + [NIX_SND_STATUS_SQ_CTX_FAULT] = "NIX_SND_STATUS_SQ_CTX_FAULT",
> + [NIX_SND_STATUS_SQ_CTX_POISON] = "NIX_SND_STATUS_SQ_CTX_POISON",
> + [NIX_SND_STATUS_SQB_FAULT] = "NIX_SND_STATUS_SQB_FAULT",
> + [NIX_SND_STATUS_SQB_POISON] = "NIX_SND_STATUS_SQB_POISON",
> + [NIX_SND_STATUS_HDR_ERR] = "NIX_SND_STATUS_HDR_ERR",
> + [NIX_SND_STATUS_EXT_ERR] = "NIX_SND_STATUS_EXT_ERR",
> + [NIX_SND_STATUS_JUMP_FAULT] = "NIX_SND_STATUS_JUMP_FAULT",
> + [NIX_SND_STATUS_JUMP_POISON] = "NIX_SND_STATUS_JUMP_POISON",
> + [NIX_SND_STATUS_CRC_ERR] = "NIX_SND_STATUS_CRC_ERR",
> + [NIX_SND_STATUS_IMM_ERR] = "NIX_SND_STATUS_IMM_ERR",
> + [NIX_SND_STATUS_SG_ERR] = "NIX_SND_STATUS_SG_ERR",
> + [NIX_SND_STATUS_MEM_ERR] = "NIX_SND_STATUS_MEM_ERR",
> + [NIX_SND_STATUS_INVALID_SUBDC] = "NIX_SND_STATUS_INVALID_SUBDC",
> + [NIX_SND_STATUS_SUBDC_ORDER_ERR] = "NIX_SND_STATUS_SUBDC_ORDER_ERR",
> + [NIX_SND_STATUS_DATA_FAULT] = "NIX_SND_STATUS_DATA_FAULT",
> + [NIX_SND_STATUS_DATA_POISON] = "NIX_SND_STATUS_DATA_POISON",
> + [NIX_SND_STATUS_NPC_DROP_ACTION] = "NIX_SND_STATUS_NPC_DROP_ACTION",
> + [NIX_SND_STATUS_LOCK_VIOL] = "NIX_SND_STATUS_LOCK_VIOL",
> + [NIX_SND_STATUS_NPC_UCAST_CHAN_ERR] = "NIX_SND_STAT_NPC_UCAST_CHAN_ERR",
> + [NIX_SND_STATUS_NPC_MCAST_CHAN_ERR] = "NIX_SND_STAT_NPC_MCAST_CHAN_ERR",
> + [NIX_SND_STATUS_NPC_MCAST_ABORT] = "NIX_SND_STATUS_NPC_MCAST_ABORT",
> + [NIX_SND_STATUS_NPC_VTAG_PTR_ERR] = "NIX_SND_STATUS_NPC_VTAG_PTR_ERR",
> + [NIX_SND_STATUS_NPC_VTAG_SIZE_ERR] = "NIX_SND_STATUS_NPC_VTAG_SIZE_ERR",
> + [NIX_SND_STATUS_SEND_MEM_FAULT] = "NIX_SND_STATUS_SEND_MEM_FAULT",
> + [NIX_SND_STATUS_SEND_STATS_ERR] = "NIX_SND_STATUS_SEND_STATS_ERR",
> };
>
> static irqreturn_t otx2_q_intr_handler(int irq, void *data)
> @@ -1238,14 +1239,16 @@ static irqreturn_t otx2_q_intr_handler(int irq, void *data)
> continue;
>
> if (val & BIT_ULL(42)) {
> - netdev_err(pf->netdev, "CQ%lld: error reading NIX_LF_CQ_OP_INT, NIX_LF_ERR_INT 0x%llx\n",
> + netdev_err(pf->netdev,
> + "CQ%lld: error reading NIX_LF_CQ_OP_INT, NIX_LF_ERR_INT 0x%llx\n",
> qidx, otx2_read64(pf, NIX_LF_ERR_INT));
> } else {
> if (val & BIT_ULL(NIX_CQERRINT_DOOR_ERR))
> netdev_err(pf->netdev, "CQ%lld: Doorbell error",
> qidx);
> if (val & BIT_ULL(NIX_CQERRINT_CQE_FAULT))
> - netdev_err(pf->netdev, "CQ%lld: Memory fault on CQE write to LLC/DRAM",
> + netdev_err(pf->netdev,
> + "CQ%lld: Memory fault on CQE write to LLC/DRAM",
> qidx);
> }
>
> @@ -1272,7 +1275,8 @@ static irqreturn_t otx2_q_intr_handler(int irq, void *data)
> (val & NIX_SQINT_BITS));
>
> if (val & BIT_ULL(42)) {
> - netdev_err(pf->netdev, "SQ%lld: error reading NIX_LF_SQ_OP_INT, NIX_LF_ERR_INT 0x%llx\n",
> + netdev_err(pf->netdev,
> + "SQ%lld: error reading NIX_LF_SQ_OP_INT, NIX_LF_ERR_INT 0x%llx\n",
> qidx, otx2_read64(pf, NIX_LF_ERR_INT));
> goto done;
> }
> @@ -1282,8 +1286,11 @@ static irqreturn_t otx2_q_intr_handler(int irq, void *data)
> goto chk_mnq_err_dbg;
>
> sq_op_err_code = FIELD_GET(GENMASK(7, 0), sq_op_err_dbg);
> - netdev_err(pf->netdev, "SQ%lld: NIX_LF_SQ_OP_ERR_DBG(%llx) err=%s\n",
> - qidx, sq_op_err_dbg, nix_sqoperr_e_str[sq_op_err_code]);
> + netdev_err(pf->netdev,
> + "SQ%lld: NIX_LF_SQ_OP_ERR_DBG(0x%llx) err=%s(%#x)\n",
> + qidx, sq_op_err_dbg,
> + nix_sqoperr_e_str[sq_op_err_code],
> + sq_op_err_code);
>
> otx2_write64(pf, NIX_LF_SQ_OP_ERR_DBG, BIT_ULL(44));
>
> @@ -1300,16 +1307,21 @@ static irqreturn_t otx2_q_intr_handler(int irq, void *data)
> goto chk_snd_err_dbg;
>
> mnq_err_code = FIELD_GET(GENMASK(7, 0), mnq_err_dbg);
> - netdev_err(pf->netdev, "SQ%lld: NIX_LF_MNQ_ERR_DBG(%llx) err=%s\n",
> - qidx, mnq_err_dbg, nix_mnqerr_e_str[mnq_err_code]);
> + netdev_err(pf->netdev,
> + "SQ%lld: NIX_LF_MNQ_ERR_DBG(0x%llx) err=%s(%#x)\n",
> + qidx, mnq_err_dbg, nix_mnqerr_e_str[mnq_err_code],
> + mnq_err_code);
> otx2_write64(pf, NIX_LF_MNQ_ERR_DBG, BIT_ULL(44));
>
> chk_snd_err_dbg:
> snd_err_dbg = otx2_read64(pf, NIX_LF_SEND_ERR_DBG);
> if (snd_err_dbg & BIT(44)) {
> snd_err_code = FIELD_GET(GENMASK(7, 0), snd_err_dbg);
> - netdev_err(pf->netdev, "SQ%lld: NIX_LF_SND_ERR_DBG:0x%llx err=%s\n",
> - qidx, snd_err_dbg, nix_snd_status_e_str[snd_err_code]);
> + netdev_err(pf->netdev,
> + "SQ%lld: NIX_LF_SND_ERR_DBG:0x%llx err=%s(%#x)\n",
> + qidx, snd_err_dbg,
> + nix_snd_status_e_str[snd_err_code],
> + snd_err_code);
> otx2_write64(pf, NIX_LF_SEND_ERR_DBG, BIT_ULL(44));
> }
>
next prev parent reply other threads:[~2023-10-27 10:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 2:19 [PATCH net v1 1/2] octeontx2-pf: Fix error codes Ratheesh Kannoth
2023-10-27 2:19 ` [PATCH net v1 2/2] octeontx2-pf: Fix holes in error code Ratheesh Kannoth
2023-10-27 10:09 ` Wojciech Drewek [this message]
2023-10-31 11:06 ` Paolo Abeni
2023-11-02 2:31 ` [EXT] " Ratheesh Kannoth
2023-10-27 10:10 ` [PATCH net v1 1/2] octeontx2-pf: Fix error codes Wojciech Drewek
2023-11-02 9:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46cbc7d8-7d1b-4307-95b2-d8f62dd57824@intel.com \
--to=wojciech.drewek@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox