Bug 258258 - igb - batch creating vlans causes ifconfig %100 cpu usage - dmesg: igbX: Hardware Initialization Failed
Summary: igb - batch creating vlans causes ifconfig %100 cpu usage - dmesg: igbX: Hard...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.2-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: Kevin Bowling
Keywords: IntelNetworking
Depends on:
Reported: 2021-09-03 18:54 UTC by Ozkan KIRIK
Modified: 2021-09-28 18:26 UTC (History)
1 user (show)

See Also:
kbowling: mfc-stable13+
kbowling: mfc-stable12+
kbowling: mfc-stable11-


Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan KIRIK 2021-09-03 18:54:07 UTC
When creating vlan interfaces using script, igb interface becomes unusable.
I'm using FreeBSD stable/12 - 0f97f2a1857a git commit (Jul 26).
There is no problem on ixl card on same hardware.

# seq 2 4000 | xargs -t -L 1 -I % ifconfig igb5.% create
ifconfig igb5.2 create
ifconfig igb5.3 create
ifconfig igb5.4 create
ifconfig igb5.5 create
ifconfig igb5.6 create
(infinite loop)

# ifconfig igb5
igb5: flags=8d03<UP,BROADCAST,PROMISC,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether ac:1f:6b:c2:6f:7f

# ps ax | grep ifconfig
55382  1  R        7:55.44 ifconfig igb5.6 create
55954  2  R+       6:10.31 ifconfig igb5

# top -azSHti
    0 root        -76    -     0B  2096K CPU12   12 103:44  99.88% [kernel{if_config_tqg_0}]
55382 root         20    0    11M  2748K CPU2     2   5:03  99.88% ifconfig igb5.6 create
55954 root         20    0    11M  2820K CPU14   14   3:18  99.88% ifconfig igb5

# dmesg | tail
igb5: Hardware Initialization Failed
igb5: Hardware Initialization Failed
igb5: Hardware Initialization Failed

#pciconf output:
igb5@pci0:8:0:0:	class=0x020000 card=0x152115d9 chip=0x15218086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'I350 Gigabit Network Connection'
    class      = network
    subclass   = ethernet
Comment 1 Ozkan KIRIK 2021-09-03 19:21:41 UTC
adding 0.2 sleep between ifconfig commands, solves problem. But this is only a work around, not a fix.
This is a big problem for the systems that have huge number of vlan interfaces.

working solution:

seq 2 4000 | xargs -t -L 1 -I % bash -c "ifconfig igb5.% create; sleep 0.2"

but it takes toooooo long to complete.
Comment 2 Ozkan KIRIK 2021-09-05 09:38:12 UTC
I know that some parts of the igb driver code is common with e1000 (em).
So that, I tried same operations with em0 also. There is no such problem exists with e1000 (em0).
So that, the bug is related with the igb code.
Comment 3 Kevin Bowling freebsd_committer 2021-09-15 23:57:01 UTC
Committed in 2796f7cab10785ef40efbba97ef67ab319c96e9c and 22b20b45c9118bf6ef313c074cdb107a1eaca78e
Comment 4 Kevin Bowling freebsd_committer 2021-09-28 18:09:42 UTC
Thank you very much for the report and testing, this has been MFCed to stable/12 and stable/13.


Comment 5 Ozkan KIRIK 2021-09-28 18:26:23 UTC
Thank you Kevin!