From: Chaoyong He <chaoyong.he@corigine.com>
To: stable@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH 23.11 1/2] net/nfp: fix firmware abnormal cleanup
Date: Wed, 14 Aug 2024 10:50:37 +0800 [thread overview]
Message-ID: <20240814025038.1698473-2-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20240814025038.1698473-1-chaoyong.he@corigine.com>
[ 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
next prev parent reply other threads:[~2024-08-14 2:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240814025038.1698473-2-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).