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 53AC445804 for ; Fri, 23 Aug 2024 18:23:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D4F54339C; Fri, 23 Aug 2024 18:23:13 +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 418344336F for ; Fri, 23 Aug 2024 18:23:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724430190; 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=XsHmmaIpLchEarmPIlqO6a31Z29trXUsNuCRKAMPkBE=; b=daxofFqW7OKbBgwUr0frIY117Biny4446BWgHtBBR9YJkkc6yNfhFJjbXxDpbxWKQZSw9h dIB74EvUuN/woPjx9rtR7LKyksfc5C5a9VrpiVCQo4eX8TciwX1SLzqD131f844xFRqvrq VDRDIjY+2G74RHMRvCNjNXc6ProLPk0= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-qeTBgOGDOo6a0kK38pinHg-1; Fri, 23 Aug 2024 12:23:07 -0400 X-MC-Unique: qeTBgOGDOo6a0kK38pinHg-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6CF321955D4A; Fri, 23 Aug 2024 16:23:06 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.193.224]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2B60B1956053; Fri, 23 Aug 2024 16:23:04 +0000 (UTC) From: Kevin Traynor To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: reconfigure more MAC Rx registers' has been queued to stable release 21.11.8 Date: Fri, 23 Aug 2024 17:18:46 +0100 Message-ID: <20240823161929.1004778-98-ktraynor@redhat.com> In-Reply-To: <20240823161929.1004778-1-ktraynor@redhat.com> References: <20240823161929.1004778-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 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 21.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/28/24. 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/df4ec1ced28446b1f3a2262d797f9079fd0f6e46 Thanks. Kevin --- >From df4ec1ced28446b1f3a2262d797f9079fd0f6e46 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Tue, 18 Jun 2024 15:11:36 +0800 Subject: [PATCH] net/txgbe: reconfigure more MAC Rx registers [ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ] When link status changes, there is a probability that no more packets can be received on the port, due to hardware defects. These MAC Rx registers should be reconfigured to fix this problem. Fixes: 950a6954df13 ("net/txgbe: reconfigure MAC Rx when link update") Signed-off-by: Jiawen Wu --- drivers/net/txgbe/base/txgbe_regs.h | 2 ++ drivers/net/txgbe/txgbe_ethdev.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h index c96bdd984b..d151123882 100644 --- a/drivers/net/txgbe/base/txgbe_regs.h +++ b/drivers/net/txgbe/base/txgbe_regs.h @@ -1021,4 +1021,6 @@ enum txgbe_5tuple_protocol { #define TXGBE_MACRXFLT_RXALL MS(31, 0x1) +#define TXGBE_MAC_WDG_TIMEOUT 0x01100C + /****************************************************************************** * Statistic Registers diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index 39874c67a9..3ff8da2de9 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -2714,4 +2714,5 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, int err; int wait = 1; + u32 reg; memset(&link, 0, sizeof(link)); @@ -2786,7 +2787,12 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, /* Re configure MAC RX */ - if (hw->mac.type == txgbe_mac_raptor) + if (hw->mac.type == txgbe_mac_raptor) { + reg = rd32(hw, TXGBE_MACRXCFG); + wr32(hw, TXGBE_MACRXCFG, reg); wr32m(hw, TXGBE_MACRXFLT, TXGBE_MACRXFLT_PROMISC, TXGBE_MACRXFLT_PROMISC); + reg = rd32(hw, TXGBE_MAC_WDG_TIMEOUT); + wr32(hw, TXGBE_MAC_WDG_TIMEOUT, reg); + } return rte_eth_linkstatus_set(dev, &link); -- 2.46.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-23 17:18:12.611299179 +0100 +++ 0098-net-txgbe-reconfigure-more-MAC-Rx-registers.patch 2024-08-23 17:18:09.822430462 +0100 @@ -1 +1 @@ -From 3056288933f06afa72f8611ab7c4accdd01899fa Mon Sep 17 00:00:00 2001 +From df4ec1ced28446b1f3a2262d797f9079fd0f6e46 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 86896d11dc..a2984f1106 100644 +index c96bdd984b..d151123882 100644 @@ -23 +24 @@ -@@ -1023,4 +1023,6 @@ enum txgbe_5tuple_protocol { +@@ -1021,4 +1021,6 @@ enum txgbe_5tuple_protocol { @@ -31 +32 @@ -index a59d964a5b..699ff1c920 100644 +index 39874c67a9..3ff8da2de9 100644 @@ -34 +35 @@ -@@ -2880,4 +2880,5 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -2714,4 +2714,5 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, @@ -40 +41 @@ -@@ -2969,7 +2970,12 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -2786,7 +2787,12 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,