From: Simei Su <simei.su@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, haiyue.wang@intel.com, xuan.ding@intel.com,
Simei Su <simei.su@intel.com>
Subject: [dpdk-dev] [PATCH] net/ice: fix core dump when device reset
Date: Tue, 10 Nov 2020 10:01:50 +0800 [thread overview]
Message-ID: <20201110020150.173762-1-simei.su@intel.com> (raw)
When device resets, it should not implememt ACL initialization
which is only executed in DCF. This patch disable ACL init and
uninit when in DPDK PF only mode.
Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF")
Signed-off-by: Simei Su <simei.su@intel.com>
---
drivers/net/ice/ice_acl_filter.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index ca483f0..8ca88d2 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -935,6 +935,9 @@ ice_acl_init(struct ice_adapter *ad)
struct ice_hw *hw = ICE_PF_TO_HW(pf);
struct ice_flow_parser *parser = &ice_acl_parser;
+ if (!ad->hw.dcf_enabled)
+ return 0;
+
ret = ice_acl_prof_alloc(hw);
if (ret) {
PMD_DRV_LOG(ERR, "Cannot allocate memory for "
@@ -979,10 +982,11 @@ ice_acl_uninit(struct ice_adapter *ad)
struct ice_hw *hw = ICE_PF_TO_HW(pf);
struct ice_flow_parser *parser = &ice_acl_parser;
- ice_unregister_parser(parser, ad);
-
- ice_deinit_acl(pf);
- ice_acl_prof_free(hw);
+ if (ad->hw.dcf_enabled) {
+ ice_unregister_parser(parser, ad);
+ ice_deinit_acl(pf);
+ ice_acl_prof_free(hw);
+ }
}
static struct
--
2.9.5
next reply other threads:[~2020-11-10 2:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 2:01 Simei Su [this message]
2020-11-10 2:41 ` Zhang, Qi Z
2020-11-10 2:56 ` Xie, WeiX
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=20201110020150.173762-1-simei.su@intel.com \
--to=simei.su@intel.com \
--cc=dev@dpdk.org \
--cc=haiyue.wang@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=xuan.ding@intel.com \
/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).