ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED and ICE_DDP_PKG_COMPATIBLE_ALREADY_LOADED should not be treated as a DDP package init failure. Use ice_is_init_pkg_successful to check return value of ice_copy_and_init_pkg.
Signed-off-by: Qi Zhang <qi.z.zh...@intel.com> --- v2: - fix error from ice_copy_and_init_pkg not be esculated. drivers/net/ice/ice_ethdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 8aa37722c3..6e21c38152 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1841,17 +1841,17 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn) PMD_INIT_LOG(DEBUG, "DDP package name: %s", pkg_file); err = ice_copy_and_init_pkg(hw, buf, bufsz); - if (err) { + if (!ice_is_init_pkg_successful(err)) { PMD_INIT_LOG(ERR, "ice_copy_and_init_hw failed: %d\n", err); - goto out; + free(buf); + return -1; } /* store the loaded pkg type info */ adapter->active_pkg_type = ice_load_pkg_type(hw); -out: free(buf); - return err; + return 0; } static void -- 2.31.1