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 0BC08454EF; Tue, 25 Jun 2024 13:24:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EFD942FCB; Tue, 25 Jun 2024 13:18:22 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 9F12D427DE 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=65fDCCsz3sP5oi5rstYOignDTNdCj7wyevd9F+muduM=; b=lLUfTWdGIo+tMs2oLe7I93bd3KEa9QtyuORh39mxfl2uk5Hba88Qsmzp 5wxL0iGYDcvyFPYX5tqYqXIlgtK5G1VYAw9hhRPkVV/5Gsb65+g+EOIgT xQ2elXVf+jDI3GnKO8PofQ7jsikD5X5JtnYFqWIMILrWE4A59qDk1W1an raqeX6L6Yqvhj3mXmAmaT/7rVT0/y/W2SiesrnmjfPppVoDy86ohwNTso pjwg23yV7VtX2/tIWWh2t9YRiNr32/lfsJF5+D/vQx8/L9hBH4FTSsfyJ 08IA68XSjQm3n/WuDgdeUBVdteBAAcSM8Kf1FaBRHowv/vW9daomdHSgB w==; X-CSE-ConnectionGUID: BRVVWFnVS3GMIi9zMM4igA== X-CSE-MsgGUID: lczZ01wmRCeY0G5umxOeVg== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080367" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080367" 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:57 -0700 X-CSE-ConnectionGUID: XubwKC+mSS2/+aYWU71KAw== X-CSE-MsgGUID: fITiRbkKQHam+B7R9c7TeQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719440" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:16:56 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Dan Nowlin , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 073/129] net/ice/base: allows packages with mixed signature presence Date: Tue, 25 Jun 2024 12:13:18 +0100 Message-ID: <204e4984f6e392063f88b0e2b18ee992cd207cd5.1719313663.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 As a temporary workaround to allow unsigned packages, there needs to be support for configuration segments that are unsigned. Allow packages that have some configuration segments that are signed and some configuration segments that are not signed. The code has been changed to detect for each configuration segment whether there is a matching signature segment or not. Signed-off-by: Dan Nowlin Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ddp.c | 24 +----------------------- drivers/net/ice/base/ice_type.h | 1 - 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c index b57c67d849..3271d4572d 100644 --- a/drivers/net/ice/base/ice_ddp.c +++ b/drivers/net/ice/base/ice_ddp.c @@ -415,21 +415,6 @@ ice_aq_get_pkg_info_list(struct ice_hw *hw, return ice_aq_send_cmd(hw, &desc, pkg_info, buf_size, cd); } -/** - * ice_has_signing_seg - determine if package has a signing segment - * @hw: pointer to the hardware structure - * @pkg_hdr: pointer to the driver's package hdr - */ -static bool ice_has_signing_seg(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr) -{ - struct ice_generic_seg_hdr *seg_hdr; - - seg_hdr = (struct ice_generic_seg_hdr *) - ice_find_seg_in_pkg(hw, SEGMENT_TYPE_SIGNING, pkg_hdr); - - return seg_hdr ? true : false; -} - /** * ice_get_pkg_segment_id - get correct package segment id, based on device * @mac_type: MAC type of the device @@ -760,7 +745,7 @@ ice_download_pkg(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr, { enum ice_ddp_state state; - if (hw->pkg_has_signing_seg) + if (ice_match_signing_seg(pkg_hdr, hw->pkg_seg_id, hw->pkg_sign_type)) state = ice_download_pkg_with_sig_seg(hw, pkg_hdr); else state = ice_download_pkg_without_sig_seg(hw, ice_seg); @@ -785,7 +770,6 @@ ice_init_pkg_info(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr) if (!pkg_hdr) return ICE_DDP_PKG_ERR; - hw->pkg_has_signing_seg = ice_has_signing_seg(hw, pkg_hdr); ice_get_signing_req(hw); ice_debug(hw, ICE_DBG_INIT, "Pkg using segment id: 0x%08X\n", @@ -1360,12 +1344,6 @@ enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len) if (state) return state; - /* For packages with signing segments, must be a matching segment */ - if (hw->pkg_has_signing_seg) - if (!ice_match_signing_seg(pkg, hw->pkg_seg_id, - hw->pkg_sign_type)) - return ICE_DDP_PKG_ERR; - /* before downloading the package, check package version for * compatibility with driver */ diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index 46fb5bd8c8..68a8397d4d 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -1352,7 +1352,6 @@ struct ice_hw { u32 pkg_seg_id; u32 pkg_sign_type; u32 active_track_id; - u8 pkg_has_signing_seg:1; u8 active_pkg_name[ICE_PKG_NAME_SIZE]; u8 active_pkg_in_nvm; -- 2.43.0