Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7946438rdb; Thu, 4 Jan 2024 12:54:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcdq+z1qo7Fb/k//dQ8f+cRVTTn8SREwXwqMzbmFTCvT6Wjm8Y1sUoIUoAJ2IIji8Xn64A X-Received: by 2002:aa7:860c:0:b0:6d9:8d6f:56ed with SMTP id p12-20020aa7860c000000b006d98d6f56edmr1166594pfn.5.1704401644512; Thu, 04 Jan 2024 12:54:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704401644; cv=none; d=google.com; s=arc-20160816; b=geZoXwcFQhvqP6qrD+sVkgkyEKhutFxgFhjofRX9OIb9If1CfBOrUkxd4TJX+2GNkM tzAA1WcHxjt++9mwEWHtPfYhLsRzU8+zTT/JwAgcFm5/D9jG4aDC03p10965gVC7wzVl uk+Pt+nKym5aNVdhJgcIUaCv24I0kuGkyN6hURn99Sq/aXwlPWAG+YfVCW+aS+gbklV4 HJGNM+ddsBSonhH6gN4hUIA6bHDVHk4NraNOcFOKu5C4/r8P2SpBrdp5sKsiqk4hGCMs xeeyPtwmeBi5ip3jnxhQVSlREyNY6OuVca6mqhJUBNGIB5E/OYLyzxsI9kHAKHIeZeof +Rnw== ARC-Message-Signature: i=1; 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=jI5w2/jaXqXjWIXkdm9hUd0WHbhSKbZHBSd2QqpJOIU=; fh=xj4dZKoaFBL4JegojZJQtsvddfztt+QYM1s2e+uzOo8=; b=x2Jx+nJPzlV2pbWUavXgReObyFRwwuTzjlc76azO/iVX52dP0TJVDH1DIyrueJPITb bcdPLjhoGwRlVpLTRCzHOcdZ5tGCsxzPZabQfrFe9GcOrq7ARPYo+EBwsViSwzBY1aQw IwV7PJR425kbWWf65bQll76SEOyOYMuc9XHTumyaq3b9LaBskGCIpwiDhYMj3nzHJbLb fyyyTFcnA4ZJdtJVDTjXAegQ0y/AueO60eeHSrqrbv2kjS80u/iMotsIoMljUvldo6MU nW8Hdp9Is7SuXQRjr7aL7cWABR5DdroDjIZHOWnu9l5YFgeHg4afqmU3bj6VIlMEygXT UJ+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h+Yw54e4; spf=pass (google.com: domain of linux-kernel+bounces-17208-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17208-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 h16-20020aa79f50000000b006da838f2dfbsi135077pfr.39.2024.01.04.12.54.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 12:54:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17208-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=h+Yw54e4; spf=pass (google.com: domain of linux-kernel+bounces-17208-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17208-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 36215287ADD for ; Thu, 4 Jan 2024 20:54:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3004E2C191; Thu, 4 Jan 2024 20:53:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h+Yw54e4" X-Original-To: linux-kernel@vger.kernel.org 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 6281E1E522; Thu, 4 Jan 2024 20:53:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A828C433C7; Thu, 4 Jan 2024 20:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704401633; bh=WQUcwzl/vxYHZ/Je6gxMisKytkD5CEuFBGa/DgIPVk0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=h+Yw54e42bwdbSPrFfu926iUAs8OuojxUWF0kq93+8rsGOsuPxyRTVg9LYYXkFKN8 s5GXBBpfizyQ7wdjSR4kga3YnydJKydZ3y2axkySh+cE5QP3tRFAnBnzhbccbYjGKH oi4GIDPU8hvzqS2hHFAra9MRf4I1HaZ7gecXrh/bj49UemLXvey/86JCMJXkvLKWnO JaLpnIwUJ/9Ngsnm6JR2Z3aaj2aoFGqVjZnET/7/wEfv+cQLOt33c3S60+rRRlcgGb edNcbMzVXXdj8TMo5RsR+lpc9bg8kq4bkF9+nO9u5tueB0mXcF8mMSx19gPyBelEgm yQwvThKMlbN8w== Date: Thu, 4 Jan 2024 12:53:52 -0800 From: Jakub Kicinski To: Shinas Rasheed Cc: , , , , , , , , , , , , Veerasenareddy Burru , Satananda Burla , "David S. Miller" , Eric Dumazet Subject: Re: [PATCH net-next v2 7/8] octeon_ep_vf: add ethtool support Message-ID: <20240104125352.5f8ef6ce@kernel.org> In-Reply-To: <20231223134000.2906144-8-srasheed@marvell.com> References: <20231223134000.2906144-1-srasheed@marvell.com> <20231223134000.2906144-8-srasheed@marvell.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 Sat, 23 Dec 2023 05:39:59 -0800 Shinas Rasheed wrote: > + rx_packets = 0; > + rx_bytes = 0; > + tx_packets = 0; > + tx_bytes = 0; > + rx_alloc_errors = 0; > + tx_busy_errors = 0; > + tx_packets = 0; > + tx_bytes = 0; > + rx_packets = 0; > + rx_bytes = 0; > + > + octep_vf_get_if_stats(oct); > + iface_tx_stats = &oct->iface_tx_stats; > + iface_rx_stats = &oct->iface_rx_stats; > + > + for (q = 0; q < oct->num_oqs; q++) { > + struct octep_vf_iq *iq = oct->iq[q]; > + struct octep_vf_oq *oq = oct->oq[q]; > + > + tx_packets += iq->stats.instr_completed; > + tx_bytes += iq->stats.bytes_sent; > + tx_busy_errors += iq->stats.tx_busy; > + > + rx_packets += oq->stats.packets; > + rx_bytes += oq->stats.bytes; > + rx_alloc_errors += oq->stats.alloc_failures; > + } > + i = 0; > + data[i++] = rx_packets; > + data[i++] = tx_packets; > + data[i++] = rx_bytes; > + data[i++] = tx_bytes; > + data[i++] = rx_alloc_errors; > + data[i++] = tx_busy_errors; Don't duplicate stats you're already reporting via ndo_get_stats64, please.