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 709504404F; Wed, 12 Jun 2024 17:17:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2AE642EF0; Wed, 12 Jun 2024 17:05:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 1B4A54278D for ; Wed, 12 Jun 2024 17:05:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204741; x=1749740741; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Qh1SYFZGko/6ckw/waxaApDCaHdG52TZ7FXea433LjQ=; b=TWKLShhbcavH3AQ6BYJSaK5KmLSkczU7Dxa93QRLdwuZ4z/u7VYgNqHD MfDqR/DcUYAPNUq6rDDhS4Ea/Z1pZ4/YuO1X6WVf4Fqj1lIIjL17AELid AQUKFWkTn2lTQ5lC9yiAOyjKdyJWlhGb7MqRifymoLKdHBup2+1yY4+Rx H0oFkOaBs2nCAjCPMJdnmW2ZhJrKB4z55XSatnCfhbDQp/MIEFxAZ6V4l lgHr7z9m01BymRgLGPIbu+yFCeagcQeGkXuYwdx//gZ/FcGNuO+7rUOds zdQWI1RwRqYLS1ol7NzMqsJqq+Wx9tF4hkRuG1Hwa9wauJdOwXLmpjjow Q==; X-CSE-ConnectionGUID: GjoHNtblRLWMElFkdPUTJw== X-CSE-MsgGUID: 59cSncVbRQOJKCEYcmg/1A== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459757" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459757" 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:40 -0700 X-CSE-ConnectionGUID: oix0kDAQTFGgOJ4N48BMQw== X-CSE-MsgGUID: Nj507HMGRKapm93mcnZ/0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925614" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:05:39 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Stefan Wegrzyn Subject: [PATCH v2 087/148] net/ice/base: allow skipping PF clear Date: Wed, 12 Jun 2024 16:01:21 +0100 Message-ID: <14a05b36f49eb68ac2f8023bf5553635367c87e6.1718204529.git.anatoly.burakov@intel.com> 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 per updated data sheet, add 'skip_clear_pf' field to ice_hw structure, which can be used to skip call to ice_clear_pf_cfg() in ice_init_hw(). Also, make 'fw_vsi_num' field of ice_hw structure visible to every component using shared code, as well as make ice_init_fltr_mgmt_struct() and ice_cleanup_fltr_mgmt_struct() non-static. Signed-off-by: Stefan Wegrzyn Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 10 +++++++--- drivers/net/ice/base/ice_switch.c | 4 ++++ drivers/net/ice/base/ice_type.h | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 550fc49e8d..3847d2d3fb 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -923,6 +923,8 @@ int ice_init_hw(struct ice_hw *hw) ice_get_itr_intrl_gran(hw); + hw->fw_vsi_num = ICE_DFLT_VSI_INVAL; + status = ice_create_all_ctrlq(hw); if (status) goto err_unroll_cqinit; @@ -934,9 +936,11 @@ int ice_init_hw(struct ice_hw *hw) if (ice_get_fw_mode(hw) == ICE_FW_MODE_ROLLBACK) ice_print_rollback_msg(hw); - status = ice_clear_pf_cfg(hw); - if (status) - goto err_unroll_cqinit; + if (!hw->skip_clear_pf) { + status = ice_clear_pf_cfg(hw); + if (status) + goto err_unroll_cqinit; + } /* Set bit to enable Flow Director filters */ wr32(hw, PFQF_FD_ENA, PFQF_FD_ENA_FD_ENA_M); diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 2992b733c9..4c3e8047d1 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -4072,6 +4072,10 @@ int ice_get_initial_sw_cfg(struct ice_hw *hw) switch (res_type) { case ICE_AQC_GET_SW_CONF_RESP_VSI: + if (hw->fw_vsi_num != ICE_DFLT_VSI_INVAL) + ice_debug(hw, ICE_DBG_SW, "fw_vsi_num %d -> %d\n", + hw->fw_vsi_num, vsi_port_num); + hw->fw_vsi_num = vsi_port_num; if (hw->dcf_enabled && !is_vf) hw->pf_id = pf_vf_num; break; diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index 7feb897656..f787020a5f 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -1258,6 +1258,7 @@ struct ice_hw { enum ice_mac_type mac_type; u16 fd_ctr_base; /* FD counter base index */ + u16 fw_vsi_num; /* pci info */ u16 device_id; u16 vendor_id; @@ -1407,6 +1408,7 @@ struct ice_hw { u16 io_expander_handle; bool subscribable_recipes_supported; + bool skip_clear_pf; }; /* Statistics collected by each port, VSI, VEB, and S-channel */ -- 2.43.0