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 566CB455AD for ; Mon, 15 Jul 2024 17:30:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5225D40DFB; Mon, 15 Jul 2024 17:30:30 +0200 (CEST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id 5AFFF40E16 for ; Mon, 15 Jul 2024 17:30:29 +0200 (CEST) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-36799fb93baso2614458f8f.0 for ; Mon, 15 Jul 2024 08:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057429; x=1721662229; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kTMseIGhRCcyut66cFgZfNP2vrfJcsm/OJZxv0F/PLQ=; b=d1Z7T8424r0MC5LBpeCCRK6RMxq6dkHc4m2hGIvZ0KsoFUSzW2p3EaUONGo3bzhC8u ca3KZEIHq9DbiGdbQWf8aONjpD780zNPohkiU3elzQR4PgyO5hBKMVaTd8daCySqyOee 1CTMklM6xAIY4J0n0lhwLOFfuX9ETmbBVNFbTrIzWAOL0H0Tuuw+Mbpinrcwv5j1Muce bRZrMhQ7mYjf3L51av1SRRItfHXqJnSl4O6Wp+NIaSHFetzRnL2CZz2kyr35Vc6ab2tL oSxXf2uRYW4DCv0vBbHmLJA+VHSkbEP5MeZIZzNxPauA7qFN3GxM62aF4R5t2qmDTCxF hLWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057429; x=1721662229; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kTMseIGhRCcyut66cFgZfNP2vrfJcsm/OJZxv0F/PLQ=; b=n/d+P6adJqtAei9ny43ByhzRTYz+aQHQGbEvGGLVkKf3gQl98Utq4RyLbWEeju+tYE WV+rpJaZEXkDSeyq7qRO/EP45EYGlXet3Px2HqqPo9Ci3CqREw0W/rUgMb970ndn8OMk qAEKg4s45tSyheO5+nNHJ25q2QWQKzG6VARcE1X3fq3sN5c2lgEmrixq8W9qPcy+tn1W Uee2bfXrkVSYfyxQ4rPlSjVXg5tfuTRyIDRqndVjETNxlhIw3ffidqBIlsy1GwUiprLC NQ1MGRSBBNfn1t/jA/82hTPZ7PYqwKgXa/b0EWjoVpERyEcZHoRHvbJmigvFTTFWIurt Om2g== X-Gm-Message-State: AOJu0YxmaR/f1+EXDeiPVAmWqgTqYE3zM/NeUnD7hvV4XxwgWkuELFNd 5L/k/8PGi7P2kGlbifL2Zb0+KiDgacLTwoBhJFH+uT7AZcgNe7AfFXrnKP2OVlk= X-Google-Smtp-Source: AGHT+IFrYkxYx8b+0QhhLq2zUNmKsUxZqnB/RJEbs2pZ8J4/9HXNgdfagVxKuEsUNDMZFreOEyWIKQ== X-Received: by 2002:a5d:5748:0:b0:367:96b5:7852 with SMTP id ffacd0b85a97d-368240cd239mr45483f8f.55.1721057428955; Mon, 15 Jul 2024 08:30:28 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680daccc91sm6701288f8f.53.2024.07.15.08.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:30:28 -0700 (PDT) From: luca.boccassi@gmail.com To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: reconfigure more MAC Rx registers' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:42 +0100 Message-Id: <20240715152704.2229503-64-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.6 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/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/13909e4ba2cd08b6477e8b8d2f5f42c459e7215b Thanks. Luca Boccassi --- >From 13909e4ba2cd08b6477e8b8d2f5f42c459e7215b 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 86896d11dc..a2984f1106 100644 --- a/drivers/net/txgbe/base/txgbe_regs.h +++ b/drivers/net/txgbe/base/txgbe_regs.h @@ -1022,6 +1022,8 @@ enum txgbe_5tuple_protocol { #define TXGBE_MACRXFLT_CTL_PASS LS(3, 6, 0x3) #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 def3202ce8..24e779c02c 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -2793,6 +2793,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, bool link_up; int err; int wait = 1; + u32 reg; memset(&link, 0, sizeof(link)); link.link_status = RTE_ETH_LINK_DOWN; @@ -2879,9 +2880,14 @@ 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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:37.813963967 +0100 +++ 0064-net-txgbe-reconfigure-more-MAC-Rx-registers.patch 2024-07-15 16:19:34.676208769 +0100 @@ -1 +1 @@ -From 3056288933f06afa72f8611ab7c4accdd01899fa Mon Sep 17 00:00:00 2001 +From 13909e4ba2cd08b6477e8b8d2f5f42c459e7215b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index a59d964a5b..699ff1c920 100644 +index def3202ce8..24e779c02c 100644 @@ -36 +37 @@ -@@ -2879,6 +2879,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -2793,6 +2793,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, @@ -44 +45 @@ -@@ -2968,9 +2969,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -2879,9 +2880,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,