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 249B945C9B for ; Tue, 12 Nov 2024 23:09:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1ACB840A8B; Tue, 12 Nov 2024 23:09:45 +0100 (CET) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id 3A38240A84 for ; Tue, 12 Nov 2024 23:09:43 +0100 (CET) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-37d4821e6b4so4372678f8f.3 for ; Tue, 12 Nov 2024 14:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731449383; x=1732054183; 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=ktoII1OHueZOo0WxsS6GddjFTPPI5WWAVeI2zbZBd8A=; b=C6M3KYeFHZaEpKL961OQY3khrz13t2MDs6IdmUsVODfXlwS4BgeR4xx5MIS5pm03WF x5miKnbn/IksUNH/n3yTaSEx1YADCPvbqdGN0nfgyAW2HZ8252h0YP+qBI613PBKjKvy sbe0magEQ2bq4cnb3o3Gsaiq+19xsIrbn7NJeyA6mPcu9xCzFMOkPJ1IqCghkfELf1Er 0gsFcfrniQ3B7P91ggl43V9uzVSbpo1E6GkVxVXUl19kSm5nioiPxLZlRzzA04LeA0Ip BvE8ciyeUKGpE6iWH4bMhopSp+YypGxLcmVm342EmpbT/6u4Umhg/kvaE0o5frDWhhpX 7brg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731449383; x=1732054183; 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=ktoII1OHueZOo0WxsS6GddjFTPPI5WWAVeI2zbZBd8A=; b=T917iys3VSuLXF6hM65C4Swo5V09YxNcM1+fcRRm81ftu2VfqcTNsnzU+8hfo14PEj j3Qj0A+YB+rjd3JqqCSsG+KxN4mcu+CE/PVbpbYQ+ieANQFdQhucktiK2Cc9P63VLZfO L+a7hSOQsApNAP4uK11noaQdGgoNJhExV3cx+kUo/EtF4+ARnUnmkv7WJGpsPbTAzqsi vgRGSLMLrViN0st68iOjRZpEmoW84B+u4xmkHPMF5LS3CGAD1dAxzyeubNfLGZmeWR/r tHQIw8fsoaKgr7cfYWfS6ZdCao2yRdDWpfQy8Nr/H8yHMvzrJ427Pb/HjXqt1OSJVRX9 4ZLg== X-Gm-Message-State: AOJu0Yx03p1tnHTk2E+FINV4/WTZVuC9HMOObyPb3HlXjUdc2T5K+EP3 aBFGad+n18LFIBOxy2osYcZPWRrPedOOsgZ/4xEi/34LVXe+0nw/t3B1JQ== X-Google-Smtp-Source: AGHT+IGAiYP+rwJ29qqTvQ/11WjIdIr3rb4PPC0ctrSlfXR/bBxVVA2ef3Bpi8ekrDK0MQ3O4vXq/A== X-Received: by 2002:a05:6000:1849:b0:37d:4fab:c198 with SMTP id ffacd0b85a97d-381f1872412mr14174701f8f.26.1731449382740; Tue, 12 Nov 2024 14:09:42 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:e89d:e9a1:da72:2f9d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381ed9ea5c1sm16724974f8f.81.2024.11.12.14.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 14:09:42 -0800 (PST) From: luca.boccassi@gmail.com To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/ngbe: reconfigure more MAC Rx registers' has been queued to stable release 22.11.7 Date: Tue, 12 Nov 2024 22:07:39 +0000 Message-ID: <20241112220754.666489-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241112220754.666489-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-79-luca.boccassi@gmail.com> <20241112220754.666489-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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/14/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/ad0153dc8a97d24a03c93bc650b22653a6b5bb4f Thanks. Luca Boccassi --- >From ad0153dc8a97d24a03c93bc650b22653a6b5bb4f Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Mon, 4 Nov 2024 10:30:05 +0800 Subject: [PATCH] net/ngbe: reconfigure more MAC Rx registers [ upstream commit b8d52e1084a17c7ef83624f3bbd11a090e7b2267 ] 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: b9246b8fa280 ("net/ngbe: support link update") Fixes: a7c5f95ed9c2 ("net/ngbe: reconfigure MAC Rx when link update") Signed-off-by: Jiawen Wu --- drivers/net/ngbe/base/ngbe_regs.h | 2 ++ drivers/net/ngbe/ngbe_ethdev.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/ngbe/base/ngbe_regs.h b/drivers/net/ngbe/base/ngbe_regs.h index c0e79a2ba7..0d820f4079 100644 --- a/drivers/net/ngbe/base/ngbe_regs.h +++ b/drivers/net/ngbe/base/ngbe_regs.h @@ -712,6 +712,8 @@ enum ngbe_5tuple_protocol { #define NGBE_MACRXFLT_CTL_PASS LS(3, 6, 0x3) #define NGBE_MACRXFLT_RXALL MS(31, 0x1) +#define NGBE_MAC_WDG_TIMEOUT 0x01100C + /****************************************************************************** * Statistic Registers ******************************************************************************/ diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c index 51a7c78e3d..5f39bd336b 100644 --- a/drivers/net/ngbe/ngbe_ethdev.c +++ b/drivers/net/ngbe/ngbe_ethdev.c @@ -1894,6 +1894,7 @@ ngbe_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; @@ -1951,8 +1952,13 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev, wr32m(hw, NGBE_MACTXCFG, NGBE_MACTXCFG_SPEED_MASK, NGBE_MACTXCFG_SPEED_1G | NGBE_MACTXCFG_TE); } + /* Re configure MAC RX */ + reg = rd32(hw, NGBE_MACRXCFG); + wr32(hw, NGBE_MACRXCFG, reg); wr32m(hw, NGBE_MACRXFLT, NGBE_MACRXFLT_PROMISC, NGBE_MACRXFLT_PROMISC); + reg = rd32(hw, NGBE_MAC_WDG_TIMEOUT); + wr32(hw, NGBE_MAC_WDG_TIMEOUT, reg); } return rte_eth_linkstatus_set(dev, &link); -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-12 22:06:59.610812185 +0000 +++ 0029-net-ngbe-reconfigure-more-MAC-Rx-registers.patch 2024-11-12 22:06:58.679307391 +0000 @@ -1 +1 @@ -From b8d52e1084a17c7ef83624f3bbd11a090e7b2267 Mon Sep 17 00:00:00 2001 +From ad0153dc8a97d24a03c93bc650b22653a6b5bb4f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b8d52e1084a17c7ef83624f3bbd11a090e7b2267 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 8a6776b0e6..b1295280a7 100644 +index c0e79a2ba7..0d820f4079 100644 @@ -34 +35 @@ -index 238533f2b8..c372fd928c 100644 +index 51a7c78e3d..5f39bd336b 100644 @@ -37 +38 @@ -@@ -1941,6 +1941,7 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -1894,6 +1894,7 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev, @@ -45 +46 @@ -@@ -1998,8 +1999,13 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev, +@@ -1951,8 +1952,13 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,