* [PATCH net v1 1/2] octeontx2-pf: Fix error codes
@ 2023-10-27 2:19 Ratheesh Kannoth
2023-10-27 2:19 ` [PATCH net v1 2/2] octeontx2-pf: Fix holes in error code Ratheesh Kannoth
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ratheesh Kannoth @ 2023-10-27 2:19 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
wojciech.drewek, Ratheesh Kannoth
Some of error codes were wrong. Fix the same.
Fixes: 51afe9026d0c ("octeontx2-pf: NIX TX overwrites SQ_CTX_HW_S[SQ_INT]")
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
ChangeLog
v0 -> v1: Splitted patch into two
---
.../marvell/octeontx2/nic/otx2_struct.h | 34 +++++++++----------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h
index fa37b9f312ca..4e5899d8fa2e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h
@@ -318,23 +318,23 @@ enum nix_snd_status_e {
NIX_SND_STATUS_EXT_ERR = 0x6,
NIX_SND_STATUS_JUMP_FAULT = 0x7,
NIX_SND_STATUS_JUMP_POISON = 0x8,
- NIX_SND_STATUS_CRC_ERR = 0x9,
- NIX_SND_STATUS_IMM_ERR = 0x10,
- NIX_SND_STATUS_SG_ERR = 0x11,
- NIX_SND_STATUS_MEM_ERR = 0x12,
- NIX_SND_STATUS_INVALID_SUBDC = 0x13,
- NIX_SND_STATUS_SUBDC_ORDER_ERR = 0x14,
- NIX_SND_STATUS_DATA_FAULT = 0x15,
- NIX_SND_STATUS_DATA_POISON = 0x16,
- NIX_SND_STATUS_NPC_DROP_ACTION = 0x17,
- NIX_SND_STATUS_LOCK_VIOL = 0x18,
- NIX_SND_STATUS_NPC_UCAST_CHAN_ERR = 0x19,
- NIX_SND_STATUS_NPC_MCAST_CHAN_ERR = 0x20,
- NIX_SND_STATUS_NPC_MCAST_ABORT = 0x21,
- NIX_SND_STATUS_NPC_VTAG_PTR_ERR = 0x22,
- NIX_SND_STATUS_NPC_VTAG_SIZE_ERR = 0x23,
- NIX_SND_STATUS_SEND_MEM_FAULT = 0x24,
- NIX_SND_STATUS_SEND_STATS_ERR = 0x25,
+ NIX_SND_STATUS_CRC_ERR = 0x10,
+ NIX_SND_STATUS_IMM_ERR = 0x11,
+ NIX_SND_STATUS_SG_ERR = 0x12,
+ NIX_SND_STATUS_MEM_ERR = 0x13,
+ NIX_SND_STATUS_INVALID_SUBDC = 0x14,
+ NIX_SND_STATUS_SUBDC_ORDER_ERR = 0x15,
+ NIX_SND_STATUS_DATA_FAULT = 0x16,
+ NIX_SND_STATUS_DATA_POISON = 0x17,
+ NIX_SND_STATUS_NPC_DROP_ACTION = 0x20,
+ NIX_SND_STATUS_LOCK_VIOL = 0x21,
+ NIX_SND_STATUS_NPC_UCAST_CHAN_ERR = 0x22,
+ NIX_SND_STATUS_NPC_MCAST_CHAN_ERR = 0x23,
+ NIX_SND_STATUS_NPC_MCAST_ABORT = 0x24,
+ NIX_SND_STATUS_NPC_VTAG_PTR_ERR = 0x25,
+ NIX_SND_STATUS_NPC_VTAG_SIZE_ERR = 0x26,
+ NIX_SND_STATUS_SEND_MEM_FAULT = 0x27,
+ NIX_SND_STATUS_SEND_STATS_ERR = 0x28,
NIX_SND_STATUS_MAX,
};
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH net v1 2/2] octeontx2-pf: Fix holes in error code 2023-10-27 2:19 [PATCH net v1 1/2] octeontx2-pf: Fix error codes Ratheesh Kannoth @ 2023-10-27 2:19 ` Ratheesh Kannoth 2023-10-27 10:09 ` Wojciech Drewek 2023-10-31 11:06 ` Paolo Abeni 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 2 siblings, 2 replies; 7+ messages in thread From: Ratheesh Kannoth @ 2023-10-27 2:19 UTC (permalink / raw) To: netdev, linux-kernel Cc: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni, wojciech.drewek, Ratheesh Kannoth 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> --- 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)); } -- 2.25.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 2/2] octeontx2-pf: Fix holes in error code 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 2023-10-31 11:06 ` Paolo Abeni 1 sibling, 0 replies; 7+ messages in thread From: Wojciech Drewek @ 2023-10-27 10:09 UTC (permalink / raw) To: Ratheesh Kannoth, netdev, linux-kernel Cc: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni 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)); > } > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 2/2] octeontx2-pf: Fix holes in error code 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 @ 2023-10-31 11:06 ` Paolo Abeni 2023-11-02 2:31 ` [EXT] " Ratheesh Kannoth 1 sibling, 1 reply; 7+ messages in thread From: Paolo Abeni @ 2023-10-31 11:06 UTC (permalink / raw) To: Ratheesh Kannoth, netdev, linux-kernel Cc: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, wojciech.drewek On Fri, 2023-10-27 at 07:49 +0530, 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> > > --- > 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); > } It's not a big deal (no need to repost just for this), but the above chunk (and a couple below, too) is not related to the current fix, you should have not included it here. Cheers, Paolo > > @@ -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)); > } > ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [EXT] Re: [PATCH net v1 2/2] octeontx2-pf: Fix holes in error code 2023-10-31 11:06 ` Paolo Abeni @ 2023-11-02 2:31 ` Ratheesh Kannoth 0 siblings, 0 replies; 7+ messages in thread From: Ratheesh Kannoth @ 2023-11-02 2:31 UTC (permalink / raw) To: Paolo Abeni, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sunil Kovvuri Goutham, Geethasowjanya Akula, Subbaraya Sundeep Bhatta, Hariprasad Kelam, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, wojciech.drewek@intel.com > From: Paolo Abeni <pabeni@redhat.com> > Subject: [EXT] Re: [PATCH net v1 2/2] octeontx2-pf: Fix holes in error code > > On Fri, 2023-10-27 at 07:49 +0530, Ratheesh Kannoth wrote: > > Error code strings are not getting printed properly due to holes. > > Print error code as well. > 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); > > } > > It's not a big deal (no need to repost just for this), but the above chunk (and > a couple below, too) is not related to the current fix, you should have not > included it here. I understand your point. But, Commit message says "Print error code as well". When I added code to print it, it crossed 80 column mark, so checkpatch script threw warning. So I splitted lines. Actually , there is not much change here. -Ratheesh ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 1/2] octeontx2-pf: Fix error codes 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:10 ` Wojciech Drewek 2023-11-02 9:50 ` patchwork-bot+netdevbpf 2 siblings, 0 replies; 7+ messages in thread From: Wojciech Drewek @ 2023-10-27 10:10 UTC (permalink / raw) To: Ratheesh Kannoth, netdev, linux-kernel Cc: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni On 27.10.2023 04:19, Ratheesh Kannoth wrote: > Some of error codes were wrong. Fix the same. > > 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 > --- > .../marvell/octeontx2/nic/otx2_struct.h | 34 +++++++++---------- > 1 file changed, 17 insertions(+), 17 deletions(-) > > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h > index fa37b9f312ca..4e5899d8fa2e 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h > @@ -318,23 +318,23 @@ enum nix_snd_status_e { > NIX_SND_STATUS_EXT_ERR = 0x6, > NIX_SND_STATUS_JUMP_FAULT = 0x7, > NIX_SND_STATUS_JUMP_POISON = 0x8, > - NIX_SND_STATUS_CRC_ERR = 0x9, > - NIX_SND_STATUS_IMM_ERR = 0x10, > - NIX_SND_STATUS_SG_ERR = 0x11, > - NIX_SND_STATUS_MEM_ERR = 0x12, > - NIX_SND_STATUS_INVALID_SUBDC = 0x13, > - NIX_SND_STATUS_SUBDC_ORDER_ERR = 0x14, > - NIX_SND_STATUS_DATA_FAULT = 0x15, > - NIX_SND_STATUS_DATA_POISON = 0x16, > - NIX_SND_STATUS_NPC_DROP_ACTION = 0x17, > - NIX_SND_STATUS_LOCK_VIOL = 0x18, > - NIX_SND_STATUS_NPC_UCAST_CHAN_ERR = 0x19, > - NIX_SND_STATUS_NPC_MCAST_CHAN_ERR = 0x20, > - NIX_SND_STATUS_NPC_MCAST_ABORT = 0x21, > - NIX_SND_STATUS_NPC_VTAG_PTR_ERR = 0x22, > - NIX_SND_STATUS_NPC_VTAG_SIZE_ERR = 0x23, > - NIX_SND_STATUS_SEND_MEM_FAULT = 0x24, > - NIX_SND_STATUS_SEND_STATS_ERR = 0x25, > + NIX_SND_STATUS_CRC_ERR = 0x10, > + NIX_SND_STATUS_IMM_ERR = 0x11, > + NIX_SND_STATUS_SG_ERR = 0x12, > + NIX_SND_STATUS_MEM_ERR = 0x13, > + NIX_SND_STATUS_INVALID_SUBDC = 0x14, > + NIX_SND_STATUS_SUBDC_ORDER_ERR = 0x15, > + NIX_SND_STATUS_DATA_FAULT = 0x16, > + NIX_SND_STATUS_DATA_POISON = 0x17, > + NIX_SND_STATUS_NPC_DROP_ACTION = 0x20, > + NIX_SND_STATUS_LOCK_VIOL = 0x21, > + NIX_SND_STATUS_NPC_UCAST_CHAN_ERR = 0x22, > + NIX_SND_STATUS_NPC_MCAST_CHAN_ERR = 0x23, > + NIX_SND_STATUS_NPC_MCAST_ABORT = 0x24, > + NIX_SND_STATUS_NPC_VTAG_PTR_ERR = 0x25, > + NIX_SND_STATUS_NPC_VTAG_SIZE_ERR = 0x26, > + NIX_SND_STATUS_SEND_MEM_FAULT = 0x27, > + NIX_SND_STATUS_SEND_STATS_ERR = 0x28, > NIX_SND_STATUS_MAX, > }; > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v1 1/2] octeontx2-pf: Fix error codes 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:10 ` [PATCH net v1 1/2] octeontx2-pf: Fix error codes Wojciech Drewek @ 2023-11-02 9:50 ` patchwork-bot+netdevbpf 2 siblings, 0 replies; 7+ messages in thread From: patchwork-bot+netdevbpf @ 2023-11-02 9:50 UTC (permalink / raw) To: Ratheesh Kannoth Cc: netdev, linux-kernel, sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni, wojciech.drewek Hello: This series was applied to netdev/net.git (main) by Paolo Abeni <pabeni@redhat.com>: On Fri, 27 Oct 2023 07:49:52 +0530 you wrote: > Some of error codes were wrong. Fix the same. > > Fixes: 51afe9026d0c ("octeontx2-pf: NIX TX overwrites SQ_CTX_HW_S[SQ_INT]") > Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com> > > --- > > [...] Here is the summary with links: - [net,v1,1/2] octeontx2-pf: Fix error codes https://git.kernel.org/netdev/net/c/96b9a68d1a6e - [net,v1,2/2] octeontx2-pf: Fix holes in error code https://git.kernel.org/netdev/net/c/7aeeb2cb7a25 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-11-02 9:50 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox