Commit 5ed66306 authored by George Cherian's avatar George Cherian Committed by Jakub Kicinski

octeontx2-af: Add devlink health reporters for NIX

Add health reporters for RVU NIX block.
NIX Health reporters handle following HW event groups
- GENERAL events
- ERROR events
- RAS events
- RVU event

Output:

 # devlink health
 pci/0002:01:00.0:
   reporter hw_npa_intr
     state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true
   reporter hw_npa_gen
     state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true
   reporter hw_npa_err
     state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true
   reporter hw_npa_ras
     state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true
   reporter hw_nix_intr
     state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true
   reporter hw_nix_gen
     state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true
   reporter hw_nix_err
     state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true
   reporter hw_nix_ras
     state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true

 # devlink health dump show pci/0002:01:00.0 reporter hw_nix_intr
  NIX_AF_RVU:
	NIX RVU Interrupt Reg : 1
	Unmap Slot Error
 # devlink health dump show pci/0002:01:00.0 reporter hw_nix_gen
  NIX_AF_GENERAL:
	NIX General Interrupt Reg : 1
	Rx multicast pkt drop

Each reporter dump shows the Register value and the description of the cause.
Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: default avatarJerin Jacob <jerinj@marvell.com>
Signed-off-by: default avatarGeorge Cherian <george.cherian@marvell.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9e8789c8
...@@ -41,11 +41,38 @@ struct rvu_npa_health_reporters { ...@@ -41,11 +41,38 @@ struct rvu_npa_health_reporters {
struct work_struct ras_work; struct work_struct ras_work;
}; };
enum nix_af_rvu_health {
NIX_AF_RVU_INTR,
NIX_AF_RVU_GEN,
NIX_AF_RVU_ERR,
NIX_AF_RVU_RAS,
};
struct rvu_nix_event_ctx {
u64 nix_af_rvu_int;
u64 nix_af_rvu_gen;
u64 nix_af_rvu_err;
u64 nix_af_rvu_ras;
};
struct rvu_nix_health_reporters {
struct rvu_nix_event_ctx *nix_event_ctx;
struct devlink_health_reporter *rvu_hw_nix_intr_reporter;
struct work_struct intr_work;
struct devlink_health_reporter *rvu_hw_nix_gen_reporter;
struct work_struct gen_work;
struct devlink_health_reporter *rvu_hw_nix_err_reporter;
struct work_struct err_work;
struct devlink_health_reporter *rvu_hw_nix_ras_reporter;
struct work_struct ras_work;
};
struct rvu_devlink { struct rvu_devlink {
struct devlink *dl; struct devlink *dl;
struct rvu *rvu; struct rvu *rvu;
struct workqueue_struct *devlink_wq; struct workqueue_struct *devlink_wq;
struct rvu_npa_health_reporters *rvu_npa_health_reporter; struct rvu_npa_health_reporters *rvu_npa_health_reporter;
struct rvu_nix_health_reporters *rvu_nix_health_reporter;
}; };
/* Devlink APIs */ /* Devlink APIs */
......
...@@ -74,6 +74,16 @@ enum npa_af_int_vec_e { ...@@ -74,6 +74,16 @@ enum npa_af_int_vec_e {
NPA_AF_INT_VEC_CNT = 0x5, NPA_AF_INT_VEC_CNT = 0x5,
}; };
/* NIX Admin function Interrupt Vector Enumeration */
enum nix_af_int_vec_e {
NIX_AF_INT_VEC_RVU = 0x0,
NIX_AF_INT_VEC_GEN = 0x1,
NIX_AF_INT_VEC_AQ_DONE = 0x2,
NIX_AF_INT_VEC_AF_ERR = 0x3,
NIX_AF_INT_VEC_POISON = 0x4,
NIX_AF_INT_VEC_CNT = 0x5,
};
/** /**
* RVU PF Interrupt Vector Enumeration * RVU PF Interrupt Vector Enumeration
*/ */
......
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