patch 'net/ixgbe: skip MACsec stats for E610' has been queued to stable release 24.11.3

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:31:45 CEST 2025


Hi,

FYI, your patch has been queued to stable release 24.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/23/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1dff4472fa5daf25a19fc488188da4a83c7eb408

Thanks.

Kevin

---
>From 1dff4472fa5daf25a19fc488188da4a83c7eb408 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng at intel.com>
Date: Tue, 10 Jun 2025 13:42:25 +0800
Subject: [PATCH] net/ixgbe: skip MACsec stats for E610

[ upstream commit e24ffb2b28b43e3583d357a568c2f7548e0be88a ]

E610 device does not support MACsec, so the xstats for MACsec are
meaningless for this device.

Exclude MACsec stats from the xstats info display for E610 device.

Fixes: 316637762a5f ("net/ixgbe/base: enable E610 device")

Signed-off-by: Kaiwen Deng <kaiwenx.deng at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 119 +++++++++++++++++--------------
 1 file changed, 66 insertions(+), 53 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index e0e4802e34..7812a5ada6 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3355,36 +3355,38 @@ ixgbe_read_stats_registers(struct ixgbe_hw *hw,
 	}
 	/* MACsec Stats registers */
-	macsec_stats->out_pkts_untagged += IXGBE_READ_REG(hw, IXGBE_LSECTXUT);
-	macsec_stats->out_pkts_encrypted +=
-		IXGBE_READ_REG(hw, IXGBE_LSECTXPKTE);
-	macsec_stats->out_pkts_protected +=
-		IXGBE_READ_REG(hw, IXGBE_LSECTXPKTP);
-	macsec_stats->out_octets_encrypted +=
-		IXGBE_READ_REG(hw, IXGBE_LSECTXOCTE);
-	macsec_stats->out_octets_protected +=
-		IXGBE_READ_REG(hw, IXGBE_LSECTXOCTP);
-	macsec_stats->in_pkts_untagged += IXGBE_READ_REG(hw, IXGBE_LSECRXUT);
-	macsec_stats->in_pkts_badtag += IXGBE_READ_REG(hw, IXGBE_LSECRXBAD);
-	macsec_stats->in_pkts_nosci += IXGBE_READ_REG(hw, IXGBE_LSECRXNOSCI);
-	macsec_stats->in_pkts_unknownsci +=
-		IXGBE_READ_REG(hw, IXGBE_LSECRXUNSCI);
-	macsec_stats->in_octets_decrypted +=
-		IXGBE_READ_REG(hw, IXGBE_LSECRXOCTD);
-	macsec_stats->in_octets_validated +=
-		IXGBE_READ_REG(hw, IXGBE_LSECRXOCTV);
-	macsec_stats->in_pkts_unchecked += IXGBE_READ_REG(hw, IXGBE_LSECRXUNCH);
-	macsec_stats->in_pkts_delayed += IXGBE_READ_REG(hw, IXGBE_LSECRXDELAY);
-	macsec_stats->in_pkts_late += IXGBE_READ_REG(hw, IXGBE_LSECRXLATE);
-	for (i = 0; i < 2; i++) {
-		macsec_stats->in_pkts_ok +=
-			IXGBE_READ_REG(hw, IXGBE_LSECRXOK(i));
-		macsec_stats->in_pkts_invalid +=
-			IXGBE_READ_REG(hw, IXGBE_LSECRXINV(i));
-		macsec_stats->in_pkts_notvalid +=
-			IXGBE_READ_REG(hw, IXGBE_LSECRXNV(i));
+	if (hw->mac.type != ixgbe_mac_E610) {
+		macsec_stats->out_pkts_untagged += IXGBE_READ_REG(hw, IXGBE_LSECTXUT);
+		macsec_stats->out_pkts_encrypted +=
+			IXGBE_READ_REG(hw, IXGBE_LSECTXPKTE);
+		macsec_stats->out_pkts_protected +=
+			IXGBE_READ_REG(hw, IXGBE_LSECTXPKTP);
+		macsec_stats->out_octets_encrypted +=
+			IXGBE_READ_REG(hw, IXGBE_LSECTXOCTE);
+		macsec_stats->out_octets_protected +=
+			IXGBE_READ_REG(hw, IXGBE_LSECTXOCTP);
+		macsec_stats->in_pkts_untagged += IXGBE_READ_REG(hw, IXGBE_LSECRXUT);
+		macsec_stats->in_pkts_badtag += IXGBE_READ_REG(hw, IXGBE_LSECRXBAD);
+		macsec_stats->in_pkts_nosci += IXGBE_READ_REG(hw, IXGBE_LSECRXNOSCI);
+		macsec_stats->in_pkts_unknownsci +=
+			IXGBE_READ_REG(hw, IXGBE_LSECRXUNSCI);
+		macsec_stats->in_octets_decrypted +=
+			IXGBE_READ_REG(hw, IXGBE_LSECRXOCTD);
+		macsec_stats->in_octets_validated +=
+			IXGBE_READ_REG(hw, IXGBE_LSECRXOCTV);
+		macsec_stats->in_pkts_unchecked += IXGBE_READ_REG(hw, IXGBE_LSECRXUNCH);
+		macsec_stats->in_pkts_delayed += IXGBE_READ_REG(hw, IXGBE_LSECRXDELAY);
+		macsec_stats->in_pkts_late += IXGBE_READ_REG(hw, IXGBE_LSECRXLATE);
+		for (i = 0; i < 2; i++) {
+			macsec_stats->in_pkts_ok +=
+				IXGBE_READ_REG(hw, IXGBE_LSECRXOK(i));
+			macsec_stats->in_pkts_invalid +=
+				IXGBE_READ_REG(hw, IXGBE_LSECRXINV(i));
+			macsec_stats->in_pkts_notvalid +=
+				IXGBE_READ_REG(hw, IXGBE_LSECRXNV(i));
+		}
+		macsec_stats->in_pkts_unusedsa += IXGBE_READ_REG(hw, IXGBE_LSECRXUNSA);
+		macsec_stats->in_pkts_notusingsa +=
+			IXGBE_READ_REG(hw, IXGBE_LSECRXNUSA);
 	}
-	macsec_stats->in_pkts_unusedsa += IXGBE_READ_REG(hw, IXGBE_LSECRXUNSA);
-	macsec_stats->in_pkts_notusingsa +=
-		IXGBE_READ_REG(hw, IXGBE_LSECRXNUSA);
 }
 
