Skip to content

Commit 1cdf344

Browse files
committed
[device/nvidia-bluefield]: Fix brkout mode in platform/vs/docker-sonic-vs/platform-nvda-bf.json (sonic-net#113)
Why I did it We will use the following command to generate the config_db.json. But the default_brkout_mode should fully equal than what was declared in the platform file, hwsku.json. Otherwise it will raise the following exception. sonic-cfggen -p /usr/share/sonic/device/x86_64-kvm_x86_64-r0/platform-nvda-bf.json -k Nvidia-MBF2H536C --print-data Traceback (most recent call last): File "/usr/local/bin/sonic-cfggen", line 454, in <module> main() File "/usr/local/bin/sonic-cfggen", line 314, in main (ports, _, _) = get_port_config(hwsku, platform, args.port_config, asic_id) File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 139, in get_port_config return parse_platform_json_file(hwsku_json_file, port_config_file) File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 354, in parse_platform_json_file child_ports = get_child_ports(intf, brkout_mode, platform_json_file) File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 327, in get_child_ports mode_handler = BreakoutCfg(interface, breakout_mode, port_dict[INTF_KEY][interface]) File "/usr/local/lib/python3.7/dist-packages/portconfig.py", line 255, in __init__ raise RuntimeError("Unsupported breakout mode {}!".format(bmode)) RuntimeError: Unsupported breakout mode 1x100G! How I did it Add breakout_modes in platform-nvda-bf.json. How to verify it root@850b4902a518:/# sonic-cfggen -p /usr/share/sonic/device/x86_64-kvm_x86_64-r0/platform-nvda-bf.json -k Nvidia-MBF2H536C --print-data { "DEVICE_METADATA": { "localhost": { "hwsku": "Nvidia-MBF2H536C" } }, "PORT": { "Ethernet0": { "alias": "etp1", "lanes": "0,1,2,3", "speed": "100000", "index": "1" }, "Ethernet4": { "alias": "etp2", "lanes": "4,5,6,7", "speed": "100000", "index": "2" } }, "BREAKOUT_CFG": { "Ethernet0": { "brkout_mode": "1x100G" }, "Ethernet4": { "brkout_mode": "1x100G" } } } Signed-off-by: Ze Gan <[email protected]>
1 parent 49d6938 commit 1cdf344

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

platform/vs/docker-sonic-vs/platform-nvda-bf.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"index": "1,1,1,1",
55
"lanes": "0,1,2,3",
66
"breakout_modes": {
7+
"1x100G": ["etp1"],
78
"1x100G[50G,40G,25G,10G]": ["etp1"],
89
"2x50G[25G,10G]": ["etp1a", "etp1b"],
910
"4x10G[25G]": ["etp1a", "etp1b", "etp1c", "etp1d"]
@@ -13,6 +14,7 @@
1314
"index": "2,2,2,2",
1415
"lanes": "4,5,6,7",
1516
"breakout_modes": {
17+
"1x100G": ["etp2"],
1618
"1x100G[50G,40G,25G,10G]": ["etp2"],
1719
"2x50G[25G,10G]": ["etp2a", "etp2b"]
1820
}

0 commit comments

Comments
 (0)