[intel] Add intelxvf_stats() to dump packet statistics registers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
3ec8b67818
commit
51b6a1c835
|
@ -38,6 +38,31 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Diagnostics
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dump statistics
|
||||||
|
*
|
||||||
|
* @v intel Intel device
|
||||||
|
*/
|
||||||
|
static __attribute__ (( unused )) void
|
||||||
|
intelxvf_stats ( struct intel_nic *intel ) {
|
||||||
|
|
||||||
|
DBGC ( intel, "INTEL %p TX %d (%#x%08x) RX %d (%#x%08x) multi %d\n",
|
||||||
|
intel, readl ( intel->regs + INTELXVF_GPTC ),
|
||||||
|
readl ( intel->regs + INTELXVF_GOTCH ),
|
||||||
|
readl ( intel->regs + INTELXVF_GOTCL ),
|
||||||
|
readl ( intel->regs + INTELXVF_GPRC ),
|
||||||
|
readl ( intel->regs + INTELXVF_GORCH ),
|
||||||
|
readl ( intel->regs + INTELXVF_GORCL ),
|
||||||
|
readl ( intel->regs + INTELXVF_MPRC ) );
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* Device reset
|
* Device reset
|
||||||
|
|
|
@ -71,7 +71,28 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||||
#define INTELXVF_SRRCTL_DESCTYPE_DEFAULT INTELXVF_SRRCTL_DESCTYPE ( 0x00 )
|
#define INTELXVF_SRRCTL_DESCTYPE_DEFAULT INTELXVF_SRRCTL_DESCTYPE ( 0x00 )
|
||||||
#define INTELXVF_SRRCTL_DESCTYPE_MASK INTELXVF_SRRCTL_DESCTYPE ( 0x07 )
|
#define INTELXVF_SRRCTL_DESCTYPE_MASK INTELXVF_SRRCTL_DESCTYPE ( 0x07 )
|
||||||
|
|
||||||
|
/** Good Packets Received Count */
|
||||||
|
#define INTELXVF_GPRC 0x101c
|
||||||
|
|
||||||
|
/** Good Packets Received Count Low */
|
||||||
|
#define INTELXVF_GORCL 0x1020
|
||||||
|
|
||||||
|
/** Good Packets Received Count High */
|
||||||
|
#define INTELXVF_GORCH 0x1024
|
||||||
|
|
||||||
|
/* Multicast Packets Received Count */
|
||||||
|
#define INTELXVF_MPRC 0x1034
|
||||||
|
|
||||||
/** Transmit Descriptor register block */
|
/** Transmit Descriptor register block */
|
||||||
#define INTELXVF_TD 0x2000UL
|
#define INTELXVF_TD 0x2000UL
|
||||||
|
|
||||||
|
/** Good Packets Transmitted Count */
|
||||||
|
#define INTELXVF_GPTC 0x201c
|
||||||
|
|
||||||
|
/** Good Packets Transmitted Count Low */
|
||||||
|
#define INTELXVF_GOTCL 0x2020
|
||||||
|
|
||||||
|
/** Good Packets Transmitted Count High */
|
||||||
|
#define INTELXVF_GOTCH 0x2024
|
||||||
|
|
||||||
#endif /* _INTELXVF_H */
|
#endif /* _INTELXVF_H */
|
||||||
|
|
Reference in New Issue