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 AAFCF45501; Wed, 26 Jun 2024 14:00:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF279433F3; Wed, 26 Jun 2024 13:56:00 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id E319E42E95 for ; Wed, 26 Jun 2024 13:44:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402268; x=1750938268; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kRl8L4nwXKuY4OlMxB0peNi/Ih4S0V7TmLEsJW8CTG0=; b=DLYBFqU5qC8AKdMyzIt0a5eMgOwlKy0ZxPhA2E8/joI8NwSgpxf+X9K3 OfkRMoeZCbWEAGQ9Nz2aB1HPxScdK8SwvK008GQ2Nmz5NRqg5sie+MSGE nH/QfZSvseCwqm0yHFRl0x6WlWLcyZ8UXFG39zhVBgYMDs9En1paZcFOf WimIwv5Zbvn0xNT8s9n4n22e20fyKezak7Jc88sarM5x5jpsmOBMwXG60 rNieym6UzTCbV1/pTaWf9XUP56WdbJ69IDGCsIpukavHzkju0oJpO0K2H KX2W3NDE0UwzQNGMwpQVO+Mx3vHHpQlXYezzoEaO0N+/1M7SKJwd/0/pX w==; X-CSE-ConnectionGUID: 5K45TtExS82pInEasgBczg== X-CSE-MsgGUID: rzBJEOFZRzy34Ji6xu3vAQ== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979438" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979438" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2024 04:44:27 -0700 X-CSE-ConnectionGUID: /B7k+KrfRRqft4D+gYTibw== X-CSE-MsgGUID: 2+mFoLPLR2WijHQVMUQ5SQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43873965" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:44:26 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Dan Nowlin , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 052/103] net/ice/base: fix package download algorithm Date: Wed, 26 Jun 2024 12:41:40 +0100 Message-ID: <5a3b3a78486f08f8a795749421f50f7f1fea12c5.1719401848.git.anatoly.burakov@intel.com> 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