Received: by 10.213.65.68 with SMTP id h4csp878444imn; Wed, 14 Mar 2018 02:58:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELuwqG+tYUiwG7tU6Vk4SmYwY6KY1+DSMp9K/GD+zCclbLixag9HplW+CHjLMY6K93o8Xe87 X-Received: by 2002:a17:902:aa03:: with SMTP id be3-v6mr3408490plb.211.1521021538223; Wed, 14 Mar 2018 02:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521021538; cv=none; d=google.com; s=arc-20160816; b=hp59IkJ3Sj3ujjoepVbbTsWszMBo3szYBjJDtyjmouEXBOdn3VN+xzsephtLS7nViy CwCjedfPZZ3pRs6XykrOTt+EtY5AJvFuQoyW7eKh11DbuSWA5l5YfGAMsqeXliP1cdMX k8R3Qhbs+MdgxUp43xn9fMkxsU+e6kF75eFhyoaNXFzSyf6wbsDFIaE+i9+qQ+Lzm+xw iAMgzQKj5tyWBw8UrPImHTYFYtVoNrHFnOlfM8/Hfe6juN2bRlQDafhD22Iepf2wQXZK CY4z1UwuKDlyPBC7L+jmyrPxp4B8Jwi001BHbu/QM6/WphiWd9noM6suYLkoDHX3UTEW FpFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=RAUPPHuviwU6irD6d5u2RzzBxGYBqoFlTYsY5wH4aNU=; b=cIX4aFTEyLKN2AsRJIDi623lNegjTlfR9ktkWpFQkizSrGtTFEO1dSBAoeerEA8zC0 IZEctj7skPXjb0tPDcN85zoG3CU+Xodyp2T4Z0NUMme8CBHfTuto20E4PgzZxW4po0Qt q16OHs76LwvW00W2pct7Lc/XJ0Zr+Ub34bWPOWyoRoWbavyn8O5M5gIS3nPGPpznO1g3 eh9A9OEY9ACSu+nKhKB00S7gf726Oa+KlPzdW7WH62fuTwy6RaSN21vMOXWV6XeQarts Vu/KOx52lnEAjYIUmEK3gKs/rhb1QoGJpxrOkxLoe1OUZ6Z2MUMer184gTNfsR2tNwiL E06w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si1651603pgo.122.2018.03.14.02.58.42; Wed, 14 Mar 2018 02:58:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751430AbeCNJ5r (ORCPT + 99 others); Wed, 14 Mar 2018 05:57:47 -0400 Received: from vegas.theobroma-systems.com ([144.76.126.164]:41166 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbeCNJ5q (ORCPT ); Wed, 14 Mar 2018 05:57:46 -0400 Received: from [86.59.122.178] (port=55922 helo=ju27.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ew3AG-0001kd-Ce; Wed, 14 Mar 2018 10:57:44 +0100 Subject: Re: rx_packets/bytes stats for error frames To: Wolfgang Grandegger , Marc Kleine-Budde Cc: Martin Elshuber , Philipp Tomsich , linux-can@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180313173520.21257-1-jakob.unterwurzacher@theobroma-systems.com> <20180313173520.21257-2-jakob.unterwurzacher@theobroma-systems.com> <6c1b7482-2cde-40e3-eff4-e4b94794a63e@theobroma-systems.com> <4c957d42-2b03-9416-75a4-e331f2ded8cf@pengutronix.de> From: Jakob Unterwurzacher Message-ID: Date: Wed, 14 Mar 2018 10:57:43 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14.03.18 10:46, Wolfgang Grandegger wrote: >>> We do count them, as errors! >>> >>> This is what happens when you transmit a single CAN frame with nothing >>> connected: "TX errors" shoots up but "RX packets" stays zero. >> >> This is handled not consistent in the existing CAN drivers. In flexcan >> all and c_can (all but rx overflow) are counted as rx_packets and >> rx_bytes. (I haven't looked at the other drivers.) >> >> I tend to count the error frames as ordinary frames. > > +1, I think we should count the packets and bytes delivered to the > network layer. Documentation/ABI/testing/sysfs-class-net-statistics says: > What: /sys/class//statistics/rx_packets > Date: April 2005 > KernelVersion: 2.6.12 > Contact: netdev@vger.kernel.org > Description: > Indicates the total number of good packets received by this > network device. I considered error frames not "good packets", but I can change that for v3, no problem. Best regards, Jakob