[PATCH v3 08/11] net/dpaa2: support dpmac Tx stats in xstats
Gagandeep Singh
g.singh at nxp.com
Mon Jun 9 04:54:47 CEST 2025
From: Apeksha Gupta <apeksha.gupta at nxp.com>
Added all mac counters including Tx stats buckets for
packet sizes in xstats.
Signed-off-by: Apeksha Gupta <apeksha.gupta at nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla at nxp.com>
---
drivers/net/dpaa2/dpaa2_ethdev.c | 20 +++++++++++++++++++-
drivers/net/dpaa2/dpaa2_ethdev.h | 4 ++--
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index bbf4df69d4..298fded65e 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1,7 +1,7 @@
/* * SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
- * Copyright 2016-2024 NXP
+ * Copyright 2016-2025 NXP
*
*/
@@ -134,6 +134,24 @@ static const struct rte_dpaa2_xstats_name_off dpaa2_xstats_strings[] = {
{"mac_tx_frame errors", 0, 0},
{"mac_rx_frames ok", 0, 0},
{"mac_tx_frames ok", 0, 0},
+ {"mac_tx_64 bytes", 0, 0},
+ {"mac_tx_65-127 bytes", 0, 0},
+ {"mac_tx_128-255 bytes", 0, 0},
+ {"mac_tx_256-511 bytes", 0, 0},
+ {"mac_tx_512-1023 bytes", 0, 0},
+ {"mac_tx_1024-1518 bytes", 0, 0},
+ {"mac_tx_1519-max bytes", 0, 0},
+ {"mac_rx_all_bytes", 0, 0},
+ {"mac_rx_fcs_err", 0, 0},
+ {"mac_rx_vlan_frame", 0, 0},
+ {"mac_rx_undersized", 0, 0},
+ {"mac_rx_control_frame", 0, 0},
+ {"mac_rx_frame_discard_not_trunc", 0, 0},
+ {"mac_tx_all_bytes", 0, 0},
+ {"mac_tx_fcs_err", 0, 0},
+ {"mac_tx_vlan_frame", 0, 0},
+ {"mac_tx_all_frame", 0, 0},
+ {"mac_tx_control_frame", 0, 0},
};
static struct rte_dpaa2_driver rte_dpaa2_pmd;
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 532c257203..570b1608a0 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2015-2016 Freescale Semiconductor, Inc. All rights reserved.
- * Copyright 2016-2022 NXP
+ * Copyright 2016-2025 NXP
*
*/
@@ -131,7 +131,7 @@
#define DPAA2_PKT_TYPE_VLAN_2 0x0260
/* mac counters */
-#define DPAA2_MAC_NUM_STATS (DPMAC_CNT_EGR_GOOD_FRAME + 1)
+#define DPAA2_MAC_NUM_STATS (DPMAC_CNT_EGR_CONTROL_FRAME + 1)
#define DPAA2_MAC_STATS_INDEX_DMA_SIZE (DPAA2_MAC_NUM_STATS * sizeof(uint32_t))
#define DPAA2_MAC_STATS_VALUE_DMA_SIZE (DPAA2_MAC_NUM_STATS * sizeof(uint64_t))
--
2.25.1
More information about the dev
mailing list