13.0-beta3: em/igb driver incoming bytes values doubled in netstat

Eric Borisch eborisch at gmail.com
Mon Feb 22 23:06:51 UTC 2021


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
dev.igb.0.mac_stats.good_octets_txd: 4836948514
dev.igb.0.mac_stats.good_octets_recvd: 17402549118

$ 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  -     199.48.95.0/2  1500922-static.ro  94275     -      -
 24989369     106396   -      9906685     -

$ zabbix_agentd -t 'net.if.in[cable]'
net.if.in[cable]                              [u|34684619970]

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.

Thanks for any suggestions,
  - Eric


More information about the freebsd-stable mailing list