Skip to content

Two uplink ports as one LACP link, and the power state survives a BMC reboot

The two uplink ports can now be one LACP link, and a BMC reboot keeps the nodes' power state as it was. LACP is off unless you turn it on. The switch chip's own trunk hardware carries the bond, and the whole LACP work is @danste22's (Daniel): the kernel patches, the bonding, the daemon, the interface and the command line (#79). Thank you, Daniel. The power-state fix builds on his gpio-latch patch, from an idea of Sven Rademakers.

Firmware v2.52.0, 21 November 2026 — the first image to carry bmcd 2.46.0, BMC-UI 4.7.0, tpi 1.11.0. Every item below is the repository's own changelog entry, taken apart; the whole entry is a click away under each one.

LACP is off unless you turn it on: a board that does not use it changes in nothing.

Thank you, @danste22 (Daniel Steinhauf). The whole LACP work in this release is his: the kernel's hardware LAG patches for the RTL8370MB-CG, the bonding, the SMI arbiter driver, the bmcd LACP uplink, the BMC-UI Switch page and the tpi commands. He also tested it on a board against a Zyxel LACP switch and wrote up the result (#79, #87, bmcd#50 → bmcd#56, BMC-UI#58 → #60, tpi#16 → #17). His commits keep his authorship, and the copyright and Signed-off-by lines are his.

