Skip to content

Use software_bfd instead of switch_type. #21794

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

Merged
merged 3 commits into from
Mar 13, 2025

Conversation

dypet
Copy link
Contributor

@dypet dypet commented Feb 19, 2025

Why I did it

Request in sonic-net/sonic-swss#3406 to allow software BFD to be enabled independent of switch_type 'dpu'.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Added checks for new config DB entry instead,
"FEATURE": {
"software_bfd": {
"state": "enabled"
}
}

How to verify it

  • pytest testcases
  • Tested on vs platform by adding software_bfd to config DB.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dypet dypet marked this pull request as draft February 20, 2025 19:51
@dypet dypet marked this pull request as ready for review February 27, 2025 15:49
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

lgtm

config_db.connect()
features = config_db.get_table('FEATURE')
if 'software_bfd' in features and 'state' in features['software_bfd'] and features['software_bfd']['state'] == 'enabled':
log_notice("software_bfd feature is enabled, starting bfd manager")
managers.append(BfdMgr(common_objs, "STATE_DB", swsscommon.STATE_BFD_SOFTWARE_SESSION_TABLE_NAME))
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @dypet could you confirm if all the tests are passing with the change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we enabling software_bfd feature by default in smartswitch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tests are passing, should azure pipeline be retriggered to get a more recent run? Planning to add software_bfd=enabled to initial config for DPU

Copy link
Contributor

Choose a reason for hiding this comment

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

@dypet Please enable software_bfd in the next PR and check the sanity.

@kperumalbfn kperumalbfn merged commit 0af7918 into sonic-net:master Mar 13, 2025
21 checks passed
yanjundeng pushed a commit to yanjundeng/sonic-buildimage that referenced this pull request Apr 23, 2025
Use software_bfd instead of switch_type
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