Commit ca8b4327 authored by Krishna Gudipati's avatar Krishna Gudipati Committed by James Bottomley

[SCSI] bfa: Modified the portstats get/clear logic

Modified the portstats get/clear logic for port physical/FCoE/QoS stats.
Added more stats to FC
Fixed some issues with FCoE stats collection.
Signed-off-by: default avatarKrishna Gudipati <kgudipat@brocade.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 0a4b1fc0
This diff is collapsed.
...@@ -46,6 +46,8 @@ struct bfa_fcport_s { ...@@ -46,6 +46,8 @@ struct bfa_fcport_s {
enum bfa_pport_topology topology; /* current topology */ enum bfa_pport_topology topology; /* current topology */
u8 myalpa; /* my ALPA in LOOP topology */ u8 myalpa; /* my ALPA in LOOP topology */
u8 rsvd[3]; u8 rsvd[3];
u32 mypid:24;
u32 rsvd_b:8;
struct bfa_pport_cfg_s cfg; /* current port configuration */ struct bfa_pport_cfg_s cfg; /* current port configuration */
struct bfa_qos_attr_s qos_attr; /* QoS Attributes */ struct bfa_qos_attr_s qos_attr; /* QoS Attributes */
struct bfa_qos_vc_attr_s qos_vc_attr; /* VC info from ELP */ struct bfa_qos_vc_attr_s qos_vc_attr; /* VC info from ELP */
...@@ -59,40 +61,25 @@ struct bfa_fcport_s { ...@@ -59,40 +61,25 @@ struct bfa_fcport_s {
void (*event_cbfn) (void *cbarg, void (*event_cbfn) (void *cbarg,
bfa_pport_event_t event); bfa_pport_event_t event);
union { union {
union bfi_pport_i2h_msg_u i2hmsg; union bfi_fcport_i2h_msg_u i2hmsg;
} event_arg; } event_arg;
void *bfad; /* BFA driver handle */ void *bfad; /* BFA driver handle */
struct bfa_fcport_ln_s ln; /* Link Notification */ struct bfa_fcport_ln_s ln; /* Link Notification */
struct bfa_cb_qe_s hcb_qe; /* BFA callback queue elem */ struct bfa_cb_qe_s hcb_qe; /* BFA callback queue elem */
struct bfa_timer_s timer; /* timer */
u32 msgtag; /* fimrware msg tag for reply */ u32 msgtag; /* fimrware msg tag for reply */
u8 *stats_kva; u8 *stats_kva;
u64 stats_pa; u64 stats_pa;
union bfa_pport_stats_u *stats; /* pport stats */ union bfa_fcport_stats_u *stats;
u32 mypid:24; union bfa_fcport_stats_u *stats_ret; /* driver stats location */
u32 rsvd_b:8; bfa_status_t stats_status; /* stats/statsclr status */
struct bfa_timer_s timer; /* timer */ bfa_boolean_t stats_busy; /* outstanding stats/statsclr */
union bfa_pport_stats_u *stats_ret;
/* driver stats location */
bfa_status_t stats_status;
/* stats/statsclr status */
bfa_boolean_t stats_busy;
/* outstanding stats/statsclr */
bfa_boolean_t stats_qfull; bfa_boolean_t stats_qfull;
bfa_boolean_t diag_busy; bfa_cb_pport_t stats_cbfn; /* driver callback function */
/* diag busy status */ void *stats_cbarg; /* *!< user callback arg */
bfa_boolean_t beacon; bfa_boolean_t diag_busy; /* diag busy status */
/* port beacon status */ bfa_boolean_t beacon; /* port beacon status */
bfa_boolean_t link_e2e_beacon; bfa_boolean_t link_e2e_beacon; /* link beacon status */
/* link beacon status */
bfa_cb_pport_t stats_cbfn;
/* driver callback function */
void *stats_cbarg;
/* *!< user callback arg */
/* FCport stats */
u8 *fcport_stats_kva;
u64 fcport_stats_pa;
union bfa_fcport_stats_u *fcport_stats;
union bfa_fcport_stats_u *fcport_stats_ret;
}; };
#define BFA_FCPORT_MOD(__bfa) (&(__bfa)->modules.fcport) #define BFA_FCPORT_MOD(__bfa) (&(__bfa)->modules.fcport)
......
...@@ -288,7 +288,7 @@ bfad_im_get_stats(struct Scsi_Host *shost) ...@@ -288,7 +288,7 @@ bfad_im_get_stats(struct Scsi_Host *shost)
init_completion(&fcomp.comp); init_completion(&fcomp.comp);
spin_lock_irqsave(&bfad->bfad_lock, flags); spin_lock_irqsave(&bfad->bfad_lock, flags);
memset(hstats, 0, sizeof(struct fc_host_statistics)); memset(hstats, 0, sizeof(struct fc_host_statistics));
rc = bfa_pport_get_stats(&bfad->bfa, rc = bfa_port_get_stats(BFA_FCPORT(&bfad->bfa),
(union bfa_pport_stats_u *) hstats, (union bfa_pport_stats_u *) hstats,
bfad_hcb_comp, &fcomp); bfad_hcb_comp, &fcomp);
spin_unlock_irqrestore(&bfad->bfad_lock, flags); spin_unlock_irqrestore(&bfad->bfad_lock, flags);
...@@ -315,7 +315,8 @@ bfad_im_reset_stats(struct Scsi_Host *shost) ...@@ -315,7 +315,8 @@ bfad_im_reset_stats(struct Scsi_Host *shost)
init_completion(&fcomp.comp); init_completion(&fcomp.comp);
spin_lock_irqsave(&bfad->bfad_lock, flags); spin_lock_irqsave(&bfad->bfad_lock, flags);
rc = bfa_pport_clear_stats(&bfad->bfa, bfad_hcb_comp, &fcomp); rc = bfa_port_clear_stats(BFA_FCPORT(&bfad->bfa), bfad_hcb_comp,
&fcomp);
spin_unlock_irqrestore(&bfad->bfad_lock, flags); spin_unlock_irqrestore(&bfad->bfad_lock, flags);
if (rc != BFA_STATUS_OK) if (rc != BFA_STATUS_OK)
......
...@@ -36,7 +36,7 @@ struct bfa_fcxp_s; ...@@ -36,7 +36,7 @@ struct bfa_fcxp_s;
struct bfa_rport_info_s { struct bfa_rport_info_s {
u16 max_frmsz; /* max rcv pdu size */ u16 max_frmsz; /* max rcv pdu size */
u32 pid:24, /* remote port ID */ u32 pid:24, /* remote port ID */
lp_tag:8; lp_tag:8; /* tag */
u32 local_pid:24, /* local port ID */ u32 local_pid:24, /* local port ID */
cisc:8; /* CIRO supported */ cisc:8; /* CIRO supported */
u8 fc_class; /* supported FC classes. enum fc_cos */ u8 fc_class; /* supported FC classes. enum fc_cos */
...@@ -55,7 +55,7 @@ struct bfa_rport_s { ...@@ -55,7 +55,7 @@ struct bfa_rport_s {
void *rport_drv; /* fcs/driver rport object */ void *rport_drv; /* fcs/driver rport object */
u16 fw_handle; /* firmware rport handle */ u16 fw_handle; /* firmware rport handle */
u16 rport_tag; /* BFA rport tag */ u16 rport_tag; /* BFA rport tag */
struct bfa_rport_info_s rport_info; /* rport info from *fcs/driver */ struct bfa_rport_info_s rport_info; /* rport info from fcs/driver */
struct bfa_reqq_wait_s reqq_wait; /* to wait for room in reqq */ struct bfa_reqq_wait_s reqq_wait; /* to wait for room in reqq */
struct bfa_cb_qe_s hcb_qe; /* BFA callback qelem */ struct bfa_cb_qe_s hcb_qe; /* BFA callback qelem */
struct bfa_rport_hal_stats_s stats; /* BFA rport statistics */ struct bfa_rport_hal_stats_s stats; /* BFA rport statistics */
...@@ -102,7 +102,7 @@ struct bfa_uf_buf_s { ...@@ -102,7 +102,7 @@ struct bfa_uf_buf_s {
struct bfa_uf_s { struct bfa_uf_s {
struct list_head qe; /* queue element */ struct list_head qe; /* queue element */
struct bfa_s *bfa; /* bfa instance */ struct bfa_s *bfa; /* bfa instance */
u16 uf_tag; /* identifying tag f/w messages */ u16 uf_tag; /* identifying tag fw msgs */
u16 vf_id; u16 vf_id;
u16 src_rport_handle; u16 src_rport_handle;
u16 rsvd; u16 rsvd;
...@@ -128,7 +128,7 @@ struct bfa_lps_s { ...@@ -128,7 +128,7 @@ struct bfa_lps_s {
u8 reqq; /* lport request queue */ u8 reqq; /* lport request queue */
u8 alpa; /* ALPA for loop topologies */ u8 alpa; /* ALPA for loop topologies */
u32 lp_pid; /* lport port ID */ u32 lp_pid; /* lport port ID */
bfa_boolean_t fdisc; /* send FDISC instead of FLOGI*/ bfa_boolean_t fdisc; /* send FDISC instead of FLOGI */
bfa_boolean_t auth_en; /* enable authentication */ bfa_boolean_t auth_en; /* enable authentication */
bfa_boolean_t auth_req; /* authentication required */ bfa_boolean_t auth_req; /* authentication required */
bfa_boolean_t npiv_en; /* NPIV is allowed by peer */ bfa_boolean_t npiv_en; /* NPIV is allowed by peer */
...@@ -178,11 +178,6 @@ bfa_status_t bfa_fcport_trunk_disable(struct bfa_s *bfa); ...@@ -178,11 +178,6 @@ bfa_status_t bfa_fcport_trunk_disable(struct bfa_s *bfa);
bfa_boolean_t bfa_fcport_trunk_query(struct bfa_s *bfa, u32 *bitmap); bfa_boolean_t bfa_fcport_trunk_query(struct bfa_s *bfa, u32 *bitmap);
void bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_pport_attr_s *attr); void bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_pport_attr_s *attr);
wwn_t bfa_fcport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node); wwn_t bfa_fcport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node);
bfa_status_t bfa_pport_get_stats(struct bfa_s *bfa,
union bfa_pport_stats_u *stats,
bfa_cb_pport_t cbfn, void *cbarg);
bfa_status_t bfa_pport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn,
void *cbarg);
void bfa_fcport_event_register(struct bfa_s *bfa, void bfa_fcport_event_register(struct bfa_s *bfa,
void (*event_cbfn) (void *cbarg, void (*event_cbfn) (void *cbarg,
bfa_pport_event_t event), void *event_cbarg); bfa_pport_event_t event), void *event_cbarg);
...@@ -198,14 +193,21 @@ void bfa_fcport_busy(struct bfa_s *bfa, bfa_boolean_t status); ...@@ -198,14 +193,21 @@ void bfa_fcport_busy(struct bfa_s *bfa, bfa_boolean_t status);
void bfa_fcport_beacon(struct bfa_s *bfa, bfa_boolean_t beacon, void bfa_fcport_beacon(struct bfa_s *bfa, bfa_boolean_t beacon,
bfa_boolean_t link_e2e_beacon); bfa_boolean_t link_e2e_beacon);
void bfa_cb_pport_event(void *cbarg, bfa_pport_event_t event); void bfa_cb_pport_event(void *cbarg, bfa_pport_event_t event);
void bfa_fcport_qos_get_attr(struct bfa_s *bfa, struct bfa_qos_attr_s *qos_attr); void bfa_fcport_qos_get_attr(struct bfa_s *bfa,
struct bfa_qos_attr_s *qos_attr);
void bfa_fcport_qos_get_vc_attr(struct bfa_s *bfa, void bfa_fcport_qos_get_vc_attr(struct bfa_s *bfa,
struct bfa_qos_vc_attr_s *qos_vc_attr); struct bfa_qos_vc_attr_s *qos_vc_attr);
bfa_status_t bfa_fcport_get_qos_stats(struct bfa_s *bfa, bfa_status_t bfa_fcport_get_qos_stats(struct bfa_s *bfa,
union bfa_pport_stats_u *stats, union bfa_fcport_stats_u *stats,
bfa_cb_pport_t cbfn, void *cbarg); bfa_cb_pport_t cbfn, void *cbarg);
bfa_status_t bfa_fcport_clear_qos_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, bfa_status_t bfa_fcport_clear_qos_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn,
void *cbarg); void *cbarg);
bfa_status_t bfa_fcport_get_fcoe_stats(struct bfa_s *bfa,
union bfa_fcport_stats_u *stats,
bfa_cb_pport_t cbfn, void *cbarg);
bfa_status_t bfa_fcport_clear_fcoe_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn,
void *cbarg);
bfa_boolean_t bfa_fcport_is_ratelim(struct bfa_s *bfa); bfa_boolean_t bfa_fcport_is_ratelim(struct bfa_s *bfa);
bfa_boolean_t bfa_fcport_is_linkup(struct bfa_s *bfa); bfa_boolean_t bfa_fcport_is_linkup(struct bfa_s *bfa);
bfa_status_t bfa_fcport_get_stats(struct bfa_s *bfa, bfa_status_t bfa_fcport_get_stats(struct bfa_s *bfa,
......
...@@ -143,8 +143,8 @@ enum bfi_mclass { ...@@ -143,8 +143,8 @@ enum bfi_mclass {
BFI_MC_IOC = 1, /* IO Controller (IOC) */ BFI_MC_IOC = 1, /* IO Controller (IOC) */
BFI_MC_DIAG = 2, /* Diagnostic Msgs */ BFI_MC_DIAG = 2, /* Diagnostic Msgs */
BFI_MC_FLASH = 3, /* Flash message class */ BFI_MC_FLASH = 3, /* Flash message class */
BFI_MC_CEE = 4, BFI_MC_CEE = 4, /* CEE */
BFI_MC_FC_PORT = 5, /* FC port */ BFI_MC_FCPORT = 5, /* FC port */
BFI_MC_IOCFC = 6, /* FC - IO Controller (IOC) */ BFI_MC_IOCFC = 6, /* FC - IO Controller (IOC) */
BFI_MC_LL = 7, /* Link Layer */ BFI_MC_LL = 7, /* Link Layer */
BFI_MC_UF = 8, /* Unsolicited frame receive */ BFI_MC_UF = 8, /* Unsolicited frame receive */
......
...@@ -22,39 +22,27 @@ ...@@ -22,39 +22,27 @@
#pragma pack(1) #pragma pack(1)
enum bfi_pport_h2i { enum bfi_fcport_h2i {
BFI_PPORT_H2I_ENABLE_REQ = (1), BFI_FCPORT_H2I_ENABLE_REQ = (1),
BFI_PPORT_H2I_DISABLE_REQ = (2), BFI_FCPORT_H2I_DISABLE_REQ = (2),
BFI_PPORT_H2I_GET_STATS_REQ = (3), BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ = (3),
BFI_PPORT_H2I_CLEAR_STATS_REQ = (4), BFI_FCPORT_H2I_STATS_GET_REQ = (4),
BFI_PPORT_H2I_SET_SVC_PARAMS_REQ = (5), BFI_FCPORT_H2I_STATS_CLEAR_REQ = (5),
BFI_PPORT_H2I_ENABLE_RX_VF_TAG_REQ = (6),
BFI_PPORT_H2I_ENABLE_TX_VF_TAG_REQ = (7),
BFI_PPORT_H2I_GET_QOS_STATS_REQ = (8),
BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ = (9),
BFI_FCPORT_H2I_GET_STATS_REQ = (10),
BFI_FCPORT_H2I_CLEAR_STATS_REQ = (11),
}; };
enum bfi_pport_i2h { enum bfi_fcport_i2h {
BFI_PPORT_I2H_ENABLE_RSP = BFA_I2HM(1), BFI_FCPORT_I2H_ENABLE_RSP = BFA_I2HM(1),
BFI_PPORT_I2H_DISABLE_RSP = BFA_I2HM(2), BFI_FCPORT_I2H_DISABLE_RSP = BFA_I2HM(2),
BFI_PPORT_I2H_GET_STATS_RSP = BFA_I2HM(3), BFI_FCPORT_I2H_SET_SVC_PARAMS_RSP = BFA_I2HM(3),
BFI_PPORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4), BFI_FCPORT_I2H_STATS_GET_RSP = BFA_I2HM(4),
BFI_PPORT_I2H_SET_SVC_PARAMS_RSP = BFA_I2HM(5), BFI_FCPORT_I2H_STATS_CLEAR_RSP = BFA_I2HM(5),
BFI_PPORT_I2H_ENABLE_RX_VF_TAG_RSP = BFA_I2HM(6), BFI_FCPORT_I2H_EVENT = BFA_I2HM(6),
BFI_PPORT_I2H_ENABLE_TX_VF_TAG_RSP = BFA_I2HM(7),
BFI_PPORT_I2H_EVENT = BFA_I2HM(8),
BFI_PPORT_I2H_GET_QOS_STATS_RSP = BFA_I2HM(9),
BFI_PPORT_I2H_CLEAR_QOS_STATS_RSP = BFA_I2HM(10),
BFI_FCPORT_I2H_GET_STATS_RSP = BFA_I2HM(11),
BFI_FCPORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(12),
}; };
/** /**
* Generic REQ type * Generic REQ type
*/ */
struct bfi_pport_generic_req_s { struct bfi_fcport_req_s {
struct bfi_mhdr_s mh; /* msg header */ struct bfi_mhdr_s mh; /* msg header */
u32 msgtag; /* msgtag for reply */ u32 msgtag; /* msgtag for reply */
}; };
...@@ -62,7 +50,7 @@ struct bfi_pport_generic_req_s { ...@@ -62,7 +50,7 @@ struct bfi_pport_generic_req_s {
/** /**
* Generic RSP type * Generic RSP type
*/ */
struct bfi_pport_generic_rsp_s { struct bfi_fcport_rsp_s {
struct bfi_mhdr_s mh; /* common msg header */ struct bfi_mhdr_s mh; /* common msg header */
u8 status; /* port enable status */ u8 status; /* port enable status */
u8 rsvd[3]; u8 rsvd[3];
...@@ -70,120 +58,61 @@ struct bfi_pport_generic_rsp_s { ...@@ -70,120 +58,61 @@ struct bfi_pport_generic_rsp_s {
}; };
/** /**
* BFI_PPORT_H2I_ENABLE_REQ * BFI_FCPORT_H2I_ENABLE_REQ
*/ */
struct bfi_pport_enable_req_s { struct bfi_fcport_enable_req_s {
struct bfi_mhdr_s mh; /* msg header */ struct bfi_mhdr_s mh; /* msg header */
u32 rsvd1; u32 rsvd1;
wwn_t nwwn; /* node wwn of physical port */ wwn_t nwwn; /* node wwn of physical port */
wwn_t pwwn; /* port wwn of physical port */ wwn_t pwwn; /* port wwn of physical port */
struct bfa_pport_cfg_s port_cfg; /* port configuration */ struct bfa_pport_cfg_s port_cfg; /* port configuration */
union bfi_addr_u stats_dma_addr; /* DMA address for stats */ union bfi_addr_u stats_dma_addr; /* DMA address for stats */
union bfi_addr_u fcport_stats_dma_addr;/*!< DMA address for stats */
u32 msgtag; /* msgtag for reply */ u32 msgtag; /* msgtag for reply */
u32 rsvd2; u32 rsvd2;
}; };
/** /**
* BFI_PPORT_I2H_ENABLE_RSP * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ
*/ */
#define bfi_pport_enable_rsp_t struct bfi_pport_generic_rsp_s struct bfi_fcport_set_svc_params_req_s {
/**
* BFI_PPORT_H2I_DISABLE_REQ
*/
#define bfi_pport_disable_req_t struct bfi_pport_generic_req_s
/**
* BFI_PPORT_I2H_DISABLE_RSP
*/
#define bfi_pport_disable_rsp_t struct bfi_pport_generic_rsp_s
/**
* BFI_PPORT_H2I_GET_STATS_REQ
*/
#define bfi_pport_get_stats_req_t struct bfi_pport_generic_req_s
/**
* BFI_PPORT_I2H_GET_STATS_RSP
*/
#define bfi_pport_get_stats_rsp_t struct bfi_pport_generic_rsp_s
/**
* BFI_PPORT_H2I_CLEAR_STATS_REQ
*/
#define bfi_pport_clear_stats_req_t struct bfi_pport_generic_req_s
/**
* BFI_PPORT_I2H_CLEAR_STATS_RSP
*/
#define bfi_pport_clear_stats_rsp_t struct bfi_pport_generic_rsp_s
/**
* BFI_PPORT_H2I_GET_QOS_STATS_REQ
*/
#define bfi_pport_get_qos_stats_req_t struct bfi_pport_generic_req_s
/**
* BFI_PPORT_H2I_GET_QOS_STATS_RSP
*/
#define bfi_pport_get_qos_stats_rsp_t struct bfi_pport_generic_rsp_s
/**
* BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ
*/
#define bfi_pport_clear_qos_stats_req_t struct bfi_pport_generic_req_s
/**
* BFI_PPORT_H2I_CLEAR_QOS_STATS_RSP
*/
#define bfi_pport_clear_qos_stats_rsp_t struct bfi_pport_generic_rsp_s
/**
* BFI_PPORT_H2I_SET_SVC_PARAMS_REQ
*/
struct bfi_pport_set_svc_params_req_s {
struct bfi_mhdr_s mh; /* msg header */ struct bfi_mhdr_s mh; /* msg header */
u16 tx_bbcredit; /* Tx credits */ u16 tx_bbcredit; /* Tx credits */
u16 rsvd; u16 rsvd;
}; };
/** /**
* BFI_PPORT_I2H_SET_SVC_PARAMS_RSP * BFI_FCPORT_I2H_EVENT
*/
/**
* BFI_PPORT_I2H_EVENT
*/ */
struct bfi_pport_event_s { struct bfi_fcport_event_s {
struct bfi_mhdr_s mh; /* common msg header */ struct bfi_mhdr_s mh; /* common msg header */
struct bfa_pport_link_s link_state; struct bfa_pport_link_s link_state;
}; };
union bfi_pport_h2i_msg_u { /**
* fcport H2I message
*/
union bfi_fcport_h2i_msg_u {
struct bfi_mhdr_s *mhdr; struct bfi_mhdr_s *mhdr;
struct bfi_pport_enable_req_s *penable; struct bfi_fcport_enable_req_s *penable;
struct bfi_pport_generic_req_s *pdisable; struct bfi_fcport_req_s *pdisable;
struct bfi_pport_generic_req_s *pgetstats; struct bfi_fcport_set_svc_params_req_s *psetsvcparams;
struct bfi_pport_generic_req_s *pclearstats; struct bfi_fcport_req_s *pstatsget;
struct bfi_pport_set_svc_params_req_s *psetsvcparams; struct bfi_fcport_req_s *pstatsclear;
struct bfi_pport_get_qos_stats_req_s *pgetqosstats;
struct bfi_pport_generic_req_s *pclearqosstats;
}; };
union bfi_pport_i2h_msg_u { /**
* fcport I2H message
*/
union bfi_fcport_i2h_msg_u {
struct bfi_msg_s *msg; struct bfi_msg_s *msg;
struct bfi_pport_generic_rsp_s *enable_rsp; struct bfi_fcport_rsp_s *penable_rsp;
struct bfi_pport_disable_rsp_s *disable_rsp; struct bfi_fcport_rsp_s *pdisable_rsp;
struct bfi_pport_generic_rsp_s *getstats_rsp; struct bfi_fcport_rsp_s *psetsvcparams_rsp;
struct bfi_pport_clear_stats_rsp_s *clearstats_rsp; struct bfi_fcport_rsp_s *pstatsget_rsp;
struct bfi_pport_set_svc_params_rsp_s *setsvcparasm_rsp; struct bfi_fcport_rsp_s *pstatsclear_rsp;
struct bfi_pport_get_qos_stats_rsp_s *getqosstats_rsp; struct bfi_fcport_event_s *event;
struct bfi_pport_clear_qos_stats_rsp_s *clearqosstats_rsp;
struct bfi_pport_event_s *event;
}; };
#pragma pack() #pragma pack()
#endif /* __BFI_PPORT_H__ */ #endif /* __BFI_PPORT_H__ */
...@@ -240,73 +240,79 @@ struct bfa_pport_attr_s { ...@@ -240,73 +240,79 @@ struct bfa_pport_attr_s {
* FC Port statistics. * FC Port statistics.
*/ */
struct bfa_pport_fc_stats_s { struct bfa_pport_fc_stats_s {
u64 secs_reset; /* seconds since stats is reset */ u64 secs_reset; /* Seconds since stats is reset */
u64 tx_frames; /* transmitted frames */ u64 tx_frames; /* Tx frames */
u64 tx_words; /* transmitted words */ u64 tx_words; /* Tx words */
u64 rx_frames; /* received frames */ u64 tx_lip; /* TX LIP */
u64 rx_words; /* received words */ u64 tx_nos; /* Tx NOS */
u64 lip_count; /* LIPs seen */ u64 tx_ols; /* Tx OLS */
u64 nos_count; /* NOS count */ u64 tx_lr; /* Tx LR */
u64 error_frames; /* errored frames */ u64 tx_lrr; /* Tx LRR */
u64 dropped_frames; /* dropped frames */ u64 rx_frames; /* Rx frames */
u64 link_failures; /* link failure count */ u64 rx_words; /* Rx words */
u64 loss_of_syncs; /* loss of sync count */ u64 lip_count; /* Rx LIP */
u64 loss_of_signals;/* loss of signal count */ u64 nos_count; /* Rx NOS */
u64 primseq_errs; /* primitive sequence protocol */ u64 ols_count; /* Rx OLS */
u64 bad_os_count; /* invalid ordered set */ u64 lr_count; /* Rx LR */
u64 err_enc_out; /* Encoding error outside frame */ u64 lrr_count; /* Rx LRR */
u64 invalid_crcs; /* frames received with invalid CRC*/ u64 invalid_crcs; /* Rx CRC err frames */
u64 undersized_frm; /* undersized frames */ u64 invalid_crc_gd_eof; /* Rx CRC err good EOF frames */
u64 oversized_frm; /* oversized frames */ u64 undersized_frm; /* Rx undersized frames */
u64 bad_eof_frm; /* frames with bad EOF */ u64 oversized_frm; /* Rx oversized frames */
struct bfa_qos_stats_s qos_stats; /* QoS statistics */ u64 bad_eof_frm; /* Rx frames with bad EOF */
u64 error_frames; /* Errored frames */
u64 dropped_frames; /* Dropped frames */
u64 link_failures; /* Link Failure (LF) count */
u64 loss_of_syncs; /* Loss of sync count */
u64 loss_of_signals;/* Loss of signal count */
u64 primseq_errs; /* Primitive sequence protocol err. */
u64 bad_os_count; /* Invalid ordered sets */
u64 err_enc_out; /* Encoding err nonframe_8b10b */
u64 err_enc; /* Encoding err frame_8b10b */
}; };
/** /**
* Eth Port statistics. * Eth Port statistics.
*/ */
struct bfa_pport_eth_stats_s { struct bfa_pport_eth_stats_s {
u64 secs_reset; /* seconds since stats is reset */ u64 secs_reset; /* Seconds since stats is reset */
u64 frame_64; /* both rx and tx counter */ u64 frame_64; /* Frames 64 bytes */
u64 frame_65_127; /* both rx and tx counter */ u64 frame_65_127; /* Frames 65-127 bytes */
u64 frame_128_255; /* both rx and tx counter */ u64 frame_128_255; /* Frames 128-255 bytes */
u64 frame_256_511; /* both rx and tx counter */ u64 frame_256_511; /* Frames 256-511 bytes */
u64 frame_512_1023; /* both rx and tx counter */ u64 frame_512_1023; /* Frames 512-1023 bytes */
u64 frame_1024_1518; /* both rx and tx counter */ u64 frame_1024_1518; /* Frames 1024-1518 bytes */
u64 frame_1519_1522; /* both rx and tx counter */ u64 frame_1519_1522; /* Frames 1519-1522 bytes */
u64 tx_bytes; /* Tx bytes */
u64 tx_bytes; u64 tx_packets; /* Tx packets */
u64 tx_packets; u64 tx_mcast_packets; /* Tx multicast packets */
u64 tx_mcast_packets; u64 tx_bcast_packets; /* Tx broadcast packets */
u64 tx_bcast_packets; u64 tx_control_frame; /* Tx control frame */
u64 tx_control_frame; u64 tx_drop; /* Tx drops */
u64 tx_drop; u64 tx_jabber; /* Tx jabber */
u64 tx_jabber; u64 tx_fcs_error; /* Tx FCS error */
u64 tx_fcs_error; u64 tx_fragments; /* Tx fragments */
u64 tx_fragments; u64 rx_bytes; /* Rx bytes */
u64 rx_packets; /* Rx packets */
u64 rx_bytes; u64 rx_mcast_packets; /* Rx multicast packets */
u64 rx_packets; u64 rx_bcast_packets; /* Rx broadcast packets */
u64 rx_mcast_packets; u64 rx_control_frames; /* Rx control frames */
u64 rx_bcast_packets; u64 rx_unknown_opcode; /* Rx unknown opcode */
u64 rx_control_frames; u64 rx_drop; /* Rx drops */
u64 rx_unknown_opcode; u64 rx_jabber; /* Rx jabber */
u64 rx_drop; u64 rx_fcs_error; /* Rx FCS errors */
u64 rx_jabber; u64 rx_alignment_error; /* Rx alignment errors */
u64 rx_fcs_error; u64 rx_frame_length_error; /* Rx frame len errors */
u64 rx_alignment_error; u64 rx_code_error; /* Rx code errors */
u64 rx_frame_length_error; u64 rx_fragments; /* Rx fragments */
u64 rx_code_error; u64 rx_pause; /* Rx pause */
u64 rx_fragments; u64 rx_zero_pause; /* Rx zero pause */
u64 tx_pause; /* Tx pause */
u64 rx_pause; /* BPC */ u64 tx_zero_pause; /* Tx zero pause */
u64 rx_zero_pause; /* BPC Pause cancellation */ u64 rx_fcoe_pause; /* Rx fcoe pause */
u64 tx_pause; /* BPC */ u64 rx_fcoe_zero_pause; /* Rx FCoE zero pause */
u64 tx_zero_pause; /* BPC Pause cancellation */ u64 tx_fcoe_pause; /* Tx FCoE pause */
u64 rx_fcoe_pause; /* BPC */ u64 tx_fcoe_zero_pause; /* Tx FCoE zero pause */
u64 rx_fcoe_zero_pause; /* BPC Pause cancellation */
u64 tx_fcoe_pause; /* BPC */
u64 tx_fcoe_zero_pause; /* BPC Pause cancellation */
}; };
/** /**
......
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