Page MenuHomeFreeBSD

lacp: simplify lacp_compose_key()
Needs ReviewPublic

Authored by gallatin on Sat, May 16, 2:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 23, 12:20 AM
Unknown Object (File)
Fri, May 22, 12:13 AM
Unknown Object (File)
Mon, May 18, 9:48 PM
Unknown Object (File)
Mon, May 18, 3:26 AM
Unknown Object (File)
Sat, May 16, 4:05 AM
Subscribers

Details

Summary

When updating the firmware on a 400g nic, the driver didn't understand the media type the NIC's firmware was reporting, and its media was reported as "unknown" by ifconfg. This broke LACP on this host, as lacp separates links by speed, and creates different aggregation groups based on speed. Since there was no media type reported, this link went into a different aggregation group as LACP could not determine its speed.

This change fixes a few bugs:

  1. Actually uses the baud rate reported by the interface as the speed (and falls back to use the baudrate associated with the media if the interface somehow doesn't support if_baudrate)
  2. Compresses the baud rates back down to 4 bits. Using things like IFM_400G_FR8 does not fit in 4 bits (its value is0x1811) . In fact, interfaces faster than 1Gb/s don't fit in 4 bits using the old scheme
  3. Emits a warning to the console once per boot if it encounters a NIC with an unsupported speed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped