Skip to content

Conversation

@sergeymatov
Copy link
Contributor

this is WIP, desc will be added later

@sergeymatov sergeymatov requested a review from a team as a code owner December 11, 2025 13:00
@sergeymatov sergeymatov requested review from Fredi-raspall and removed request for a team December 11, 2025 13:00
@sergeymatov sergeymatov marked this pull request as draft December 11, 2025 13:00
@sergeymatov sergeymatov force-pushed the pr/smatov/bmp-frr-config branch from 43e8d27 to 6044efa Compare December 11, 2025 13:01
}

#[derive(Clone, Debug)]
pub enum BmpSource {
Copy link
Contributor

@Fredi-raspall Fredi-raspall Dec 12, 2025

Choose a reason for hiding this comment

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

I'd define this in another file (bmp.rs), since the bgp.rs is becoming large and bmp is a clear cut?
(I mean the whole bmp config). In bgp.rs you would just import the BmpOptions.

cfg += MARKER;
cfg += "address-family ipv4 unicast";

/* activate neighbors in AF */
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you remove the comments?

init_logging();
let args = CmdArgs::parse();

let (bmp_server_params, bmp_client_opts) = if args.bmp_enabled() {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could probably put this in a function in main.rs that would return the tuple so that main() would remain small (that will help dealing with conflicts).

CheckBytes,
)]
#[rkyv(attr(derive(PartialEq, Eq, Debug)))]
pub struct BmpConfigSection {
Copy link
Contributor

@Fredi-raspall Fredi-raspall Dec 12, 2025

Choose a reason for hiding this comment

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

Here I have a question, that we should clarify ASAP.
For mgmt server (gRPC), we pass the ip/port & Co. from the cmd line. We have no other option probably. However, for BMP, is this what we want to do? I mean, are we sure we don't want to do that via grpc/k8s? In the latter case, the bmp server would be configured and started from the mgmt module and not by main, on demand, depending on the gRPC/k8s configuration.
@Frostman, @mvachhar any thoughts on that?

I know it may seem to be more work, but it may actually turn out to reduce and simplify the code and provide the capability to enable/disable bmp if needed at runtime.


/// Spawn BMP server in a dedicated thread with its own Tokio runtime.
/// Always uses `StatusUpdateHandler` to update `DataplaneStatus`.
pub fn spawn_background(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be renamed to be more meaningful?

}
}

impl Render for BmpOptions {
Copy link
Contributor

Choose a reason for hiding this comment

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

you could also put this in a separate bmp.rs. But it's fine.
At the end of the file, there's a test for bgp that you could extend with bmp options.
It's not really a test, but a way to visually validate that the config is properly rendered.

@Fredi-raspall Fredi-raspall self-requested a review December 12, 2025 10:50
Copy link
Contributor

@Fredi-raspall Fredi-raspall left a comment

Choose a reason for hiding this comment

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

I like the approach and implementation!
I am going to request changes because I'd like to review this again once it is no longer a draft and some of the questions get clarified.
Thanks!

@sergeymatov sergeymatov force-pushed the pr/smatov/bmp-frr-config branch from 6044efa to 66e7168 Compare December 15, 2025 06:44
@sergeymatov sergeymatov force-pushed the pr/smatov/bmp-frr-config branch from 66e7168 to 613b990 Compare December 15, 2025 08:07
@mvachhar mvachhar closed this Dec 15, 2025
@mvachhar mvachhar reopened this Dec 15, 2025
@sergeymatov sergeymatov force-pushed the pr/smatov/bmp-frr-config branch from 613b990 to 4ce4148 Compare December 16, 2025 14:17
@sergeymatov sergeymatov force-pushed the pr/smatov/bmp-frr-config branch from 4ce4148 to eeea2b2 Compare December 16, 2025 14:20
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.

4 participants