DPDK patches and discussions
 help / color / mirror / Atom feed
* RE: [PATCH] net/ice: fix DDP package init
  2022-09-07 12:06 [PATCH] net/ice: fix DDP package init Qi Zhang
@ 2022-09-07 12:05 ` Zhang, Qi Z
  2022-10-08  5:46   ` Zhang, Qi Z
  2022-10-08 14:06 ` [PATCH v2] " Qi Zhang
  1 sibling, 1 reply; 6+ messages in thread
From: Zhang, Qi Z @ 2022-09-07 12:05 UTC (permalink / raw)
  To: Yang, Qiming; +Cc: dev, Yang, SteveX



> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Wednesday, September 7, 2022 8:06 PM
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Yang, SteveX <stevex.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Subject: [PATCH] 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.
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>

The patch has been squashed into below patch which has not been merged.
https://patchwork.dpdk.org/project/dpdk/patch/20220815073206.2917968-21-qi.z.zhang@intel.com/

> ---
>  drivers/net/ice/ice_ethdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index
> fc889420c7..50fe23fdc4 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -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
> --
> 2.26.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] net/ice: fix DDP package init
@ 2022-09-07 12:06 Qi Zhang
  2022-09-07 12:05 ` Zhang, Qi Z
  2022-10-08 14:06 ` [PATCH v2] " Qi Zhang
  0 siblings, 2 replies; 6+ messages in thread
From: Qi Zhang @ 2022-09-07 12:06 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, stevex.yang, Qi Zhang

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.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index fc889420c7..50fe23fdc4 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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
-- 
2.26.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] net/ice: fix DDP package init
  2022-09-07 12:05 ` Zhang, Qi Z
@ 2022-10-08  5:46   ` Zhang, Qi Z
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Qi Z @ 2022-10-08  5:46 UTC (permalink / raw)
  To: Yang, Qiming; +Cc: dev, Yang, SteveX



> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Wednesday, September 7, 2022 8:05 PM
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Yang, SteveX <stevex.yang@intel.com>
> Subject: RE: [PATCH] net/ice: fix DDP package init
> 
> 
> 
> > -----Original Message-----
> > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Sent: Wednesday, September 7, 2022 8:06 PM
> > To: Yang, Qiming <qiming.yang@intel.com>
> > Cc: dev@dpdk.org; Yang, SteveX <stevex.yang@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>
> > Subject: [PATCH] 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.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> The patch has been squashed into below patch which has not been merged.
> https://patchwork.dpdk.org/project/dpdk/patch/20220815073206.2917968-
> 21-qi.z.zhang@intel.com/

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.

> 
> > ---
> >  drivers/net/ice/ice_ethdev.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ice/ice_ethdev.c
> > b/drivers/net/ice/ice_ethdev.c index
> > fc889420c7..50fe23fdc4 100644
> > --- a/drivers/net/ice/ice_ethdev.c
> > +++ b/drivers/net/ice/ice_ethdev.c
> > @@ -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
> > --
> > 2.26.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] net/ice: fix DDP package init
  2022-10-08 14:06 ` [PATCH v2] " Qi Zhang
@ 2022-10-08  6:11   ` Huang, ZhiminX
  2022-10-08  6:13     ` Zhang, Qi Z
  0 siblings, 1 reply; 6+ messages in thread
From: Huang, ZhiminX @ 2022-10-08  6:11 UTC (permalink / raw)
  To: Zhang, Qi Z, Yang, Qiming; +Cc: dev, Zhang, Qi Z

> -----Original Message-----
> From: Qi Zhang <qi.z.zhang@intel.com>
> Sent: Saturday, October 8, 2022 10:06 PM
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH v2] 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.
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> 
> v2:
> - fix error from ice_copy_and_init_pkg not be esculated.
> 
Tested-by: Zhimin Huang <zhiminx.huang@intel.com >



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] net/ice: fix DDP package init
  2022-10-08  6:11   ` Huang, ZhiminX
@ 2022-10-08  6:13     ` Zhang, Qi Z
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Qi Z @ 2022-10-08  6:13 UTC (permalink / raw)
  To: Huang, ZhiminX, Yang, Qiming; +Cc: dev



> -----Original Message-----
> From: Huang, ZhiminX <zhiminx.huang@intel.com>
> Sent: Saturday, October 8, 2022 2:11 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [PATCH v2] net/ice: fix DDP package init
> 
> > -----Original Message-----
> > From: Qi Zhang <qi.z.zhang@intel.com>
> > Sent: Saturday, October 8, 2022 10:06 PM
> > To: Yang, Qiming <qiming.yang@intel.com>
> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: [PATCH v2] 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.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> >
> > v2:
> > - fix error from ice_copy_and_init_pkg not be esculated.
> >
> Tested-by: Zhimin Huang <zhiminx.huang@intel.com >

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] net/ice: fix DDP package init
  2022-09-07 12:06 [PATCH] net/ice: fix DDP package init Qi Zhang
  2022-09-07 12:05 ` Zhang, Qi Z
@ 2022-10-08 14:06 ` Qi Zhang
  2022-10-08  6:11   ` Huang, ZhiminX
  1 sibling, 1 reply; 6+ messages in thread
From: Qi Zhang @ 2022-10-08 14:06 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, Qi Zhang

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.zhang@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-08  6:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 12:06 [PATCH] net/ice: fix DDP package init Qi Zhang
2022-09-07 12:05 ` Zhang, Qi Z
2022-10-08  5:46   ` Zhang, Qi Z
2022-10-08 14:06 ` [PATCH v2] " Qi Zhang
2022-10-08  6:11   ` Huang, ZhiminX
2022-10-08  6:13     ` 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).