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 A894645501; Wed, 26 Jun 2024 14:00:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C75F4340B; Wed, 26 Jun 2024 13:56:02 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 8D8CD42E95 for ; Wed, 26 Jun 2024 13:44:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402269; x=1750938269; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=65fDCCsz3sP5oi5rstYOignDTNdCj7wyevd9F+muduM=; b=Ku4ybCJ7FV0aAEBI0vuZH/gKikmKKRhyNr5k1giXfETeKNZgLrIiac+q eWHoaWTfXmOFMjevXD7eJPGoB1eZpDOhsbrz4AOk4JUbZpb4g5MRm3A/F PPx/1CzYfdq+JbLoHsHpMM/z+HuRe7xMsJ7Db7/kqoVEgBdqBGTIxD8I3 JX6sXUe6NwPLCzOHouMvDcIk+Fdapa4fSB90Uqljg2zw3M3sBx53aBRbm CgfkuLnGK0AaP9Acpvyyf0pyrRepMCp0iIK7z62qaENAErO9h/ycn+LCZ QdboNIatnWdxudq8xtQRgAmtlVPxAi249DPhRw+S0XrkTppnmY4ieTF0m A==; X-CSE-ConnectionGUID: VVY/USfMS6yoWpEw0Mlz3w== X-CSE-MsgGUID: iICskTtBSvm+6ri31+vPyQ== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979440" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979440" 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:29 -0700 X-CSE-ConnectionGUID: 0XJtYZ7+RuKi2yJ9+ZWulg== X-CSE-MsgGUID: twOkQq4kSX2XhCF3IcU7xg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43873973" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:44:28 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Dan Nowlin , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 053/103] net/ice/base: allows packages with mixed signature presence Date: Wed, 26 Jun 2024 12:41:41 +0100 Message-ID: <0f4c68add4209a4fc5563fa92ef0e85774dffb1b.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 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