Bug 253583 - igb(4) double counting ingress traffic
Summary: igb(4) double counting ingress traffic
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-STABLE
Hardware: amd64 Any
: --- Affects Many People
Assignee: Mark Johnston
URL:
Keywords: IntelNetworking
: 253836 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-17 12:41 UTC by Daniel Ponte
Modified: 2021-02-28 20:54 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Ponte 2021-02-17 12:41:58 UTC
Appears to be a recurrence of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220198

On stable/13-n244514-18097ee2fb7c, ingress packets on igb(4) are counting doubly. Using the same methodology as in 220198 (comparing iftop to systat -if), I am seeing this behavior. See also https://lists.freebsd.org/pipermail/freebsd-current/2021-February/078825.html.

My machine is a Protectli Vault 4 with 4x I210 interfaces.
Comment 1 commit-hook freebsd_committer 2021-02-24 15:13:46 UTC
A commit in branch main references this bug:

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

commit b6999635b195e8c0dd5c08ac9ff268c92107cc66
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-02-24 15:08:53 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-02-24 15:08:53 +0000

    iflib: Avoid double counting in rxeof

    iflib_rxeof() was counting everything twice.  This was introduced when
    pfil hooks were added to the iflib receive path.  We want to count rx
    packets/bytes before the pfil hooks are executed, so remove the counter
    adjustments that are executed after.

    PR:             253583
    Reviewed by:    gallatin, erj
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D28900

 sys/net/iflib.c | 2 --
 1 file changed, 2 deletions(-)
Comment 2 Daniel Ponte 2021-02-24 21:24:39 UTC
I have cherry-picked this into my local stable/13 and can also confirm that this fixes the issue.
Comment 3 Andrey V. Elsukov freebsd_committer 2021-02-25 12:17:58 UTC
*** Bug 253836 has been marked as a duplicate of this bug. ***
Comment 4 commit-hook freebsd_committer 2021-02-27 16:09:14 UTC
A commit in branch stable/13 references this bug:

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

commit 76294b65df64e87f29a7d7df23c5360dd9ada5aa
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-02-24 15:08:53 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-02-27 16:07:46 +0000

    iflib: Avoid double counting in rxeof

    iflib_rxeof() was counting everything twice.  This was introduced when
    pfil hooks were added to the iflib receive path.  We want to count rx
    packets/bytes before the pfil hooks are executed, so remove the counter
    adjustments that are executed after.

    PR:             253583
    Reviewed by:    gallatin, erj
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D28900

    (cherry picked from commit b6999635b195e8c0dd5c08ac9ff268c92107cc66)

 sys/net/iflib.c | 2 --
 1 file changed, 2 deletions(-)
Comment 5 commit-hook freebsd_committer 2021-02-28 20:51:40 UTC
A commit in branch releng/13.0 references this bug:

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

commit 18b6283014a291f5fe546092ee16d774a0102691
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-02-24 15:08:53 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-02-28 20:51:21 +0000

    iflib: Avoid double counting in rxeof

    iflib_rxeof() was counting everything twice.  This was introduced when
    pfil hooks were added to the iflib receive path.  We want to count rx
    packets/bytes before the pfil hooks are executed, so remove the counter
    adjustments that are executed after.

    Approved by:    re (gjb)
    PR:             253583
    Reviewed by:    gallatin, erj
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D28900

    (cherry picked from commit b6999635b195e8c0dd5c08ac9ff268c92107cc66)
    (cherry picked from commit 76294b65df64e87f29a7d7df23c5360dd9ada5aa)

 sys/net/iflib.c | 2 --
 1 file changed, 2 deletions(-)