Skip to content

Conversation

@zjswhhh
Copy link
Contributor

@zjswhhh zjswhhh commented Sep 12, 2025

What I did
Adding rx_monitor_timer and tx_monitor_timer handling per HLD: https://github.com/sonic-net/SONiC/blob/master/doc/vxlan/Overlay%20ECMP%20ehancements.md

sign-off: Jing Zhang [email protected]

Why I did it
It's needed for SSW HA scenario as DPU side bfd is a software solution, interval must be set to a reasonable value.

How I verified it
UTs.

Details if related

root@8486a8ef5a38:/# redis-cli -n 0  hgetall  "VNET_ROUTE_TUNNEL_TABLE:Vnet28:100.100.1.1/32"
 1) "endpoint"
 2) "9.1.0.1,9.1.0.2"
 3) "endpoint_monitor"
 4) "9.1.0.1,9.1.0.2"
 5) "profile"
 6) "Test_profile"
 7) "primary"
 8) "9.1.0.1"
 9) "adv_prefix"
10) "100.100.1.0/24"
11) "check_directly_connected"
12) "true"
13) "rx_monitor_timer"
14) "100"
15) "tx_monitor_timer"
16) "100"

root@8486a8ef5a38:/# redis-cli -n 0  hgetall  "BFD_SESSION_TABLE:default:default:9.1.0.1"    
 1) "local_addr"
 2) "9.9.9.9"
 3) "multihop"
 4) "true"
 5) "shutdown_bfd_during_tsa"
 6) "true"
 7) "rx_interval"
 8) "100"
 9) "tx_interval"
10) "100"

root@8486a8ef5a38:/# show bfd  sum
/bin/sh: 1: sudo: not found
Total number of BFD sessions: 1
Peer Addr    Interface    Vrf      State    Type          Local Addr      TX Interval    RX Interval    Multiplier  Multihop      Local Discriminator
-----------  -----------  -------  -------  ------------  ------------  -------------  -------------  ------------  ----------  ---------------------
9.1.0.1      default      default  Down     async_active  9.9.9.9                 100            100            10  true                            1
root@8486a8ef5a38:/# 

@zjswhhh zjswhhh requested a review from prsunny as a code owner September 12, 2025 02:25
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

vnet_obj = self.get_vnet_obj()
tunnel_name = 'tunnel_28'
vnet_name = 'Vnet28'
asic_db = swsscommon.DBConnector(swsscommon.ASIC_DB, dvs.redis_sock, 0)

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable asic_db is not used.
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zjswhhh
Copy link
Contributor Author

zjswhhh commented Oct 5, 2025

Hi @prsunny - can you help merge this? Without the request description change, orchagent will throw exception when we add rx_monitor_timer and tx_monitor_timer fields.

The code change should be covered by DVS UT.

prsunny
prsunny previously approved these changes Oct 6, 2025
Copy link
Collaborator

@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.

Please check backward compatibility.

@prsunny
Copy link
Collaborator

prsunny commented Oct 6, 2025

@zjswhhh , possible to fix UT coverage?

@prsunny
Copy link
Collaborator

prsunny commented Oct 6, 2025

@zjswhhh , would you also update the BFD hld with these changes?

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI review requested due to automatic review settings October 24, 2025 21:02
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for configurable BFD monitoring intervals (rx_monitor_timer and tx_monitor_timer) for VNET tunnel routes, as specified in the Overlay ECMP enhancements HLD. This is needed for SSW HA scenarios where DPU-side BFD operates in software and requires reasonable interval values.

Key changes:

  • Added rx_monitor_timer and tx_monitor_timer parameters to VNET route configuration
  • Extended BFD session creation to accept and apply these timer values
  • Added unit test coverage for the new timer functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
tests/vnet_lib.py Added rx_monitor_timer and tx_monitor_timer parameters to route creation/update helper functions
tests/test_vnet.py Added new test case to verify timer handling in VNET routes with BFD monitoring
orchagent/vnetorch.h Updated function signatures and request descriptor to support timer parameters
orchagent/vnetorch.cpp Implemented timer handling throughout the route processing pipeline and BFD session creation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@prsunny
Copy link
Collaborator

prsunny commented Oct 29, 2025

@zjswhhh , please fix conflicts

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zjswhhh zjswhhh requested a review from prsunny November 3, 2025 00:55
@zjswhhh
Copy link
Contributor Author

zjswhhh commented Nov 10, 2025

Hi @prsunny - can you help merge please?

correct typo in comments

Co-authored-by: Copilot <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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