This patch fixes core dump issue when entering safe mode with a
wrong ice.pkg. In safe mode, rte_flow is not supported and it
won't initialize any flow engine.
Fixes:
7615a6895009 ("net/ice: rework for generic flow enabling")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
/* get base queue pairs index in the device */
ice_base_queue_get(pf);
- ret = ice_flow_init(ad);
- if (ret) {
- PMD_INIT_LOG(ERR, "Failed to initialize flow");
- return ret;
+ if (!ad->is_safe_mode) {
+ ret = ice_flow_init(ad);
+ if (ret) {
+ PMD_INIT_LOG(ERR, "Failed to initialize flow");
+ return ret;
+ }
}
ret = ice_reset_fxp_resource(hw);
ice_dev_stop(dev);
- ice_flow_uninit(ad);
+ if (!ad->is_safe_mode)
+ ice_flow_uninit(ad);
/* release all queue resource */
ice_free_queues(dev);