diff mbox series

[v1] net/ice/base: fix switch rules not cleared on warm reset

Message ID 20220812025254.145132-1-stevex.yang@intel.com (mailing list archive)
State Superseded
Delegated to: Qi Zhang
Headers show
Series [v1] net/ice/base: fix switch rules not cleared on warm reset | expand

Checks

Context Check Description
ci/intel-Testing fail Testing issues
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Steve Yang Aug. 12, 2022, 2:52 a.m. UTC
When users killed app forcely (e.g.: kill -9 pid), the driver reset
couldn't make all registers of NIC recovery to initial status.
For example, the switch filter rules, which involved the vlan tag,
couldn't be added.

Tell the Firmware to shut down the AdminQ to avoid possible error
when process was killed abnormally.

Fixes: 453d087ccaff ("net/ice/base: add common functions")
Cc: stable@dpdk.org

Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
 drivers/net/ice/base/ice_common.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index db87bacd97..66b51be29d 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -926,6 +926,11 @@  enum ice_status ice_init_hw(struct ice_hw *hw)
 	if (status)
 		goto err_unroll_cqinit;
 
+	/* Tell the Firmware to shut down the AdminQ to avoid possible error
+	 * when process was killed abnormally.
+	 */
+	ice_aq_q_shutdown(hw, true);
+
 	status = ice_init_nvm(hw);
 	if (status)
 		goto err_unroll_cqinit;