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 4336A454EF; Tue, 25 Jun 2024 13:20:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E3A942EFB; Tue, 25 Jun 2024 13:16:43 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id B839242EB4 for ; Tue, 25 Jun 2024 13:16:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314164; x=1750850164; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kE9hbgZTbWboh+jQPXkhFNRPXHzucP7OBjHJWF3VyTk=; b=GiNIyI/SFz/bBALLnPYZMkkEF2JUtT3pkxdn6CHpoVn6myjmb0aiaaNp QAQeSZFcXETcCV6M7zEp+9j7JbjjfWU71TnEDwgrJfbYTvm6fxTm9y4/l xZAq12pusa+YVYWw429INMAaWgnO8wDlk2hsjAoaJIpRbP0xemR91yVTN RTqojUbXgqnNSHt7+TOeRbPSvfsmJ6MTqHV8WkD7K/Z2jSsIoAN9qYA3n ZTl6bbPWBZ6vXfJkgFlFrdZT6HWO+UyvFn6eY6x/tcKjwibIRST48rs8y skHm7qcoJ+s8Cqv0tKJzxjN1Sztox/+9Ir/ABkJqkUH5MNLfbnm/BY6o4 g==; X-CSE-ConnectionGUID: vh0WefRVRJOWCuQ5ViMaUQ== X-CSE-MsgGUID: 3chi5RKMQqacsJ+AufZeaQ== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080178" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080178" 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:03 -0700 X-CSE-ConnectionGUID: JkD51AjXR3mKdvjcD8C59A== X-CSE-MsgGUID: nN5w1BWIQVCRXTopAnYH4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719151" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:16:03 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Eric Joyner , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 039/129] net/ice/base: adapt No FEC in Auto support check to add E82X devices Date: Tue, 25 Jun 2024 12:12:44 +0100 Message-ID: <4a23b3cd7ddddaa3e9e489094117e7212bc280d4.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: Eric Joyner Previously, the "No FEC in Auto mode" feature was added to the link management engine (part of firmware) for E810 devices, and was unsupported at the time on E82X devices. However, this support is now being extended to new FW versions for E82X devices, and so the SW check to enable this mode must be changed to allow E82X devices as well. Importantly, to support this, modify the existing the ice_is_fw_min_ver() function to no longer check FW Major/Minor/Patch versions across branches, since features land in the E810 and E82X branches in different versions. Then, the check in ice_fw_supports_fec_dis_auto() can check the supported versions in each branch separately. ice_is_fw_min_ver() is only used in this function, so there's no behavior change needed elsewhere. Signed-off-by: Eric Joyner Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 11 +++++++---- drivers/net/ice/base/ice_type.h | 7 +++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 61cf6da3ad..5a34a0e86e 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -5951,8 +5951,6 @@ static bool ice_is_fw_min_ver(struct ice_hw *hw, u8 branch, u8 maj, u8 min, if (hw->fw_min_ver == min && hw->fw_patch >= patch) return true; } - } else if (hw->fw_branch > branch) { - return true; } return false; @@ -6166,11 +6164,16 @@ bool ice_fw_supports_report_dflt_cfg(struct ice_hw *hw) */ bool ice_fw_supports_fec_dis_auto(struct ice_hw *hw) { - return ice_is_fw_min_ver(hw, ICE_FW_FEC_DIS_AUTO_BRANCH, + return ice_is_fw_min_ver(hw, ICE_FW_VER_BRANCH_E810, ICE_FW_FEC_DIS_AUTO_MAJ, ICE_FW_FEC_DIS_AUTO_MIN, - ICE_FW_FEC_DIS_AUTO_PATCH); + ICE_FW_FEC_DIS_AUTO_PATCH) || + ice_is_fw_min_ver(hw, ICE_FW_VER_BRANCH_E82X, + ICE_FW_FEC_DIS_AUTO_MAJ_E82X, + ICE_FW_FEC_DIS_AUTO_MIN_E82X, + ICE_FW_FEC_DIS_AUTO_PATCH_E82X); } + /** * ice_is_fw_auto_drop_supported * @hw: pointer to the hardware structure diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index 99eb758eeb..d5f17081af 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -1653,11 +1653,18 @@ struct ice_aq_get_set_rss_lut_params { #define ICE_FW_API_REPORT_DFLT_CFG_PATCH 3 +/* FW branch number for hardware families */ +#define ICE_FW_VER_BRANCH_E82X 0 +#define ICE_FW_VER_BRANCH_E810 1 + /* FW version for FEC disable in Auto FEC mode */ #define ICE_FW_FEC_DIS_AUTO_BRANCH 1 #define ICE_FW_FEC_DIS_AUTO_MAJ 7 #define ICE_FW_FEC_DIS_AUTO_MIN 0 #define ICE_FW_FEC_DIS_AUTO_PATCH 5 +#define ICE_FW_FEC_DIS_AUTO_MAJ_E82X 7 +#define ICE_FW_FEC_DIS_AUTO_MIN_E82X 1 +#define ICE_FW_FEC_DIS_AUTO_PATCH_E82X 2 /* AQ API version for FW auto drop reports */ #define ICE_FW_API_AUTO_DROP_MAJ 1 -- 2.43.0