Skip to content

[fw] initial BIER support#176

Open
asoberai wants to merge 7 commits intonamed-data:dv2from
asoberai:dv2
Open

[fw] initial BIER support#176
asoberai wants to merge 7 commits intonamed-data:dv2from
asoberai:dv2

Conversation

@asoberai
Copy link

No description provided.

@tianyuan129 tianyuan129 changed the title Dv2 [fw] initial BIER support Mar 13, 2026
}

pfx.Announce(prefix, faceId, cost, params.ValidityPeriod)
pfx.Announce(prefix, faceId, cost, cost == 1, params.ValidityPeriod)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

dv/dv/mgmt.go Outdated

dv.mutex.Lock()
dv.pfx.Announce(name, faceID, cost, validity)
dv.pfx.Announce(name, faceID, cost, cost == 1, validity)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

// Rebuild the BIFT whenever the FIB changes so BIER forwarding paths
// are always consistent with the routing table.
if fw.IsBierEnabled() {
fw.Bift.BuildFromFibPet()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought BIFT is solely built from FIB? What you need PET for?

} `json:"tables"`
}

// (AI GENERATED DESCRIPTION): Creates and returns a `Config` object pre‑populated with default settings for core parameters, face types, forwarding, management, and table options.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you delete those?

Copy link
Collaborator

@tianyuan129 tianyuan129 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two additional things.

1/ I didn't catch where the BIFT is rebuilt on FIB changes?

2/ You should include sample BIER config in yanfd.sample.yaml

dv/dv/prefix.go Outdated
}

// AnnounceSync adds or updates a Sync group prefix marked for BIER multicast.
func (pfx *PrefixModule) AnnounceSync(name enc.Name, face uint64, cost uint64, validity *spec.ValidityPeriod) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having one Announce() is a lot simpler.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok should we then overload the Announce() method with cost? This was originally implemented in the last commit as cost encoded multicast behavior previously. To my understanding, in Announce(), cost feeds into DV routing metric computation. In AnnounceSync(), cost only configures the local PET nexthop. BIER builds the BIFT independently from the FIB, so the prefix-level cost is irrelevant to multicast tree construction.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can have an additional parameter as the multicast flag.

return
}

bfrId := params.Cost.GetOr(0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with overloading the Cost field, but just a reminder that we do something hacky here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants