Bug 240818 - igb drivers: vlanhwfilter feature generate link UP/DOWN for each new vlan created
Summary: igb drivers: vlanhwfilter feature generate link UP/DOWN for each new vlan cre...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-net mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-25 14:58 UTC by Olivier Cochard
Modified: 2019-10-31 05:16 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Cochard freebsd_committer 2019-09-25 14:58:24 UTC
On 12-STALBE and -head (I didn't try with older version), creating a vlan generate interface DOWN + UP.

Problem reproduced with I354 and I211.

How to reproduce the problem:

# ifconfig igb3.1000 create vlan 1000 vlandev igb3
igb3: link state changed to DOWN
igb3.1000: link state changed to DOWN
igb3: link state changed to UP
igb3.1000: link state changed to UP

So let's disable vlanhwfilter (this will trigger another down/up):

# ifconfig igb3 -vlanhwfilter
igb3: link state changed to DOWN
igb3.1000: link state changed to DOWN
igb3: link state changed to UP
igb3.1000: link state changed to UP


# ifconfig igb3.1100 create vlan 1100 vlandev igb3

=> No more down/up with vlanhwfilter disabled
Comment 1 Piotr Pietruszewski 2019-09-26 08:52:01 UTC
Currently, iflib based drivers issue an init after registering or unregistering vlans with IFCAP_VLAN_HWFILTER enabled ( https://svnweb.freebsd.org/base/stable/12/sys/net/iflib.c?revision=351276&view=markup#l4265 ). In case of e1000 driver, init is needed as vlan hw support setup is part of driver's initialization routine.
Comment 2 Olivier Cochard freebsd_committer 2019-09-26 11:41:55 UTC
Here is a user use case:

FreeBSD as a router serving multiple customer: one customer per vlan.
Each time we add a new customer, we add a VLAN… and the link re-init, so all the customers are impacted.
It's a big limitation for this use case.
Comment 3 Andrey V. Elsukov freebsd_committer 2019-09-26 12:35:08 UTC
It was reported by several people a year ago:
https://lists.freebsd.org/pipermail/freebsd-net/2018-November/052184.html

I also think that this behavior makes Intel cards with iflib drivers unusable for setups many vlans.
Comment 4 Kurt Jaeger freebsd_committer 2019-10-31 05:16:38 UTC
Wouldn't it be sufficient to init only on the first vlan ? For all further VLANs, the hardware would already be available ?

I agree with the statement that that DOWN/UP events for every VLAN
would make that type of interface useless for VLANs.