* [PATCH v1] net/ice/base: fix ddp pkg loaded failed
@ 2022-09-07 9:10 Steve Yang
2022-09-07 12:17 ` Zhang, Qi Z
0 siblings, 1 reply; 2+ messages in thread
From: Steve Yang @ 2022-09-07 9:10 UTC (permalink / raw)
To: dev; +Cc: qiming.yang, qi.z.zhang, Steve Yang
When DDP package state is 'ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED',
it should be treated as success state, otherwise, the wrong state will
be used within 'ice_load_pkg'.
Fixes: 58e9fd55be0e ("net/ice/base: refactor DDP code")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
drivers/net/ice/base/ice_ddp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c
index d1cae48047..284b58a6b1 100644
--- a/drivers/net/ice/base/ice_ddp.c
+++ b/drivers/net/ice/base/ice_ddp.c
@@ -1378,8 +1378,11 @@ enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
*/
if (!state || state == ICE_DDP_PKG_ALREADY_LOADED) {
state = ice_get_pkg_info(hw);
- if (!state)
+ if (!state) {
state = ice_get_ddp_pkg_state(hw, already_loaded);
+ if (state == ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED)
+ state = ICE_SUCCESS;
+ }
}
if (ice_is_init_pkg_successful(state)) {
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH v1] net/ice/base: fix ddp pkg loaded failed
2022-09-07 9:10 [PATCH v1] net/ice/base: fix ddp pkg loaded failed Steve Yang
@ 2022-09-07 12:17 ` Zhang, Qi Z
0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2022-09-07 12:17 UTC (permalink / raw)
To: Yang, SteveX, dev; +Cc: Yang, Qiming
> -----Original Message-----
> From: Yang, SteveX <stevex.yang@intel.com>
> Sent: Wednesday, September 7, 2022 5:10 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>
> Subject: [PATCH v1] net/ice/base: fix ddp pkg loaded failed
>
> When DDP package state is
> 'ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED',
> it should be treated as success state, otherwise, the wrong state will be used
> within 'ice_load_pkg'.
>
> Fixes: 58e9fd55be0e ("net/ice/base: refactor DDP code")
>
> Signed-off-by: Steve Yang <stevex.yang@intel.com>
> ---
> drivers/net/ice/base/ice_ddp.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c
> index d1cae48047..284b58a6b1 100644
> --- a/drivers/net/ice/base/ice_ddp.c
> +++ b/drivers/net/ice/base/ice_ddp.c
> @@ -1378,8 +1378,11 @@ enum ice_ddp_state ice_init_pkg(struct ice_hw
> *hw, u8 *buf, u32 len)
> */
> if (!state || state == ICE_DDP_PKG_ALREADY_LOADED) {
> state = ice_get_pkg_info(hw);
> - if (!state)
> + if (!state) {
> state = ice_get_ddp_pkg_state(hw, already_loaded);
> + if (state ==
> ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED)
We can use ice_is_init_pkg_successful to check the return value which also accept ICE_DDP_PKG_COMPATIBLE_ALREADY_LOADED and this is expected.
Btw, I didn't notice this patch has been sent before I send another one for the same purpose, this one can be superseded.
> + state = ICE_SUCCESS;
> + }
> }
>
> if (ice_is_init_pkg_successful(state)) {
> --
> 2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-07 12:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 9:10 [PATCH v1] net/ice/base: fix ddp pkg loaded failed Steve Yang
2022-09-07 12:17 ` Zhang, Qi Z
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).