|
2 | 2 |
|
3 | 3 | ## Revision |
4 | 4 |
|
5 | | - | Version | Date | Author | Description | |
6 | | - |:-------:|:-----------:|:----------------------:|:--------------------------------------------------:| |
7 | | - | 0.1 | 12/19/2024 | Jan Mazurek | Initial version | |
8 | | - | 0.2 | 01/07/2026 | Brian Gallagher | Updated after publishing PRs to implement this HLD | |
| 5 | + | Version | Date | Author | Description | |
| 6 | + |:-------:|:-----------:|:----------------------:|:-----------------------------------------------------------------------:| |
| 7 | + | 0.1 | 12/19/2024 | Jan Mazurek | Initial version | |
| 8 | + | 0.2 | 01/07/2026 | Brian Gallagher | Updated after publishing PRs to implement this HLD | |
| 9 | + | 0.3 | 02/27/2026 | Brian Gallagher | Changed the format of the media_settings.json to avoid changes in xcvrd | |
9 | 10 |
|
10 | 11 | ## Summary |
11 | 12 |
|
@@ -53,105 +54,96 @@ The media settings file currently supports lookups for a variety of media tuning |
53 | 54 |
|
54 | 55 | ## Design Proposal |
55 | 56 |
|
56 | | -### 1\. sonic-buildimage \- Add GEARBOX\_MEDIA\_SETTINGS Section in Media Settings File |
| 57 | +### 1\. sonic-buildimage \- Add gearbox-specific attributes in the Media Settings File |
57 | 58 |
|
58 | | -The first proposed change is to add support for a new section to the media settings file of gearbox-enabled SKUs specifically for gearbox tunings. Support is added for GEARBOX\_GLOBAL\_MEDIA\_SETTINGS and GEARBOX\_PORT\_MEDIA\_SETTINGS as top-level keys, representing global gearbox settings over a range of ports and individual logical port configurations, respectively. These new keys will include sub-sections for line-side and system-side tunings for logical ports which have gearbox connections. |
| 59 | +The first proposed change is to add support for gearbox-specific signal integrity tuning attributes. Existing attributes can be configured for either the line-side or system-side of a gearbox by prepending either `gb_line_` or `gb_system_` to the attribute name. For instance, to configure values for `pre1` on the line-side of the gearbox, the `gb_line_pre1` attribute would be specified in media_settings.json. |
59 | 60 |
|
60 | 61 | #### Example media_settings.json |
61 | 62 |
|
62 | 63 | ``` |
63 | 64 | { |
64 | | - "GEARBOX_GLOBAL_MEDIA_SETTINGS": { |
| 65 | + "MEDIA_SETTINGS": { |
65 | 66 | "2-32": { |
66 | | - "line": { |
67 | | - "COPPER100": { |
68 | | - "main": { |
69 | | - "lane0": "0x75", |
70 | | - "lane1": "0x75", |
71 | | - "lane2": "0x75", |
72 | | - "lane3": "0x75", |
73 | | - "lane4": "0x75", |
74 | | - "lane5": "0x75", |
75 | | - "lane6": "0x75", |
76 | | - "lane7": "0x75" |
77 | | - }, |
78 | | - ... |
79 | | - } |
80 | | - }, |
81 | | - "system": { |
82 | | - "Default": { |
83 | | - "main": { |
84 | | - "lane0": "0x75", |
85 | | - "lane1": "0x75", |
86 | | - "lane2": "0x75", |
87 | | - "lane3": "0x75", |
88 | | - "lane4": "0x75", |
89 | | - "lane5": "0x75", |
90 | | - "lane6": "0x75", |
91 | | - "lane7": "0x75" |
92 | | - }, |
93 | | - ... |
94 | | - } |
95 | | - } |
96 | | - } |
97 | | - }, |
98 | | - "GEARBOX_PORT_MEDIA_SETTINGS": { |
99 | | - "1": { |
100 | | - "line": { |
101 | | - "COPPER100": { |
102 | | - "main": { |
103 | | - "lane0": "0x75", |
104 | | - "lane1": "0x75", |
105 | | - "lane2": "0x75", |
106 | | - "lane3": "0x75", |
107 | | - "lane4": "0x75", |
108 | | - "lane5": "0x75", |
109 | | - "lane6": "0x75", |
110 | | - "lane7": "0x75" |
111 | | - }, |
112 | | - ... |
113 | | - } |
| 67 | + "COPPER100": { |
| 68 | + "gb_line_pre1": { |
| 69 | + "lane0": "0x75", |
| 70 | + "lane1": "0x75", |
| 71 | + }, |
| 72 | + "gb_line_main": { |
| 73 | + "lane0": "0x75", |
| 74 | + "lane1": "0x75", |
| 75 | + }, |
| 76 | + "gb_line_post1": { |
| 77 | + "lane0": "0x75", |
| 78 | + "lane1": "0x75", |
| 79 | + }, |
| 80 | + "gb_system_pre1": { |
| 81 | + "lane0": "0x75", |
| 82 | + "lane1": "0x75", |
| 83 | + "lane2": "0x75", |
| 84 | + "lane3": "0x75", |
| 85 | + }, |
| 86 | + "gb_system_main": { |
| 87 | + "lane0": "0x75", |
| 88 | + "lane1": "0x75", |
| 89 | + "lane2": "0x75", |
| 90 | + "lane3": "0x75", |
| 91 | + }, |
| 92 | + "gb_system_post1": { |
| 93 | + "lane0": "0x75", |
| 94 | + "lane1": "0x75", |
| 95 | + "lane2": "0x75", |
| 96 | + "lane3": "0x75", |
| 97 | + }, |
| 98 | + ... |
114 | 99 | }, |
115 | | - "system": { |
116 | | - "Default": { |
117 | | - "main": { |
118 | | - "lane0": "0x75", |
119 | | - "lane1": "0x75", |
120 | | - "lane2": "0x75", |
121 | | - "lane3": "0x75", |
122 | | - "lane4": "0x75", |
123 | | - "lane5": "0x75", |
124 | | - "lane6": "0x75", |
125 | | - "lane7": "0x75" |
126 | | - }, |
127 | | - ... |
128 | | - } |
129 | | - } |
130 | 100 | } |
131 | 101 | }, |
132 | 102 | "PORT_MEDIA_SETTINGS": { |
133 | | - "33": { |
| 103 | + "1": { |
134 | 104 | "COPPER100": { |
135 | | - "main": { |
136 | | - "lane0": "0x6d", |
137 | | - "lane1": "0x6d", |
138 | | - "lane2": "0x6d", |
139 | | - "lane3": "0x6d", |
140 | | - "lane4": "0x6d", |
141 | | - "lane5": "0x6d", |
142 | | - "lane6": "0x6d", |
143 | | - "lane7": "0x6d" |
| 105 | + "gb_line_pre1": { |
| 106 | + "lane0": "0x5", |
| 107 | + "lane1": "0x5", |
| 108 | + }, |
| 109 | + "gb_line_main": { |
| 110 | + "lane0": "0x5", |
| 111 | + "lane1": "0x5", |
| 112 | + }, |
| 113 | + "gb_line_post1": { |
| 114 | + "lane0": "0x5", |
| 115 | + "lane1": "0x5", |
| 116 | + }, |
| 117 | + "gb_system_pre1": { |
| 118 | + "lane0": "0x5", |
| 119 | + "lane1": "0x5", |
| 120 | + "lane2": "0x5", |
| 121 | + "lane3": "0x5", |
144 | 122 | }, |
145 | | - ... |
146 | | - } |
| 123 | + "gb_system_main": { |
| 124 | + "lane0": "0x5", |
| 125 | + "lane1": "0x5", |
| 126 | + "lane2": "0x5", |
| 127 | + "lane3": "0x5", |
| 128 | + }, |
| 129 | + "gb_system_post1": { |
| 130 | + "lane0": "0x5", |
| 131 | + "lane1": "0x5", |
| 132 | + "lane2": "0x5", |
| 133 | + "lane3": "0x5", |
| 134 | + }, |
| 135 | + ... |
| 136 | + }, |
147 | 137 | } |
148 | 138 | } |
149 | 139 | } |
150 | 140 | ``` |
151 | 141 |
|
152 | 142 | ### 2\. sonic-platform-daemons \- Update Media Settings Parser / xcvrd |
153 | 143 |
|
154 | | -The second proposed change is to expand the media settings parser to parse the new gearbox settings section(s) in the media settings file. Currently xcvrd uses the parser file to parse tuning values for ASIC-port connections and sets these values in APPL\_DB. The aim here is to expand this functionality to include the new gearbox tunings. To facilitate this, we will simply add new gearbox media settings keys to the lookup function within the parser and make additional calls to parse the gearbox values. Updating APPL\_DB with gearbox tuning values will follow the same design as ASIC tunings while simply adding a unique prefix to the key-value pair to distinguish between line-side and system-side values. Parsing gearbox tunings will follow the same lookup logic as current ASIC tunings, and will support global gearbox settings over a range of ports (GEARBOX\_GLOBAL\_MEDIA\_SETTINGS) or individual logical port configurations (GEARBOX\_PORT\_MEDIA\_SETTINGS). This change will not disrupt vendors and SKUs which do not implement gearboxes or rely on specific vendor/media keys to perform tuning value lookups. |
| 144 | +`xcvrd` requires only minimal changes to support the above format. When calculating the speed for a media key, the line-side lane count will be used in the calculation. For example, when calculating lane speed, `xcvrd` performs calculations like `speed = int(int(int(port_speed) /lane_count)/1000)`. The gearbox line-side lane count will be used for `lane_count` in these calculations. Additionally, `xcvrd` requires some minor changes in its logic for publishing SI settings to APPL_DB to make sure it publishes the correct lane-width size for the line-side settings. These changes can be found in [this PR](https://github.com/sonic-net/sonic-platform-daemons/pull/728). |
| 145 | + |
| 146 | +Other than that, `xcvrd` requires no further changes and will pick up the new attributes and publish them to APPL_DB out-of-the-box. |
155 | 147 |
|
156 | 148 | #### Example gearbox port APPL\_DB: |
157 | 149 |
|
|
0 commit comments