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 9CB7B432DA for ; Wed, 8 Nov 2023 20:27:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 968C4406A2; Wed, 8 Nov 2023 20:27:04 +0100 (CET) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by mails.dpdk.org (Postfix) with ESMTP id A7BE642E32 for ; Wed, 8 Nov 2023 20:27:02 +0100 (CET) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-507cee17b00so16291e87.2 for ; Wed, 08 Nov 2023 11:27:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699471622; x=1700076422; 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=PM4bBausD+vcsS3+jj/Z2vQzeN2H5NvZUtJVYV89RwA=; b=Zlk/v4KRKMm8wFHC7aZ03pJJWTbXbybZrqhtvbH0D766g1PgIaw7SgDdSjFZVs/+fb 26qXsKuYVZixa/ZgQmoQyfLGu5F2KFfX8/7u8eESBrV1uDgAp4aPnq3kp+32JoxNdgsc dMsMjG0iZzzfJOAO3tRXeMvlVs4YN0ANkuYutALgCJqTxKBw+hksLBpxTvmmYcaiL2bH vT6VTETP+Ge0lz/9wKOP92hTVGvXLNw6uItsgoGnSjgXl0nL1oLF/aTa8W5bb+la72hJ pHPdeEmll6zKNPBqINthUGF267Vdc90YjcZgikk1kM3gsObkrTkIIyTZ9+wU2sHjhe/s 0Ylg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699471622; x=1700076422; 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=PM4bBausD+vcsS3+jj/Z2vQzeN2H5NvZUtJVYV89RwA=; b=M+NqpPFWz7XxpJcVOXSuDUKwrgQ5FABJUCLa1GyMug1us8ivkNMv6xS4it2M9uKERA fG4i2B/73INBWn5inxTxsH3OgV1Js4ZLkrYf3DgaUqEUAYrTYn3V3moRXvFi1JpaIvrT AGCSa1V3YeO+uHKlpcq64I1944moMNPUMbTfSPHyX+z4L4XMJ5uVShhLbJ4hsVybmSg3 Tfsd3yOknyRbAT+QR3yRmm9meva6gJ2ZSnzdYCvxsY5wXdYiEgHaF0KdlwHP1pMTtuQC xCj1kr3m1gHsFjFkowjUoOxOSsetb+tTGDXTSxv2XQk9mHr2foJUosvxnVTjosfNL+n7 OKXA== X-Gm-Message-State: AOJu0YzmWHYCNtLpMw8srIhfOSGLu+5vXPWGeZ5Qv7/reOFZNuAHsBdX mKBmUjDP2xkbVNv6mAEzFJGUeqi0x9WCTQ== X-Google-Smtp-Source: AGHT+IHzFwG4dvaDeFTrayqO8u5B+kRxcXa59oLC4f5j2jX4wKTg17RWRwIs0ALvLxECVVN9nY1DRg== X-Received: by 2002:ac2:4f8e:0:b0:507:a40e:d8bf with SMTP id z14-20020ac24f8e000000b00507a40ed8bfmr1879679lfs.7.1699471622088; Wed, 08 Nov 2023 11:27:02 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id z13-20020a5d640d000000b0032d96dd703bsm5648899wru.70.2023.11.08.11.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 11:27:01 -0800 (PST) From: luca.boccassi@gmail.com To: Peng Zhang Cc: Shihong Wang , Chaoyong He , dpdk stable Subject: patch 'net/nfp: fix link status interrupt' has been queued to stable release 20.11.10 Date: Wed, 8 Nov 2023 19:25:27 +0000 Message-Id: <20231108192535.922238-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108192535.922238-1-luca.boccassi@gmail.com> References: <20231018235930.3144-41-luca.boccassi@gmail.com> <20231108192535.922238-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 20.11.10 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/10/23. 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/fff9e4948d6b2bcb6376d09d36e7ceea50dfa5b5 Thanks. Luca Boccassi --- >From fff9e4948d6b2bcb6376d09d36e7ceea50dfa5b5 Mon Sep 17 00:00:00 2001 From: Peng Zhang Date: Thu, 2 Nov 2023 10:23:12 +0800 Subject: [PATCH] net/nfp: fix link status interrupt [ upstream commit 94d0631a8275afa4314ee1d4f08d2fbd02325124 ] In rare cases, when DPDK application exit, the interrupt handler was not processed the interrupt in time, resulting in the LSC interrupt mask bit not being cleared. So when the DPDK application start again, the newly coming LSC interrupts cannot be received and processed properly. Fix this problem by force clear the LSC interrupt mask on port initialization. Fixes: 6c53f87b3497 ("nfp: add link status interrupt") Signed-off-by: Shihong Wang Signed-off-by: Peng Zhang Reviewed-by: Chaoyong He --- drivers/net/nfp/nfp_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index f9844851bf..b60457b9bd 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -3040,6 +3040,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev) (void *)eth_dev); /* Telling the firmware about the LSC interrupt entry */ nn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX); + /* Unmask the LSC interrupt */ + nfp_net_irq_unmask(eth_dev); /* Recording current stats counters values */ nfp_net_stats_reset(eth_dev); } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-08 19:23:53.371552953 +0000 +++ 0029-net-nfp-fix-link-status-interrupt.patch 2023-11-08 19:23:51.813397120 +0000 @@ -1 +1 @@ -From 94d0631a8275afa4314ee1d4f08d2fbd02325124 Mon Sep 17 00:00:00 2001 +From fff9e4948d6b2bcb6376d09d36e7ceea50dfa5b5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 94d0631a8275afa4314ee1d4f08d2fbd02325124 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -21,57 +22,16 @@ - drivers/net/nfp/nfp_ethdev.c | 2 ++ - drivers/net/nfp/nfp_ethdev_vf.c | 2 ++ - drivers/net/nfp/nfp_net_common.c | 2 +- - drivers/net/nfp/nfp_net_common.h | 1 + - 4 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c -index f5e06970ec..d4cc6ca64a 100644 ---- a/drivers/net/nfp/nfp_ethdev.c -+++ b/drivers/net/nfp/nfp_ethdev.c -@@ -592,6 +592,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev) - nfp_net_dev_interrupt_handler, (void *)eth_dev); - /* Telling the firmware about the LSC interrupt entry */ - nn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX); -+ /* Unmask the LSC interrupt */ -+ nfp_net_irq_unmask(eth_dev); - /* Recording current stats counters values */ - nfp_net_stats_reset(eth_dev); - -diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c -index e1bd5555e9..7927f53403 100644 ---- a/drivers/net/nfp/nfp_ethdev_vf.c -+++ b/drivers/net/nfp/nfp_ethdev_vf.c -@@ -353,6 +353,8 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) - nfp_net_dev_interrupt_handler, (void *)eth_dev); - /* Telling the firmware about the LSC interrupt entry */ - nn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX); -+ /* Unmask the LSC interrupt */ -+ nfp_net_irq_unmask(eth_dev); - /* Recording current stats counters values */ - nfp_net_stats_reset(eth_dev); - -diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c -index 2326c812c7..f517fcb5de 100644 ---- a/drivers/net/nfp/nfp_net_common.c -+++ b/drivers/net/nfp/nfp_net_common.c -@@ -1379,7 +1379,7 @@ nfp_net_dev_link_status_print(struct rte_eth_dev *dev) - * If MSI-X auto-masking is enabled clear the mask bit, otherwise - * clear the ICR for the entry. - */ --static void -+void - nfp_net_irq_unmask(struct rte_eth_dev *dev) - { - struct nfp_net_hw *hw; -diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h -index 2cad10668c..88a65b19a6 100644 ---- a/drivers/net/nfp/nfp_net_common.h -+++ b/drivers/net/nfp/nfp_net_common.h -@@ -207,6 +207,7 @@ int nfp_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id); - int nfp_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id); - void nfp_net_params_setup(struct nfp_net_hw *hw); - void nfp_net_cfg_queue_setup(struct nfp_net_hw *hw); -+void nfp_net_irq_unmask(struct rte_eth_dev *dev); - void nfp_net_dev_interrupt_handler(void *param); - void nfp_net_dev_interrupt_delayed_handler(void *param); - int nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu); + drivers/net/nfp/nfp_net.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c +index f9844851bf..b60457b9bd 100644 +--- a/drivers/net/nfp/nfp_net.c ++++ b/drivers/net/nfp/nfp_net.c +@@ -3040,6 +3040,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev) + (void *)eth_dev); + /* Telling the firmware about the LSC interrupt entry */ + nn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX); ++ /* Unmask the LSC interrupt */ ++ nfp_net_irq_unmask(eth_dev); + /* Recording current stats counters values */ + nfp_net_stats_reset(eth_dev); + }