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 84C00454EF; Tue, 25 Jun 2024 13:23:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DF1042FB1; Tue, 25 Jun 2024 13:18:17 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 7D08042D8C for ; Tue, 25 Jun 2024 13:16:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314216; x=1750850216; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lBo/u4aPsGq0jlp4rZ2CNwV50cqHVsJsTFdy8fmFhAk=; b=RvqikgbX6/mULY7nxg8U59bsVCbiwni+q+761AOeCOA7IJIrNwpLRfwG +TaSEi8FKkIQPdASkT70WZ8VcdwX2vyXGqDJkTWW9mTFzgCy2ot0MwK1N 3PwMoWWFmluWHw9HBDVplcYs+pmrf9MOE/vWbolXoHEo6zib10MueuO4P eqs/b6jxA3MOvp4CK+GGEshk0mYdQRb99bR3XS0EG+0165177ZPO+AsZl JCgQnBRbAZfMlZhSaWmpSEMQE1De2ip/dlqSYG02vGAcMvo0l3/8QrVZO xuiTXqakaXDnd2hehQFDIAZGd7DhVf2A3aee+AyAZcGHpEUQbDxON6VMq w==; X-CSE-ConnectionGUID: idUF0r0pQbe8hG6Z+vS6iQ== X-CSE-MsgGUID: 1vMWTvZPS3GfmzXbph2puw== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080343" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080343" 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:51 -0700 X-CSE-ConnectionGUID: nVZhmWxCTQ2DsqDGN1rAiA== X-CSE-MsgGUID: WBDFpUgfT9C6UDf5pdwbhg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719402" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:16:51 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Stefan Wegrzyn , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 069/129] net/ice/base: allow skipping PF clear Date: Tue, 25 Jun 2024 12:13:14 +0100 Message-ID: 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: Stefan Wegrzyn 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. 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 | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 3306ef9b44..55f26d7628 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -1022,6 +1022,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; @@ -1033,9 +1035,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 030a415c44..9f7fceb85e 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -3883,6 +3883,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 638e812c0f..46fb5bd8c8 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; @@ -1404,6 +1405,8 @@ struct ice_hw { ice_declare_bitmap(hw_ptype, ICE_FLOW_PTYPE_MAX); u8 dvm_ena; u16 io_expander_handle; + + bool skip_clear_pf; }; /* Statistics collected by each port, VSI, VEB, and S-channel */ -- 2.43.0