From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 28FCEA04B5; Mon, 2 Dec 2019 09:04:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C50861C07D; Mon, 2 Dec 2019 08:58:58 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 285791BF88 for ; Mon, 2 Dec 2019 08:58:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Dec 2019 23:58:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,268,1571727600"; d="scan'208";a="207993573" Received: from dpdk_yexl_af_xdp.sh.intel.com ([10.67.119.186]) by fmsmga008.fm.intel.com with ESMTP; 01 Dec 2019 23:58:45 -0800 From: Xiaolong Ye To: Beilei Xing , Qi Zhang Cc: dev@dpdk.org, Xiaolong Ye , Aleksandr Loktionov Date: Mon, 2 Dec 2019 15:49:06 +0800 Message-Id: <20191202074935.97629-41-xiaolong.ye@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191202074935.97629-1-xiaolong.ye@intel.com> References: <20191202074935.97629-1-xiaolong.ye@intel.com> Subject: [dpdk-dev] [PATCH 40/69] net/i40e/base: change link flapping on 25g cards X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" After NVM update on some 25g cards link start periodically flap. The issue was fixed by adding additional check into i40e_get_lpi_counters() which calls i40e_aq_run_phy_activity() only for EEE capable cards. Signed-off-by: Aleksandr Loktionov Reviewed-by: Galazka Krzysztof Reviewed-by: Paul M Stillwell Jr Reviewed-by: Formela Marcin Reviewed-by: Kirsher Jeffrey T Reviewed-by: Michael Alice Signed-off-by: Xiaolong Ye --- drivers/net/i40e/base/i40e_common.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 4d2d86196..337d62b5f 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -7176,6 +7176,15 @@ enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw, enum i40e_status_code retval; u32 cmd_status; + /* only X710-T*L requires special handling of counters + * for other devices we just read the MAC registers + */ + if (hw->device_id != I40E_DEV_ID_10G_BASE_T_BC) { + *tx_counter = rd32(hw, I40E_PRTPM_TLPIC); + *rx_counter = rd32(hw, I40E_PRTPM_RLPIC); + return I40E_SUCCESS; + } + retval = i40e_aq_run_phy_activity(hw, I40E_AQ_RUN_PHY_ACTIVITY_ACTIVITY_ID_USER_DEFINED, I40E_AQ_RUN_PHY_ACTIVITY_DNL_OPCODE_GET_EEE_STATISTICS, -- 2.17.1