From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9D20AA054F; Wed, 7 Sep 2022 14:01:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E2FC40143; Wed, 7 Sep 2022 14:01:08 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id DD648400D6 for ; Wed, 7 Sep 2022 14:01:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662552066; x=1694088066; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ooWxt5IC+QwPtr50P5syPISqZ4uk1xz1t03NF7yi09Q=; b=gm42c9RJ+VNXO/GQMlMGZM9tDGPqVFQStJKLeg46Ey5qZBV+M31ftVLb 1hlAyvZ6PxVw9JNfRZT88WMpMJzbyX4DRRCXsXNP3eK0+t1/+IXg1qc1r 7eMccifuqgbTqj0Hht2BOJZRQ4n16nUbYkz+DpcnQKBhs2ZSWcuK6t0dX /1mskkxawIm7tGvvMKLC/YC+bRYTUDbxHqQ6RjC3ymwl9BfBDw1QN6Hvn 2gjqBVIq0Tulr6vrQUx8h2kgGJSHkwVXGmxfBYzvwBRcf09aNZx8evdnD NzxwfDheKsiX6GLj05xunJt+smZ4Rj5iPc2yeANTfDBfK+vxwyHHGyTNF A==; X-IronPort-AV: E=McAfee;i="6500,9779,10462"; a="295587360" X-IronPort-AV: E=Sophos;i="5.93,296,1654585200"; d="scan'208";a="295587360" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 05:00:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,296,1654585200"; d="scan'208";a="682782307" Received: from dpdk-qzhan15-test01.sh.intel.com ([10.67.111.92]) by fmsmga004.fm.intel.com with ESMTP; 07 Sep 2022 05:00:44 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, stevex.yang@intel.com, Qi Zhang Subject: [PATCH] net/ice: fix DDP package init Date: Wed, 7 Sep 2022 20:06:03 +0800 Message-Id: <20220907120603.169681-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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