Bug 241785 - [vlan][lagg] creating vlan over lagg causes flapping
Summary: [vlan][lagg] creating vlan over lagg causes flapping
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-07 17:40 UTC by Konrad
Modified: 2019-11-09 11:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konrad 2019-11-07 17:40:50 UTC
Hello,

Starting of 12-STABLE (I do not know revision numer) up to 12.1-RELEASE I notice a problem with vlans over laggport. I have INTEL 82599 (ix0, ix1) and create a lagg(LACP):

root@:~ # ifconfig lagg0 create
root@:~ # ifconfig lagg0 laggproto lacp laggport ix0 laggport ix1

and vlans:
root@:~ # ifconfig vlan3960 create
root@:~ # ifconfig vlan3960 vlan 3960 vlandev lagg0

ifconfig output:

ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=e53fbb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
	ether a0:36:9f:1d:db:4c
	media: Ethernet autoselect (10Gbase-Twinax <full-duplex,rxpause,txpause>)
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ix1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=e53fbb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
	ether a0:36:9f:1d:db:4c
	hwaddr a0:36:9f:1d:db:4e
	media: Ethernet autoselect (10Gbase-Twinax <full-duplex,rxpause,txpause>)
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x7
	inet 127.0.0.1 netmask 0xff000000
	groups: lo
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=e53fbb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
	ether a0:36:9f:1d:db:4c
	laggproto lacp lagghash l2,l3,l4
	laggport: ix0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
	laggport: ix1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
	groups: lagg
	media: Ethernet autoselect
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
vlan3960: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=600703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,RXCSUM_IPV6,TXCSUM_IPV6>
	ether a0:36:9f:1d:db:4c
	inet 212.127.xx.xx netmask 0xfffffffc broadcast 212.127.92.255
	groups: vlan
	vlan: 3960 vlanpcp: 0 parent interface: lagg0
	media: Ethernet autoselect
	status: active
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

next, creating new vlan causes a port flapping (ix0,ix1 and whole lagg0):

root@:~ # ifconfig vlan100 create
root@:~ # ifconfig vlan100 vlan 100 vlandev lagg0

root@:~ # ifconfig vlan200 create
root@:~ # ifconfig vlan200 vlan 200 vlandev lagg0

dmesg output:

vlan3960: link state changed to UP
ix0: link state changed to DOWN
ix1: link state changed to DOWN
lagg0: link state changed to DOWN
vlan3960: link state changed to DOWN
vlan100: link state changed to DOWN
ix0: link state changed to UP
ix1: link state changed to UP
lagg0: link state changed to UP
vlan3960: link state changed to UP
vlan100: link state changed to UP
ix0: link state changed to DOWN
ix1: link state changed to DOWN
lagg0: link state changed to DOWN
vlan3960: link state changed to DOWN
vlan100: link state changed to DOWN
vlan200: link state changed to DOWN
ix0: link state changed to UP
ix1: link state changed to UP
lagg0: link state changed to UP
vlan3960: link state changed to UP
vlan100: link state changed to UP
vlan200: link state changed to UP

Its happend for example on 12.0-STABLE #0 r344658M, 12.1-RELEASE. I use a diffrent hardware, only networkcard (based on INTEL 82599 chipset) is the same.
Comment 1 Aleksandr Fedorov 2019-11-09 11:53:39 UTC
This is a known issue with iflib + intel drivers:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240818
https://lists.freebsd.org/pipermail/freebsd-net/2018-November/052184.html

We also use vlan + lagg + ix and we often need to add/remove vlans, so as a temporary solution we disable vlanhwfilter on lagg interface.