Skip to contentSkip to conversation

net/ice: fix core dump when device reset

PATCH Applied Simei Su 3 participants 3 messages Nov 10, 2020 Network drivers

lore
Share & tools
lore

Simei Su

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/ice/ice_acl_filter.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/net/ice/ice_acl_filter.c +8 -4
index ca483f0..8ca88d2 100644
@@ -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
Signature · 1 line
2.9.5
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Su, Simei <[email protected]>
Sent: Tuesday, November 10, 2020 10:02 AM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wang, Haiyue <[email protected]>; Ding, Xuan <[email protected]>; Su, Simei <[email protected]>
Subject: [PATCH] net/ice: fix core dump when device reset

Quoted 7 lines

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")

Applied to dpdk-next-net-intel.

Thanks
Qi

Tested-by on v1 1/1
#2 lore raw
In reply to Simei Su

Regards,
Xie Wei

Quoted 11 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Simei Su
Sent: Tuesday, November 10, 2020 10:02 AM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wang, Haiyue <[email protected]>; Ding, Xuan <[email protected]>; Su, Simei <[email protected]>
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.