Page MenuHomeFreeBSD

Make LACP behavior more closely conform to the standard
ClosedPublic

Authored by jtl on Feb 8 2017, 1:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 22 2024, 2:05 PM
Unknown Object (File)
Feb 22 2024, 4:57 AM
Unknown Object (File)
Jan 26 2024, 3:10 PM
Unknown Object (File)
Jan 26 2024, 3:10 PM
Unknown Object (File)
Jan 26 2024, 3:06 PM
Unknown Object (File)
Jan 26 2024, 1:55 PM
Unknown Object (File)
Dec 20 2023, 3:47 AM
Unknown Object (File)
Nov 15 2023, 3:23 PM
Subscribers

Details

Summary

Do some minimal work to better conform to the 802.3ad (LACP) standard.
In particular, don't set the synchronized bit for the peer unless it truly appears to be synchronized to us. Also, don't set our own synchronized bit unless we have actually seen a remote system.

Prior to this change, we were seeing some strange behavior, such as this:

  1. We send an advertisement with the Activity, Aggregation, and Default flags, followed by an advertisement with the Activity, Aggregation, Synchronization, and Default flags. However, we hadn't seen an advertisement from another peer and were still advertising the default (NULL) peer. A closer examination of the in-kernel data structures (using kgdb) showed that the system had added the default (NULL) peer as a valid aggregator for the segment.
  2. We were receiving an advertisement from a peer that included the default (NULL) peer instead of including our systgem information. However, we responded with an advertisement that included the Synchronization flag for both our system and the peer. (Since the peer's advertisement did not include our system information, we shouldn't add the synchronization bit for the peer.)

This patch corrects those two items.

Sponsored by: Netflix
MFC After: 2 weeks

Test Plan

Run LACP on test systems and monitor startup. (So far, it appears that the system now behaves more in keeping with the standard.)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7272
Build 7440: arc lint + arc unit

Event Timeline

jtl retitled this revision from to Make LACP behavior more closely conform to the standard.
jtl updated this object.
jtl edited the test plan for this revision. (Show Details)
jtl added reviewers: network, smh, glebius.
jtl added a subscriber: gallatin.

*bump*

This has been lingering for a while. Any comments before I commit it?

smh edited edge metadata.

LGTM

sys/net/ieee8023ad_lacp.c
1698

Not sure its been fixed, but when I added the sysctl we definitely needed to disable strict mode to get LACP to work properly:
https://svnweb.freebsd.org/base?view=revision&revision=290450

Unfortunately I can't for the life of me remember what happened without it :(

This revision is now accepted and ready to land.Feb 23 2017, 5:39 PM
This revision was automatically updated to reflect the committed changes.