Skip to content

Commit

Permalink
[xcvrd] Fixed SFP state update in case port is not in port_config.ini (
Browse files Browse the repository at this point in the history
…sonic-net#47)

Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
  • Loading branch information
akokhan authored and jleveque committed Oct 21, 2019
1 parent a34ba13 commit ac87a27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sonic-xcvrd/scripts/xcvrd
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,9 @@ class sfp_state_update_task:
# this is for the vendors who don't implement "system_not_ready/system_becom_ready" logic
for key, value in port_dict.iteritems():
logical_port_list = platform_sfputil.get_physical_to_logical(int(key))
if logical_port_list is None:
logger.log_warning("Got unknown FP port index {}, ignored".format(key))
continue
for logical_port in logical_port_list:
if value == SFP_STATUS_INSERTED:
logger.log_info("Got SFP inserted event")
Expand Down

0 comments on commit ac87a27

Please sign in to comment.