> I am afraid that we won't be able to enforce a consistent behavior,
> because the HW itself is not consistent, both on the NIC and on the
> switch side.

Hi Florian

I agree with that, for MIB counters. They tend to come direct from the
hardware.

However, rx_bytes and tx_bytes are not from the hardware. They are
software stats, kept by the drivers. Just grep in driver/net/ethernet
and you see:

broadcom/bcmsysport.c:                  ndev->stats.rx_bytes += len;
broadcom/sb1250-mac.c:                  dev->stats.rx_bytes += len;
mellanox/mlx5/core/en_main.c:           s->rx_bytes     += rq_stats->bytes;
microchip/encx24j600.c:                 dev->stats.rx_bytes += rsv->len;
neterion/vxge/vxge-main.c:              net_stats->rx_bytes += bytes;
nuvoton/w90p910_ether.c:                dev->stats.rx_bytes += length;

etc.

Since these are software counters, they can be consistent. From a
practical point of view, i doubt they ever will all be consistent,
there are simply too many drivers to test and change if
needed. However, for the ones somebody cares about, they can be made
consistent.

I care about r8152, and would like to make it consistent with asix,
dsa, e1000e.

     Andrew

Reply via email to