Bug 282309 - igb(4) shows high error count when attached to VF
Summary: igb(4) shows high error count when attached to VF
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 15.0-CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2024-10-24 20:45 UTC by Justin Hibbits
Modified: 2025-09-26 20:17 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Hibbits freebsd_committer freebsd_triage 2024-10-24 20:45:45 UTC
On Wind River Linux LTS19 and LTS22, passing through a VF from the host, igb shows a lot of Ierrs and Oerrs, with very few packets going through.  This happens on FreeBSD 12.4 and FreeBSD 15-CURRENT.  FreeBSD 11 appears to work fine, per the tester.

igb0: <Intel(R) PRO/1000 82576 Virtual Function> mem 0xfebc0000-0xfebc3fff,0xfebc4000-0xfebc7fff at device 2.0 on pci0


root@freebsd:~ # netstat -i igb0
Name     Mtu Network           Address                             Ipkts          Ierrs          Idrop    Opkts          Oerrs           Coll
igb0    1500 <Link#1>          xx:xx:xx:xx:xx:xx                      15  8047606890496              0       18          50814              0


Reportedly, on the same setup, some Linux distro works fine, no errors.  The host also sees no errors in any scenario.

Sysctl register dump:

dev.igb.0.reg_dump: General Registers
        CTRL     00000000
        STATUS   002c4784
        CTRL_EXT         00000000

Interrupt Registers
        ICR      00000000

RX Registers
        RCTL     00000000
        RDLEN    00004000
        RDH      00000000
        RDT      00000080
        RXDCTL   02040808
        RDBAL    02719000
        RDBAH    00000000

TX Registers
        TCTL     00000000
        TDBAL    02707000
        TDBAH    00000000
        TDLEN    00004000
        TDH      00000000
        TDT      00000000
        TXDCTL   0241011f
        TDFH     00000000
        TDFT     00000000
        TDFHS    00000000
        TDFPC    00000000
Comment 1 Kevin Bowling freebsd_committer freebsd_triage 2024-11-01 21:20:42 UTC
Hi Justin, the FreeBSD igbvf driver is basically a prototype, intel has basically stated such publicly.  I don't know that there is too much work to do here but there is definitely some JFYI.
Comment 2 Justin Hibbits freebsd_committer freebsd_triage 2024-11-02 18:47:50 UTC
Hi Kevin, is the igb(4) driver significantly different between FreeBSD 11 and FreeBSD 12(.4)/later?  Since the driver in stock FreeBSD 11 works this appears to be a regression in some form.  Does 12 and later use a different driver (igbvf, or something like that) that still reports as igb?
Comment 3 Kevin Bowling freebsd_committer freebsd_triage 2024-11-04 15:42:35 UTC
(In reply to Justin Hibbits from comment #2)
Yes FreeBSD 11 predates the converged driver.

The intel out of tree driver which is similar to that still exists.  It has some other bugs and is about 20% slower but might do what you need with the least amount of effort.
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-09-12 22:08:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=3c60ea77649d0f0d944c0830225c525541010710

commit 3c60ea77649d0f0d944c0830225c525541010710
Author:     John-Mark Gurney <jmg@FreeBSD.org>
AuthorDate: 2025-09-01 22:03:07 +0000
Commit:     John-Mark Gurney <jmg@FreeBSD.org>
CommitDate: 2025-09-12 17:07:26 +0000

    e1000: fix igb VF stats

    igb VF must not read normal stat registers and only read a limited
    set of registers.  The PF registers also don't make since as the VF
    is an internal port, and there is no PHY to collect stats like CRC
    errors from.

    PR:     282309
    Obtained from:  Juniper Networks, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52326

 sys/dev/e1000/if_em.c | 351 +++++++++++++++++++++++++++++++-------------------
 sys/dev/e1000/if_em.h |  19 ++-
 2 files changed, 237 insertions(+), 133 deletions(-)
Comment 5 John-Mark Gurney freebsd_committer freebsd_triage 2025-09-25 22:07:16 UTC
Committed and fixed.
Comment 6 commit-hook freebsd_committer freebsd_triage 2025-09-26 20:17:49 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=d2518851f2f90b0b36e7354b5441935125b8a574

commit d2518851f2f90b0b36e7354b5441935125b8a574
Author:     John-Mark Gurney <jmg@FreeBSD.org>
AuthorDate: 2025-09-26 19:58:02 +0000
Commit:     John-Mark Gurney <jmg@FreeBSD.org>
CommitDate: 2025-09-26 20:16:16 +0000

    e1000: fix igb VF stats

    igb VF must not read normal stat registers and only read a limited
    set of registers.  The PF registers also don't make since as the VF
    is an internal port, and there is no PHY to collect stats like CRC
    errors from.

    This is effectively a cherry-pick of 3c60ea77649d, which had to be
    adapted due to another commit.  This is diff id 161565.

    PR:     282309
    Obtained from:  Juniper Networks, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52326

 sys/dev/e1000/if_em.c | 351 +++++++++++++++++++++++++++++++-------------------
 sys/dev/e1000/if_em.h |  19 ++-
 2 files changed, 237 insertions(+), 133 deletions(-)