DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>
Subject: [PATCH v2] net/ice: fix DDP package init
Date: Sat,  8 Oct 2022 10:06:29 -0400	[thread overview]
Message-ID: <20221008140629.355646-1-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20220907120603.169681-1-qi.z.zhang@intel.com>

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


  parent reply	other threads:[~2022-10-08  5:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 12:06 [PATCH] " Qi Zhang
2022-09-07 12:05 ` Zhang, Qi Z
2022-10-08  5:46   ` Zhang, Qi Z
2022-10-08 14:06 ` Qi Zhang [this message]
2022-10-08  6:11   ` [PATCH v2] " Huang, ZhiminX
2022-10-08  6:13     ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221008140629.355646-1-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).