This is a preliminary conversion of iflib.
- IOV support is untested
- netmap support is untested
Differential D5213
convert ixgbe to iflib cramerj_intel.com on Feb 6 2016, 2:25 AM. Authored by Tags None Referenced Files
Details
This is a preliminary conversion of iflib.
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions Stop the bus, I want to get off... I'm seeing panics during init/ifup on certain parts. More specifically: none71@pci0:130:0:0: class=0x020000 card=0x004c1170 chip=0x10fb8086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82599ES 10-Gigabit SFI/SFP+ Network Connection' class = network subclass = ethernet cap 01[40] = powerspec 3 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message, 64 bit, vector masks cap 11[70] = MSI-X supports 64 messages Table in map 0x20[0x0], PBA in map 0x20[0x2000] cap 10[a0] = PCI-Express 2 endpoint max data 256(512) FLR RO NS link x8(x8) speed 5.0(5.0) ASPM disabled(L0s) cap 03[e0] = VPD ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected ecap 0003[140] = Serial 1 008cfaffff18a128 ecap 000e[150] = ARI 1 ecap 0010[160] = SR-IOV 1 IOV disabled, Memory Space disabled, ARI disabled 0 VFs configured out of 64 supported First VF RID Offset 0x0180, VF RID Stride 0x0002 VF Device ID 0x10ed Page Sizes: 4096 (enabled), 8192, 65536, 262144, 1048576, 4194304 none72@pci0:130:0:1: class=0x020000 card=0x004c1170 chip=0x10fb8086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82599ES 10-Gigabit SFI/SFP+ Network Connection' class = network subclass = ethernet cap 01[40] = powerspec 3 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message, 64 bit, vector masks cap 11[70] = MSI-X supports 64 messages Table in map 0x20[0x0], PBA in map 0x20[0x2000] cap 10[a0] = PCI-Express 2 endpoint max data 256(512) FLR RO NS link x8(x8) speed 5.0(5.0) ASPM disabled(L0s) cap 03[e0] = VPD ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected ecap 0003[140] = Serial 1 008cfaffff18a128 ecap 000e[150] = ARI 1 ecap 0010[160] = SR-IOV 1 IOV disabled, Memory Space disabled, ARI disabled 0 VFs configured out of 64 supported First VF RID Offset 0x0180, VF RID Stride 0x0002 VF Device ID 0x10ed Page Sizes: 4096 (enabled), 8192, 65536, 262144, 1048576, 4194304 These are Dell X520 mezz cards. Another small nit: Print the driver version at attach as well as in sysctl. Comment Actions Jeffrey: Is this the same or different as reported in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211771 with the unmodified driver? The wording caught my eye as something we had already discussed a bit. Comment Actions 9e6f38428d632aa7be0c61c681627f0085399d3e convert ixgbe to iflib Comment Actions FreeBSD u0807 12.0-CURRENT FreeBSD 12.0-CURRENT #0 9e6f384(arcpatch-D5213): Wed Oct 19 13:03:43 UTC 2016 root@s254:/usr/obj/diskless/os/FreeBSD/12-CURRENT_2016-08-29-D5213/usr/src/sys/VALIDATION amd64 Comment Actions Another data point: Neither an X520-DA2 adapter (same device id) nor X552 show this behavior. Comment Actions I assume this means you did a git pull (asked for svn rev, but this is git log information) to update to the "latest" head prior to these tests? Comment Actions @jeffrey.e.pieper_intel.com Please run with INVARIANTS. No one else has the offending hardware. Comment Actions @jeffrey.e.pieper_intel.com The panic you've hit means that the admin task was not assigned a taskqueue. In all likelihood we're hitting an initialization edge case on the system itself, not that particular adapter. Comment Actions For the most part. Everything I've been using for testing iflib is MP, with the exception of The BDX-DE (X552). The systems in question are actually mainly used as clients (I have many). They are Dell C6220, all with X520 mezz cards. The only UP systems that I have (besides desktop/mobile systems) are Supermicro Microcloud servers w/ 8 nodes per chassis, which are also used as clients. Comment Actions
In this case irq_alloc isn't getting called for the admin task. I'll take a closer look at ixgbe and fix the logic in iflib to handle this case. Comment Actions Preinitialize admin task and add some INVARIANT debugging in case this Jeffrey: Give this a spin and lets see if we can make forward progress with it. Comment Actions That seemed to do the trick. Ran some basic functionality on X520 (both adapter and mezz card) as well a couple BDX-DE skus and X540. I'm currently running netperf stress tests. I will do some more comprehensive testing (driver load/unload stress, mtu tests etc) after they've ran 24 hours. Comment Actions Because this is a structural change of some magnitude, does anyone have a handle on how the man page should be updated? Comment Actions I am confused by the question about the manual page. That can be put under a separate review if you like. Comment Actions The changes to the driver are going to need an update to the man page for ix(4). That is my only point. I haven't done it, but I am noting that it needs to be done. Comment Actions There is an issue where a reset can cause the interface to be effectively dead and is only recoverable by reloading the driver. This was found during an mtu test, where the mtu is changed and traffic is ran between each iteration. It can be reproduced with just iterations of ifconfig up/down with ping and netperf between each iteration. See the attached log and repro script. Comment Actions Also, I mentioned this earlier, but PLEASE print the driver version in dmesg at attach as well as in sysctl. It isn't very optimal to have no clue as to what driver version is being used. Comment Actions hrm ... I had the same behavior on an em(4) system when executing an "ifconfig em0 down up" here. Are you sure this is an "iflib" problem? Comment Actions Considering this doesn't reproduce on ix legacy, I'm pretty sure. The mtu test completes with no errors anyways. Comment Actions ix_iflib usually fails within a few minutes. I've been running the script on ix legacy for 10 minutes with no failures. Comment Actions
I was able to make this happen this morning it I do *exactly* what Jeffrey is doing. There's some kind of race here that I think is related to handling of reinit being to "graceful". Jeffrey, can you modify your iflib install with this? I'll update the review in a bit after I'm done with my testing, but so far, this seems to be "doing the same" if not "right" thing: Index: sys/net/iflib.c =================================================================== --- sys/net/iflib.c (revision 308582) +++ sys/net/iflib.c (working copy) @@ -3228,7 +3228,7 @@ err = IFDI_PROMISC_SET(ctx, if_getflags(ifp)); } } else - reinit = 1; + iflib_if_init(ctx); } else if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { iflib_stop(ctx); } Comment Actions The following 1 line change fixes this issue: https://github.com/freebsd/freebsd/commit/bcebdde733b4104f437bc935647645901b909aab Comment Actions Remove shims for legacy vs iflib in head. iflib will be the default Comment Actions Sean, The ixv fails to build because there is no ifdi_if.h in SRCS. Could you update the Makefile? Thanks,
Comment Actions On a router/firewall use case: About -13% performance drop (4 cores Intel Xeon L5630 with Intel 82599EB NIC) x r313730, paquets-per-second + r313730-D5213, paquets-per-second +--------------------------------------------------------------------------+ | + x | | ++ x ++ x xx | | |__________________A_______M_________|| ||_____M_____________A___________________| | +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 2439877 2923715.5 2907858.5 2816269.4 210659.57 + 5 2251528.5 2679501 2259267 2424025.7 229988.26 Difference at 95.0% confidence -392244 +/- 321639 -13.9278% +/- 10.7244% (Student's t, pooled s = 220536) Flamgraph before applying this patch: Flamegraph after applying this patch:
Comment Actions The function ixgbe_intr used in if_txrx struct filled in ix_txrx.c is defined in if_ix.c but ix_txrx.c is used in both ix and ixv drivers so ixv build as KLD cannot be loaded.
|