From 26be02d9ae5d97ed7da0ffd2d6e681fb1e30fed1 Mon Sep 17 00:00:00 2001 From: Anoop Kamath <115578705+AnoopKamath@users.noreply.github.com> Date: Tue, 19 Dec 2023 23:24:23 -0800 Subject: [PATCH 1/2] Support 800G iframe in xcvrd --- sonic-xcvrd/xcvrd/xcvrd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonic-xcvrd/xcvrd/xcvrd.py b/sonic-xcvrd/xcvrd/xcvrd.py index 319f15678..60b9d8d09 100644 --- a/sonic-xcvrd/xcvrd/xcvrd.py +++ b/sonic-xcvrd/xcvrd/xcvrd.py @@ -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 From fed956b0af18979115045f28781eb0ebfc32760a Mon Sep 17 00:00:00 2001 From: Anoop Kamath <115578705+AnoopKamath@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:59:27 -0800 Subject: [PATCH 2/2] Add code coverage --- sonic-xcvrd/tests/test_xcvrd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sonic-xcvrd/tests/test_xcvrd.py b/sonic-xcvrd/tests/test_xcvrd.py index 9414d805f..d79747710 100644 --- a/sonic-xcvrd/tests/test_xcvrd.py +++ b/sonic-xcvrd/tests/test_xcvrd.py @@ -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),