Skip to content

Commit

Permalink
Support 800G ifname in xcvrd (sonic-net#416)
Browse files Browse the repository at this point in the history
* Support 800G iframe in xcvrd

* Add code coverage
  • Loading branch information
AnoopKamath authored Dec 21, 2023
1 parent b2b8905 commit b1e51c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions sonic-xcvrd/tests/test_xcvrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ def get_application(lane):
assert task.is_cmis_application_update_required(mock_xcvr_api, app_new, host_lanes_mask) == expected

@pytest.mark.parametrize("ifname, expected", [
('800G L C2M', 800000),
('400G CR8', 400000),
('200GBASE-CR4 (Clause 136)', 200000),
('100GBASE-CR2 (Clause 136)', 100000),
Expand Down
4 changes: 3 additions & 1 deletion sonic-xcvrd/xcvrd/xcvrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def get_interface_speed(ifname):
"""
# see HOST_ELECTRICAL_INTERFACE of sff8024.py
speed = 0
if '400G' in ifname:
if '800G' in ifname:
speed = 800000
elif '400G' in ifname:
speed = 400000
elif '200G' in ifname:
speed = 200000
Expand Down

0 comments on commit b1e51c3

Please sign in to comment.