patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2
@ 2024-08-14  2:50 Chaoyong He
  2024-08-14  2:50 ` [PATCH 23.11 1/2] net/nfp: fix firmware abnormal cleanup Chaoyong He
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chaoyong He @ 2024-08-14  2:50 UTC (permalink / raw)
  To: stable; +Cc: oss-drivers, Chaoyong He

This patch series aims to backport 2 patches to DPDK 23.11.2:
3a64e190bc  Chaoyong He      net/nfp: fix firmware abnormal cleanup
78bbab1628  Chaoyong He      net/nfp: forbid offload flow rules with empty action list

Chaoyong He (2):
  net/nfp: fix firmware abnormal cleanup
  net/nfp: forbid offload flow rules with empty action list

 drivers/net/nfp/nfp_ethdev.c | 6 ++++--
 drivers/net/nfp/nfp_flow.c   | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.39.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 23.11 1/2] net/nfp: fix firmware abnormal cleanup
  2024-08-14  2:50 [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Chaoyong He
@ 2024-08-14  2:50 ` Chaoyong He
  2024-08-14  2:50 ` [PATCH 23.11 2/2] net/nfp: forbid offload flow rules with empty action list Chaoyong He
  2024-08-21  8:56 ` [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Xueming Li
  2 siblings, 0 replies; 4+ messages in thread
From: Chaoyong He @ 2024-08-14  2:50 UTC (permalink / raw)
  To: stable; +Cc: oss-drivers, Chaoyong He

[ upstream commit 3a64e190bcddd51b8e062cf9e78d5f62156e5e0e ]

The logic of 'nfp_fw_setup()' consider both single-pf and multi-pf
firmware, but the abnormal firmware cleanup logic only consider multi-pf
firmware and try to write the heart beat value, which will cause
coredump when using the single-pf firmware.

Fixes: 8ba461d1eecc ("net/nfp: introduce keepalive mechanism for multiple PF")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 8bb6715450..7495b01f16 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1396,8 +1396,10 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	free(sym_tbl);
 fw_cleanup:
 	nfp_fw_unload(cpp);
-	nfp_net_keepalive_stop(&pf_dev->multi_pf);
-	nfp_net_keepalive_uninit(&pf_dev->multi_pf);
+	if (pf_dev->multi_pf.enabled) {
+		nfp_net_keepalive_stop(&pf_dev->multi_pf);
+		nfp_net_keepalive_uninit(&pf_dev->multi_pf);
+	}
 eth_table_cleanup:
 	free(nfp_eth_table);
 hwinfo_cleanup:
-- 
2.39.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 23.11 2/2] net/nfp: forbid offload flow rules with empty action list
  2024-08-14  2:50 [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Chaoyong He
  2024-08-14  2:50 ` [PATCH 23.11 1/2] net/nfp: fix firmware abnormal cleanup Chaoyong He
@ 2024-08-14  2:50 ` Chaoyong He
  2024-08-21  8:56 ` [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Xueming Li
  2 siblings, 0 replies; 4+ messages in thread
From: Chaoyong He @ 2024-08-14  2:50 UTC (permalink / raw)
  To: stable; +Cc: oss-drivers, Chaoyong He

[ upstream commit 78bbab16282a2b6b8b3983677b7b1a32543b909b ]

The original logic allow offload flow rules with empty action list, but
the matched packets will be drop by the flower firmware.

Fix this by forbidding offload this type flow rules.

Fixes: 4d946034bf9c ("net/nfp: support basic flow actions")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 9ad434affb..91ebee5db4 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3741,6 +3741,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
 		total_actions++;
 	}
 
+	if (nfp_flow->install_flag && total_actions == 0) {
+		PMD_DRV_LOG(ERR, "The action list is empty");
+		return -ENOTSUP;
+	}
+
 	if (drop_flag)
 		nfp_flow_meta->shortcut = rte_cpu_to_be_32(NFP_FL_SC_ACT_DROP);
 	else if (total_actions > 1)
-- 
2.39.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2
  2024-08-14  2:50 [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Chaoyong He
  2024-08-14  2:50 ` [PATCH 23.11 1/2] net/nfp: fix firmware abnormal cleanup Chaoyong He
  2024-08-14  2:50 ` [PATCH 23.11 2/2] net/nfp: forbid offload flow rules with empty action list Chaoyong He
@ 2024-08-21  8:56 ` Xueming Li
  2 siblings, 0 replies; 4+ messages in thread
From: Xueming Li @ 2024-08-21  8:56 UTC (permalink / raw)
  To: Chaoyong He, stable; +Cc: oss-drivers

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

Hi Chaoyong,

Thanks for the backporting, patch sent to release candidate queue.

Best Regards,
Xueming
________________________________
From: Chaoyong He <chaoyong.he@corigine.com>
Sent: Wednesday, August 14, 2024 10:50 AM
To: stable@dpdk.org <stable@dpdk.org>
Cc: oss-drivers@corigine.com <oss-drivers@corigine.com>; Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2

This patch series aims to backport 2 patches to DPDK 23.11.2:
3a64e190bc  Chaoyong He      net/nfp: fix firmware abnormal cleanup
78bbab1628  Chaoyong He      net/nfp: forbid offload flow rules with empty action list

Chaoyong He (2):
  net/nfp: fix firmware abnormal cleanup
  net/nfp: forbid offload flow rules with empty action list

 drivers/net/nfp/nfp_ethdev.c | 6 ++++--
 drivers/net/nfp/nfp_flow.c   | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)

--
2.39.1


[-- Attachment #2: Type: text/html, Size: 2767 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-21  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-14  2:50 [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Chaoyong He
2024-08-14  2:50 ` [PATCH 23.11 1/2] net/nfp: fix firmware abnormal cleanup Chaoyong He
2024-08-14  2:50 ` [PATCH 23.11 2/2] net/nfp: forbid offload flow rules with empty action list Chaoyong He
2024-08-21  8:56 ` [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Xueming Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).