[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c1b7482-2cde-40e3-eff4-e4b94794a63e@theobroma-systems.com>
Date: Wed, 14 Mar 2018 10:09:52 +0100
From: Jakob Unterwurzacher <jakob.unterwurzacher@...obroma-systems.com>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: Martin Elshuber <martin.elshuber@...obroma-systems.com>,
Philipp Tomsich <philipp.tomsich@...obroma-systems.com>,
Wolfgang Grandegger <wg@...ndegger.com>,
linux-can@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] can: ucan: add driver for Theobroma Systems UCAN
devices
On 14.03.18 08:51, Marc Kleine-Budde wrote:
>> + memcpy(cf->data, m->msg.can_msg.data, cf->can_dlc);
>> +
>> + /* don't count error frames as real packets */
>> + if (!(canid & CAN_ERR_FLAG)) {
>> + stats->rx_packets++;
>> + stats->rx_bytes += cf->can_dlc;
>> + }
> Please count them, too.
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.
> root@...399-q7:~# ip -details -statistics link show can0
[...]
> RX: bytes packets errors dropped overrun mcast
> 0 0 0 0 0 0
> TX: bytes packets errors dropped carrier collsns
> 0 0 20425 0 0 0
Powered by blists - more mailing lists