Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Apr 2023 15:30:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 268490] [igb] [lagg] [vlan]: Intel i210 performance severely degraded
Message-ID:  <bug-268490-7501-CqXX4PJYLT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-268490-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-268490-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268490

--- Comment #40 from Daniel Duerr <duerrd561@gmail.com> ---
(In reply to Kevin Bowling from comment #39)
Thanks Kevin. I've run two passes on my local branch of origin/releng/12.4 =
with
a `git revert 1a132077c2cb500410079f9120c3f676d15f7931` to back out that la=
st
bad commit. In summary, the performance is still dismal in both of the
following cases.

My gut says the problem is in the `vlan` driver, not the `em` (igb) driver.=
 On
other machines that had this same exact problem, I was not using lagg but I=
 was
using vlan. Getting rid of vlan worked around this problem.

Anyways, here's the log for you:

## Round 1: fix adapter -> sc

[root@nfs src]# git diff
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index e3da4a2f3d20..3d80d7dc1a3b 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -2541,7 +2541,7 @@ em_reset(if_ctx_t ctx)
                pba =3D E1000_PBA_34K;
                break;
        default:
-               if (adapter->hw.mac.max_frame_size > 8192)
+               if (sc->hw.mac.max_frame_size > 8192)
                        pba =3D E1000_PBA_40K; /* 40K for Rx, 24K for Tx */
                else
                        pba =3D E1000_PBA_48K; /* 48K for Rx, 16K for Tx */
[root@nfs src]# make -j `sysctl -n hw.ncpu` buildkernel
KERNCONF=3DGENERIC-NODEBUG && make installkernel KERNCONF=3DGENERIC-NODEBUG
[root@nfs src]# reboot

[root@nfs src]# uname -a
FreeBSD nfs.tidepool.cloud 12.4-RELEASE-p1 FreeBSD 12.4-RELEASE-p1 #25
releng/12.4-n235814-4f54a7f1b95c-dirty: Thu Apr 13 06:23:53 PDT 2023=20=20=
=20=20
toor@nfs.tidepool.cloud:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  a=
md64
[root@nfs src]# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[  1] local 172.27.6.135 port 5001 connected with 172.27.6.129 port 17974
[  2] local 172.27.6.135 port 5001 connected with 172.27.6.129 port 49417
[  3] local 172.27.6.135 port 5001 connected with 172.27.6.129 port 64045
^CWaiting for server threads to complete. Interrupt again to force quit.
[ ID] Interval       Transfer     Bandwidth
[  2] 0.00-28.43 sec  60.0 Bytes  16.9 bits/sec
[  3] 0.00-8.09 sec  60.0 Bytes  59.4 bits/sec
[  1] 0.00-52.52 sec  60.0 Bytes  9.14 bits/sec
[SUM] 0.00-52.52 sec   180 Bytes  27.4 bits/sec

## Round 2: fix adapter -> sc, restore em_if_set_promisc(ctx, IFF_PROMISC)

[root@nfs src]# git diff
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index e3da4a2f3d20..4a45a0f84ce8 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -1361,7 +1361,7 @@ em_if_init(if_ctx_t ctx)
        em_setup_vlan_hw_support(ctx);

        /* Don't lose promiscuous settings */
-       em_if_set_promisc(ctx, if_getflags(ifp));
+       em_if_set_promisc(ctx, IFF_PROMISC);
        e1000_clear_hw_cntrs_base_generic(&sc->hw);

        /* MSI-X configuration for 82574 */
@@ -2541,7 +2541,7 @@ em_reset(if_ctx_t ctx)
                pba =3D E1000_PBA_34K;
                break;
        default:
-               if (adapter->hw.mac.max_frame_size > 8192)
+               if (sc->hw.mac.max_frame_size > 8192)
                        pba =3D E1000_PBA_40K; /* 40K for Rx, 24K for Tx */
                else
                        pba =3D E1000_PBA_48K; /* 48K for Rx, 16K for Tx */
[root@nfs src]# make -j `sysctl -n hw.ncpu` buildkernel
KERNCONF=3DGENERIC-NODEBUG && make installkernel KERNCONF=3DGENERIC-NODEBUG
[root@nfs src]# reboot

[root@nfs src]# uname -a
FreeBSD nfs.tidepool.cloud 12.4-RELEASE-p1 FreeBSD 12.4-RELEASE-p1 #26
releng/12.4-n235814-4f54a7f1b95c-dirty: Thu Apr 13 06:52:12 PDT 2023=20=20=
=20=20
toor@nfs.tidepool.cloud:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  a=
md64
[root@nfs src]# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[  1] local 172.27.6.135 port 5001 connected with 172.27.6.129 port 34226
[  2] local 172.27.6.135 port 5001 connected with 172.27.6.129 port 42851
[  3] local 172.27.6.135 port 5001 connected with 172.27.6.129 port 23908
recv failed: Connection reset by peer
[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-79.38 sec  60.0 Bytes  6.05 bits/sec
recv failed: Connection reset by peer
[  2] 0.00-79.37 sec  60.0 Bytes  6.05 bits/sec
recv failed: Connection reset by peer
[  3] 0.00-79.37 sec  60.0 Bytes  6.05 bits/sec
[SUM] 0.00-122.44 sec   180 Bytes  11.8 bits/sec

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268490-7501-CqXX4PJYLT>