Section titled “LACP uplink: ge0 and ge1 as one 802.3ad bond0 on the RTL8370 hardware LAG, by @danste22 (#79, #87, bmcd#50, BMC-UI#58, tpi#16), thanks!”

Three kernel patches (net-dsa/0014 to 0016) offload a Linux bond onto the switch chip's own trunk hardware, CONFIG_BONDING is built in, and the kernel command line carries bonding.max_bonds=0, so no bond0 exists until ifupdown-ng creates the configured one.

The whole entry

bmcd 2.46.0 creates bond0 (802.3ad, layer2+3 hash, fast LACP) over ge0 and ge1 when the switch asks for second_uplink: lag, and writes it into /etc/network/interfaces so the bond is up before the daemon starts. BMC-UI 4.7.0 has the LACP switch and the flat-lag and trunk-lag presets on the Switch page, and tpi 1.11.0 has tpi network switch apply --preset flat-lag (or trunk-lag, or --second-uplink lag). A change goes through the usual confirm window and is put back automatically if it is not confirmed; if the uplink never forwards after an apply, bmcd reverts anyway, 60 s after the window would have ended. A hand-written /etc/network/interfaces needs an explicit opt-in (the checkbox, --replace-hand-written, or replace_hand_written: true), and only when the change turns LACP on. A bond0 that bmcd did not create is refused. The switch at the other end needs LACP on both ports. Nothing creates a bond by itself: without one in /etc/network/interfaces the board stays the flat br0 it is today. tests/lag-parts.sh checks the kernel pieces offline. The patches keep their From: and Signed-off-by: headers.

Tested by @danste22 on a Zyxel LACP switch: both ports in one aggregator, ge0 alone (the bond keeps its carrier and nothing is sent to the dead port), the automatic revert in both directions, and an upstream without LACP. We tested it on two boards with LACP off, which is how every board runs it by default. Each part was carried on from his pull request with his commits kept under his authorship (bmcd#56, BMC-UI#60, tpi#17).

LACP (SecondUplink::Lag) on Flat and Trunk

Section titled “LACP (SecondUplink::Lag) on Flat and Trunk”

bmcd 2.45.0

bond0 (802.3ad) carries the uplink VLANs; ge0 and ge1 are empty slaves.

The whole entry

The presets list shows them as flat-lag and trunk-lag; the value to send is the preset's preset field, for example {"preset":"flat","second_uplink":"lag"}. Split stays incompatible with LAG. The bond is created with xmit_hash_policy layer2+3 and lacp_rate fast, live and in the interfaces stanza: the switch copies the bond's hash when it joins, and the kernel default layer2 put two nodes' uploads on one member. With DHCP, br0 gets udhcpc-opts "-t 25 -T 2" so the lease waits for LACP to reach Distributing. The confirm window watches bond0. LACP needs ifupdown-ng's bond executor on the image. (thanks @danste22, #50/#56)

A confirmed switch change also writes /etc/network/interfaces

Section titled “A confirmed switch change also writes /etc/network/interfaces”

bmcd 2.45.0

One locked writer, shared with address confirm.

The whole entry

A # bmcd-switch: header carries the document, and bond0, bridge-ports and the post-up lines come from it, so a reboot brings the bond and the VLANs up before this daemon starts. (thanks @danste22, #50/#56)

Section titled “A document without second_uplink is read one way, whatever it came in by”

bmcd 2.45.0

The file on the overlay, the interfaces header and an API body all infer it from the ports and STP (a Split, or a Trunk with ge1 off, is off; STP on is redundant; bond0 in the ports is lag), instead of the API defaulting to redundant while the file inferred.

BMC-UI 4.7.0

(thanks @danste22, #58).

The whole entry

The board's flat-lag and trunk-lag presets are in the list, and an LACP switch beside VLAN filtering and spanning tree bundles ge0 and ge1 into bond0. With LACP on, ge0 and ge1 are locked as empty slaves, bond0 carries the uplink VLANs, and spanning tree is off. The running view shows an LACP badge. The switch at the other end needs LACP on both ports, and the description says so. The draft logic moved out of SwitchConfig.tsx into switchDraft.ts, with tests.

BMC-UI 4.7.0

LACP needs bond0 declared in /etc/network/interfaces.

The whole entry

When the board answers that the file was written by hand, the page says so and shows "Replace my hand-written network file"; Apply stays off until it is ticked, then sends replace_hand_written. The board keeps a copy of the old file. A bond0 the board did not create is explained rather than retried.

The LACP switch appears only on a board that shows it can do LACP (a preset that uses it, or LACP already running), so a daemon from before bmcd's LACP support does not get a control it would refuse

Section titled “The LACP switch appears only on a board that shows it can do LACP (a preset that uses it, or LACP already running), so a daemon from before bmcd's LACP support does not get a control it would refuse”

BMC-UI 4.7.0

Turning LACP off on a flat layout gives back the flat layout: spanning tree follows VLAN filtering, as in the board's presets.

tpi 1.11.0

--preset flat-lag / trunk-lag, or --second-uplink lag on flat / trunk, send the board {"preset":"flat|trunk","second_uplink":"lag"} so ge0+ge1 become LACP bond0.

The whole entry

show and presets now print the port table under flat+lag too, so bond0 is visible, and say that ge0 and ge1 are the bond's members (their empty rows are not a fault). Needs a bmcd that accepts second_uplink: lag (and ifupdown-ng's bond executor to confirm), and LACP on both ports of the switch at the other end. (thanks @danste22, #16/#17)

tpi network switch apply --replace-hand-written

Section titled “tpi network switch apply --replace-hand-written”

tpi 1.11.0

LACP needs bond0 declared in /etc/network/interfaces, so over a hand-written file the board refuses it with a 409.

The whole entry

With the flag the request carries replace_hand_written: true, and a confirmed change replaces the file (the board keeps a copy beside it). Without it, that 409 now says so in tpi's words and names the flag; the 409 for a bond0 the board did not make says how to remove it. Every other change needs neither. (review of #16)

  • bmcd 2.46.0, BMC-UI 4.7.0 and tpi 1.11.0. Are the pinned versions (the latest of each).
  • One over-the-air write was seen to fail, on one board. Writing the image with tpi-selfupdate failed with a UBI write timeout on the final block (ubiupdatevol: error 110). The firmware the board was running is untouched and still boots.

    The whole entry

    Power-cycle the board, then retry or flash from the SD card (tpi-selfupdate now says so itself). The cause is not found yet.

  • tests/selfupdate-failure.sh covers the failure paths with stubbed curl, df and osupdate, under dash and busybox ash; the mutation check in checks.yml fails if the cleanup, the advice or the writability test is removed.

  • Upgrading rewrites an address-only interfaces once. A board whose interfaces was written by an earlier bmcd as the address alone has it rewritten at the first start of this version, now carrying the switch's own boot lines (and bond0 when LACP is confirmed). bmcd 2.45.0

    The whole entry

    The log line says so. A file written by hand is never rewritten by this.

  • A hand-written interfaces holds up LACP only. LACP is the one change that needs the file (bond0 has to exist before this daemon starts), so only an apply that asks for second_uplink: lag over a hand-written file is refused, with a 409, unless the request carries replace_hand_written: true (a copy of the file is kept when the change is confirmed). bmcd 2.45.0

    The whole entry

    Every other change is applied live and persisted in switch.json as before, and a hand-written file is left alone, at confirm and at boot. A hand-written file whose address cannot be read (not DHCP, not a static address with a netmask) is refused instead of turned into DHCP. The 409 names the options a client has: the interface's checkbox, tpi --replace-hand-written, or the field in the request; the clients grow them separately.

  • The OpenAPI request bodies of PUT and validate on the switch are the SwitchPreset and SwitchDocument components,. With window_s and replace_hand_written beside them, instead of a hand-written properties list that had already drifted from them. bmcd 2.45.0

  • The API types are generated from bmcd v2.45.0,. The first daemon with LACP (bmcd#56, also @danste22's, from bmcd#50). BMC-UI 4.7.0

    The whole entry

    bmcd-release.txt and src/lib/api/schema.d.ts, with npm run api:refresh. The hand-written switch types in src/lib/api/get.ts now follow the generated ones (SecondUplink, the port membership, SwitchDocument, the preset's preset field), so a change in the daemon's document shows up as a type error here.

  • --preset flat --second-uplink redundant|off is refused. It used to be ignored without a word; flat takes only --second-uplink lag (or --preset flat-lag). --preset split refuses --second-uplink as well. tpi 1.11.0

    The whole entry

    (thanks @danste22, #16/#17)

  • A reboot of the BMC on the 6.18 kernel is read as a warm boot again (bmcd 2.46.0). Bmcd up to 2.45.0 logged cold boot: restoring persisted power state after every reboot of the BMC on 6.18 (v2.51.0), with all four modules running, where on 6.12 it adopted the live state.

    The whole entry

    The saved state was then restored over the live one, so a node that was off in the database but on in fact was switched off. bmcd now reads which nodes are powered from the latch shadow word that the kernel's gpio-latch patch keeps in SoC SRAM (the cooperative contract with the bootloader that @danste22 carried to 6.18, with the original idea from Sven Rademakers, whose 2024 patch in turing-machines/BMC-Firmware started it; thanks to both), and requests the node enable lines with that value, so starting the daemon no longer pulses running modules either (bmcd#58). A cold boot still restores the persisted state. No kernel change.

  • tpi-selfupdate cleans up after a failed update and says what to do (#102). A write that failed on the last partial LEB (ubiupdatevol: ... error 110) left the ~39 MB download in /mnt/overlay, which has very little room, and printed nothing about the state the board was in.

    The whole entry

    After a write error other than EIO UBI goes read-only until the next boot, so retrying is useless and even tpi reboot can fail. The download is now removed on every exit (failure, checksum mismatch, interrupted transfer, SIGINT/SIGTERM) and only that file, under a name carrying the PID so a file already in the directory is never touched. A failed write exits 1 and states that the running firmware is untouched and will boot, that UBI may be read-only, and to power-cycle the board and retry or flash from the SD card. --keep keeps the image only after a successful write.

  • Staging says when it is not on the SD card. The card was already preferred; it is now also required to be writable (a card remounted read-only after an error used to be picked and then failed), and the script names the reason when it falls back to the overlay or /tmp.

  • A reboot of the BMC on the 6.18 kernel no longer reads as a cold boot. The daemon logged cold boot: restoring persisted power state on every start, with all four modules powered and running, where on the 6.12 kernel it logged adopted live power state. bmcd 2.46.0

    The whole entry

    The state was restored from the database instead of adopted, so a node that was off in the database but on in fact was switched off. Two causes. The node enable lines were requested as outputs with no value, which drives them to 0; the 6.18 gpio-latch driver writes that into the latch and its shadow, so the read that followed saw "all off" (the 6.12 driver ignored the request). And the enable lines alone cannot tell a running board from a cold one: they are active low, and the bootloader clears every latch on a cold boot, which reads as "enabled". The daemon now reads the boot cookie and the latch shadow word that the bootloader and the kernel keep in SoC SRAM (read-only, through /dev/mem, no line is touched) and counts a node as powered when the ATX latch is set and its enable latch is asserted. A cold boot clears the ATX latch, so it still restores the persisted state. The enable lines are requested with what the board is doing, so starting the daemon no longer holds running modules in reset for a moment. Where the shadow cannot be read, and on a v2.4 board, the daemon reads the enable lines as before.

  • A confirm window that never starts is no longer a trap. The window starts when the uplink forwards. bmcd 2.45.0

    The whole entry

    With LACP that is easy to miss (an uncabled port, a switch with no LACP on the other end, a bond that never negotiates), and the board was then off the network with nothing to put it back until a power cycle. A change whose uplink has not forwarded within window_s plus 60 seconds of the apply is now put back anyway. (review of #50)

  • A failed LACP apply no longer takes down a bond it did not make. A bond0 that already exists and is not the running document's (a hand-written file, an earlier run) refuses the apply with a 409 and changes nothing. bmcd 2.45.0

    The whole entry

    A failed apply undoes only what it did: the bond is deleted only if this apply created it. (review of #50)

  • Boot heal checks the kernel, not just the file. When interfaces matches the confirmed document, heal now also checks that bond0 exists for LACP, that br0 has vlan_filtering as the document says, and that each front port holds its VLANs, and runs the post-up plan once if they are missing. bmcd 2.45.0

    The whole entry

    A br0 whose DHCP failed before post-up ran no longer leaves bmcd believing in VLANs that were never programmed. A hand-written interfaces is still left alone, and a bond0 it made is not made again. (review of #50)

  • A revert does not stop at the first error, and reports what is there. The timer and a requested revert now try every step even if one fails (a half-moved ge0 and ge1 left the board stranded), and the document reported as running is then read back from the kernel instead of assumed. bmcd 2.45.0

    The whole entry

    (review of #50)

  • post-up lines that delete the bridge's own VLAN end in || true. ifupdown stops at a post-up that fails, and the delete of an entry that may not exist must not cancel the lines after it. bmcd 2.45.0

  • Confirm reads the clock once. The check and the commit used two readings; if the window ended while the two files were being flushed, the commit refused after both were written, and the timer then put the old document back under a configuration nobody confirmed. bmcd 2.45.0

    The whole entry

    (review of #50)

  • The preview warnings for a LACP document ask about bond0,. Not about ge0 and ge1, which are empty slaves by design. bmcd 2.45.0


Every release of the firmware · the roadmap · follow by feed

Last updated: