Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3470045pxb; Mon, 16 Nov 2020 15:59:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJy803V8L+2LHCpB3pqgzsA/3i0YstfIerBihLD2Mhbf9HKFv8RWsq+KR1EZQn5a7HkkGUkz X-Received: by 2002:a50:d582:: with SMTP id v2mr18720618edi.218.1605571157390; Mon, 16 Nov 2020 15:59:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605571157; cv=none; d=google.com; s=arc-20160816; b=xH60kVGmWg2lw6CMBfHlp+JNp24WYv9kmr/o8eFa6UCEMmqU8w8iXcAEYxzBlQSshs a/N974lbjaBnTBEAh5C14h1QDlzBUpg8nVqChd2nece8FpwMLfGIzPFGFKJDLz/fTNwx oFarGDQbyetT0ZDGbKkc5gin7O7OiCfvttTjL6R78424h9IpuED/uENBTovLl4iLKM7e Q707UuMIvXlDO/aaoDEjpWJTv9VzpeO+yIaFp7yQ9NPKIFKGEMoEA2XqgHXyhfhppMDn grSlrtDhYRBBPLm7tWh/RoszZfX53DZFDPOmS3OYR6LLoua32oz+T9CskDHTQ7M+Gys/ bNAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=iS37q3wyjPqOv8jU3x+fgRuQM6YwvVy3OH5a83IeOiw=; b=Y0liBZomO1d316nBGN+e7ULAG4qedRhE+dUygHYhkFAsSgaDEUGCEhplYLTYoXAFES C84nvQ25y/2ELAM0zK8gNIzxR5fXorYYaDbeXgl6Hk+P+BqvSyrJOOiq/hbLrP8pXVXv RjBtzDNb6oqaWPEf7xz4uK/W04Ve5DcUY9Fke9XU8TxCXJvlOuj6/QOJ169jImdqX3j6 al7F/HZmFLlleCBzkbI/qMqe2vWxOKYqUGVRyps6maQqqtTLGFh65ApgcfMg+2qkOkvX rVibCqDCqJ5HzYXa4x18jhlq2sPLtHBTlFdQhl2P79eKIq5qeGR2QraDRJqQQl9NF0Pu bSow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i5Na4pD3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq40si5893002ejc.462.2020.11.16.15.58.54; Mon, 16 Nov 2020 15:59:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i5Na4pD3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730524AbgKPX4I (ORCPT + 99 others); Mon, 16 Nov 2020 18:56:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:52610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728281AbgKPX4H (ORCPT ); Mon, 16 Nov 2020 18:56:07 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C1E2D20758; Mon, 16 Nov 2020 23:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605570967; bh=DOQpUMc6qBTxv+A3TJ1JObV5KNd1EpCukKk4oazz4B8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i5Na4pD3/hzlEDCmxCu1bE0/Ur59/kLpQQapa+TW+FWlM57GlI7okvmt8eoTUkSl1 WM7s6FMe0+JNj33cyZhMGXBX8zV8vo5CRGgntJ2o2rdD7RmZfhuPbdRJXQh6LBW4WX xN7Dy6bCtweapVpaFVqwmz7ljny31CcUJwWJEDC0= Date: Mon, 16 Nov 2020 15:56:05 -0800 From: Jakub Kicinski To: Vladimir Oltean Cc: Oleksij Rempel , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Russell King , Pengutronix Kernel Team , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH v1 net-next] net: dsa: qca: ar9331: add ethtool stats support Message-ID: <20201116155605.1309c4eb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201116232731.4utpige7fguzghsi@skbuf> References: <20201115073533.1366-1-o.rempel@pengutronix.de> <20201116133453.270b8db5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201116222146.znetv5u2q2q2vk2j@skbuf> <20201116143544.036baf58@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201116230053.ddub7p6lvvszz7ic@skbuf> <20201116151347.591925ca@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201116232731.4utpige7fguzghsi@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Nov 2020 01:27:31 +0200 Vladimir Oltean wrote: > > Note that I said _forwarded_. Frames are either forwarded by the HW or > > SW (former never hit the CPU, while the latter do hit the CPU or > > originate from it). > > Ah, you were just thinking out loud, I really did not understand what > you meant by the separation between "forwarded in software" and > "forwarded in hardware". > Yes, the hardware typically only gives us MAC-level counters anyway. > Another way to look at it is that the number of packets forwarded in > hardware from a given port are equal to the total number of RX packets > on that MAC minus the packets seen by the CPU coming from that port. > So all in all, it's the MAC-level counters we should expose in > .ndo_get_stats64, I'm glad you agree. As for the error packets, I > suppose that would be a driver-specific aggregate. Yup, sorry about the confusion, I was only working on those stats with SDN/OvS/tc hardware, which explains the slight difference in terminology.