DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: fix core dump when device reset
@ 2020-11-10  2:01 Simei Su
  2020-11-10  2:41 ` Zhang, Qi Z
  2020-11-10  2:56 ` Xie, WeiX
  0 siblings, 2 replies; 3+ messages in thread
From: Simei Su @ 2020-11-10  2:01 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, haiyue.wang, xuan.ding, Simei Su

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


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

* Re: [dpdk-dev] [PATCH] net/ice: fix core dump when device reset
  2020-11-10  2:01 [dpdk-dev] [PATCH] net/ice: fix core dump when device reset Simei Su
@ 2020-11-10  2:41 ` Zhang, Qi Z
  2020-11-10  2:56 ` Xie, WeiX
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2020-11-10  2:41 UTC (permalink / raw)
  To: Su, Simei; +Cc: dev, Wang, Haiyue, Ding, Xuan



> -----Original Message-----
> From: Su, Simei <simei.su@intel.com>
> Sent: Tuesday, November 10, 2020 10:02 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; Ding, Xuan
> <xuan.ding@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [PATCH] net/ice: fix core dump when device reset
> 
> 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>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

* Re: [dpdk-dev] [PATCH] net/ice: fix core dump when device reset
  2020-11-10  2:01 [dpdk-dev] [PATCH] net/ice: fix core dump when device reset Simei Su
  2020-11-10  2:41 ` Zhang, Qi Z
@ 2020-11-10  2:56 ` Xie, WeiX
  1 sibling, 0 replies; 3+ messages in thread
From: Xie, WeiX @ 2020-11-10  2:56 UTC (permalink / raw)
  To: Su, Simei, Zhang, Qi Z; +Cc: dev, Wang, Haiyue, Ding, Xuan, Su, Simei

Tested-by:  Xie,WeiX < weix.xie@intel.com>

Regards,
Xie Wei


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Simei Su
> Sent: Tuesday, November 10, 2020 10:02 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; Ding, Xuan
> <xuan.ding@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [dpdk-dev] [PATCH] net/ice: fix core dump when device reset
> 
> 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.

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

end of thread, other threads:[~2020-11-10  2:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  2:01 [dpdk-dev] [PATCH] net/ice: fix core dump when device reset Simei Su
2020-11-10  2:41 ` Zhang, Qi Z
2020-11-10  2:56 ` Xie, WeiX

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git