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 5F822454EF; Tue, 25 Jun 2024 13:18:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A2E342DF1; Tue, 25 Jun 2024 13:15:54 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 7F221427C9 for ; Tue, 25 Jun 2024 13:15:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314134; x=1750850134; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l7jj3eC2dTN/yMWZpj0TRPXp1GqRGagjogv3dx4eBQc=; b=inD1tS/DbDiGq1orNyttTf3UvLpHsiOi6gNd/kjVsMJgrPaEuMqlpy6q DmOO038wnEC0V32APz7+nZdHajyPGu9lT+RIJuW28VhSQkNd6ejuPNn8A QFALcuRyzmjJrK8vJy/RhaRzPfFSMh9oqjLzDc7c/4dr0LWaFPo4cw74L Qm4g3fsdYVuHWVNkoPZS9MSM8yO3JqqMElgxS9zF79266gw0sQc3fe1Eq 1sZx0jSwjtKlV1LZd4xi2yNkekhEJ1HhOvzi9t1AJmdGKkkAovEFrE4iI yycOGFwlfp3QdTGu/GAUAYAMuYzRWkanQqMmFJEAfWulHVo32rlDAYQmf w==; X-CSE-ConnectionGUID: TA1sCjm9Q+qp/T41Gc6Vpg== X-CSE-MsgGUID: 7MF6KFKsQhuea29RUlqydQ== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080107" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080107" 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:15:34 -0700 X-CSE-ConnectionGUID: 6tA2F92cRC6LdED8/M3PDQ== X-CSE-MsgGUID: fpLyisrGRO6BolHd28FrAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719017" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:15:33 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Karol Kolacinski , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 021/129] net/ice/base: add LL Tx timestamp interrupt read Date: Tue, 25 Jun 2024 12:12:26 +0100 Message-ID: <07a16146548b46bdd0c9fac756a270bf775cc129.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: Karol Kolacinski E810 products can support low latency Tx timestamp register read using the SW interrupt from the FW. Add a check for the device capability and use the new method if supported. Signed-off-by: Karol Kolacinski Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 3 +++ drivers/net/ice/base/ice_ptp_hw.h | 1 + drivers/net/ice/base/ice_type.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index ef6696cddf..b68afdaa14 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -2781,6 +2781,7 @@ ice_parse_1588_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, info->tmr1_ena = ((number & ICE_TS_TMR1_ENA_M) != 0); info->ts_ll_read = ((number & ICE_TS_LL_TX_TS_READ_M) != 0); + info->ts_ll_int_read = ((number & ICE_TS_LL_TX_TS_INT_READ_M) != 0); info->tmr_own_map = phys_id; @@ -2800,6 +2801,8 @@ ice_parse_1588_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, info->tmr1_ena); ice_debug(hw, ICE_DBG_INIT, "dev caps: ts_ll_read = %u\n", info->ts_ll_read); + ice_debug(hw, ICE_DBG_INIT, "dev caps: ts_ll_int_read = %u\n", + info->ts_ll_int_read); ice_debug(hw, ICE_DBG_INIT, "dev caps: tmr_own_map = %u\n", info->tmr_own_map); } diff --git a/drivers/net/ice/base/ice_ptp_hw.h b/drivers/net/ice/base/ice_ptp_hw.h index 35ab9bb3e8..441ad0b77d 100644 --- a/drivers/net/ice/base/ice_ptp_hw.h +++ b/drivers/net/ice/base/ice_ptp_hw.h @@ -489,6 +489,7 @@ int ice_ptp_init_phy_cfg(struct ice_hw *hw); /* Tx timestamp low latency read definitions */ #define TS_LL_READ_RETRIES 200 +#define TS_LL_READ_TS_INTR BIT(30) #define TS_LL_READ_TS BIT(31) #define TS_LL_READ_TS_IDX_S 24 #define TS_LL_READ_TS_IDX_M MAKEMASK(0x3F, 0) diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index 239b1a018e..7a1471e474 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -778,6 +778,7 @@ struct ice_ts_func_info { #define ICE_TS_TMR0_ENA_M BIT(25) #define ICE_TS_TMR1_ENA_M BIT(26) #define ICE_TS_LL_TX_TS_READ_M BIT(28) +#define ICE_TS_LL_TX_TS_INT_READ_M BIT(29) struct ice_ts_dev_info { /* Device specific info */ @@ -790,6 +791,7 @@ struct ice_ts_dev_info { u8 tmr0_ena : 1; u8 tmr1_ena : 1; u8 ts_ll_read : 1; + u8 ts_ll_int_read : 1; }; #define ICE_NAC_TOPO_PRIMARY_M BIT(0) -- 2.43.0