@@ -3479,13 +3481,17 @@ ixgbe_dev_stats_reset(struct rte_eth_dev *dev)
 
 static unsigned
-ixgbe_xstats_calc_num(void)
+ixgbe_xstats_calc_num(struct rte_eth_dev *dev)
 {
+	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	if (hw->mac.type == ixgbe_mac_E610)
+		return IXGBE_XSTATS_CALC_NUM - IXGBE_NB_MACSEC_STATS;
 	return IXGBE_XSTATS_CALC_NUM;
 }
 
-static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
+static int ixgbe_dev_xstats_get_names(struct rte_eth_dev *dev,
 	struct rte_eth_xstat_name *xstats_names, __rte_unused unsigned int size)
 {
-	const unsigned cnt_stats = ixgbe_xstats_calc_num();
+	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	const unsigned int cnt_stats = ixgbe_xstats_calc_num(dev);
 	unsigned stat, i, count;
 
@@ -3506,9 +3512,11 @@ static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 
 		/* MACsec Stats */
-		for (i = 0; i < IXGBE_NB_MACSEC_STATS; i++) {
-			strlcpy(xstats_names[count].name,
-				rte_ixgbe_macsec_strings[i].name,
-				sizeof(xstats_names[count].name));
-			count++;
+		if (hw->mac.type != ixgbe_mac_E610) {
+			for (i = 0; i < IXGBE_NB_MACSEC_STATS; i++) {
+				strlcpy(xstats_names[count].name,
+					rte_ixgbe_macsec_strings[i].name,
+					sizeof(xstats_names[count].name));
+				count++;
+			}
 		}
 
@@ -3545,5 +3553,6 @@ static int ixgbe_dev_xstats_get_names_by_id(
 {
 	if (!ids) {
-		const unsigned int cnt_stats = ixgbe_xstats_calc_num();
+		struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+		const unsigned int cnt_stats = ixgbe_xstats_calc_num(dev);
 		unsigned int stat, i, count;
 
@@ -3564,9 +3573,11 @@ static int ixgbe_dev_xstats_get_names_by_id(
 
 			/* MACsec Stats */
-			for (i = 0; i < IXGBE_NB_MACSEC_STATS; i++) {
-				strlcpy(xstats_names[count].name,
-					rte_ixgbe_macsec_strings[i].name,
-					sizeof(xstats_names[count].name));
-				count++;
+			if (hw->mac.type != ixgbe_mac_E610) {
+				for (i = 0; i < IXGBE_NB_MACSEC_STATS; i++) {
+					strlcpy(xstats_names[count].name,
+						rte_ixgbe_macsec_strings[i].name,
+						sizeof(xstats_names[count].name));
+					count++;
+				}
 			}
 
@@ -3644,5 +3655,5 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	unsigned i, stat, count = 0;
 
-	count = ixgbe_xstats_calc_num();
+	count = ixgbe_xstats_calc_num(dev);
 
 	if (n < count)
@@ -3673,9 +3684,11 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 
 	/* MACsec Stats */
-	for (i = 0; i < IXGBE_NB_MACSEC_STATS; i++) {
-		xstats[count].value = *(uint64_t *)(((char *)macsec_stats) +
-				rte_ixgbe_macsec_strings[i].offset);
-		xstats[count].id = count;
-		count++;
+	if (hw->mac.type != ixgbe_mac_E610) {
+		for (i = 0; i < IXGBE_NB_MACSEC_STATS; i++) {
+			xstats[count].value = *(uint64_t *)(((char *)macsec_stats) +
+					rte_ixgbe_macsec_strings[i].offset);
+			xstats[count].id = count;
+			count++;
+		}
 	}
 
@@ -3720,5 +3733,5 @@ ixgbe_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 		unsigned int i, stat, count = 0;
 
-		count = ixgbe_xstats_calc_num();
+		count = ixgbe_xstats_calc_num(dev);
 
 		if (!ids && n < count)
@@ -3804,5 +3817,5 @@ ixgbe_dev_xstats_reset(struct rte_eth_dev *dev)
 				dev->data->dev_private);
 
-	unsigned count = ixgbe_xstats_calc_num();
+	unsigned int count = ixgbe_xstats_calc_num(dev);
 
 	/* HW registers are cleared on read */
-- 
2.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:16.970242208 +0100
+++ 0171-net-ixgbe-skip-MACsec-stats-for-E610.patch	2025-07-18 20:29:11.189908125 +0100
@@ -1 +1 @@
-From e24ffb2b28b43e3583d357a568c2f7548e0be88a Mon Sep 17 00:00:00 2001
+From 1dff4472fa5daf25a19fc488188da4a83c7eb408 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e24ffb2b28b43e3583d357a568c2f7548e0be88a ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
- drivers/net/intel/ixgbe/ixgbe_ethdev.c | 119 ++++++++++++++-----------
+ drivers/net/ixgbe/ixgbe_ethdev.c | 119 +++++++++++++++++--------------
@@ -20,5 +21,5 @@
-diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
-index f1fd271a0a..1aae40be15 100644
---- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
-+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
-@@ -3359,36 +3359,38 @@ ixgbe_read_stats_registers(struct ixgbe_hw *hw,
+diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
+index e0e4802e34..7812a5ada6 100644
+--- a/drivers/net/ixgbe/ixgbe_ethdev.c
++++ b/drivers/net/ixgbe/ixgbe_ethdev.c
+@@ -3355,36 +3355,38 @@ ixgbe_read_stats_registers(struct ixgbe_hw *hw,
@@ -94 +95 @@
-@@ -3483,13 +3485,17 @@ ixgbe_dev_stats_reset(struct rte_eth_dev *dev)
+@@ -3479,13 +3481,17 @@ ixgbe_dev_stats_reset(struct rte_eth_dev *dev)
@@ -115 +116 @@
-@@ -3510,9 +3516,11 @@ static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
+@@ -3506,9 +3512,11 @@ static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
@@ -132 +133 @@
-@@ -3549,5 +3557,6 @@ static int ixgbe_dev_xstats_get_names_by_id(
+@@ -3545,5 +3553,6 @@ static int ixgbe_dev_xstats_get_names_by_id(
@@ -140 +141 @@
-@@ -3568,9 +3577,11 @@ static int ixgbe_dev_xstats_get_names_by_id(
+@@ -3564,9 +3573,11 @@ static int ixgbe_dev_xstats_get_names_by_id(
@@ -157 +158 @@
-@@ -3648,5 +3659,5 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -3644,5 +3655,5 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -164 +165 @@
-@@ -3677,9 +3688,11 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -3673,9 +3684,11 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -181 +182 @@
-@@ -3724,5 +3737,5 @@ ixgbe_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -3720,5 +3733,5 @@ ixgbe_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -188 +189 @@
-@@ -3808,5 +3821,5 @@ ixgbe_dev_xstats_reset(struct rte_eth_dev *dev)
+@@ -3804,5 +3817,5 @@ ixgbe_dev_xstats_reset(struct rte_eth_dev *dev)



More information about the stable mailing list