Skip to content

Commit

Permalink
Correct the peer forwarding state table (sonic-net#281)
Browse files Browse the repository at this point in the history
Description
Fixes: sonic-net/sonic-linkmgrd#101

ycabled failed to toggle peer forwarding state for active-active ports.
Use ConsumerStateTable to listen to HW_FORWARDING_STATE_PEER.

Signed-off-by: Longxiang Lyu lolv@microsoft.com

Motivation and Context
As the description

How Has This Been Tested?
On a dualtor-mixed testbed, shutdown a port on upper ToR, verified the lower ToR could toggle the nic_simulator upper ToR forwarding state to standby.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
  • Loading branch information
lolyu authored Aug 10, 2022
1 parent 5f5fefd commit c7b7543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3400,8 +3400,8 @@ def task_worker(self):
hw_mux_cable_tbl[asic_id] = swsscommon.Table(
state_db[asic_id], swsscommon.STATE_HW_MUX_CABLE_TABLE_NAME)
# TODO add definition inside app DB
status_tbl_peer[asic_id] = swsscommon.SubscriberStateTable(
appl_db[asic_id], "HW_MUX_CABLE_TABLE_PEER")
status_tbl_peer[asic_id] = swsscommon.ConsumerStateTable(
appl_db[asic_id], "HW_FORWARDING_STATE_PEER")
fwd_state_command_tbl[asic_id] = swsscommon.SubscriberStateTable(
appl_db[asic_id], "FORWARDING_STATE_COMMAND")
fwd_state_response_tbl[asic_id] = swsscommon.Table(
Expand Down

0 comments on commit c7b7543

Please sign in to comment.