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 49776C48BC3 for ; Tue, 20 Feb 2024 12:07:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D8D0941503; Tue, 20 Feb 2024 12:06:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xF5GGiEmE5wJ; Tue, 20 Feb 2024 12:06:56 +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 AD42140840 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1708430816; bh=E9mY4beHsfe+BK40ieBuMr+KYav5lxsPw1O8+eV9SQQ=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=TzjCpvwfiQE6aYkQW4i5pypUnLoe854/12gq7UxT7afaZ5ZMLoxfkD/i4ZtfSRqBo MKIPpBxntbEqtcZONvvkfNiOPsdOI0FrI3AkluXtWkI0DV/Z4CHbR74+ChR36F6M9Z VFQ695n46yTol92fvFPu9PwR2DPXKyk9qc5ZZO9FidlPCRurKZCM0BmPJrOrEMB361 fBSsli62YCWwHrn7fqwsww/8Y7310V8BCES3JRyVjRry6G4whzlhHzMdnfd92sF88R bS4vDVEWizx+VRKtWv3Rede7WX9QMkmb53abcMpc+7EI62sQ0oPnRHavHn+B3Q5zI5 LaOOo9fPX2Eng== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id AD42140840; Tue, 20 Feb 2024 12:06:56 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 548F21BF3A7 for ; Tue, 20 Feb 2024 12:06:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 409FE60743 for ; Tue, 20 Feb 2024 12:06:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 68kMTla9myW9 for ; Tue, 20 Feb 2024 12:06:53 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2604:1380:40e1:4800::1; helo=sin.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org E8CA660719 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E8CA660719 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by smtp3.osuosl.org (Postfix) with ESMTPS id E8CA660719 for ; Tue, 20 Feb 2024 12:06:52 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 8F5E5CE1821; Tue, 20 Feb 2024 12:06:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C2E0C433C7; Tue, 20 Feb 2024 12:06:45 +0000 (UTC) Date: Tue, 20 Feb 2024 12:06:43 +0000 From: Simon Horman To: Andrew Lunn Message-ID: <20240220120643.GZ40273@kernel.org> References: <20240218-keee-u32-cleanup-v4-0-71f13b7c3e60@lunn.ch> <20240218-keee-u32-cleanup-v4-4-71f13b7c3e60@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240218-keee-u32-cleanup-v4-4-71f13b7c3e60@lunn.ch> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708430807; bh=g7OWh2V1T0jWuCWOpLghLxY/l/z2kpl8hgQUF80BDLk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IsU1gpx6BLHMdxvwzV2splWpbqoYa6PWyr4iVc0LZEQTV6AUeKVxCp7HM0rvMoTRs JXhqKr4qcuCtMvQx9mO7FcroqUtYg4XPI9KC0azUZI1Ftea729VOTL59xrSQKsJqM6 GwVZLjjaNiLgDxk7hxB2QTzw5Shxg6QkjWyasn59ei5xf2cPcIqN/x30PaBuQRB0zf KazOn5NIGF2ZJIr+mRvp+UDjviLAR+o2Om3voD9dgke7DPyohmDaK/jMCQOOyJV77r WyW630lB2Lmvf3mMoVt6jD5xweAjYAshlQVDV2KkDWSGKJDeH9vR2eh//bv3zOsGhv 5eorKcz+qy36w== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp3.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=IsU1gpx6 Subject: Re: [Intel-wired-lan] [PATCH net-next v4 4/9] net: ethernet: ixgbe: Convert EEE to use linkmodes 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: Ariel Elior , Manish Chopra , netdev@vger.kernel.org, linux-usb@vger.kernel.org, Jesse Brandeburg , linux-kernel@vger.kernel.org, Eric Dumazet , Tony Nguyen , intel-wired-lan@lists.osuosl.org, Jakub Kicinski , Paolo Abeni , "David S. Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Sun, Feb 18, 2024 at 11:07:01AM -0600, Andrew Lunn wrote: > Convert the tables to make use of ETHTOOL link mode bits, rather than > the old u32 SUPPORTED speeds. Make use of the linkmode helps to set > bits and compare linkmodes. As a result, the _u32 members of keee are > no longer used, a step towards removing them. > > Signed-off-by: Andrew Lunn > --- > drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 48 ++++++++++++------------ > 1 file changed, 25 insertions(+), 23 deletions(-) > > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c ... > @@ -3436,28 +3437,29 @@ ixgbe_get_eee_fw(struct ixgbe_adapter *adapter, struct ethtool_keee *edata) > if (rc) > return rc; > > - edata->lp_advertised_u32 = 0; > for (i = 0; i < ARRAY_SIZE(ixgbe_lp_map); ++i) { > if (info[0] & ixgbe_lp_map[i].lp_advertised) > - edata->lp_advertised_u32 |= ixgbe_lp_map[i].mac_speed; > + linkmode_set_bit(ixgbe_lp_map[i].link_mode, > + edata->lp_advertised); > } > > - edata->supported_u32 = 0; > for (i = 0; i < ARRAY_SIZE(ixgbe_ls_map); ++i) { > if (hw->phy.eee_speeds_supported & ixgbe_ls_map[i].mac_speed) > - edata->supported_u32 |= ixgbe_ls_map[i].supported; > + linkmode_set_bit(ixgbe_lp_map[i].link_mode, > + edata->lp_advertised); Hi Andrew, should this be edata->supported rather than edata->lp_advertised? > } > > - edata->advertised_u32 = 0; > for (i = 0; i < ARRAY_SIZE(ixgbe_ls_map); ++i) { > if (hw->phy.eee_speeds_advertised & ixgbe_ls_map[i].mac_speed) > - edata->advertised_u32 |= ixgbe_ls_map[i].supported; > + linkmode_set_bit(ixgbe_lp_map[i].link_mode, > + edata->advertised); > } > > - edata->eee_enabled = !!edata->advertised_u32; > + edata->eee_enabled = !linkmode_empty(edata->advertised); > edata->tx_lpi_enabled = edata->eee_enabled; > - if (edata->advertised_u32 & edata->lp_advertised_u32) > - edata->eee_active = true; > + > + linkmode_and(common, edata->advertised, edata->lp_advertised); > + edata->eee_active = !linkmode_empty(common); > > return 0; > } ...