]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lacp: short timeout erroneously declares link-flapping
authorGreg Foster <gfoster@panasas.com>
Tue, 26 Apr 2022 06:38:23 +0000 (23:38 -0700)
committerRavi Pokala <rpokala@FreeBSD.org>
Wed, 27 Apr 2022 19:41:30 +0000 (12:41 -0700)
commit00a80538b4471b2978c5a1990f48189f2c692e24
treec69b7ce1bfcc551ea2d64d81b5a66207ae12104a
parentfa160738bd18db58b811ed6716330527416f2eda
lacp: short timeout erroneously declares link-flapping

Panasas was seeing a higher-than-expected number of link-flap events.
After joint debugging with the switch vendor, we determined there were
problems on both sides; either of which might cause the occasional
event, but together caused lots of them.

On the switch side, an internal queuing issue was causing LACP PDUs --
which should be sent every second, in short-timeout mode -- to sometimes
be sent slightly later than they should have been. In some cases, two
successive PDUs were late, but we never saw three late PDUs in a row.

On the FreeBSD side, we saw a link-flap event every time there were two
late PDUs, while the spec says that it takes *three* seconds of downtime
to trigger that event. It turns out that if a PDU was received shortly
before the timer code was run, it would decrement less than a full
second after the PDU arrived. Then two delayed PDUs would cause two
additional decrements, causing it to reach zero less than three seconds
after the most-recent on-time PDU.

The solution is to note the time a PDU arrives, and only decrement if at
least a full second has elapsed since then.

Reported by: Greg Foster <gfoster@panasas.com>
Reviewed by: gallatin
Tested by: Greg Foster <gfoster@panasas.com>
MFC after: 3 days
Sponsored by: Panasas
Differential Revision: https://reviews.freebsd.org/D35070
sys/net/ieee8023ad_lacp.c
sys/net/ieee8023ad_lacp.h