patch 'net/nfp: fix link status interrupt' has been queued to stable release 20.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Nov 8 20:25:27 CET 2023


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 <peng.zhang at corigine.com>
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 <shihong.wang at corigine.com>
Signed-off-by: Peng Zhang <peng.zhang at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
---
 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 at 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);
+ 	}


More information about the stable mailing list