From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ABE8F46BAE for ; Fri, 18 Jul 2025 21:38:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A663740B8F; Fri, 18 Jul 2025 21:38:55 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 600EC40611 for ; Fri, 18 Jul 2025 21:38:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X5OGIDCpqyUNEhjjjc1GUuiBfry62Rh7IngIryaT/Xs=; b=OXTZrl6GKpLcvrqQXLkYIH0n4c+UXIlup2hTsu69iQaHnG7E8y/dIN97ApH/YQEquahxJZ XDfe/gwYgVyxmn2/iBhciGktbgxGbfbn16n2O8/liSCnkRVo6+sgmjhMFXUI/ITowh94iH bMYOeOup+JVi1oNpJ5QBdqlvn5+VUoA= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-501-uKEBYkFXNNWXEPCwT3ExTQ-1; Fri, 18 Jul 2025 15:38:50 -0400 X-MC-Unique: uKEBYkFXNNWXEPCwT3ExTQ-1 X-Mimecast-MFC-AGG-ID: uKEBYkFXNNWXEPCwT3ExTQ_1752867529 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A5B7D18004A7; Fri, 18 Jul 2025 19:38:49 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1E2F018003FC; Fri, 18 Jul 2025 19:38:47 +0000 (UTC) From: Kevin Traynor To: Kaiwen Deng Cc: Bruce Richardson , dpdk stable Subject: patch 'net/ixgbe: skip MACsec stats for E610' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:31:45 +0100 Message-ID: <20250718193247.1008129-171-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lrxGUmWKq_O4C6zunBhho4vjHG1vFLjJEmYWu9pIpFE_1752867529 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Acked-by: Bruce Richardson --- 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@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)