You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change searches for a third generic key that covers medium type + lane speed. This will cover all Arista usecases as at Arista out tuning values are based off medium type + lane speed. Of course this will work for all vendors if they choose to do so. The consequence of this is that on bringup Arista can upload a single media_settings.json which will cover every possible speed and lane combination. Any users of our SKUs will not need to ever ask for updates to cover new optics, speeds etc.
Note if there is no xcvr present we will assume copper; this will cover internal phy to external phy connection, as well as any backplane links.
The new flow will look like: (Addition to current flow in green)
Motivation and Context
The current implementation of the the dynamic media tuning feature requires that you know either:
Vendor Key E.g. AMPHENOL-1234
Media Key E.g. QSFP28-40GBASE-CR4-1M
This is too specific. For example consider the following case. I am using QSFP-DDs, but last minute before deployment I change vendors and use QSFPs - now I need the vendor like Arista to upstream a new PR that includes different or even the same tuning values but with a new vendor/media key to match against. Same scenario if we change from DACs to optics last minute.
We can make this more generic by adding a third key that is a combination of physical medium (copper or optical) and lane speed (E.g. 400g-8 is 50000, 100g-4 is 25000).
This key can be easily derived in xcvrd because
cmis spec can tell us if it is copper or optical
We can easily derive the lane speed from config
This means that we can now have 1 media_settings.json file that can cover all scenarios. It does the check after Vendor+Media key - so you can still have very specific values if you want to take precedence over the generic.
How Has This Been Tested?
Added a new media_settings.json for Arista QuicksilverP with the following entries per port:
Changing speeds and doing xcvr swap I can see that the different and correct values are applied in APPL_DB. I also added a print to xcvrd to show what keys it looks for at different speeds and xcvr types:
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 16
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 23
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 15
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 10
{'vendor_key': 'ARISTA NETWORKS -OSFP-400G-PLR4 ', 'media_key': 'OSFP-8X-sm_media_interface', 'lane_speed_key': 'speed:400GAUI-8', 'medium_lane_speed_key': 'OPTICAL50000'}
found OPTICAL50000 in media_dict for physical port 21
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 29
{'vendor_key': 'ARISTA NETWORKS -OSFP-800G-2XDR4 ', 'media_key': 'OSFP-8X-sm_media_interface', 'lane_speed_key': None, 'medium_lane_speed_key': 'OPTICAL50000'}
found OPTICAL50000 in media_dict for physical port 13
{'vendor_key': 'ARISTA NETWORKS -OSFP-800G-2XDR4 ', 'media_key': 'OSFP-8X-sm_media_interface', 'lane_speed_key': 'speed:100GAUI-1-L', 'medium_lane_speed_key': 'OPTICAL100000'}
found OPTICAL100000 in media_dict for physical port 1
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 40
{'vendor_key': 'ARISTA NETWORKS -OSFP-400G-FR4 ', 'media_key': 'OSFP-8X-sm_media_interface', 'lane_speed_key': 'speed:400GAUI-8', 'medium_lane_speed_key': 'OPTICAL50000'}
found OPTICAL50000 in media_dict for physical port 8
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 62
{'vendor_key': 'ARISTA NETWORKS -OSFP-400G-SR8 ', 'media_key': 'OSFP-8X-nm_850_media_interface', 'lane_speed_key': 'speed:400GAUI-8', 'medium_lane_speed_key': 'OPTICAL50000'}
found OPTICAL50000 in media_dict for physical port 32
{'vendor_key': 'ARISTA NETWORKS -OSFP-800G-2XDR4 ', 'media_key': 'OSFP-8X-sm_media_interface', 'lane_speed_key': None, 'medium_lane_speed_key': 'OPTICAL50000'}
found OPTICAL50000 in media_dict for physical port 35
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 38
{'vendor_key': 'ARISTA NETWORKS -OSFP-400G-DR4 ', 'media_key': 'OSFP-8X-sm_media_interface', 'lane_speed_key': 'speed:400GAUI-8', 'medium_lane_speed_key': 'OPTICAL50000'}
found OPTICAL50000 in media_dict for physical port 55
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 37
{'vendor_key': 'ARISTA NETWORKS -AOC-O-O-400G-1M ', 'media_key': 'OSFP-8X-active_cable_media_interface', 'lane_speed_key': 'speed:400GAUI-8', 'medium_lane_speed_key': 'OPTICAL50000'}
found OPTICAL50000 in media_dict for physical port 57
{'vendor_key': 'ARISTA NETWORKS -AOC-O-O-400G-1M ', 'media_key': 'OSFP-8X-active_cable_media_interface', 'lane_speed_key': 'speed:400GAUI-8', 'medium_lane_speed_key': 'OPTICAL50000'}
found OPTICAL50000 in media_dict for physical port 53
{'vendor_key': 'ARISTA NETWORKS -CAB-O-O-400G-1M ', 'media_key': 'OSFP-8X-passive_copper_media_interface-1.0M', 'lane_speed_key': 'speed:400G', 'medium_lane_speed_key': 'COPPER50000'}
found COPPER50000 in media_dict for physical port 46
I also added test cases and made sure other testcases pass tests/test_xcvrd.py unit tests.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change searches for a third generic key that covers medium type + lane speed. This will cover all Arista usecases as at Arista out tuning values are based off medium type + lane speed. Of course this will work for all vendors if they choose to do so. The consequence of this is that on bringup Arista can upload a single media_settings.json which will cover every possible speed and lane combination. Any users of our SKUs will not need to ever ask for updates to cover new optics, speeds etc.
Note if there is no xcvr present we will assume copper; this will cover internal phy to external phy connection, as well as any backplane links.
The new flow will look like: (Addition to current flow in green)

Motivation and Context
The current implementation of the the dynamic media tuning feature requires that you know either:
This is too specific. For example consider the following case. I am using QSFP-DDs, but last minute before deployment I change vendors and use QSFPs - now I need the vendor like Arista to upstream a new PR that includes different or even the same tuning values but with a new vendor/media key to match against. Same scenario if we change from DACs to optics last minute.
We can make this more generic by adding a third key that is a combination of physical medium (copper or optical) and lane speed (E.g. 400g-8 is 50000, 100g-4 is 25000).
This key can be easily derived in xcvrd because
This means that we can now have 1 media_settings.json file that can cover all scenarios. It does the check after Vendor+Media key - so you can still have very specific values if you want to take precedence over the generic.
How Has This Been Tested?
Added a new media_settings.json for Arista QuicksilverP with the following entries per port:
Changing speeds and doing xcvr swap I can see that the different and correct values are applied in APPL_DB. I also added a print to xcvrd to show what keys it looks for at different speeds and xcvr types:
I also added test cases and made sure other testcases pass tests/test_xcvrd.py unit tests.
Additional Information (Optional)