net/ice: fix DDP package init
PATCH 1/1 net/ice: fix DDP package init
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.
--- drivers/net/ice/ice_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ice/ice_ethdev.c +2 -2
@@ -1836,7 +1836,7 @@ 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; }
@@ -1846,7 +1846,7 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn) out:free (buf); -return err; +return 0 ; } static void
Signature · 1 line
2.26.2
Quoted 10 lines
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Wednesday, September 7, 2022 8:06 PM
To: Yang, Qiming <[email protected]>
Cc: [email protected]; Yang, SteveX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH] net/ice: fix DDP package init
Quoted 6 lines
ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADEDandICE_DDP_PKG_COMPATIBLE_ALREADY_LOADEDshould not be treated as a DDP package init failure. Useice_is_init_pkg_successfulto check return value ofice_copy_and_init_pkg.Signed-off-by Qi Zhang <[email protected]>
The patch has been squashed into below patch which has not been merged.
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
Quoted 31 lines
--- drivers/net/ice/ice_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ice/ice_ethdev.c index renamed from drivers/net/ice/ice_ethdev.c +0
-0
fc889420c7..50fe23fdc4100644drivers/net/ice/ice_ethdev.c +1
-1@@ -1836,7 +1836,7 @@ 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);drivers/net/ice/ice_ethdev.c +1
-1goto out; }@@ -1846,7 +1846,7 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn) out:free (buf); -return err; +return 0 ; }static void
--
2.26.2
Quoted 22 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Wednesday, September 7, 2022 8:05 PM
To: Yang, Qiming <[email protected]>
Cc: [email protected]; Yang, SteveX <[email protected]>
Subject: RE: [PATCH] net/ice: fix DDP package initQuoted 10 lines
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Wednesday, September 7, 2022 8:06 PM
To: Yang, Qiming <[email protected]>
Cc: [email protected]; Yang, SteveX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH] net/ice: fix DDP package init
ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADEDandICE_DDP_PKG_COMPATIBLE_ALREADY_LOADEDshould not be treated as aDDP
Quoted 8 lines
Quoted 4 lines
package init failure. Use
ice_is_init_pkg_successfulto check return value ofice_copy_and_init_pkg.Signed-off-by Qi Zhang <[email protected]>The patch has been squashed into below patch which has not been merged.
https://patchwork.dpdk.org/project/dpdk/patch/20220815073206.2917968-
[email protected]/
There is a miss-operation in dpdk-next-net-intel, the patch actually has not been squashed.
At this moment, since the target patch already be merged, a separated fix is required.
The good point is the original fix still has defect as a failure of ice_copy_and_init_pkg will not be escalated to the caller and V2 will fix this.
Quoted 33 lines
Quoted 11 lines
--- drivers/net/ice/ice_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/net/ice/ice_ethdev.cindexfc889420c7..50fe23fdc4100644drivers/net/ice/ice_ethdev.c int ice_load_pkg(struct ice_adapter *adapter, · line 1841
Quoted 7 lines
drivers/net/ice/ice_ethdev.c +1
-1@@ -1836,7 +1836,7 @@ 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);
Quoted 14 lines
drivers/net/ice/ice_ethdev.c +0
-0goto out;drivers/net/ice/ice_ethdev.c +1
-1}@@ -1846,7 +1846,7 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn) out:free (buf ); -return err; +return 0 ; }static void
--
2.26.2
PATCH v2 1/1 net/ice: fix DDP package init
In reply to Qi ZhangICE_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.
---
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(-)
drivers/net/ice/ice_ethdev.c +4 -4
@@ -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
Signature · 1 line
2.31.1
Quoted 12 lines
-----Original Message-----
From: Qi Zhang <[email protected]>
Sent: Saturday, October 8, 2022 10:06 PM
To: Yang, Qiming <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>
Subject: [PATCH v2] net/ice: fix DDP package init
ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADEDandICE_DDP_PKG_COMPATIBLE_ALREADY_LOADEDshould not be treated as a DDP package init failure. Useice_is_init_pkg_successfulto check return value ofice_copy_and_init_pkg.
Quoted 6 lines
Signed-off-by Qi Zhang <[email protected]>---
v2:
- fix error fromice_copy_and_init_pkgnot be esculated.
Zhang, Qi Z
AppliedQuoted 23 lines
-----Original Message-----
From: Huang, ZhiminX <[email protected]>
Sent: Saturday, October 8, 2022 2:11 PM
To: Zhang, Qi Z <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>
Subject: RE: [PATCH v2] net/ice: fix DDP package initQuoted 9 lines
-----Original Message-----
From: Qi Zhang <[email protected]>
Sent: Saturday, October 8, 2022 10:06 PM
To: Yang, Qiming <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>
Subject: [PATCH v2] net/ice: fix DDP package init
ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADEDandICE_DDP_PKG_COMPATIBLE_ALREADY_LOADEDshould not be treated as aDDP
Quoted 3 lines
package init failure. Use
ice_is_init_pkg_successfulto check return value ofice_copy_and_init_pkg.
Quoted 7 lines
Quoted 6 lines
Signed-off-by Qi Zhang <[email protected]>---
v2:
- fix error fromice_copy_and_init_pkgnot be esculated.Tested-by Zhimin Huang <[email protected] >
Applied to dpdk-next-net-intel.
Thanks
Qi