Skip to content

Implement bfd pinned state#134

Merged
zjswhhh merged 2 commits intosonic-net:masterfrom
yue-fred-gao:bfd_pinned
Jan 21, 2026
Merged

Implement bfd pinned state#134
zjswhhh merged 2 commits intosonic-net:masterfrom
yue-fred-gao:bfd_pinned

Conversation

@yue-fred-gao
Copy link
Collaborator

What I did
Implement BFD pinned state in ha_set_config_table.

  1. Handle ha-set update
  2. Pass pinned_vdpu_bfd_probe_states in ha_set_config_table to pinned_state in VNET_ROUTE_TUNNEL_TABLE

Why I did it
Missing feature

How I verified it
Verified with unit test (will verify in hardware when VnetOrch supports pinned_state)
Details if related

Signed-off-by: Yue Gao <yuega2@cisco.com>
@mssonicbld
Copy link

/azp run


self.update_dash_ha_set_table(&vdpus, incoming, outgoing)?;

if !first_time {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can pinned state be part of initial config?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It can be. first_time check is set when the actor first receives ha_set_config. At the first time, it will register with VDpu actors. Only after the actor receives VDpu update, which won't happen when it's the first_time, and DashHaGlobalConfig, it is ready to create vnet route. In the corresponding VDpu update and DashHaGlobalConfig, there is call of self.update_vnet_route_tunnel_table. If the pinned state in the initial ha_set_config, it will be set by those calls. Here is only to handle ha_set_config update.

@mssonicbld
Copy link

/azp run

Copy link
Collaborator

@zjswhhh zjswhhh left a comment

Choose a reason for hiding this comment

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

When pinned_state is updated, will the list of monitor IPs and endpoint IPs be written along with it again?

@yue-fred-gao
Copy link
Collaborator Author

When pinned_state is updated, will the list of monitor IPs and endpoint IPs be written along with it again?

Yes, it is a complete rewrite with all the attributes.

@zjswhhh zjswhhh merged commit 17e2e0b into sonic-net:master Jan 21, 2026
4 checks passed
@yue-fred-gao
Copy link
Collaborator Author

hi @zjswhhh , what will happen if this change goes in before VnetOrch supports pinned_state? will it be ignored?

@zjswhhh
Copy link
Collaborator

zjswhhh commented Jan 22, 2026

hi @zjswhhh , what will happen if this change goes in before VnetOrch supports pinned_state? will it be ignored?

Good catch, I think orchagent will throw exception because the field is not expected. :(

@yue-fred-gao
Copy link
Collaborator Author

ok. Let's hope your vnetorch change going in quickly. In the meantime, we have to exclude the PR when building a new image.

@zjswhhh
Copy link
Collaborator

zjswhhh commented Jan 22, 2026

ok. Let's hope your vnetorch change going in quickly. In the meantime, we have to exclude the PR when building a new image.

Please help review: sonic-net/sonic-swss#4150

@mssonicbld
Copy link

Cherry-pick PR to msft-202506: Azure/sonic-dash-ha.msft#22

yue-fred-gao added a commit to yue-fred-gao/sonic-dash-ha that referenced this pull request Feb 11, 2026
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.

5 participants