From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95F4AC04FFE for ; Sat, 11 May 2024 16:56:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3047B4245F; Sat, 11 May 2024 16:56:31 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id amyYeVzOH-vT; Sat, 11 May 2024 16:56:29 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 71C0342462 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1715446589; bh=c8JAEkFmDuX+LpzrW3IWol5zU3ANwkuCDlj7BaPojHU=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=ewOzM1bj/BJ/lqUMnbiqJ6kv0GTKWUXcd6L3Xk8VzGoNWbmvj3G1HG6VuFpe/SZWa XAN4Tlx0VzKFW1WsfXJeFuHCM1cdjAm04nw4iiEft12tmbkHTyf8nrDHGF0L9CC/x5 h/ldpYHifV29kSo3OtCXbWhGDYGWXG6d+aAxT49k/pirkuG1hG4qqFb2b8/5zGyM31 qpMyJhsSuEcV1s9bynHOUzfu1ofwt6Zv4YvXRiAwfvPfDyMEBPSHmDXoEWuIidPwPp ++deG2OUrc7FMGKhrUOWTq41Qt699M2lR81aWBM4oo4QXtNtoBnzSgo23mRVcuSUmK 0Svg/BxBtP1Uw== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 71C0342462; Sat, 11 May 2024 16:56:29 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E45EE1BF4D7 for ; Sat, 11 May 2024 16:56:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id CF51B40189 for ; Sat, 11 May 2024 16:56:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id wgNzdK5yuhVI for ; Sat, 11 May 2024 16:56:27 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=145.40.73.55; helo=sin.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org C842940168 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org C842940168 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by smtp2.osuosl.org (Postfix) with ESMTPS id C842940168 for ; Sat, 11 May 2024 16:56:26 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 86F75CE04AE; Sat, 11 May 2024 16:56:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49E59C2BBFC; Sat, 11 May 2024 16:56:19 +0000 (UTC) Date: Sat, 11 May 2024 17:56:16 +0100 From: Simon Horman To: Anil Samal Message-ID: <20240511165616.GO2347895@kernel.org> References: <20240510065243.906877-1-anil.samal@intel.com> <20240510065243.906877-4-anil.samal@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240510065243.906877-4-anil.samal@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715446581; bh=yehxKsTcJixa47K5qCB6QJ5OG1nz+0o9cOwyFMRSRiM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dij6wF4+C7Tt7VycjvdgcMOGqii8D+8fC6sHcpU4FWAvD47lxMYwvBEHZCoCmvXQU KzDcgdFPUtPjl/aiYxA1Zy/tKEZ7anjmn/2wbIrN9nXY+feXm9pJBT+hvmUWl9YY7a aodsqRgmS9OH6goPG6oGRQaKbYGTe570uV2S3KbMi+K3gQD/vjTzZ/fyKpw0qvdsNN tjW0X2JuDbaO6bkZa2XC4GbhkC1AC7Dho5YXjRu0nlat4b7x4vYTZt8oGq8rdtRliS VaeBPX+SdIELf8ApxLGwLnTjrR0nw+6dfeEwiO5zsGB8ivrLhF/+GB977NRpA3Bhil oo/ZzZOdY1QoQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Dij6wF4+ Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 3/3] ice: Implement driver functionality to dump serdes equalizer values X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, lukasz.czapnik@intel.com, leszek.pepiak@intel.com, Anthony L Nguyen , przemyslaw.kitszel@intel.com, intel-wired-lan@lists.osuosl.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" [ Fixed CC list by dropping '--cc=' from start of addresses. ] On Thu, May 09, 2024 at 11:50:42PM -0700, Anil Samal wrote: > To debug link issues in the field, serdes Tx/Rx equalizer values > help to determine the health of serdes lane. > > Extend 'ethtool -d' option to dump serdes Tx/Rx equalizer. > The following list of equalizer param is supported > a. rx_equalization_pre2 > b. rx_equalization_pre1 > c. rx_equalization_post1 > d. rx_equalization_bflf > e. rx_equalization_bfhf > f. rx_equalization_drate > g. tx_equalization_pre1 > h. tx_equalization_pre3 > i. tx_equalization_atten > j. tx_equalization_post1 > k. tx_equalization_pre2 > > Reviewed-by: Anthony L Nguyen > Reviewed-by: Jesse Brandeburg > Signed-off-by: Anil Samal The nit below notwithstanding, this looks good to me. Reviewed-by: Simon Horman > diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c ... > +/** > + * ice_get_extended_regs - returns FEC correctable, uncorrectable stats per > + * pcsquad, pcsport > + * @netdev: pointer to net device structure > + * @p: output buffer to fill requested register dump > + * > + * Return: 0 on success, negative on failure. > + */ > +static int ice_get_extended_regs(struct net_device *netdev, void *p) > +{ > + struct ice_regdump_to_ethtool *ice_prv_regs_buf; > + struct ice_netdev_priv *np = netdev_priv(netdev); nit: Please arrange local variables in reverse xmas tree order - longest line to shortest. It's probably not necessary to repost just because of this. This tool can be of use here: https://github.com/ecree-solarflare/xmastree > + struct ice_port_topology port_topology = {}; > + struct ice_port_info *pi; > + struct ice_pf *pf; > + struct ice_hw *hw; > + unsigned int i; > + int err; ... From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C3C67F for ; Sat, 11 May 2024 16:56:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715446582; cv=none; b=lTnVm/etylpPLnjAslh51YWcpKf1eMuu7pa0n7PylJUg0feswLnjV8Ps7UZ08GP8nT7/20n1hgIgpq8Hyz1YBu/RzxbxS8x+V3pzF3phRXlVAgELZmqKXJMUgcs9O2f+XJ4Q3eNQ0MuoQAEChihJjBS4wAnTi1CsJ3FmtKdGYYk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715446582; c=relaxed/simple; bh=yehxKsTcJixa47K5qCB6QJ5OG1nz+0o9cOwyFMRSRiM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=R+I8YBAhK1BTgsWHmYvaw+5ef6dMsyCuoiWD2WgvsEDtNHc9rVH+ASYRuIfhwQTvgp8W4mfw1t9LNMj0oM1p8NSgaYSqz5vjOflLrOyEJl7wURnzkzn//GA8RviCVqlBoYX0cO3T4xUhIP5F1Bdlg2tenXYDrCsY10LUnxEFmg8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Dij6wF4+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Dij6wF4+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49E59C2BBFC; Sat, 11 May 2024 16:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715446581; bh=yehxKsTcJixa47K5qCB6QJ5OG1nz+0o9cOwyFMRSRiM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dij6wF4+C7Tt7VycjvdgcMOGqii8D+8fC6sHcpU4FWAvD47lxMYwvBEHZCoCmvXQU KzDcgdFPUtPjl/aiYxA1Zy/tKEZ7anjmn/2wbIrN9nXY+feXm9pJBT+hvmUWl9YY7a aodsqRgmS9OH6goPG6oGRQaKbYGTe570uV2S3KbMi+K3gQD/vjTzZ/fyKpw0qvdsNN tjW0X2JuDbaO6bkZa2XC4GbhkC1AC7Dho5YXjRu0nlat4b7x4vYTZt8oGq8rdtRliS VaeBPX+SdIELf8ApxLGwLnTjrR0nw+6dfeEwiO5zsGB8ivrLhF/+GB977NRpA3Bhil oo/ZzZOdY1QoQ== Date: Sat, 11 May 2024 17:56:16 +0100 From: Simon Horman To: Anil Samal Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, leszek.pepiak@intel.com, przemyslaw.kitszel@intel.com, lukasz.czapnik@intel.com, Anthony L Nguyen , Jesse Brandeburg Subject: Re: [PATCH iwl-next v2 3/3] ice: Implement driver functionality to dump serdes equalizer values Message-ID: <20240511165616.GO2347895@kernel.org> References: <20240510065243.906877-1-anil.samal@intel.com> <20240510065243.906877-4-anil.samal@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240510065243.906877-4-anil.samal@intel.com> [ Fixed CC list by dropping '--cc=' from start of addresses. ] On Thu, May 09, 2024 at 11:50:42PM -0700, Anil Samal wrote: > To debug link issues in the field, serdes Tx/Rx equalizer values > help to determine the health of serdes lane. > > Extend 'ethtool -d' option to dump serdes Tx/Rx equalizer. > The following list of equalizer param is supported > a. rx_equalization_pre2 > b. rx_equalization_pre1 > c. rx_equalization_post1 > d. rx_equalization_bflf > e. rx_equalization_bfhf > f. rx_equalization_drate > g. tx_equalization_pre1 > h. tx_equalization_pre3 > i. tx_equalization_atten > j. tx_equalization_post1 > k. tx_equalization_pre2 > > Reviewed-by: Anthony L Nguyen > Reviewed-by: Jesse Brandeburg > Signed-off-by: Anil Samal The nit below notwithstanding, this looks good to me. Reviewed-by: Simon Horman > diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c ... > +/** > + * ice_get_extended_regs - returns FEC correctable, uncorrectable stats per > + * pcsquad, pcsport > + * @netdev: pointer to net device structure > + * @p: output buffer to fill requested register dump > + * > + * Return: 0 on success, negative on failure. > + */ > +static int ice_get_extended_regs(struct net_device *netdev, void *p) > +{ > + struct ice_regdump_to_ethtool *ice_prv_regs_buf; > + struct ice_netdev_priv *np = netdev_priv(netdev); nit: Please arrange local variables in reverse xmas tree order - longest line to shortest. It's probably not necessary to repost just because of this. This tool can be of use here: https://github.com/ecree-solarflare/xmastree > + struct ice_port_topology port_topology = {}; > + struct ice_port_info *pi; > + struct ice_pf *pf; > + struct ice_hw *hw; > + unsigned int i; > + int err; ...