On 27.11.20 17:09, Jeroen Hofstee wrote:
Since it took me a while to figure it out, it might be worthwhile to share. If a CAN-bus network interface is first set to up and only later used, the messages received in the meantime are counted by [1] as dropped.
Interesting! But makes sense and is consistent: When the CAN frame is not processed by the network layer is is just dropped in the rx path.
If the the can module is modprobed before the interface is upped, this is no longer the case. Perhaps it saves someone some time.
So far we have not documented these details for the existing netdev statistics. Do you think this is needed when the behaviour, which leads to rx-dropped, is common for other netdevs also?
Regards, Oliver
[1] https://github.com/torvalds/linux/blob/v5.9/net/core/dev.c#L5257