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 E7E2E4404F; Wed, 12 Jun 2024 17:18:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4D8342F04; Wed, 12 Jun 2024 17:05:51 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 3886842EE7 for ; Wed, 12 Jun 2024 17:05:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204745; x=1749740745; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4HqNQE4xcEvRTaDekBioZKF23oUl6VCeNd4YBzwBQGU=; b=McIyk2I0lJhjuv93LQFl8E3Y9/tIXduZ63YIUxrTFEnQ7/Wns9MFF/Ax 7moI0ritcFbRVwAaCqKXjofSFIuUfW/xVU5iaD8hl406q/obT59BZ21S7 n+fZsqUIZ4zALFVZwbomafMFMQRnnRE0PaqZ1ShQLLmwi+OtMNh5TO1Ou 2xP/8VXHfkxwEeVEXRuvjEZSRlouyZD9cyoTvJtCYt8dbENylvk3/jlwu D6xlvlQAEhkVStoF5YN74QuWaaFw+o3cN+bKWHjeWw+Esxb6DkJl0B5yE +76qwuKcbziYfMbfczrMMk4VpVcLI42rdODY27uXwQs5uOM28aAIKkBwa g==; X-CSE-ConnectionGUID: CNA5vr0DSXyrXFlGE4VCfA== X-CSE-MsgGUID: NXEeFe+qTHSjYDp1U3rYXQ== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459780" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459780" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:05:45 -0700 X-CSE-ConnectionGUID: +adAlutxScKOXaLVWi6i5A== X-CSE-MsgGUID: B+JvaUgAQGu+8nGSDT4crA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925633" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:05:44 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Dan Nowlin Subject: [PATCH v2 090/148] net/ice/base: fix package download algorithm Date: Wed, 12 Jun 2024 16:01:24 +0100 Message-ID: <7204b01d9d0a93303a566e4dd0f54ea6f3a8956f.1718204529.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@intel.com> 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 From: Ian Stokes Previously, the code would assume that only "Modular Signature Segment" existed. Given a package with both a "Reference Signature Segment" and a "Modular Signature Segment" the download would not have been successful because an incorrect sequence of buffers would be sent to the firmware. Update download flow to detect a "Reference Signature Segment" and to only download the buffers in the signature segment in this case, and to skip downloading any buffers from the configuration segment. Signed-off-by: Dan Nowlin Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ddp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c index 5a0cf4d54f..b57c67d849 100644 --- a/drivers/net/ice/base/ice_ddp.c +++ b/drivers/net/ice/base/ice_ddp.c @@ -568,6 +568,14 @@ ice_dwnld_sign_and_cfg_segs(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr, if (state) goto exit; + if (count == 0) { + /* this is a "Reference Signature Segment" and download should + * be only for the buffers in the signature segment (and not + * the hardware configuration segment) + */ + goto exit; + } + state = ice_download_pkg_config_seg(hw, pkg_hdr, conf_idx, start, count); -- 2.43.0