Skip to content

Commit

Permalink
[xcvrd] replace check_active_linked_tor_side api to check_mux_directi…
Browse files Browse the repository at this point in the history
…on (sonic-net#131)

Summary:
This PR provides replaces the logic to check mux_direction on the y_cable by checking the mux_direction register instead of actively linked and routing TOR register
Approach
added the changes in y_cable_helper.py by replacing the API

What is the motivation for this PR?
check_mux_direction is required as per design to replace the active_linked_tor_side
active_linked_tor_side -> check_mux_direction
check_mux_direction will be utlized as for establishing mux direction explicitly

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
  • Loading branch information
vdahiya12 authored Dec 4, 2020
1 parent ab39059 commit 73e6ddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sonic-xcvrd/xcvrd/xcvrd_utilities/y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def update_appdb_port_mux_cable_response_table(logical_port_name, asic_index, ap
"Error: Could not get read side for mux cable port probe command logical port {} and physical port {}".format(logical_port_name, physical_port))
return

active_side = y_cable.check_active_linked_tor_side(physical_port)
active_side = y_cable.check_mux_direction(physical_port)

if active_side is None:

Expand Down Expand Up @@ -234,7 +234,7 @@ def read_y_cable_and_update_statedb_port_tbl(logical_port_name, mux_config_tbl):
"Error: Could not establish the read side for Y cable port {}".format(logical_port_name))
return

active_side = y_cable.check_active_linked_tor_side(physical_port)
active_side = y_cable.check_mux_direction(physical_port)
if active_side is None or active_side not in y_cable_switch_state_values:
read_side = active_side = -1
update_table_mux_status_for_statedb_port_tbl(
Expand Down

0 comments on commit 73e6ddd

Please sign in to comment.