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 48FEFC6FD1F for ; Tue, 2 Apr 2024 14:57:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 09B134082F; Tue, 2 Apr 2024 14:57:34 +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 iF23CUXZ1tG5; Tue, 2 Apr 2024 14:57:32 +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 3DFC340837 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1712069852; bh=0sM+PF1faer+1R7DFgq8gLZEds5mGKsgjskx6cXrKUI=; h=Date:From:To:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=UN/tOlTG4Ja53K2rRv15zz5oakeXG8iMUsLzq1hfKapjJvnWasLLD3EQuP94GQdfO nD4nVrtHNfUIVrrlta25tVRGtPFHpJ23TmQjzoWqWv2qUW++kOUPE0vdOxvK0aMcFT HpXfYI6oLXfpzUe/gRzHfin+Nhaosa+dRodFG8oUZUmgYNXC7K0MWcwDZl70BbQBHf XlChHjgEa67Dwh5d0y2LKWxIqAhqoCRf9JcVbS2Lnr5685LG3oyjvnT4i0c37g8zQO TrhsEpKMc0KDQJBA1BXhrRujMq2x1yw9Kq2CfJbn7S50wkUP3k0YCb2c2RvNK6L+M5 tZiDRjnKUUlXg== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 3DFC340837; Tue, 2 Apr 2024 14:57:32 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id BDBB91BF317 for ; Tue, 2 Apr 2024 14:57:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B02F240AEC for ; Tue, 2 Apr 2024 14:57:30 +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 QiX2bjIchUWn for ; Tue, 2 Apr 2024 14:57:29 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2604:1380:40e1:4800::1; helo=sin.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 074944094F DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 074944094F Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by smtp2.osuosl.org (Postfix) with ESMTPS id 074944094F for ; Tue, 2 Apr 2024 14:57:28 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 3F53BCE1B4A; Tue, 2 Apr 2024 14:57:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07E04C433F1; Tue, 2 Apr 2024 14:57:24 +0000 (UTC) Date: Tue, 2 Apr 2024 07:57:24 -0700 From: Jakub Kicinski To: Wojciech Drewek Message-ID: <20240402075724.04e1a831@kernel.org> In-Reply-To: References: <20240329092321.16843-1-wojciech.drewek@intel.com> <38d874e3-f25b-4af2-8c1c-946ab74c1925@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712069845; bh=jH8W3rNaCzzyywh+KEmos38PBmWwa8tmyPdVUI7pHTg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VAZsLfKdeRqVSfCsOyhS/9qr9mFIW+YK/4hwIgPDpRLBCjR9D2aYf+VftQRzZF7qw /GQlUzpMBWKtcDTXWotimx8ge8ljLv7lROZ+LzhumLswZqopzXRqC+AE8Yrk+khs1D /V/6uYBqlZgJsRHEZ5X0fR3oJlsb1R4Z6mTxPtQPxFoN5/xYQ4RxBuXMlJeTBT+gjA 1vwXH9K38fceIWvgup0XPAmUUCpgFVZu1fqg7JC261ftnHgoRAeqPr/yoUaHUPELyF CO8rBZTvrM8Cz14fSlLNRviNkl7Mfa5aEXzwCi1PpL5BPfbT7v9BB/yuR7MsOJW2EP iHwyaUkvhqw9w== 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, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=VAZsLfKd Subject: Re: [Intel-wired-lan] [PATCH net-next 0/3] ethtool: Max power support 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: Andrew Lunn , idosch@nvidia.com, edumazet@google.com, marcin.szycik@linux.intel.com, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, pabeni@redhat.com, przemyslaw.kitszel@intel.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Tue, 2 Apr 2024 16:46:54 +0200 Andrew Lunn wrote: > Looking at > https://www.optcore.net/wp-content/uploads/2017/04/QSFP-MSA.pdf table > 7 it indicates different power budget classifications. Power level 1 > is a Maximum power of 1.5W. So does your parameter represent this? It > is the minimum maximum power? And your other parameter is the maximum > maximum power? > > I agree with Jakub here, there needs to be documentation added > explaining in detail what these parameters mean, and ideally, > references to the specification. > > Does > > $ ethtool --set-module enp1s0f0np0 power-max-set 4000 > > actually talk to the SFP module and tell it the maximum power it can > consume. So in this case, it is not the cage, but the module? > > Or is it talking to some entity which is managing the overall power > consumption of a number of cages, and asking it to allocate a maximum > of 4W to this cage. It might return an error message saying there is > no power budget left? > > Or is it doing both? > > Sorry to be picky, but at some point, somebody is going to want to > implement this in the Linux SFP driver, and we want a consistent > implementation cross different implementations. Or "guessing how things work" another way of putting this would be - please go investigate what exactly the FW will do with these values. 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 E213A138A for ; Tue, 2 Apr 2024 14:57:25 +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=1712069846; cv=none; b=DJ1vMiHS/9FJ9+iZKs5CgxxsHpmLySY2flHt+y2fD4HFXU6MCl7Gs1nvvMXxJY7wcd9j6QefW9xs3Oq0cbuO9fP6BJqoaRqRd8oZYuCWqz4JjdjQdHhHPa45kCEMIKtkDIffVVmbK/gLAhkk2kOZFOVmwGWg7aTYdpzYPu5ctOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712069846; c=relaxed/simple; bh=jH8W3rNaCzzyywh+KEmos38PBmWwa8tmyPdVUI7pHTg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YH21qAJpAuyQaoZW3gpV0MsSDUMWfgkcLgjafSsmUN14FsI/27WzF7Kg7EjlSGhhpYjItn0VeclqKi6PTvdxCc821o5ipleKJV83QKTtx3xqgYf0MI1JQZbmRroOVdw8Q7KyJ93UwikVd4+RoI+9WMS9peA4J/VXX/Qg6lrakJg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VAZsLfKd; 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="VAZsLfKd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07E04C433F1; Tue, 2 Apr 2024 14:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712069845; bh=jH8W3rNaCzzyywh+KEmos38PBmWwa8tmyPdVUI7pHTg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VAZsLfKdeRqVSfCsOyhS/9qr9mFIW+YK/4hwIgPDpRLBCjR9D2aYf+VftQRzZF7qw /GQlUzpMBWKtcDTXWotimx8ge8ljLv7lROZ+LzhumLswZqopzXRqC+AE8Yrk+khs1D /V/6uYBqlZgJsRHEZ5X0fR3oJlsb1R4Z6mTxPtQPxFoN5/xYQ4RxBuXMlJeTBT+gjA 1vwXH9K38fceIWvgup0XPAmUUCpgFVZu1fqg7JC261ftnHgoRAeqPr/yoUaHUPELyF CO8rBZTvrM8Cz14fSlLNRviNkl7Mfa5aEXzwCi1PpL5BPfbT7v9BB/yuR7MsOJW2EP iHwyaUkvhqw9w== Date: Tue, 2 Apr 2024 07:57:24 -0700 From: Jakub Kicinski To: Wojciech Drewek Cc: Andrew Lunn , netdev@vger.kernel.org, idosch@nvidia.com, edumazet@google.com, marcin.szycik@linux.intel.com, anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org, pabeni@redhat.com, przemyslaw.kitszel@intel.com Subject: Re: [Intel-wired-lan] [PATCH net-next 0/3] ethtool: Max power support Message-ID: <20240402075724.04e1a831@kernel.org> In-Reply-To: References: <20240329092321.16843-1-wojciech.drewek@intel.com> <38d874e3-f25b-4af2-8c1c-946ab74c1925@lunn.ch> 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-Transfer-Encoding: 7bit On Tue, 2 Apr 2024 16:46:54 +0200 Andrew Lunn wrote: > Looking at > https://www.optcore.net/wp-content/uploads/2017/04/QSFP-MSA.pdf table > 7 it indicates different power budget classifications. Power level 1 > is a Maximum power of 1.5W. So does your parameter represent this? It > is the minimum maximum power? And your other parameter is the maximum > maximum power? > > I agree with Jakub here, there needs to be documentation added > explaining in detail what these parameters mean, and ideally, > references to the specification. > > Does > > $ ethtool --set-module enp1s0f0np0 power-max-set 4000 > > actually talk to the SFP module and tell it the maximum power it can > consume. So in this case, it is not the cage, but the module? > > Or is it talking to some entity which is managing the overall power > consumption of a number of cages, and asking it to allocate a maximum > of 4W to this cage. It might return an error message saying there is > no power budget left? > > Or is it doing both? > > Sorry to be picky, but at some point, somebody is going to want to > implement this in the Linux SFP driver, and we want a consistent > implementation cross different implementations. Or "guessing how things work" another way of putting this would be - please go investigate what exactly the FW will do with these values.