As reported here: https://lists.freebsd.org/pipermail/freebsd-stable/2021-February/093170.html and now reproduced on a Thinkpad X230, on 13.0-BETA3:
Isssue: ifconfig reports 2x the received bytes compared to what is reported via dev.(igb|em).<n>.mac_stats.good_octets_recvd. The octets_recvd count lines (~) up with the expected count based on known traffic.
This is new on 13.
Copy of my original report to the mailing list:
The incoming bytes on an intel I211 (em/igb) are being counted twice
somewhere in the path that is queried by netstat and zabbix_agentd (which
definitely uses ifmib.)
My 'cable' interface is dev.igb.0; the system is live, so counts are going
to keep going up, too.
$ sysctl dev.igb.0 | grep octet
$ netstat -I cable -b | column -t
Name Mtu Network Address Ipkts Ierrs Idrop
Ibytes Opkts Oerrs Obytes Coll
cable 1500 <Link#1> 00:0d:b9:55:70:08 31197172 0 0
34681776974 9401856 0 4793050336 0
cable - 188.8.131.52/2 1500922-static.ro 94275 - -
24989369 106396 - 9906685 -
$ zabbix_agentd -t 'net.if.in[cable]'
Note the octets_txd (which should be a little bigger than obytes) is very
close to netstat's Obytes (obytes):
4836948514 ~= 4793050336
But octets_recvd (which should be a little bigger than ibytes) is ~ 1/2 of
netstat/zabbix's (ifmib's) ibytes.
17402549118 ~= 34681776974 / 2
I can run known traffic across an interface, and the octets_recvd are
hanging with the expected change, while netstat's and zabbix's are at 2x.
I'm running a custom kernel, but I was running the same on 12.2, as well,
and this only crept up on 13. I don't have 13 running on anything with
different hardware to compare, unfortunately.
*** This bug has been marked as a duplicate of bug 253583 ***