744a152685
- Why I did it The field 'subport' represents the index of the split port within a physical port. For example, if a port is split into 4, the subport of the first logical port is 1, the subport of the second logical port is 2, and so on. In xcvrd, the CMIS manager uses the subport to calculate the lane mask, which is used to control the data path per lane. In Nvidia platform, the subport is missing and is always set to 0. According to the xcvrd code, when subport=0, it will always correspond to the first logical port. Therefore, if we shut down any logical port that is not the first one, we will see the operational status of the first logical port also becomes down. This PR aims to add the subport field to CONFIG DB and prevent such scenarios. This is applicable only for static default breakout mode. For DPB, subport calculation will happen on the fly (changes are not in Sonic yet). (Subport HLD: HLD of subport: [link to the HLD document]) - How I did it I have added the 'subport' field to all relevant Nvidia hwsku.json files (minigraph generation is based on them). Additionally, I introduced the new 'subport' field to portconfig.py, so that sonic-cfggen will be able to generate the minigraph with it. In this file, I also fixed an error that caused all attributes from hwsku.json to be applied only to the first logical ports associated with a physical port. Furthermore, I updated hwsku_json_checker to include the new field and applied a fix to the sample_hwsku.json file. sample_hwsku.json is the file that sonic-config-engine's unit tests rely on for its tests. Previously, it only included attributes for the first logical port of a split physical port. For example, if Ethernet4, a 4-lane port, was split into 2 ports, then sample_hwsku.json included only the entry for Ethernet4, with no entry for Ethernet6. This misalignment with the structure of other hwsku.json files has been corrected as well. - How to verify it Ensure that each logical port has the correct value of 'subport' in CONFIG DB, and that shutting down a logical port affects only that port and not other ports in the split. |
||
---|---|---|
.. | ||
accton | ||
alphanetworks | ||
arista | ||
barefoot | ||
broadcom | ||
celestica | ||
centec | ||
cig | ||
common | ||
dell | ||
delta | ||
facebook/x86_64-facebook_wedge100-r0 | ||
fs/arm64-fs_s5800_48t4s-r0 | ||
ingrasys | ||
inventec | ||
juniper | ||
marvell | ||
mellanox | ||
mitac/x86_64-mitac_ly1200_b32h0_c3-r0 | ||
netberg | ||
nokia | ||
pegatron/x86_64-pegatron_porsche-r0 | ||
pensando/arm64-elba-asic-r0 | ||
quanta | ||
ragile | ||
ruijie/x86_64-ruijie_b6510-48vs8cq-r0 | ||
supermicro/x86_64-supermicro_sse_t7132s-r0 | ||
tencent | ||
ufispace | ||
virtual | ||
wistron | ||
wnc/x86_64-wnc_osw1800-r0 |