From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 49B33B3C3 for ; Tue, 9 Sep 2014 09:17:38 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 09 Sep 2014 00:16:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,491,1406617200"; d="scan'208";a="600087298" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 09 Sep 2014 00:22:10 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s897M901008879; Tue, 9 Sep 2014 15:22:09 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s897M7v4004488; Tue, 9 Sep 2014 15:22:09 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s897M6Kh004484; Tue, 9 Sep 2014 15:22:06 +0800 From: Helin Zhang To: dev@dpdk.org Date: Tue, 9 Sep 2014 15:21:33 +0800 Message-Id: <1410247299-4365-10-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1410247299-4365-1-git-send-email-helin.zhang@intel.com> References: <1410247299-4365-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH 09/15] i40e: remove code for TPH (TLP Processing Hints) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 07:17:38 -0000 The code wrapped in '#ifdef I40E_TPH_SUPPORT' was added to check if 'TPH' is supported, and enable it. It is not used currently and can be removed. Signed-off-by: Helin Zhang Reviewed-by: Chen Jing --- lib/librte_pmd_i40e/i40e/i40e_common.c | 55 ---------------------------------- 1 file changed, 55 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e/i40e_common.c b/lib/librte_pmd_i40e/i40e/i40e_common.c index 4f11542..7e750ec 100644 --- a/lib/librte_pmd_i40e/i40e/i40e_common.c +++ b/lib/librte_pmd_i40e/i40e/i40e_common.c @@ -542,61 +542,6 @@ struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = { I40E_PTT_UNUSED_ENTRY(255) }; -#ifdef I40E_TPH_SUPPORT - -/** - * i40e_tph_present - * @hw: pointer to the hw struct - * - * Check to see if TPH capability is present. - **/ -bool i40e_tph_present(struct i40e_hw *hw) -{ - u32 capsup = rd32(hw, I40E_GLPCI_CAPSUP); - - return capsup & I40E_GLPCI_CAPSUP_TPH_EN_MASK; -} - -/** - * i40e_enable_tph - * @hw: pointer to the hw struct - * @tph_control: contents of TPH Requester Control Register - * - * Check to see if TPH can be enabled; if so, enable it. - **/ -bool i40e_enable_tph(struct i40e_hw *hw, u32 tph_control) -{ - u32 gltph, st_mode, permit; - - /* check that TPH is permitted */ - permit = (tph_control & I40E_TPH_REQ_ENA_MASK) - >> I40E_TPH_REQ_ENA_SHIFT; - if (!(permit & I40E_TPH_REQ_PERMIT)) - return false; - - /* check for valid ST mode */ - st_mode = tph_control & I40E_TPH_ST_MODE_MASK; - if ((st_mode != I40E_TPH_MODE_NOTABLE) && - (st_mode != I40E_TPH_MODE_DEVSPEC)) - return false; - - /* TPH may be enabled */ - gltph = rd32(hw, I40E_GLTPH_CTRL); - - /* turn off device-specific */ - if (st_mode != I40E_TPH_MODE_DEVSPEC) - gltph &= ~I40E_GLTPH_CTRL_TPH_DEVSPEC_MASK; - - /* This enables TPH for all queues for the given types of operation. - * Additional enabling is done per-queue in setup of the queue contexts. - */ - gltph |= I40E_GLTPH_CTRL_DESC_PH_MASK; /* descriptor reads/writes */ - gltph |= I40E_GLTPH_CTRL_DATA_PH_MASK; /* data reads/writes */ - wr32(hw, I40E_GLTPH_CTRL, gltph); - - return true; -} -#endif /* I40E_TPH_SUPPORT */ #ifndef VF_DRIVER /** -- 1.8.1.4