From 22df08d82eeb0ffd5aa3b7f15ca978dfb5cc8377 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Tue, 23 May 2023 16:47:46 +0300 Subject: net: ldpaa_eth: extend debug capabilities with DPMAC statistics The ldpaa_eth driver already had a DPMAC statistics dump, this patch extends the list of stats and adds a bit more structure to the code. For a bit more context, the DPAA2 u-boot software architecture uses a default network interface object - a DPNI - which, at runtime, will get connected to the currently used DPMAC object. Each time the .stop() eth callback is called, the DPMAC is destroyed thus any previous counters will get lost. As a preparation for the next patches, we add a software kept set of DPMAC counters which will get updated before each destroy operation takes place. Signed-off-by: Ioana Ciornei Reviewed-by: Ramon Fried Signed-off-by: Peng Fan --- include/fsl-mc/fsl_dpmac.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/fsl-mc/fsl_dpmac.h b/include/fsl-mc/fsl_dpmac.h index 8f5e17fe222..1fa26ef3805 100644 --- a/include/fsl-mc/fsl_dpmac.h +++ b/include/fsl-mc/fsl_dpmac.h @@ -412,6 +412,8 @@ int dpmac_set_link_state(struct fsl_mc_io *mc_io, * @DPMAC_CNT_EGR_ERR_FRAME: counts frame transmitted with an error * @DPMAC_CNT_ING_GOOD_FRAME: counts frame received without error, including * pause frames. + * @DPMAC_CNT_EGR_GOOD_FRAME: counts frames transmitted without error, including + * pause frames. */ enum dpmac_counter { DPMAC_CNT_ING_FRAME_64, @@ -440,7 +442,8 @@ enum dpmac_counter { DPMAC_CNT_EGR_BCAST_FRAME, DPMAC_CNT_EGR_UCAST_FRAME, DPMAC_CNT_EGR_ERR_FRAME, - DPMAC_CNT_ING_GOOD_FRAME + DPMAC_CNT_ING_GOOD_FRAME, + DPMAC_CNT_EGR_GOOD_FRAME, }; /** -- cgit v1.2.3