Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp600023lqs; Tue, 5 Mar 2024 10:34:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVn7w8LIM1k5F1HN9yJNGKr8kwPbxmiurmRMxjfxAAmJK2LAVIlSeVF8qmSkMRW1Wy2LN1vwvWDrucWQl/pquguR/dbXFNMOMhdp6gWvQ== X-Google-Smtp-Source: AGHT+IEvTlNk4gkk3/AvQX71RHYNC+ytwok/RvZQDdVmxzBZySAvMCabeFFWrREZA+fgfBE+Um8N X-Received: by 2002:a05:6a20:7289:b0:1a1:4d8b:6f34 with SMTP id o9-20020a056a20728900b001a14d8b6f34mr3024049pzk.16.1709663693587; Tue, 05 Mar 2024 10:34:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709663693; cv=pass; d=google.com; s=arc-20160816; b=FWIu9JUwlUnUVm7isDWEnEtRMxLdobVVOCeznHHlvW/iJskaGA7vMHlYSa2RwK/QXE fsZjy3DF6o6twMa9QzrlAaPuB/zKxaiGi/KObtjIZmuMkTASU563lGoLkD21gYkswkAk ++czn+xFhg/oSKsubIsl1ZvwS2r84cQXZbV59mtddaxge+AOsh9Yg4RKZ/3oCjh7y/4C 4i4m8it6X188YTHc/EUD91EkQExVr9xziMCp7xYWd5J59V5/p7bI6ssVYbYbE6uLB11D IUmHiLAyAsYLxSSFQMxQc9rPclve2lf955yeZoGgYRRAv2vJk0Brzl7QVcGXjlxecMhV OXcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=93AIBfXFU7715c16JLxRGR/g+8DNBiwafvSaZbXJPgM=; fh=A9Sug53MQX1oZbnh3wZG8+Gy2RBQhwBx/K4hznv0bIw=; b=ctm0AeGtnN1L7H8xBEBBK1IecNH3fP+Wm0MyZJHNU3wVjCQ4Q0vNk3JwWmccIFBqxl MjmOCqhhifCeoSP0mC7xol0ntknspquxlz4ZOKFAH99iMTN+pzb11x2Zp107mPunuPNH Lg8DSezSm7eiiSVUXYyyVyyxS4EKsEE4ZXNxpWktbS70tOWZiBCa6SArbHCI7E42QNVk LLkEbLUCiGUaT/f6gH/Ywqh2ncaKxmIxLiXO/3qMyjXt0x3YWwwIXOsSgHnUEX5c0LwD OZYVju9BgqH+Iq0P4IVrRRUmC7xMk8kr7a20N7iAXwItIUsMnftMXfdMk4N2zcuaxoKW jofg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OPCF1SzI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92833-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92833-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p8-20020a056a000b4800b006e596ded654si309980pfo.88.2024.03.05.10.34.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 10:34:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92833-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OPCF1SzI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92833-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92833-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4380528593B for ; Tue, 5 Mar 2024 18:34:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57C201A5BA; Tue, 5 Mar 2024 18:34:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OPCF1SzI" 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 794A814A89; Tue, 5 Mar 2024 18:34:45 +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=1709663685; cv=none; b=TbhaKKvJLaDtctCc4tNof2LZQWPhOYtQe4ROO4C+Au5ykWGavZFvz5esCGMLDIQTIMCCxRDFp9vvvOrDSutaIXI6FmTpD+Jgjpa4MiRs9wFWXExSUTVxyEs/9/0Bpi2FC1R7VFqk3KNzQd0Hfg6kABALWRf1gmCCWdh3gccLnR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709663685; c=relaxed/simple; bh=7Y5PRGDd3DbEB+kbePurEXliBR8uj4hnZjuQ5yw7JB4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qZC4TtJ5oxawiI8aDxkIUr/b7xOYHjodKzQbaKAXlpuNz9AuhE5/93VyXqqgHTcWavpY3L15cYivUti7asGkSvyvcdIW4JWJrUac/SnDFhf4FPPUVuJZWAunE+nOplLzOyO8k7l4kgnTONZMQfrdr/jJH6FW3E1vcrl+U821adY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OPCF1SzI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B93D7C433F1; Tue, 5 Mar 2024 18:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709663685; bh=7Y5PRGDd3DbEB+kbePurEXliBR8uj4hnZjuQ5yw7JB4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OPCF1SzIAnjbI7quNW7xp8leOBA87Q/iPoF46n2xgeiI4a1Cos87Wb0VDkruHdU04 bsZuU419RoPh0Di5UcpCARYEYYHRHCutJQwfmVa8pRPyFgh+JuK3/NzDqGQ7HXZpnq I6b/rDrnqf6Zjd120gqjXOOIFystR4LvUG6GpEV2TXqrPW+w7q9FqhEVYH+QcZR2Df o3dOtjocT6lAOW0LwLLHAgTApREV4tuPm590hYkD2Vljl8iiDXM5IkhvpoiJjYQ4xa 825Pgx8io/8/akG5j5Zsuv7NwKrF41RzTVjbJi5wH37oEU3NHBQmsHGv1ibjrChncp dT92okxBd1CHA== Date: Tue, 5 Mar 2024 10:34:43 -0800 From: Jakub Kicinski To: David Thompson Cc: , , , , , Asmaa Mnebhi Subject: Re: [PATCH net-next v1] mlxbf_gige: add support to display pause frame counters Message-ID: <20240305103443.70e1f619@kernel.org> In-Reply-To: <20240305151851.533-1-davthompson@nvidia.com> References: <20240305151851.533-1-davthompson@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@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, 5 Mar 2024 10:18:51 -0500 David Thompson wrote: > + /* Read LLU counters only if they are enabled */ > + if (mlxbf_gige_llu_counters_enabled(priv)) { > + data_lo = readl(priv->llu_base + MLXBF_GIGE_TX_PAUSE_CNT_LO); > + data_hi = readl(priv->llu_base + MLXBF_GIGE_TX_PAUSE_CNT_HI); > + pause_stats->tx_pause_frames = (data_hi << 32) | data_lo; > + > + data_lo = readl(priv->llu_base + MLXBF_GIGE_RX_PAUSE_CNT_LO); > + data_hi = readl(priv->llu_base + MLXBF_GIGE_RX_PAUSE_CNT_HI); > + pause_stats->rx_pause_frames = (data_hi << 32) | data_lo; > + } else { > + pause_stats->tx_pause_frames = 0; > + pause_stats->rx_pause_frames = 0; Counters are not enabled, meaning we don't know how many frames were sent? Or pause frames are not enabled, therefore we know it's 0? If the latter we should add a comment clarifying that, if the former: * @get_pause_stats: Report pause frame statistics. Drivers must not zero * statistics which they don't report. The stats structure is initialized * to ETHTOOL_STAT_NOT_SET indicating driver does not report statistics. -- pw-bot: cr