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 044A44404F; Wed, 12 Jun 2024 17:18:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E90F42F08; Wed, 12 Jun 2024 17:05:53 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id D5D1042EED for ; Wed, 12 Jun 2024 17:05:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204747; x=1749740747; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PJPBPtnoYSDBhB5ZZzj0ECo8mDzAkhZzQgQ4gszs+E0=; b=OwqS6HCwGWDLuWSyMIuBycKWJPSXXwFIHzq6QuFNJ8S7EiC5wp1B4t8o 3BPT+4xg/k/YJ1v4OubLV5Ed1/2CI3ETmz/k9ghzwq7zWdKgAETGZTB+Z ZiFnVxOCiKNttagtm8v/mvcxxC9yaQJOs136CCkfWixB54llFddjDZivT kMM25ljV07KAj9otP8bOkCyli/VlQRbArE4UCI7jiOwJ7HH/PSWhvfwEa eN79188E6HXnYTGhFyae+QMDSvyiXXl4Kv+Wj7TXOHorY9I43PuKOwsUU pvKUxiUhW7l9artRPN+jga5CFdRKad9mq9p+dUFWVQI+y6lCzi3TcbpND Q==; X-CSE-ConnectionGUID: dOQ+NAwKQHmnzzH57MpKJw== X-CSE-MsgGUID: SFKZ0U89TnSSjcU2e1rMKA== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459787" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459787" 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:47 -0700 X-CSE-ConnectionGUID: e7s78AHaQgG+LCmFGz43Jg== X-CSE-MsgGUID: 3Zx+MwjITq2wwBkJSY3WVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925641" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:05:45 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Dan Nowlin Subject: [PATCH v2 091/148] net/ice/base: allows packages with mixed signature presence Date: Wed, 12 Jun 2024 16:01:25 +0100 Message-ID: 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 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 f787020a5f..d462423891 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