Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: simplify frrlib debug #16664

Merged
merged 4 commits into from
Aug 29, 2024
Merged

Conversation

mjstapp
Copy link
Contributor

@mjstapp mjstapp commented Aug 27, 2024

This is a refresh of Igor R's PR #15646 . It simplifies the use of the libfrr debug module and updates the existing users of that api. This lib module could be the basis for a better-integrated debug capability for frr components; that work seems worth continuing even though Igor is not able to be as involved personally.

Pathd uses a single debug struct with additional option flags to
configure different types of debug messages. This is not how debug
library is supposed to be used. The idea of option flags is to allow
more granular control of a single type, not to represent multiple types.

This commit adds a separate debug struct for each type which greatly
simplifies the code.

Signed-off-by: Igor Ryzhov <[email protected]>
The debug library allows to register a `debug_set_all` callback which
should enable all debugs in a daemon. This callback is implemented
exactly the same in each daemon. Instead of duplicating the code, rework
the lib to allow registration of each debug type, and implement the
common code only once in the lib.

Signed-off-by: Igor Ryzhov <[email protected]>
Implement common code for debug config output and remove daemon-specific
code that is duplicated everywhere.

Signed-off-by: Igor Ryzhov <[email protected]>
Implement common code for debug status output and remove daemon-specific
code that is duplicated everywhere.

Signed-off-by: Igor Ryzhov <[email protected]>
@frrbot frrbot bot added the libfrr label Aug 27, 2024
@mjstapp mjstapp marked this pull request as ready for review August 27, 2024 14:05
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

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

looks good ...

@riw777
Copy link
Member

riw777 commented Aug 27, 2024

Should we close #15646 ?

@riw777 riw777 mentioned this pull request Aug 27, 2024
@Jafaral Jafaral merged commit 77e1a26 into FRRouting:master Aug 29, 2024
14 checks passed
@mjstapp mjstapp deleted the igor_debug_simplify branch August 29, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants