Bug 208431

Summary: Intel igc Ethernet driver does not provide statistics in /proc/net/dev
Product: Drivers Reporter: Ronald Wahl (ronald.wahl)
Component: NetworkAssignee: drivers_network (drivers_network)
Status: RESOLVED CODE_FIX    
Severity: normal CC: carnil, hidenosuke, sergiodj+linux-bugzilla, vkrevs
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.7.6 Subsystem:
Regression: No Bisected commit-id:

Description Ronald Wahl 2020-07-04 14:41:10 UTC
The Intel igc Ethernet driver does not provide any statistical info in /proc/net/dev:


$ cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
...
enp6s0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
...

But this interface is used by many tools for showing network utilization. Nevertheless some statistical counters are available via ethtool:

$ ethtool -S enp6s0
NIC statistics:
     rx_packets: 87554
     tx_packets: 39364
     rx_bytes: 122526287
     tx_bytes: 3043976
     rx_broadcast: 397
     tx_broadcast: 4
     rx_multicast: 2377
     tx_multicast: 84
     multicast: 2377
...

Device info:

06:00.0 Ethernet controller: Intel Corporation Intel(R) Ethernet Controller I225-V (rev 02)
        Subsystem: ASUSTeK Computer Inc. Device 87d2
        Flags: bus master, fast devsel, latency 0, IRQ 37
        Memory at fca00000 (32-bit, non-prefetchable) [size=1M]
        Memory at fcb00000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
        Capabilities: [70] MSI-X: Enable+ Count=5 Masked-
        Capabilities: [a0] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 24-4b-fe-ff-ff-5a-42-aa
        Capabilities: [1c0] Latency Tolerance Reporting
        Capabilities: [1f0] Precision Time Measurement
        Capabilities: [1e0] L1 PM Substates
        Kernel driver in use: igc
        Kernel modules: igc
Comment 1 Sergio Durigan Junior 2020-07-21 22:43:52 UTC
I can confirm this bug.
Comment 2 Salvatore Bonaccorso 2020-11-15 08:47:35 UTC
Is commit 6b7ed22ae4c9 ("igc: Fix returning wrong statistics") fixing this issue?
Comment 3 Salvatore Bonaccorso 2020-11-16 13:38:23 UTC
In Debian, affected user confirmed the fix in https://bugs.debian.org/970722 .
Comment 4 Ronald Wahl 2020-11-23 13:15:19 UTC
Patch arrived in Fedora and seems to work. Many thanks!

Setting to RESOLVED.