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 9C8AE454EF; Tue, 25 Jun 2024 13:24:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE91142FC3; Tue, 25 Jun 2024 13:18:20 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 28CCC42C24 for ; Tue, 25 Jun 2024 13:16:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314217; x=1750850217; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kRl8L4nwXKuY4OlMxB0peNi/Ih4S0V7TmLEsJW8CTG0=; b=IdH5o5EkPx3GVjxo4PNT89hp3DCdb5rVpXmLptKu+2RGk6fjC1zJ+pNZ kUOGUKUVTxrB850jsa6ChR4xGaMpR6WhXiuNBfJRlpJ5Qzd3Ef0D6LCmr AvB1I9ie0X5ntQMk3OPU3jvXejWy9+6AK6ypIvHyPSuEdRayUzfgnYsVI oC2qiDmgeFCBpussvGTVWSkwr72l1CMVkkQ/lwEfuVKIQTv+lysx4WACf zt4xCtDkDamhNYGVeO+4iFynsteCl+/eO2XbodrQ7gtjOScWOMCqr9XoB QBbswS7Aton9JyUtrnloGQf+ut6owvjpExa89Ns5KwwyrMWzUXRmOhEMF A==; X-CSE-ConnectionGUID: tKtNiBRzRmyk9rCzry4FPg== X-CSE-MsgGUID: w3HJqFoXQ36eQS6MoPT3lA== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080356" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080356" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:16:55 -0700 X-CSE-ConnectionGUID: YCH2UJi1R2W6tw6qdfkdFA== X-CSE-MsgGUID: pwl0dSzWTP6L0zFiloI5hg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719430" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:16:55 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Dan Nowlin , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 072/129] net/ice/base: fix package download algorithm Date: Tue, 25 Jun 2024 12:13:17 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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: Dan Nowlin 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