lkml.org 
[lkml]   [2018]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/1] can: ucan: add driver for Theobroma Systems UCAN devices
From
Date
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@rk3399-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

\
 
 \ /
  Last update: 2018-03-14 10:10    [W:0.135 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site