From 499b354870c53aa6382e80f36a6f1ac301ecb22c Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 29 Jun 2024 19:04:25 +0800 Subject: [PATCH 01/38] [submodule] Update submodule sonic-swss to the latest HEAD automatically (#19417) #### Why I did it src/sonic-swss ``` * b02181ae - (HEAD -> master, origin/master, origin/HEAD) Use shared egress ACL table for PFCWD in BRCM DNX platform (#3136) (9 hours ago) [Song Yuan] * 21378131 - [dash] align dash inbound route actions with the latest SAI headers (#3206) (30 hours ago) [Yakiv Huryk] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-swss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss b/src/sonic-swss index d20294a3853d..b02181ae529f 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit d20294a3853d4de08e897c5c4a66c159ef2d9cdd +Subproject commit b02181ae529f2bc493926b8151f971632fe413fa From 53025993f303345d75464c77dfab3a225bbd6939 Mon Sep 17 00:00:00 2001 From: Vivek Date: Sun, 30 Jun 2024 22:45:48 -0700 Subject: [PATCH 02/38] [Cache] Truly disable loading the RFS cache (#19395) Why I did it Bug Fix: RFS is still loading from cache user@build-server:/sonic-buildimage$ cat target/sonic-mellanox.bin__mellanox__rfs.squashfs.log Build start time: Tue Jun 25 20:13:00 UTC 2024 [ FLAGS FILE ] : [mellanox amd64 bookworm] [ FLAGS DEPENDS ] : [mellanox amd64 bookworm] [ FLAGS DIFF ] : [] target/sonic-mellanox.bin__mellanox__rfs.squashfs target/sonic-mellanox.bin__mellanox__rfs.squashfs.cached.log File /dpkg_cache/sonic-mellanox.bin__mellanox__rfs.squashfs-adc83b19e793491b1c6ea0f-3bc3261c3a235b9c15daac9.tgz is loaded from cache into /sonic [ CACHE::LOADED ] /dpkg_cache/sonic-mellanox.bin__mellanox__rfs.squashfs-adc83b19e793491b1c6ea0f-3bc3261c3a235b9c15daac9.tgz File /dpkg_cache/sonic-mellanox.bin__mellanox__rfs.squashfs-adc83b19e793491b1c6ea0f-3bc3261c3a235b9c15daac9.tgz is not present in cache or cache mode set as cache ! [ CACHE::SKIPPED ] /dpkg_cache/sonic-mellanox.bin__mellanox__rfs.squashfs-adc83b19e793491b1c6ea0f-3bc3261c3a235b9c15daac9.tgz [ CACHE::SKIPPED ] DEP_FILES - Modified Files: [] [ CACHE::SKIPPED ] DEPENDS - Modified Files: [.platform build_debian.sh target/debs/bookworm/initramfs-tools_0.142_all.deb target/debs/bookworm/linux-image-6.1.0-11-2-amd64-unsigned_6.1.38-4_amd64.deb target/sonic-mellanox.bin__mellanox__rfs.squashfs.dep] Build end time: Tue Jun 25 20:13:04 UTC 2024 Elapsed time: 0h 0m 4s - How I did it Replace the tab before the comment so that Make subsystem doesn't run the LOAD_CACHE - How to verify it Re-trigger the RFS and see it being built and not getting loaded from cache Signed-off-by: Vivek Reddy --- slave.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slave.mk b/slave.mk index a08778bed145..017a90242499 100644 --- a/slave.mk +++ b/slave.mk @@ -1298,7 +1298,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_RFS_TARGETS)) : $(TARGET_PATH)/% : \ $(call dpkg_depend,$(TARGET_PATH)/%.dep) $(HEADER) - # $(call LOAD_CACHE,$*,$@) + # $(call LOAD_CACHE,$*,$@) # Skip building the target if it is already loaded from cache if [ -z '$($*_CACHE_LOADED)' ] ; then From 2960b76b92af16bfe1f1a6ca8f49107481cf9031 Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Mon, 1 Jul 2024 11:16:38 +0530 Subject: [PATCH 03/38] [Mellanox]Removing 8x DPB mode from SN5400 and simx platforms (#19265) - Why I did it Removed 8x mode from SN5400 and simx platforms as current DPB infrastructure doesn't support 8x mode with the subsequent port need to be disabled - How I did it Updated platform.json of both devices. - How to verify it Running show interfaces breakout command and verifying this mode doesn't exist. --- .../x86_64-nvidia_sn5400-r0/platform.json | 192 ++++++------------ .../platform.json | 192 ++++++------------ 2 files changed, 128 insertions(+), 256 deletions(-) diff --git a/device/mellanox/x86_64-nvidia_sn5400-r0/platform.json b/device/mellanox/x86_64-nvidia_sn5400-r0/platform.json index f4f9ed17d60e..b2c0264ba142 100644 --- a/device/mellanox/x86_64-nvidia_sn5400-r0/platform.json +++ b/device/mellanox/x86_64-nvidia_sn5400-r0/platform.json @@ -681,8 +681,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp1"], "2x200G[100G,50G,40G,25G,10G]": ["etp1a", "etp1b"], - "4x100G[50G,25G,10G]": ["etp1a", "etp1b", "etp1c", "etp1d"], - "8x50G[25G,10G]": ["etp1a", "etp1b", "etp1c", "etp1d", "etp1e", "etp1f", "etp1g", "etp1h"] + "4x100G[50G,25G,10G]": ["etp1a", "etp1b", "etp1c", "etp1d"] } }, "Ethernet8": { @@ -691,8 +690,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp2"], "2x200G[100G,50G,40G,25G,10G]": ["etp2a", "etp2b"], - "4x100G[50G,25G,10G]": ["etp2a", "etp2b", "etp2c", "etp2d"], - "8x50G[25G,10G]": ["etp2a", "etp2b", "etp2c", "etp2d", "etp2e", "etp2f", "etp2g", "etp2h"] + "4x100G[50G,25G,10G]": ["etp2a", "etp2b", "etp2c", "etp2d"] } }, "Ethernet16": { @@ -701,8 +699,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp3"], "2x200G[100G,50G,40G,25G,10G]": ["etp3a", "etp3b"], - "4x100G[50G,25G,10G]": ["etp3a", "etp3b", "etp3c", "etp3d"], - "8x50G[25G,10G]": ["etp3a", "etp3b", "etp3c", "etp3d", "etp3e", "etp3f", "etp3g", "etp3h"] + "4x100G[50G,25G,10G]": ["etp3a", "etp3b", "etp3c", "etp3d"] } }, "Ethernet24": { @@ -711,8 +708,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp4"], "2x200G[100G,50G,40G,25G,10G]": ["etp4a", "etp4b"], - "4x100G[50G,25G,10G]": ["etp4a", "etp4b", "etp4c", "etp4d"], - "8x50G[25G,10G]": ["etp4a", "etp4b", "etp4c", "etp4d", "etp4e", "etp4f", "etp4g", "etp4h"] + "4x100G[50G,25G,10G]": ["etp4a", "etp4b", "etp4c", "etp4d"] } }, "Ethernet32": { @@ -721,8 +717,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp5"], "2x200G[100G,50G,40G,25G,10G]": ["etp5a", "etp5b"], - "4x100G[50G,25G,10G]": ["etp5a", "etp5b", "etp5c", "etp5d"], - "8x50G[25G,10G]": ["etp5a", "etp5b", "etp5c", "etp5d", "etp5e", "etp5f", "etp5g", "etp5h"] + "4x100G[50G,25G,10G]": ["etp5a", "etp5b", "etp5c", "etp5d"] } }, "Ethernet40": { @@ -731,8 +726,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp6"], "2x200G[100G,50G,40G,25G,10G]": ["etp6a", "etp6b"], - "4x100G[50G,25G,10G]": ["etp6a", "etp6b", "etp6c", "etp6d"], - "8x50G[25G,10G]": ["etp6a", "etp6b", "etp6c", "etp6d", "etp6e", "etp6f", "etp6g", "etp6h"] + "4x100G[50G,25G,10G]": ["etp6a", "etp6b", "etp6c", "etp6d"] } }, "Ethernet48": { @@ -741,8 +735,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp7"], "2x200G[100G,50G,40G,25G,10G]": ["etp7a", "etp7b"], - "4x100G[50G,25G,10G]": ["etp7a", "etp7b", "etp7c", "etp7d"], - "8x50G[25G,10G]": ["etp7a", "etp7b", "etp7c", "etp7d", "etp7e", "etp7f", "etp7g", "etp7h"] + "4x100G[50G,25G,10G]": ["etp7a", "etp7b", "etp7c", "etp7d"] } }, "Ethernet56": { @@ -751,8 +744,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp8"], "2x200G[100G,50G,40G,25G,10G]": ["etp8a", "etp8b"], - "4x100G[50G,25G,10G]": ["etp8a", "etp8b", "etp8c", "etp8d"], - "8x50G[25G,10G]": ["etp8a", "etp8b", "etp8c", "etp8d", "etp8e", "etp8f", "etp8g", "etp8h"] + "4x100G[50G,25G,10G]": ["etp8a", "etp8b", "etp8c", "etp8d"] } }, "Ethernet64": { @@ -761,8 +753,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp9"], "2x200G[100G,50G,40G,25G,10G]": ["etp9a", "etp9b"], - "4x100G[50G,25G,10G]": ["etp9a", "etp9b", "etp9c", "etp9d"], - "8x50G[25G,10G]": ["etp9a", "etp9b", "etp9c", "etp9d", "etp9e", "etp9f", "etp9g", "etp9h"] + "4x100G[50G,25G,10G]": ["etp9a", "etp9b", "etp9c", "etp9d"] } }, "Ethernet72": { @@ -771,8 +762,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp10"], "2x200G[100G,50G,40G,25G,10G]": ["etp10a", "etp10b"], - "4x100G[50G,25G,10G]": ["etp10a", "etp10b", "etp10c", "etp10d"], - "8x50G[25G,10G]": ["etp10a", "etp10b", "etp10c", "etp10d", "etp10e", "etp10f", "etp10g", "etp10h"] + "4x100G[50G,25G,10G]": ["etp10a", "etp10b", "etp10c", "etp10d"] } }, "Ethernet80": { @@ -781,8 +771,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp11"], "2x200G[100G,50G,40G,25G,10G]": ["etp11a", "etp11b"], - "4x100G[50G,25G,10G]": ["etp11a", "etp11b", "etp11c", "etp11d"], - "8x50G[25G,10G]": ["etp11a", "etp11b", "etp11c", "etp11d", "etp11e", "etp11f", "etp11g", "etp11h"] + "4x100G[50G,25G,10G]": ["etp11a", "etp11b", "etp11c", "etp11d"] } }, "Ethernet88": { @@ -791,8 +780,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp12"], "2x200G[100G,50G,40G,25G,10G]": ["etp12a", "etp12b"], - "4x100G[50G,25G,10G]": ["etp12a", "etp12b", "etp12c", "etp12d"], - "8x50G[25G,10G]": ["etp12a", "etp12b", "etp12c", "etp12d", "etp12e", "etp12f", "etp12g", "etp12h"] + "4x100G[50G,25G,10G]": ["etp12a", "etp12b", "etp12c", "etp12d"] } }, "Ethernet96": { @@ -801,8 +789,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp13"], "2x200G[100G,50G,40G,25G,10G]": ["etp13a", "etp13b"], - "4x100G[50G,25G,10G]": ["etp13a", "etp13b", "etp13c", "etp13d"], - "8x50G[25G,10G]": ["etp13a", "etp13b", "etp13c", "etp13d", "etp13e", "etp13f", "etp13g", "etp13h"] + "4x100G[50G,25G,10G]": ["etp13a", "etp13b", "etp13c", "etp13d"] } }, "Ethernet104": { @@ -811,8 +798,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp14"], "2x200G[100G,50G,40G,25G,10G]": ["etp14a", "etp14b"], - "4x100G[50G,25G,10G]": ["etp14a", "etp14b", "etp14c", "etp14d"], - "8x50G[25G,10G]": ["etp14a", "etp14b", "etp14c", "etp14d", "etp14e", "etp14f", "etp14g", "etp14h"] + "4x100G[50G,25G,10G]": ["etp14a", "etp14b", "etp14c", "etp14d"] } }, "Ethernet112": { @@ -821,8 +807,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp15"], "2x200G[100G,50G,40G,25G,10G]": ["etp15a", "etp15b"], - "4x100G[50G,25G,10G]": ["etp15a", "etp15b", "etp15c", "etp15d"], - "8x50G[25G,10G]": ["etp15a", "etp15b", "etp15c", "etp15d", "etp15e", "etp15f", "etp15g", "etp15h"] + "4x100G[50G,25G,10G]": ["etp15a", "etp15b", "etp15c", "etp15d"] } }, "Ethernet120": { @@ -831,8 +816,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp16"], "2x200G[100G,50G,40G,25G,10G]": ["etp16a", "etp16b"], - "4x100G[50G,25G,10G]": ["etp16a", "etp16b", "etp16c", "etp16d"], - "8x50G[25G,10G]": ["etp16a", "etp16b", "etp16c", "etp16d", "etp16e", "etp16f", "etp16g", "etp16h"] + "4x100G[50G,25G,10G]": ["etp16a", "etp16b", "etp16c", "etp16d"] } }, "Ethernet128": { @@ -841,8 +825,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp17"], "2x200G[100G,50G,40G,25G,10G]": ["etp17a", "etp17b"], - "4x100G[50G,25G,10G]": ["etp17a", "etp17b", "etp17c", "etp17d"], - "8x50G[25G,10G]": ["etp17a", "etp17b", "etp17c", "etp17d", "etp17e", "etp17f", "etp17g", "etp17h"] + "4x100G[50G,25G,10G]": ["etp17a", "etp17b", "etp17c", "etp17d"] } }, "Ethernet136": { @@ -851,8 +834,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp18"], "2x200G[100G,50G,40G,25G,10G]": ["etp18a", "etp18b"], - "4x100G[50G,25G,10G]": ["etp18a", "etp18b", "etp18c", "etp18d"], - "8x50G[25G,10G]": ["etp18a", "etp18b", "etp18c", "etp18d", "etp18e", "etp18f", "etp18g", "etp18h"] + "4x100G[50G,25G,10G]": ["etp18a", "etp18b", "etp18c", "etp18d"] } }, "Ethernet144": { @@ -861,8 +843,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp19"], "2x200G[100G,50G,40G,25G,10G]": ["etp19a", "etp19b"], - "4x100G[50G,25G,10G]": ["etp19a", "etp19b", "etp19c", "etp19d"], - "8x50G[25G,10G]": ["etp19a", "etp19b", "etp19c", "etp19d", "etp19e", "etp19f", "etp19g", "etp19h"] + "4x100G[50G,25G,10G]": ["etp19a", "etp19b", "etp19c", "etp19d"] } }, "Ethernet152": { @@ -871,8 +852,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp20"], "2x200G[100G,50G,40G,25G,10G]": ["etp20a", "etp20b"], - "4x100G[50G,25G,10G]": ["etp20a", "etp20b", "etp20c", "etp20d"], - "8x50G[25G,10G]": ["etp20a", "etp20b", "etp20c", "etp20d", "etp20e", "etp20f", "etp20g", "etp20h"] + "4x100G[50G,25G,10G]": ["etp20a", "etp20b", "etp20c", "etp20d"] } }, "Ethernet160": { @@ -881,8 +861,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp21"], "2x200G[100G,50G,40G,25G,10G]": ["etp21a", "etp21b"], - "4x100G[50G,25G,10G]": ["etp21a", "etp21b", "etp21c", "etp21d"], - "8x50G[25G,10G]": ["etp21a", "etp21b", "etp21c", "etp21d", "etp21e", "etp21f", "etp21g", "etp21h"] + "4x100G[50G,25G,10G]": ["etp21a", "etp21b", "etp21c", "etp21d"] } }, "Ethernet168": { @@ -891,8 +870,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp22"], "2x200G[100G,50G,40G,25G,10G]": ["etp22a", "etp22b"], - "4x100G[50G,25G,10G]": ["etp22a", "etp22b", "etp22c", "etp22d"], - "8x50G[25G,10G]": ["etp22a", "etp22b", "etp22c", "etp22d", "etp22e", "etp22f", "etp22g", "etp22h"] + "4x100G[50G,25G,10G]": ["etp22a", "etp22b", "etp22c", "etp22d"] } }, "Ethernet176": { @@ -901,8 +879,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp23"], "2x200G[100G,50G,40G,25G,10G]": ["etp23a", "etp23b"], - "4x100G[50G,25G,10G]": ["etp23a", "etp23b", "etp23c", "etp23d"], - "8x50G[25G,10G]": ["etp23a", "etp23b", "etp23c", "etp23d", "etp23e", "etp23f", "etp23g", "etp23h"] + "4x100G[50G,25G,10G]": ["etp23a", "etp23b", "etp23c", "etp23d"] } }, "Ethernet184": { @@ -911,8 +888,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp24"], "2x200G[100G,50G,40G,25G,10G]": ["etp24a", "etp24b"], - "4x100G[50G,25G,10G]": ["etp24a", "etp24b", "etp24c", "etp24d"], - "8x50G[25G,10G]": ["etp24a", "etp24b", "etp24c", "etp24d", "etp24e", "etp24f", "etp24g", "etp24h"] + "4x100G[50G,25G,10G]": ["etp24a", "etp24b", "etp24c", "etp24d"] } }, "Ethernet192": { @@ -921,8 +897,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp25"], "2x200G[100G,50G,40G,25G,10G]": ["etp25a", "etp25b"], - "4x100G[50G,25G,10G]": ["etp25a", "etp25b", "etp25c", "etp25d"], - "8x50G[25G,10G]": ["etp25a", "etp25b", "etp25c", "etp25d", "etp25e", "etp25f", "etp25g", "etp25h"] + "4x100G[50G,25G,10G]": ["etp25a", "etp25b", "etp25c", "etp25d"] } }, "Ethernet200": { @@ -931,8 +906,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp26"], "2x200G[100G,50G,40G,25G,10G]": ["etp26a", "etp26b"], - "4x100G[50G,25G,10G]": ["etp26a", "etp26b", "etp26c", "etp26d"], - "8x50G[25G,10G]": ["etp26a", "etp26b", "etp26c", "etp26d", "etp26e", "etp26f", "etp26g", "etp26h"] + "4x100G[50G,25G,10G]": ["etp26a", "etp26b", "etp26c", "etp26d"] } }, "Ethernet208": { @@ -941,8 +915,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp27"], "2x200G[100G,50G,40G,25G,10G]": ["etp27a", "etp27b"], - "4x100G[50G,25G,10G]": ["etp27a", "etp27b", "etp27c", "etp27d"], - "8x50G[25G,10G]": ["etp27a", "etp27b", "etp27c", "etp27d", "etp27e", "etp27f", "etp27g", "etp27h"] + "4x100G[50G,25G,10G]": ["etp27a", "etp27b", "etp27c", "etp27d"] } }, "Ethernet216": { @@ -951,8 +924,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp28"], "2x200G[100G,50G,40G,25G,10G]": ["etp28a", "etp28b"], - "4x100G[50G,25G,10G]": ["etp28a", "etp28b", "etp28c", "etp28d"], - "8x50G[25G,10G]": ["etp28a", "etp28b", "etp28c", "etp28d", "etp28e", "etp28f", "etp28g", "etp28h"] + "4x100G[50G,25G,10G]": ["etp28a", "etp28b", "etp28c", "etp28d"] } }, "Ethernet224": { @@ -961,8 +933,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp29"], "2x200G[100G,50G,40G,25G,10G]": ["etp29a", "etp29b"], - "4x100G[50G,25G,10G]": ["etp29a", "etp29b", "etp29c", "etp29d"], - "8x50G[25G,10G]": ["etp29a", "etp29b", "etp29c", "etp29d", "etp29e", "etp29f", "etp29g", "etp29h"] + "4x100G[50G,25G,10G]": ["etp29a", "etp29b", "etp29c", "etp29d"] } }, "Ethernet232": { @@ -971,8 +942,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp30"], "2x200G[100G,50G,40G,25G,10G]": ["etp30a", "etp30b"], - "4x100G[50G,25G,10G]": ["etp30a", "etp30b", "etp30c", "etp30d"], - "8x50G[25G,10G]": ["etp30a", "etp30b", "etp30c", "etp30d", "etp30e", "etp30f", "etp30g", "etp30h"] + "4x100G[50G,25G,10G]": ["etp30a", "etp30b", "etp30c", "etp30d"] } }, "Ethernet240": { @@ -981,8 +951,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp31"], "2x200G[100G,50G,40G,25G,10G]": ["etp31a", "etp31b"], - "4x100G[50G,25G,10G]": ["etp31a", "etp31b", "etp31c", "etp31d"], - "8x50G[25G,10G]": ["etp31a", "etp31b", "etp31c", "etp31d", "etp31e", "etp31f", "etp31g", "etp31h"] + "4x100G[50G,25G,10G]": ["etp31a", "etp31b", "etp31c", "etp31d"] } }, "Ethernet248": { @@ -991,8 +960,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp32"], "2x200G[100G,50G,40G,25G,10G]": ["etp32a", "etp32b"], - "4x100G[50G,25G,10G]": ["etp32a", "etp32b", "etp32c", "etp32d"], - "8x50G[25G,10G]": ["etp32a", "etp32b", "etp32c", "etp32d", "etp32e", "etp32f", "etp32g", "etp32h"] + "4x100G[50G,25G,10G]": ["etp32a", "etp32b", "etp32c", "etp32d"] } }, "Ethernet256": { @@ -1001,8 +969,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp33"], "2x200G[100G,50G,40G,25G,10G]": ["etp33a", "etp33b"], - "4x100G[50G,25G,10G]": ["etp33a", "etp33b", "etp33c", "etp33d"], - "8x50G[25G,10G]": ["etp33a", "etp33b", "etp33c", "etp33d", "etp33e", "etp33f", "etp33g", "etp33h"] + "4x100G[50G,25G,10G]": ["etp33a", "etp33b", "etp33c", "etp33d"] } }, "Ethernet264": { @@ -1011,8 +978,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp34"], "2x200G[100G,50G,40G,25G,10G]": ["etp34a", "etp34b"], - "4x100G[50G,25G,10G]": ["etp34a", "etp34b", "etp34c", "etp34d"], - "8x50G[25G,10G]": ["etp34a", "etp34b", "etp34c", "etp34d", "etp34e", "etp34f", "etp34g", "etp34h"] + "4x100G[50G,25G,10G]": ["etp34a", "etp34b", "etp34c", "etp34d"] } }, "Ethernet272": { @@ -1021,8 +987,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp35"], "2x200G[100G,50G,40G,25G,10G]": ["etp35a", "etp35b"], - "4x100G[50G,25G,10G]": ["etp35a", "etp35b", "etp35c", "etp35d"], - "8x50G[25G,10G]": ["etp35a", "etp35b", "etp35c", "etp35d", "etp35e", "etp35f", "etp35g", "etp35h"] + "4x100G[50G,25G,10G]": ["etp35a", "etp35b", "etp35c", "etp35d"] } }, "Ethernet280": { @@ -1031,8 +996,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp36"], "2x200G[100G,50G,40G,25G,10G]": ["etp36a", "etp36b"], - "4x100G[50G,25G,10G]": ["etp36a", "etp36b", "etp36c", "etp36d"], - "8x50G[25G,10G]": ["etp36a", "etp36b", "etp36c", "etp36d", "etp36e", "etp36f", "etp36g", "etp36h"] + "4x100G[50G,25G,10G]": ["etp36a", "etp36b", "etp36c", "etp36d"] } }, "Ethernet288": { @@ -1041,8 +1005,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp37"], "2x200G[100G,50G,40G,25G,10G]": ["etp37a", "etp37b"], - "4x100G[50G,25G,10G]": ["etp37a", "etp37b", "etp37c", "etp37d"], - "8x50G[25G,10G]": ["etp37a", "etp37b", "etp37c", "etp37d", "etp37e", "etp37f", "etp37g", "etp37h"] + "4x100G[50G,25G,10G]": ["etp37a", "etp37b", "etp37c", "etp37d"] } }, "Ethernet296": { @@ -1051,8 +1014,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp38"], "2x200G[100G,50G,40G,25G,10G]": ["etp38a", "etp38b"], - "4x100G[50G,25G,10G]": ["etp38a", "etp38b", "etp38c", "etp38d"], - "8x50G[25G,10G]": ["etp38a", "etp38b", "etp38c", "etp38d", "etp38e", "etp38f", "etp38g", "etp38h"] + "4x100G[50G,25G,10G]": ["etp38a", "etp38b", "etp38c", "etp38d"] } }, "Ethernet304": { @@ -1061,8 +1023,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp39"], "2x200G[100G,50G,40G,25G,10G]": ["etp39a", "etp39b"], - "4x100G[50G,25G,10G]": ["etp39a", "etp39b", "etp39c", "etp39d"], - "8x50G[25G,10G]": ["etp39a", "etp39b", "etp39c", "etp39d", "etp39e", "etp39f", "etp39g", "etp39h"] + "4x100G[50G,25G,10G]": ["etp39a", "etp39b", "etp39c", "etp39d"] } }, "Ethernet312": { @@ -1071,8 +1032,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp40"], "2x200G[100G,50G,40G,25G,10G]": ["etp40a", "etp40b"], - "4x100G[50G,25G,10G]": ["etp40a", "etp40b", "etp40c", "etp40d"], - "8x50G[25G,10G]": ["etp40a", "etp40b", "etp40c", "etp40d", "etp40e", "etp40f", "etp40g", "etp40h"] + "4x100G[50G,25G,10G]": ["etp40a", "etp40b", "etp40c", "etp40d"] } }, "Ethernet320": { @@ -1081,8 +1041,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp41"], "2x200G[100G,50G,40G,25G,10G]": ["etp41a", "etp41b"], - "4x100G[50G,25G,10G]": ["etp41a", "etp41b", "etp41c", "etp41d"], - "8x50G[25G,10G]": ["etp41a", "etp41b", "etp41c", "etp41d", "etp41e", "etp41f", "etp41g", "etp41h"] + "4x100G[50G,25G,10G]": ["etp41a", "etp41b", "etp41c", "etp41d"] } }, "Ethernet328": { @@ -1091,8 +1050,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp42"], "2x200G[100G,50G,40G,25G,10G]": ["etp42a", "etp42b"], - "4x100G[50G,25G,10G]": ["etp42a", "etp42b", "etp42c", "etp42d"], - "8x50G[25G,10G]": ["etp42a", "etp42b", "etp42c", "etp42d", "etp42e", "etp42f", "etp42g", "etp42h"] + "4x100G[50G,25G,10G]": ["etp42a", "etp42b", "etp42c", "etp42d"] } }, "Ethernet336": { @@ -1101,8 +1059,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp43"], "2x200G[100G,50G,40G,25G,10G]": ["etp43a", "etp43b"], - "4x100G[50G,25G,10G]": ["etp43a", "etp43b", "etp43c", "etp43d"], - "8x50G[25G,10G]": ["etp43a", "etp43b", "etp43c", "etp43d", "etp43e", "etp43f", "etp43g", "etp43h"] + "4x100G[50G,25G,10G]": ["etp43a", "etp43b", "etp43c", "etp43d"] } }, "Ethernet344": { @@ -1111,8 +1068,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp44"], "2x200G[100G,50G,40G,25G,10G]": ["etp44a", "etp44b"], - "4x100G[50G,25G,10G]": ["etp44a", "etp44b", "etp44c", "etp44d"], - "8x50G[25G,10G]": ["etp44a", "etp44b", "etp44c", "etp44d", "etp44e", "etp44f", "etp44g", "etp44h"] + "4x100G[50G,25G,10G]": ["etp44a", "etp44b", "etp44c", "etp44d"] } }, "Ethernet352": { @@ -1121,8 +1077,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp45"], "2x200G[100G,50G,40G,25G,10G]": ["etp45a", "etp45b"], - "4x100G[50G,25G,10G]": ["etp45a", "etp45b", "etp45c", "etp45d"], - "8x50G[25G,10G]": ["etp45a", "etp45b", "etp45c", "etp45d", "etp45e", "etp45f", "etp45g", "etp45h"] + "4x100G[50G,25G,10G]": ["etp45a", "etp45b", "etp45c", "etp45d"] } }, "Ethernet360": { @@ -1131,8 +1086,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp46"], "2x200G[100G,50G,40G,25G,10G]": ["etp46a", "etp46b"], - "4x100G[50G,25G,10G]": ["etp46a", "etp46b", "etp46c", "etp46d"], - "8x50G[25G,10G]": ["etp46a", "etp46b", "etp46c", "etp46d", "etp46e", "etp46f", "etp46g", "etp46h"] + "4x100G[50G,25G,10G]": ["etp46a", "etp46b", "etp46c", "etp46d"] } }, "Ethernet368": { @@ -1141,8 +1095,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp47"], "2x200G[100G,50G,40G,25G,10G]": ["etp47a", "etp47b"], - "4x100G[50G,25G,10G]": ["etp47a", "etp47b", "etp47c", "etp47d"], - "8x50G[25G,10G]": ["etp47a", "etp47b", "etp47c", "etp47d", "etp47e", "etp47f", "etp47g", "etp47h"] + "4x100G[50G,25G,10G]": ["etp47a", "etp47b", "etp47c", "etp47d"] } }, "Ethernet376": { @@ -1151,8 +1104,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp48"], "2x200G[100G,50G,40G,25G,10G]": ["etp48a", "etp48b"], - "4x100G[50G,25G,10G]": ["etp48a", "etp48b", "etp48c", "etp48d"], - "8x50G[25G,10G]": ["etp48a", "etp48b", "etp48c", "etp48d", "etp48e", "etp48f", "etp48g", "etp48h"] + "4x100G[50G,25G,10G]": ["etp48a", "etp48b", "etp48c", "etp48d"] } }, "Ethernet384": { @@ -1161,8 +1113,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp49"], "2x200G[100G,50G,40G,25G,10G]": ["etp49a", "etp49b"], - "4x100G[50G,25G,10G]": ["etp49a", "etp49b", "etp49c", "etp49d"], - "8x50G[25G,10G]": ["etp49a", "etp49b", "etp49c", "etp49d", "etp49e", "etp49f", "etp49g", "etp49h"] + "4x100G[50G,25G,10G]": ["etp49a", "etp49b", "etp49c", "etp49d"] } }, "Ethernet392": { @@ -1171,8 +1122,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp50"], "2x200G[100G,50G,40G,25G,10G]": ["etp50a", "etp50b"], - "4x100G[50G,25G,10G]": ["etp50a", "etp50b", "etp50c", "etp50d"], - "8x50G[25G,10G]": ["etp50a", "etp50b", "etp50c", "etp50d", "etp50e", "etp50f", "etp50g", "etp50h"] + "4x100G[50G,25G,10G]": ["etp50a", "etp50b", "etp50c", "etp50d"] } }, "Ethernet400": { @@ -1181,8 +1131,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp51"], "2x200G[100G,50G,40G,25G,10G]": ["etp51a", "etp51b"], - "4x100G[50G,25G,10G]": ["etp51a", "etp51b", "etp51c", "etp51d"], - "8x50G[25G,10G]": ["etp51a", "etp51b", "etp51c", "etp51d", "etp51e", "etp51f", "etp51g", "etp51h"] + "4x100G[50G,25G,10G]": ["etp51a", "etp51b", "etp51c", "etp51d"] } }, "Ethernet408": { @@ -1191,8 +1140,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp52"], "2x200G[100G,50G,40G,25G,10G]": ["etp52a", "etp52b"], - "4x100G[50G,25G,10G]": ["etp52a", "etp52b", "etp52c", "etp52d"], - "8x50G[25G,10G]": ["etp52a", "etp52b", "etp52c", "etp52d", "etp52e", "etp52f", "etp52g", "etp52h"] + "4x100G[50G,25G,10G]": ["etp52a", "etp52b", "etp52c", "etp52d"] } }, "Ethernet416": { @@ -1201,8 +1149,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp53"], "2x200G[100G,50G,40G,25G,10G]": ["etp53a", "etp53b"], - "4x100G[50G,25G,10G]": ["etp53a", "etp53b", "etp53c", "etp53d"], - "8x50G[25G,10G]": ["etp53a", "etp53b", "etp53c", "etp53d", "etp53e", "etp53f", "etp53g", "etp53h"] + "4x100G[50G,25G,10G]": ["etp53a", "etp53b", "etp53c", "etp53d"] } }, "Ethernet424": { @@ -1211,8 +1158,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp54"], "2x200G[100G,50G,40G,25G,10G]": ["etp54a", "etp54b"], - "4x100G[50G,25G,10G]": ["etp54a", "etp54b", "etp54c", "etp54d"], - "8x50G[25G,10G]": ["etp54a", "etp54b", "etp54c", "etp54d", "etp54e", "etp54f", "etp54g", "etp54h"] + "4x100G[50G,25G,10G]": ["etp54a", "etp54b", "etp54c", "etp54d"] } }, "Ethernet432": { @@ -1221,8 +1167,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp55"], "2x200G[100G,50G,40G,25G,10G]": ["etp55a", "etp55b"], - "4x100G[50G,25G,10G]": ["etp55a", "etp55b", "etp55c", "etp55d"], - "8x50G[25G,10G]": ["etp55a", "etp55b", "etp55c", "etp55d", "etp55e", "etp55f", "etp55g", "etp55h"] + "4x100G[50G,25G,10G]": ["etp55a", "etp55b", "etp55c", "etp55d"] } }, "Ethernet440": { @@ -1231,8 +1176,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp56"], "2x200G[100G,50G,40G,25G,10G]": ["etp56a", "etp56b"], - "4x100G[50G,25G,10G]": ["etp56a", "etp56b", "etp56c", "etp56d"], - "8x50G[25G,10G]": ["etp56a", "etp56b", "etp56c", "etp56d", "etp56e", "etp56f", "etp56g", "etp56h"] + "4x100G[50G,25G,10G]": ["etp56a", "etp56b", "etp56c", "etp56d"] } }, "Ethernet448": { @@ -1241,8 +1185,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp57"], "2x200G[100G,50G,40G,25G,10G]": ["etp57a", "etp57b"], - "4x100G[50G,25G,10G]": ["etp57a", "etp57b", "etp57c", "etp57d"], - "8x50G[25G,10G]": ["etp57a", "etp57b", "etp57c", "etp57d", "etp57e", "etp57f", "etp57g", "etp57h"] + "4x100G[50G,25G,10G]": ["etp57a", "etp57b", "etp57c", "etp57d"] } }, "Ethernet456": { @@ -1251,8 +1194,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp58"], "2x200G[100G,50G,40G,25G,10G]": ["etp58a", "etp58b"], - "4x100G[50G,25G,10G]": ["etp58a", "etp58b", "etp58c", "etp58d"], - "8x50G[25G,10G]": ["etp58a", "etp58b", "etp58c", "etp58d", "etp58e", "etp58f", "etp58g", "etp58h"] + "4x100G[50G,25G,10G]": ["etp58a", "etp58b", "etp58c", "etp58d"] } }, "Ethernet464": { @@ -1261,8 +1203,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp59"], "2x200G[100G,50G,40G,25G,10G]": ["etp59a", "etp59b"], - "4x100G[50G,25G,10G]": ["etp59a", "etp59b", "etp59c", "etp59d"], - "8x50G[25G,10G]": ["etp59a", "etp59b", "etp59c", "etp59d", "etp59e", "etp59f", "etp59g", "etp59h"] + "4x100G[50G,25G,10G]": ["etp59a", "etp59b", "etp59c", "etp59d"] } }, "Ethernet472": { @@ -1271,8 +1212,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp60"], "2x200G[100G,50G,40G,25G,10G]": ["etp60a", "etp60b"], - "4x100G[50G,25G,10G]": ["etp60a", "etp60b", "etp60c", "etp60d"], - "8x50G[25G,10G]": ["etp60a", "etp60b", "etp60c", "etp60d", "etp60e", "etp60f", "etp60g", "etp60h"] + "4x100G[50G,25G,10G]": ["etp60a", "etp60b", "etp60c", "etp60d"] } }, "Ethernet480": { @@ -1281,8 +1221,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp61"], "2x200G[100G,50G,40G,25G,10G]": ["etp61a", "etp61b"], - "4x100G[50G,25G,10G]": ["etp61a", "etp61b", "etp61c", "etp61d"], - "8x50G[25G,10G]": ["etp61a", "etp61b", "etp61c", "etp61d", "etp61e", "etp61f", "etp61g", "etp61h"] + "4x100G[50G,25G,10G]": ["etp61a", "etp61b", "etp61c", "etp61d"] } }, "Ethernet488": { @@ -1291,8 +1230,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp62"], "2x200G[100G,50G,40G,25G,10G]": ["etp62a", "etp62b"], - "4x100G[50G,25G,10G]": ["etp62a", "etp62b", "etp62c", "etp62d"], - "8x50G[25G,10G]": ["etp62a", "etp62b", "etp62c", "etp62d", "etp62e", "etp62f", "etp62g", "etp62h"] + "4x100G[50G,25G,10G]": ["etp62a", "etp62b", "etp62c", "etp62d"] } }, "Ethernet496": { @@ -1301,8 +1239,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp63"], "2x200G[100G,50G,40G,25G,10G]": ["etp63a", "etp63b"], - "4x100G[50G,25G,10G]": ["etp63a", "etp63b", "etp63c", "etp63d"], - "8x50G[25G,10G]": ["etp63a", "etp63b", "etp63c", "etp63d", "etp63e", "etp63f", "etp63g", "etp63h"] + "4x100G[50G,25G,10G]": ["etp63a", "etp63b", "etp63c", "etp63d"] } }, "Ethernet504": { @@ -1311,8 +1248,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp64"], "2x200G[100G,50G,40G,25G,10G]": ["etp64a", "etp64b"], - "4x100G[50G,25G,10G]": ["etp64a", "etp64b", "etp64c", "etp64d"], - "8x50G[25G,10G]": ["etp64a", "etp64b", "etp64c", "etp64d", "etp64e", "etp64f", "etp64g", "etp64h"] + "4x100G[50G,25G,10G]": ["etp64a", "etp64b", "etp64c", "etp64d"] } }, "Ethernet512": { diff --git a/device/mellanox/x86_64-nvidia_sn5400_simx-r0/platform.json b/device/mellanox/x86_64-nvidia_sn5400_simx-r0/platform.json index e85c160d0cc2..ff58f12eda70 100644 --- a/device/mellanox/x86_64-nvidia_sn5400_simx-r0/platform.json +++ b/device/mellanox/x86_64-nvidia_sn5400_simx-r0/platform.json @@ -684,8 +684,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp1"], "2x200G[100G,50G,40G,25G,10G]": ["etp1a", "etp1b"], - "4x100G[50G,25G,10G]": ["etp1a", "etp1b", "etp1c", "etp1d"], - "8x50G[25G,10G]": ["etp1a", "etp1b", "etp1c", "etp1d", "etp1e", "etp1f", "etp1g", "etp1h"] + "4x100G[50G,25G,10G]": ["etp1a", "etp1b", "etp1c", "etp1d"] } }, "Ethernet8": { @@ -694,8 +693,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp2"], "2x200G[100G,50G,40G,25G,10G]": ["etp2a", "etp2b"], - "4x100G[50G,25G,10G]": ["etp2a", "etp2b", "etp2c", "etp2d"], - "8x50G[25G,10G]": ["etp2a", "etp2b", "etp2c", "etp2d", "etp2e", "etp2f", "etp2g", "etp2h"] + "4x100G[50G,25G,10G]": ["etp2a", "etp2b", "etp2c", "etp2d"] } }, "Ethernet16": { @@ -704,8 +702,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp3"], "2x200G[100G,50G,40G,25G,10G]": ["etp3a", "etp3b"], - "4x100G[50G,25G,10G]": ["etp3a", "etp3b", "etp3c", "etp3d"], - "8x50G[25G,10G]": ["etp3a", "etp3b", "etp3c", "etp3d", "etp3e", "etp3f", "etp3g", "etp3h"] + "4x100G[50G,25G,10G]": ["etp3a", "etp3b", "etp3c", "etp3d"] } }, "Ethernet24": { @@ -714,8 +711,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp4"], "2x200G[100G,50G,40G,25G,10G]": ["etp4a", "etp4b"], - "4x100G[50G,25G,10G]": ["etp4a", "etp4b", "etp4c", "etp4d"], - "8x50G[25G,10G]": ["etp4a", "etp4b", "etp4c", "etp4d", "etp4e", "etp4f", "etp4g", "etp4h"] + "4x100G[50G,25G,10G]": ["etp4a", "etp4b", "etp4c", "etp4d"] } }, "Ethernet32": { @@ -724,8 +720,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp5"], "2x200G[100G,50G,40G,25G,10G]": ["etp5a", "etp5b"], - "4x100G[50G,25G,10G]": ["etp5a", "etp5b", "etp5c", "etp5d"], - "8x50G[25G,10G]": ["etp5a", "etp5b", "etp5c", "etp5d", "etp5e", "etp5f", "etp5g", "etp5h"] + "4x100G[50G,25G,10G]": ["etp5a", "etp5b", "etp5c", "etp5d"] } }, "Ethernet40": { @@ -734,8 +729,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp6"], "2x200G[100G,50G,40G,25G,10G]": ["etp6a", "etp6b"], - "4x100G[50G,25G,10G]": ["etp6a", "etp6b", "etp6c", "etp6d"], - "8x50G[25G,10G]": ["etp6a", "etp6b", "etp6c", "etp6d", "etp6e", "etp6f", "etp6g", "etp6h"] + "4x100G[50G,25G,10G]": ["etp6a", "etp6b", "etp6c", "etp6d"] } }, "Ethernet48": { @@ -744,8 +738,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp7"], "2x200G[100G,50G,40G,25G,10G]": ["etp7a", "etp7b"], - "4x100G[50G,25G,10G]": ["etp7a", "etp7b", "etp7c", "etp7d"], - "8x50G[25G,10G]": ["etp7a", "etp7b", "etp7c", "etp7d", "etp7e", "etp7f", "etp7g", "etp7h"] + "4x100G[50G,25G,10G]": ["etp7a", "etp7b", "etp7c", "etp7d"] } }, "Ethernet56": { @@ -754,8 +747,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp8"], "2x200G[100G,50G,40G,25G,10G]": ["etp8a", "etp8b"], - "4x100G[50G,25G,10G]": ["etp8a", "etp8b", "etp8c", "etp8d"], - "8x50G[25G,10G]": ["etp8a", "etp8b", "etp8c", "etp8d", "etp8e", "etp8f", "etp8g", "etp8h"] + "4x100G[50G,25G,10G]": ["etp8a", "etp8b", "etp8c", "etp8d"] } }, "Ethernet64": { @@ -764,8 +756,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp9"], "2x200G[100G,50G,40G,25G,10G]": ["etp9a", "etp9b"], - "4x100G[50G,25G,10G]": ["etp9a", "etp9b", "etp9c", "etp9d"], - "8x50G[25G,10G]": ["etp9a", "etp9b", "etp9c", "etp9d", "etp9e", "etp9f", "etp9g", "etp9h"] + "4x100G[50G,25G,10G]": ["etp9a", "etp9b", "etp9c", "etp9d"] } }, "Ethernet72": { @@ -774,8 +765,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp10"], "2x200G[100G,50G,40G,25G,10G]": ["etp10a", "etp10b"], - "4x100G[50G,25G,10G]": ["etp10a", "etp10b", "etp10c", "etp10d"], - "8x50G[25G,10G]": ["etp10a", "etp10b", "etp10c", "etp10d", "etp10e", "etp10f", "etp10g", "etp10h"] + "4x100G[50G,25G,10G]": ["etp10a", "etp10b", "etp10c", "etp10d"] } }, "Ethernet80": { @@ -784,8 +774,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp11"], "2x200G[100G,50G,40G,25G,10G]": ["etp11a", "etp11b"], - "4x100G[50G,25G,10G]": ["etp11a", "etp11b", "etp11c", "etp11d"], - "8x50G[25G,10G]": ["etp11a", "etp11b", "etp11c", "etp11d", "etp11e", "etp11f", "etp11g", "etp11h"] + "4x100G[50G,25G,10G]": ["etp11a", "etp11b", "etp11c", "etp11d"] } }, "Ethernet88": { @@ -794,8 +783,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp12"], "2x200G[100G,50G,40G,25G,10G]": ["etp12a", "etp12b"], - "4x100G[50G,25G,10G]": ["etp12a", "etp12b", "etp12c", "etp12d"], - "8x50G[25G,10G]": ["etp12a", "etp12b", "etp12c", "etp12d", "etp12e", "etp12f", "etp12g", "etp12h"] + "4x100G[50G,25G,10G]": ["etp12a", "etp12b", "etp12c", "etp12d"] } }, "Ethernet96": { @@ -804,8 +792,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp13"], "2x200G[100G,50G,40G,25G,10G]": ["etp13a", "etp13b"], - "4x100G[50G,25G,10G]": ["etp13a", "etp13b", "etp13c", "etp13d"], - "8x50G[25G,10G]": ["etp13a", "etp13b", "etp13c", "etp13d", "etp13e", "etp13f", "etp13g", "etp13h"] + "4x100G[50G,25G,10G]": ["etp13a", "etp13b", "etp13c", "etp13d"] } }, "Ethernet104": { @@ -814,8 +801,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp14"], "2x200G[100G,50G,40G,25G,10G]": ["etp14a", "etp14b"], - "4x100G[50G,25G,10G]": ["etp14a", "etp14b", "etp14c", "etp14d"], - "8x50G[25G,10G]": ["etp14a", "etp14b", "etp14c", "etp14d", "etp14e", "etp14f", "etp14g", "etp14h"] + "4x100G[50G,25G,10G]": ["etp14a", "etp14b", "etp14c", "etp14d"] } }, "Ethernet112": { @@ -824,8 +810,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp15"], "2x200G[100G,50G,40G,25G,10G]": ["etp15a", "etp15b"], - "4x100G[50G,25G,10G]": ["etp15a", "etp15b", "etp15c", "etp15d"], - "8x50G[25G,10G]": ["etp15a", "etp15b", "etp15c", "etp15d", "etp15e", "etp15f", "etp15g", "etp15h"] + "4x100G[50G,25G,10G]": ["etp15a", "etp15b", "etp15c", "etp15d"] } }, "Ethernet120": { @@ -834,8 +819,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp16"], "2x200G[100G,50G,40G,25G,10G]": ["etp16a", "etp16b"], - "4x100G[50G,25G,10G]": ["etp16a", "etp16b", "etp16c", "etp16d"], - "8x50G[25G,10G]": ["etp16a", "etp16b", "etp16c", "etp16d", "etp16e", "etp16f", "etp16g", "etp16h"] + "4x100G[50G,25G,10G]": ["etp16a", "etp16b", "etp16c", "etp16d"] } }, "Ethernet128": { @@ -844,8 +828,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp17"], "2x200G[100G,50G,40G,25G,10G]": ["etp17a", "etp17b"], - "4x100G[50G,25G,10G]": ["etp17a", "etp17b", "etp17c", "etp17d"], - "8x50G[25G,10G]": ["etp17a", "etp17b", "etp17c", "etp17d", "etp17e", "etp17f", "etp17g", "etp17h"] + "4x100G[50G,25G,10G]": ["etp17a", "etp17b", "etp17c", "etp17d"] } }, "Ethernet136": { @@ -854,8 +837,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp18"], "2x200G[100G,50G,40G,25G,10G]": ["etp18a", "etp18b"], - "4x100G[50G,25G,10G]": ["etp18a", "etp18b", "etp18c", "etp18d"], - "8x50G[25G,10G]": ["etp18a", "etp18b", "etp18c", "etp18d", "etp18e", "etp18f", "etp18g", "etp18h"] + "4x100G[50G,25G,10G]": ["etp18a", "etp18b", "etp18c", "etp18d"] } }, "Ethernet144": { @@ -864,8 +846,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp19"], "2x200G[100G,50G,40G,25G,10G]": ["etp19a", "etp19b"], - "4x100G[50G,25G,10G]": ["etp19a", "etp19b", "etp19c", "etp19d"], - "8x50G[25G,10G]": ["etp19a", "etp19b", "etp19c", "etp19d", "etp19e", "etp19f", "etp19g", "etp19h"] + "4x100G[50G,25G,10G]": ["etp19a", "etp19b", "etp19c", "etp19d"] } }, "Ethernet152": { @@ -874,8 +855,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp20"], "2x200G[100G,50G,40G,25G,10G]": ["etp20a", "etp20b"], - "4x100G[50G,25G,10G]": ["etp20a", "etp20b", "etp20c", "etp20d"], - "8x50G[25G,10G]": ["etp20a", "etp20b", "etp20c", "etp20d", "etp20e", "etp20f", "etp20g", "etp20h"] + "4x100G[50G,25G,10G]": ["etp20a", "etp20b", "etp20c", "etp20d"] } }, "Ethernet160": { @@ -884,8 +864,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp21"], "2x200G[100G,50G,40G,25G,10G]": ["etp21a", "etp21b"], - "4x100G[50G,25G,10G]": ["etp21a", "etp21b", "etp21c", "etp21d"], - "8x50G[25G,10G]": ["etp21a", "etp21b", "etp21c", "etp21d", "etp21e", "etp21f", "etp21g", "etp21h"] + "4x100G[50G,25G,10G]": ["etp21a", "etp21b", "etp21c", "etp21d"] } }, "Ethernet168": { @@ -894,8 +873,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp22"], "2x200G[100G,50G,40G,25G,10G]": ["etp22a", "etp22b"], - "4x100G[50G,25G,10G]": ["etp22a", "etp22b", "etp22c", "etp22d"], - "8x50G[25G,10G]": ["etp22a", "etp22b", "etp22c", "etp22d", "etp22e", "etp22f", "etp22g", "etp22h"] + "4x100G[50G,25G,10G]": ["etp22a", "etp22b", "etp22c", "etp22d"] } }, "Ethernet176": { @@ -904,8 +882,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp23"], "2x200G[100G,50G,40G,25G,10G]": ["etp23a", "etp23b"], - "4x100G[50G,25G,10G]": ["etp23a", "etp23b", "etp23c", "etp23d"], - "8x50G[25G,10G]": ["etp23a", "etp23b", "etp23c", "etp23d", "etp23e", "etp23f", "etp23g", "etp23h"] + "4x100G[50G,25G,10G]": ["etp23a", "etp23b", "etp23c", "etp23d"] } }, "Ethernet184": { @@ -914,8 +891,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp24"], "2x200G[100G,50G,40G,25G,10G]": ["etp24a", "etp24b"], - "4x100G[50G,25G,10G]": ["etp24a", "etp24b", "etp24c", "etp24d"], - "8x50G[25G,10G]": ["etp24a", "etp24b", "etp24c", "etp24d", "etp24e", "etp24f", "etp24g", "etp24h"] + "4x100G[50G,25G,10G]": ["etp24a", "etp24b", "etp24c", "etp24d"] } }, "Ethernet192": { @@ -924,8 +900,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp25"], "2x200G[100G,50G,40G,25G,10G]": ["etp25a", "etp25b"], - "4x100G[50G,25G,10G]": ["etp25a", "etp25b", "etp25c", "etp25d"], - "8x50G[25G,10G]": ["etp25a", "etp25b", "etp25c", "etp25d", "etp25e", "etp25f", "etp25g", "etp25h"] + "4x100G[50G,25G,10G]": ["etp25a", "etp25b", "etp25c", "etp25d"] } }, "Ethernet200": { @@ -934,8 +909,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp26"], "2x200G[100G,50G,40G,25G,10G]": ["etp26a", "etp26b"], - "4x100G[50G,25G,10G]": ["etp26a", "etp26b", "etp26c", "etp26d"], - "8x50G[25G,10G]": ["etp26a", "etp26b", "etp26c", "etp26d", "etp26e", "etp26f", "etp26g", "etp26h"] + "4x100G[50G,25G,10G]": ["etp26a", "etp26b", "etp26c", "etp26d"] } }, "Ethernet208": { @@ -944,8 +918,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp27"], "2x200G[100G,50G,40G,25G,10G]": ["etp27a", "etp27b"], - "4x100G[50G,25G,10G]": ["etp27a", "etp27b", "etp27c", "etp27d"], - "8x50G[25G,10G]": ["etp27a", "etp27b", "etp27c", "etp27d", "etp27e", "etp27f", "etp27g", "etp27h"] + "4x100G[50G,25G,10G]": ["etp27a", "etp27b", "etp27c", "etp27d"] } }, "Ethernet216": { @@ -954,8 +927,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp28"], "2x200G[100G,50G,40G,25G,10G]": ["etp28a", "etp28b"], - "4x100G[50G,25G,10G]": ["etp28a", "etp28b", "etp28c", "etp28d"], - "8x50G[25G,10G]": ["etp28a", "etp28b", "etp28c", "etp28d", "etp28e", "etp28f", "etp28g", "etp28h"] + "4x100G[50G,25G,10G]": ["etp28a", "etp28b", "etp28c", "etp28d"] } }, "Ethernet224": { @@ -964,8 +936,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp29"], "2x200G[100G,50G,40G,25G,10G]": ["etp29a", "etp29b"], - "4x100G[50G,25G,10G]": ["etp29a", "etp29b", "etp29c", "etp29d"], - "8x50G[25G,10G]": ["etp29a", "etp29b", "etp29c", "etp29d", "etp29e", "etp29f", "etp29g", "etp29h"] + "4x100G[50G,25G,10G]": ["etp29a", "etp29b", "etp29c", "etp29d"] } }, "Ethernet232": { @@ -974,8 +945,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp30"], "2x200G[100G,50G,40G,25G,10G]": ["etp30a", "etp30b"], - "4x100G[50G,25G,10G]": ["etp30a", "etp30b", "etp30c", "etp30d"], - "8x50G[25G,10G]": ["etp30a", "etp30b", "etp30c", "etp30d", "etp30e", "etp30f", "etp30g", "etp30h"] + "4x100G[50G,25G,10G]": ["etp30a", "etp30b", "etp30c", "etp30d"] } }, "Ethernet240": { @@ -984,8 +954,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp31"], "2x200G[100G,50G,40G,25G,10G]": ["etp31a", "etp31b"], - "4x100G[50G,25G,10G]": ["etp31a", "etp31b", "etp31c", "etp31d"], - "8x50G[25G,10G]": ["etp31a", "etp31b", "etp31c", "etp31d", "etp31e", "etp31f", "etp31g", "etp31h"] + "4x100G[50G,25G,10G]": ["etp31a", "etp31b", "etp31c", "etp31d"] } }, "Ethernet248": { @@ -994,8 +963,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp32"], "2x200G[100G,50G,40G,25G,10G]": ["etp32a", "etp32b"], - "4x100G[50G,25G,10G]": ["etp32a", "etp32b", "etp32c", "etp32d"], - "8x50G[25G,10G]": ["etp32a", "etp32b", "etp32c", "etp32d", "etp32e", "etp32f", "etp32g", "etp32h"] + "4x100G[50G,25G,10G]": ["etp32a", "etp32b", "etp32c", "etp32d"] } }, "Ethernet256": { @@ -1004,8 +972,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp33"], "2x200G[100G,50G,40G,25G,10G]": ["etp33a", "etp33b"], - "4x100G[50G,25G,10G]": ["etp33a", "etp33b", "etp33c", "etp33d"], - "8x50G[25G,10G]": ["etp33a", "etp33b", "etp33c", "etp33d", "etp33e", "etp33f", "etp33g", "etp33h"] + "4x100G[50G,25G,10G]": ["etp33a", "etp33b", "etp33c", "etp33d"] } }, "Ethernet264": { @@ -1014,8 +981,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp34"], "2x200G[100G,50G,40G,25G,10G]": ["etp34a", "etp34b"], - "4x100G[50G,25G,10G]": ["etp34a", "etp34b", "etp34c", "etp34d"], - "8x50G[25G,10G]": ["etp34a", "etp34b", "etp34c", "etp34d", "etp34e", "etp34f", "etp34g", "etp34h"] + "4x100G[50G,25G,10G]": ["etp34a", "etp34b", "etp34c", "etp34d"] } }, "Ethernet272": { @@ -1024,8 +990,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp35"], "2x200G[100G,50G,40G,25G,10G]": ["etp35a", "etp35b"], - "4x100G[50G,25G,10G]": ["etp35a", "etp35b", "etp35c", "etp35d"], - "8x50G[25G,10G]": ["etp35a", "etp35b", "etp35c", "etp35d", "etp35e", "etp35f", "etp35g", "etp35h"] + "4x100G[50G,25G,10G]": ["etp35a", "etp35b", "etp35c", "etp35d"] } }, "Ethernet280": { @@ -1034,8 +999,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp36"], "2x200G[100G,50G,40G,25G,10G]": ["etp36a", "etp36b"], - "4x100G[50G,25G,10G]": ["etp36a", "etp36b", "etp36c", "etp36d"], - "8x50G[25G,10G]": ["etp36a", "etp36b", "etp36c", "etp36d", "etp36e", "etp36f", "etp36g", "etp36h"] + "4x100G[50G,25G,10G]": ["etp36a", "etp36b", "etp36c", "etp36d"] } }, "Ethernet288": { @@ -1044,8 +1008,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp37"], "2x200G[100G,50G,40G,25G,10G]": ["etp37a", "etp37b"], - "4x100G[50G,25G,10G]": ["etp37a", "etp37b", "etp37c", "etp37d"], - "8x50G[25G,10G]": ["etp37a", "etp37b", "etp37c", "etp37d", "etp37e", "etp37f", "etp37g", "etp37h"] + "4x100G[50G,25G,10G]": ["etp37a", "etp37b", "etp37c", "etp37d"] } }, "Ethernet296": { @@ -1054,8 +1017,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp38"], "2x200G[100G,50G,40G,25G,10G]": ["etp38a", "etp38b"], - "4x100G[50G,25G,10G]": ["etp38a", "etp38b", "etp38c", "etp38d"], - "8x50G[25G,10G]": ["etp38a", "etp38b", "etp38c", "etp38d", "etp38e", "etp38f", "etp38g", "etp38h"] + "4x100G[50G,25G,10G]": ["etp38a", "etp38b", "etp38c", "etp38d"] } }, "Ethernet304": { @@ -1064,8 +1026,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp39"], "2x200G[100G,50G,40G,25G,10G]": ["etp39a", "etp39b"], - "4x100G[50G,25G,10G]": ["etp39a", "etp39b", "etp39c", "etp39d"], - "8x50G[25G,10G]": ["etp39a", "etp39b", "etp39c", "etp39d", "etp39e", "etp39f", "etp39g", "etp39h"] + "4x100G[50G,25G,10G]": ["etp39a", "etp39b", "etp39c", "etp39d"] } }, "Ethernet312": { @@ -1074,8 +1035,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp40"], "2x200G[100G,50G,40G,25G,10G]": ["etp40a", "etp40b"], - "4x100G[50G,25G,10G]": ["etp40a", "etp40b", "etp40c", "etp40d"], - "8x50G[25G,10G]": ["etp40a", "etp40b", "etp40c", "etp40d", "etp40e", "etp40f", "etp40g", "etp40h"] + "4x100G[50G,25G,10G]": ["etp40a", "etp40b", "etp40c", "etp40d"] } }, "Ethernet320": { @@ -1084,8 +1044,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp41"], "2x200G[100G,50G,40G,25G,10G]": ["etp41a", "etp41b"], - "4x100G[50G,25G,10G]": ["etp41a", "etp41b", "etp41c", "etp41d"], - "8x50G[25G,10G]": ["etp41a", "etp41b", "etp41c", "etp41d", "etp41e", "etp41f", "etp41g", "etp41h"] + "4x100G[50G,25G,10G]": ["etp41a", "etp41b", "etp41c", "etp41d"] } }, "Ethernet328": { @@ -1094,8 +1053,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp42"], "2x200G[100G,50G,40G,25G,10G]": ["etp42a", "etp42b"], - "4x100G[50G,25G,10G]": ["etp42a", "etp42b", "etp42c", "etp42d"], - "8x50G[25G,10G]": ["etp42a", "etp42b", "etp42c", "etp42d", "etp42e", "etp42f", "etp42g", "etp42h"] + "4x100G[50G,25G,10G]": ["etp42a", "etp42b", "etp42c", "etp42d"] } }, "Ethernet336": { @@ -1104,8 +1062,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp43"], "2x200G[100G,50G,40G,25G,10G]": ["etp43a", "etp43b"], - "4x100G[50G,25G,10G]": ["etp43a", "etp43b", "etp43c", "etp43d"], - "8x50G[25G,10G]": ["etp43a", "etp43b", "etp43c", "etp43d", "etp43e", "etp43f", "etp43g", "etp43h"] + "4x100G[50G,25G,10G]": ["etp43a", "etp43b", "etp43c", "etp43d"] } }, "Ethernet344": { @@ -1114,8 +1071,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp44"], "2x200G[100G,50G,40G,25G,10G]": ["etp44a", "etp44b"], - "4x100G[50G,25G,10G]": ["etp44a", "etp44b", "etp44c", "etp44d"], - "8x50G[25G,10G]": ["etp44a", "etp44b", "etp44c", "etp44d", "etp44e", "etp44f", "etp44g", "etp44h"] + "4x100G[50G,25G,10G]": ["etp44a", "etp44b", "etp44c", "etp44d"] } }, "Ethernet352": { @@ -1124,8 +1080,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp45"], "2x200G[100G,50G,40G,25G,10G]": ["etp45a", "etp45b"], - "4x100G[50G,25G,10G]": ["etp45a", "etp45b", "etp45c", "etp45d"], - "8x50G[25G,10G]": ["etp45a", "etp45b", "etp45c", "etp45d", "etp45e", "etp45f", "etp45g", "etp45h"] + "4x100G[50G,25G,10G]": ["etp45a", "etp45b", "etp45c", "etp45d"] } }, "Ethernet360": { @@ -1134,8 +1089,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp46"], "2x200G[100G,50G,40G,25G,10G]": ["etp46a", "etp46b"], - "4x100G[50G,25G,10G]": ["etp46a", "etp46b", "etp46c", "etp46d"], - "8x50G[25G,10G]": ["etp46a", "etp46b", "etp46c", "etp46d", "etp46e", "etp46f", "etp46g", "etp46h"] + "4x100G[50G,25G,10G]": ["etp46a", "etp46b", "etp46c", "etp46d"] } }, "Ethernet368": { @@ -1144,8 +1098,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp47"], "2x200G[100G,50G,40G,25G,10G]": ["etp47a", "etp47b"], - "4x100G[50G,25G,10G]": ["etp47a", "etp47b", "etp47c", "etp47d"], - "8x50G[25G,10G]": ["etp47a", "etp47b", "etp47c", "etp47d", "etp47e", "etp47f", "etp47g", "etp47h"] + "4x100G[50G,25G,10G]": ["etp47a", "etp47b", "etp47c", "etp47d"] } }, "Ethernet376": { @@ -1154,8 +1107,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp48"], "2x200G[100G,50G,40G,25G,10G]": ["etp48a", "etp48b"], - "4x100G[50G,25G,10G]": ["etp48a", "etp48b", "etp48c", "etp48d"], - "8x50G[25G,10G]": ["etp48a", "etp48b", "etp48c", "etp48d", "etp48e", "etp48f", "etp48g", "etp48h"] + "4x100G[50G,25G,10G]": ["etp48a", "etp48b", "etp48c", "etp48d"] } }, "Ethernet384": { @@ -1164,8 +1116,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp49"], "2x200G[100G,50G,40G,25G,10G]": ["etp49a", "etp49b"], - "4x100G[50G,25G,10G]": ["etp49a", "etp49b", "etp49c", "etp49d"], - "8x50G[25G,10G]": ["etp49a", "etp49b", "etp49c", "etp49d", "etp49e", "etp49f", "etp49g", "etp49h"] + "4x100G[50G,25G,10G]": ["etp49a", "etp49b", "etp49c", "etp49d"] } }, "Ethernet392": { @@ -1174,8 +1125,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp50"], "2x200G[100G,50G,40G,25G,10G]": ["etp50a", "etp50b"], - "4x100G[50G,25G,10G]": ["etp50a", "etp50b", "etp50c", "etp50d"], - "8x50G[25G,10G]": ["etp50a", "etp50b", "etp50c", "etp50d", "etp50e", "etp50f", "etp50g", "etp50h"] + "4x100G[50G,25G,10G]": ["etp50a", "etp50b", "etp50c", "etp50d"] } }, "Ethernet400": { @@ -1184,8 +1134,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp51"], "2x200G[100G,50G,40G,25G,10G]": ["etp51a", "etp51b"], - "4x100G[50G,25G,10G]": ["etp51a", "etp51b", "etp51c", "etp51d"], - "8x50G[25G,10G]": ["etp51a", "etp51b", "etp51c", "etp51d", "etp51e", "etp51f", "etp51g", "etp51h"] + "4x100G[50G,25G,10G]": ["etp51a", "etp51b", "etp51c", "etp51d"] } }, "Ethernet408": { @@ -1194,8 +1143,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp52"], "2x200G[100G,50G,40G,25G,10G]": ["etp52a", "etp52b"], - "4x100G[50G,25G,10G]": ["etp52a", "etp52b", "etp52c", "etp52d"], - "8x50G[25G,10G]": ["etp52a", "etp52b", "etp52c", "etp52d", "etp52e", "etp52f", "etp52g", "etp52h"] + "4x100G[50G,25G,10G]": ["etp52a", "etp52b", "etp52c", "etp52d"] } }, "Ethernet416": { @@ -1204,8 +1152,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp53"], "2x200G[100G,50G,40G,25G,10G]": ["etp53a", "etp53b"], - "4x100G[50G,25G,10G]": ["etp53a", "etp53b", "etp53c", "etp53d"], - "8x50G[25G,10G]": ["etp53a", "etp53b", "etp53c", "etp53d", "etp53e", "etp53f", "etp53g", "etp53h"] + "4x100G[50G,25G,10G]": ["etp53a", "etp53b", "etp53c", "etp53d"] } }, "Ethernet424": { @@ -1214,8 +1161,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp54"], "2x200G[100G,50G,40G,25G,10G]": ["etp54a", "etp54b"], - "4x100G[50G,25G,10G]": ["etp54a", "etp54b", "etp54c", "etp54d"], - "8x50G[25G,10G]": ["etp54a", "etp54b", "etp54c", "etp54d", "etp54e", "etp54f", "etp54g", "etp54h"] + "4x100G[50G,25G,10G]": ["etp54a", "etp54b", "etp54c", "etp54d"] } }, "Ethernet432": { @@ -1224,8 +1170,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp55"], "2x200G[100G,50G,40G,25G,10G]": ["etp55a", "etp55b"], - "4x100G[50G,25G,10G]": ["etp55a", "etp55b", "etp55c", "etp55d"], - "8x50G[25G,10G]": ["etp55a", "etp55b", "etp55c", "etp55d", "etp55e", "etp55f", "etp55g", "etp55h"] + "4x100G[50G,25G,10G]": ["etp55a", "etp55b", "etp55c", "etp55d"] } }, "Ethernet440": { @@ -1234,8 +1179,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp56"], "2x200G[100G,50G,40G,25G,10G]": ["etp56a", "etp56b"], - "4x100G[50G,25G,10G]": ["etp56a", "etp56b", "etp56c", "etp56d"], - "8x50G[25G,10G]": ["etp56a", "etp56b", "etp56c", "etp56d", "etp56e", "etp56f", "etp56g", "etp56h"] + "4x100G[50G,25G,10G]": ["etp56a", "etp56b", "etp56c", "etp56d"] } }, "Ethernet448": { @@ -1244,8 +1188,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp57"], "2x200G[100G,50G,40G,25G,10G]": ["etp57a", "etp57b"], - "4x100G[50G,25G,10G]": ["etp57a", "etp57b", "etp57c", "etp57d"], - "8x50G[25G,10G]": ["etp57a", "etp57b", "etp57c", "etp57d", "etp57e", "etp57f", "etp57g", "etp57h"] + "4x100G[50G,25G,10G]": ["etp57a", "etp57b", "etp57c", "etp57d"] } }, "Ethernet456": { @@ -1254,8 +1197,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp58"], "2x200G[100G,50G,40G,25G,10G]": ["etp58a", "etp58b"], - "4x100G[50G,25G,10G]": ["etp58a", "etp58b", "etp58c", "etp58d"], - "8x50G[25G,10G]": ["etp58a", "etp58b", "etp58c", "etp58d", "etp58e", "etp58f", "etp58g", "etp58h"] + "4x100G[50G,25G,10G]": ["etp58a", "etp58b", "etp58c", "etp58d"] } }, "Ethernet464": { @@ -1264,8 +1206,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp59"], "2x200G[100G,50G,40G,25G,10G]": ["etp59a", "etp59b"], - "4x100G[50G,25G,10G]": ["etp59a", "etp59b", "etp59c", "etp59d"], - "8x50G[25G,10G]": ["etp59a", "etp59b", "etp59c", "etp59d", "etp59e", "etp59f", "etp59g", "etp59h"] + "4x100G[50G,25G,10G]": ["etp59a", "etp59b", "etp59c", "etp59d"] } }, "Ethernet472": { @@ -1274,8 +1215,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp60"], "2x200G[100G,50G,40G,25G,10G]": ["etp60a", "etp60b"], - "4x100G[50G,25G,10G]": ["etp60a", "etp60b", "etp60c", "etp60d"], - "8x50G[25G,10G]": ["etp60a", "etp60b", "etp60c", "etp60d", "etp60e", "etp60f", "etp60g", "etp60h"] + "4x100G[50G,25G,10G]": ["etp60a", "etp60b", "etp60c", "etp60d"] } }, "Ethernet480": { @@ -1284,8 +1224,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp61"], "2x200G[100G,50G,40G,25G,10G]": ["etp61a", "etp61b"], - "4x100G[50G,25G,10G]": ["etp61a", "etp61b", "etp61c", "etp61d"], - "8x50G[25G,10G]": ["etp61a", "etp61b", "etp61c", "etp61d", "etp61e", "etp61f", "etp61g", "etp61h"] + "4x100G[50G,25G,10G]": ["etp61a", "etp61b", "etp61c", "etp61d"] } }, "Ethernet488": { @@ -1294,8 +1233,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp62"], "2x200G[100G,50G,40G,25G,10G]": ["etp62a", "etp62b"], - "4x100G[50G,25G,10G]": ["etp62a", "etp62b", "etp62c", "etp62d"], - "8x50G[25G,10G]": ["etp62a", "etp62b", "etp62c", "etp62d", "etp62e", "etp62f", "etp62g", "etp62h"] + "4x100G[50G,25G,10G]": ["etp62a", "etp62b", "etp62c", "etp62d"] } }, "Ethernet496": { @@ -1304,8 +1242,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp63"], "2x200G[100G,50G,40G,25G,10G]": ["etp63a", "etp63b"], - "4x100G[50G,25G,10G]": ["etp63a", "etp63b", "etp63c", "etp63d"], - "8x50G[25G,10G]": ["etp63a", "etp63b", "etp63c", "etp63d", "etp63e", "etp63f", "etp63g", "etp63h"] + "4x100G[50G,25G,10G]": ["etp63a", "etp63b", "etp63c", "etp63d"] } }, "Ethernet504": { @@ -1314,8 +1251,7 @@ "breakout_modes": { "1x400G[200G,100G,50G,40G,25G,10G]": ["etp64"], "2x200G[100G,50G,40G,25G,10G]": ["etp64a", "etp64b"], - "4x100G[50G,25G,10G]": ["etp64a", "etp64b", "etp64c", "etp64d"], - "8x50G[25G,10G]": ["etp64a", "etp64b", "etp64c", "etp64d", "etp64e", "etp64f", "etp64g", "etp64h"] + "4x100G[50G,25G,10G]": ["etp64a", "etp64b", "etp64c", "etp64d"] } }, "Ethernet512": { From 6728c3e0c82947749f467c17a9baef9bd3069f1f Mon Sep 17 00:00:00 2001 From: Vivek Date: Sun, 30 Jun 2024 22:47:29 -0700 Subject: [PATCH 04/38] [Mellanox] Remove lm-sensors dependency from hw-management (#19300) - Why I did it Remove lm-sensors dependency on hw-mgmt. lm-sensors installs a oneshot lm-sensors.service which starts early in the boot and can sometime gets stuck in activating state blocking hostcfgd to progress further --- platform/mellanox/hw-management/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/mellanox/hw-management/Makefile b/platform/mellanox/hw-management/Makefile index 3ada49920413..a42bcdfeafb7 100644 --- a/platform/mellanox/hw-management/Makefile +++ b/platform/mellanox/hw-management/Makefile @@ -9,7 +9,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : git stash git apply -3 ../*.patch || exit 1 chmod +x ./debian/rules - KVERSION=$(KVERSION) dpkg-buildpackage -us -uc -b -rfakeroot -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) + KVERSION=$(KVERSION) LM_DEPENDS=0 dpkg-buildpackage -us -uc -b -rfakeroot -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) popd mv $* $(DEST)/ From e488f10a78cafa280a516e8f3d6dd4cc56fe51bf Mon Sep 17 00:00:00 2001 From: Gagan Punathil Ellath Date: Mon, 1 Jul 2024 21:00:14 -0700 Subject: [PATCH 05/38] [Mellanox] Addition of minicom configuration file (#19234) - Why I did it For setting the rts and cts configuration for the minicom package to the switch image, The file is copied to minicom configuration location in the switch image This is a machine generated file in minicom , so the configuration can be present in the switch image upon installation --- files/build_templates/sonic_debian_extension.j2 | 2 ++ platform/mellanox/minirc.dfl | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 platform/mellanox/minirc.dfl diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 52f12b4ef7c4..766874571dd1 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -1075,6 +1075,8 @@ sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable nv-syncd-shared # Install required packages specific for mellanox platform sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install minicom xmlstarlet +sudo mkdir -p $FILESYSTEM_ROOT/etc/minicom/ +sudo cp platform/mellanox/minirc.dfl $FILESYSTEM_ROOT/etc/minicom/ sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable rshim.service {% endif %} diff --git a/platform/mellanox/minirc.dfl b/platform/mellanox/minirc.dfl new file mode 100644 index 000000000000..193cf47d9f39 --- /dev/null +++ b/platform/mellanox/minirc.dfl @@ -0,0 +1,2 @@ +# Machine-generated file - use "minicom -s" to change parameters. +pu rtscts No From 011437310366db80a21cf484b1e5e9636bf519f4 Mon Sep 17 00:00:00 2001 From: Yakiv Huryk <62013282+Yakiv-Huryk@users.noreply.github.com> Date: Tue, 2 Jul 2024 07:02:11 +0300 Subject: [PATCH 06/38] [nvidia-bluefield] update platform-api thermal logic (#19409) - Why I did it For setting the rts and cts configuration for the minicom package to the switch image, The file is copied to minicom configuration location in the switch image This is a machine generated file in minicom , so the configuration can be present in the switch image upon installation --- .../sonic_platform/thermal_bf3.py | 94 +++++++++++++++---- .../platform-api/tests/test_thermal_bf3.py | 44 ++++----- .../platform-api/tests/utils.py | 12 +++ 3 files changed, 109 insertions(+), 41 deletions(-) diff --git a/platform/nvidia-bluefield/platform-api/sonic_platform/thermal_bf3.py b/platform/nvidia-bluefield/platform-api/sonic_platform/thermal_bf3.py index c769a5e373f1..c1e2ea5fdaa7 100644 --- a/platform/nvidia-bluefield/platform-api/sonic_platform/thermal_bf3.py +++ b/platform/nvidia-bluefield/platform-api/sonic_platform/thermal_bf3.py @@ -18,7 +18,11 @@ try: from sonic_platform_base.thermal_base import ThermalBase from sonic_py_common.logger import Logger + from .device_data import DeviceDataManager + from enum import Enum, auto import os + import json + import subprocess except ImportError as e: raise ImportError (str(e) + "- required module not found") @@ -26,28 +30,75 @@ logger = Logger() MLXBF_BASE_PATH = '/sys/kernel/debug/mlxbf-ptm/monitors/status' +SSD_DEV='nvme0' -SENSORS = [ - {'name': 'CPU', 'mlxbf_sensor_name': 'core_temp', 'ht': 95, 'cht': 100}, - {'name': 'DDR', 'mlxbf_sensor_name': 'ddr_temp', 'ht': 95, 'cht': 100}, - {'name': 'SFP0', 'iface': 'Ethernet0', 'hwmon_path': None}, - {'name': 'SFP1', 'iface': 'Ethernet4', 'hwmon_path': None}, +class ThermalType(Enum): + MLXBF = auto() + SFP = auto() + SSD = auto() + +MLXBF_SENSORS = [ + {'name': 'CPU', 'thermal_type': ThermalType.MLXBF, 'mlxbf_sensor_name': 'core_temp', 'ht': 95, 'cht': 100}, + {'name': 'DDR', 'thermal_type': ThermalType.MLXBF, 'mlxbf_sensor_name': 'ddr_temp', 'ht': 95, 'cht': 100}, ] -def set_hwmon_path(sensor): - base = f'/sys/class/net/{sensor["iface"]}/device/hwmon' +def get_hwmon_path(iface): + base = f'/sys/class/net/{iface}/device/hwmon' dirs = os.listdir(base) if len(dirs) != 1 or not dirs[0].startswith('hwmon'): - logger.log_error(f'Failed to find hwmon path for {sensor["iface"]}') + logger.log_error(f'Failed to find hwmon path for {iface}') return - sensor['hwmon_path'] = f'{base}/{dirs[0]}' + return f'{base}/{dirs[0]}' + +def initialize_sfp_thermals(): + sfps = [] + sfp_count = DeviceDataManager().get_sfp_count() + for i in range(sfp_count): + iface = f'Ethernet{i * 4}' + sfp_thermal = Thermal(name=f'SFP{i}', thermal_type=ThermalType.SFP, hwmon_path=get_hwmon_path(iface)) + sfps.append(sfp_thermal) + return sfps + +def read_smartctl(dev, all=False): + all_flag = 'u' if all else '' + cmd = f'smartctl -x /dev/{dev} --json=v{all_flag}' + try: + output = subprocess.check_output(cmd.split(' ')).decode().strip() + return json.loads(output) + except: + logger.log_error('Failed to read smartctl output') + return {} + +def read_ssd_temperatrue(dev): + try: + return int(read_smartctl(dev)['temperature']['current']) + except: + logger.log_error('Failed to read nvme0 temperature') + return 'N/A' + +def read_ssd_thresholds(dev): + higt_th = None + crit_th = None + def parse_value(v): + return int(v.split(':')[1].strip().split(' ')[0]) + + output = read_smartctl(dev, all=True) + for k,v in output.items(): + if "smartctl" in k: + if not higt_th and "Warning Comp. Temp. Threshold" in v: + higt_th = parse_value(v) + if not crit_th and "Critical Comp. Temp. Threshold" in v: + crit_th = parse_value(v) + return higt_th or 'N/A', crit_th or 'N/A' + +def initialize_ssd_thermals(): + higt_th, crit_th = read_ssd_thresholds(SSD_DEV) + return [Thermal(name=f'NVME', thermal_type=ThermalType.SSD, dev=SSD_DEV, ht=higt_th, cht=crit_th)] def initialize_chassis_thermals(): - thermal_list = [] - for s in SENSORS: - if 'hwmon_path' in s: - set_hwmon_path(s) - thermal_list.append(Thermal(**s)) + thermal_list = [Thermal(**x) for x in MLXBF_SENSORS] + thermal_list += initialize_sfp_thermals() + thermal_list += initialize_ssd_thermals() return thermal_list def read_fs(path, name): @@ -72,10 +123,12 @@ def read_temp_hwmon(hwmon_path, sensor): return v / 1000 class Thermal(ThermalBase): - def __init__(self, name, mlxbf_sensor_name=None, iface=None, hwmon_path=None, ht='N/A', cht='N/A'): + def __init__(self, name, thermal_type=None, mlxbf_sensor_name=None, dev=None, hwmon_path=None, ht='N/A', cht='N/A'): super(Thermal, self).__init__() self.name = name + self.thermal_type = thermal_type self.mlxbf_sensor_name = mlxbf_sensor_name + self.dev = dev self.hwmon_path = hwmon_path self.ht = ht self.cht = cht @@ -97,10 +150,13 @@ def get_temperature(self): A float number of current temperature in Celsius up to nearest thousandth of one degree Celsius, e.g. 30.125 """ - if self.mlxbf_sensor_name: - return read_temp_mlxbf(self.mlxbf_sensor_name) - else: - return read_temp_hwmon(self.hwmon_path, 'temp1_input') + match self.thermal_type: + case ThermalType.MLXBF: + return read_temp_mlxbf(self.mlxbf_sensor_name) + case ThermalType.SFP: + return read_temp_hwmon(self.hwmon_path, 'temp1_input') + case ThermalType.SSD: + return read_ssd_temperatrue(self.dev) def get_high_threshold(self): """ diff --git a/platform/nvidia-bluefield/platform-api/tests/test_thermal_bf3.py b/platform/nvidia-bluefield/platform-api/tests/test_thermal_bf3.py index 1ceac45d8725..991f15edd8b5 100644 --- a/platform/nvidia-bluefield/platform-api/tests/test_thermal_bf3.py +++ b/platform/nvidia-bluefield/platform-api/tests/test_thermal_bf3.py @@ -17,6 +17,7 @@ import os import sys +import json from unittest.mock import patch from unittest.mock import mock_open @@ -27,7 +28,7 @@ sys.path.insert(0, modules_path) from sonic_platform.chassis import Chassis -from .utils import platform_sample_bf3 +from .utils import platform_sample_bf3, smartctl_output @patch('sonic_py_common.device_info.get_platform', MagicMock(return_value="")) @@ -38,54 +39,53 @@ class TestThermal: def test_chassis_thermal(self, *args): - from sonic_platform.thermal_bf3 import SENSORS chassis = Chassis() thermal_list = chassis.get_all_thermals() assert thermal_list - for s in SENSORS: - assert 'name' in s - assert 'mlxbf_sensor_name' in s or 'hwmon_path' in s - - sensor_names = list(map(lambda x: x.get('name'), SENSORS)) - thermal_names = list(map(lambda x: x.get_name(), thermal_list)) - for sn in sensor_names: - assert sn in thermal_names - def test_hwmon_read(self, *args): from sonic_platform import thermal_bf3 as thermal - from sonic_platform.thermal_bf3 import Thermal + from sonic_platform.thermal_bf3 import Thermal, ThermalType thermal.read_fs = MagicMock(return_value=83123) - sensor = {'name': 'test', 'hwmon_path': '/tmp/', 'ht': 95, 'cht': 100} - t = Thermal(**sensor) + t = Thermal(name='test', thermal_type=ThermalType.SFP, hwmon_path='/tmp/', ht=95, cht=100) assert t.get_temperature() == 83.123 assert t.get_high_critical_threshold() == 83.123 + def test_ssd(self, *args): + from sonic_platform import thermal_bf3 as thermal + from sonic_platform.thermal_bf3 import initialize_ssd_thermals + thermal.read_smartctl = MagicMock(return_value=json.loads(smartctl_output)) + t = initialize_ssd_thermals() + assert len(t) == 1 + assert t[0].get_temperature() == 42 + assert t[0].get_high_threshold() == 90 + assert t[0].get_high_critical_threshold() == 100 + + def test_thermal_get(self, *args): from sonic_platform import thermal_bf3 as thermal - from sonic_platform.thermal_bf3 import Thermal + from sonic_platform.thermal_bf3 import Thermal, ThermalType temp_test_mocked_vals = [123, 10.5, -1, None] for tv in temp_test_mocked_vals: thermal.read_temp_mlxbf = MagicMock(return_value=tv) - sensor = {'name': 'test', 'mlxbf_sensor_name': 'test', 'ht': 95, 'cht': 100} - t = Thermal(**sensor) + t = Thermal(name='test', thermal_type=ThermalType.MLXBF, mlxbf_sensor_name='test', ht=95, cht=100) assert t.get_temperature() == tv - assert t.get_high_threshold() == sensor['ht'] - assert t.get_high_critical_threshold() == sensor['cht'] + assert t.get_high_threshold() == 95 + + assert t.get_high_critical_threshold() == 100 assert t.get_low_threshold() == 'N/A' assert t.get_low_critical_threshold() == 'N/A' for tv in temp_test_mocked_vals: thermal.read_temp_hwmon = MagicMock(return_value=tv) - sensor = {'name': 'test', 'hwmon_path': '/tmp/', 'ht': 95, 'cht': 100} - t = Thermal(**sensor) + t = Thermal(name='test', thermal_type=ThermalType.SFP, hwmon_path='/tmp/', ht=95) assert t.get_temperature() == tv - assert t.get_high_threshold() == sensor['ht'] + assert t.get_high_threshold() == 95 assert t.get_high_critical_threshold() == tv assert t.get_low_threshold() == 'N/A' assert t.get_low_critical_threshold() == 'N/A' diff --git a/platform/nvidia-bluefield/platform-api/tests/utils.py b/platform/nvidia-bluefield/platform-api/tests/utils.py index 8c9878e0c0e3..e40bbe8e24ed 100644 --- a/platform/nvidia-bluefield/platform-api/tests/utils.py +++ b/platform/nvidia-bluefield/platform-api/tests/utils.py @@ -92,6 +92,18 @@ } """ +smartctl_output = """ +{ + "smartctl_0004_u": "=== START OF INFORMATION SECTION ===", + "smartctl_0023_u": "Maximum Data Transfer Size: 512 Pages", + "smartctl_0024_u": "Warning Comp. Temp. Threshold: 90 Celsius", + "smartctl_0025_u": "Critical Comp. Temp. Threshold: 100 Celsius", + "temperature": { + "current": 42 + } +} +""" + # Utilities for throttling tests class LogRecorderMock(object): def __init__(self): From dda96cf14784aa02a672bd758add27491e00ca0f Mon Sep 17 00:00:00 2001 From: abdosi <58047199+abdosi@users.noreply.github.com> Date: Tue, 2 Jul 2024 12:22:40 -0700 Subject: [PATCH 07/38] [minigraph] populate bgp_asn in DEVICE_METADATA only if it is valid. (#19413) What I did:- Populate bgp_asn in DEVICE_METADATA only if is present/valid. Why I did: Without this it causes Yang Validation failure for Systems that are Pure L2/Chassis Supervisor (no BGP) as Yang expects bgp_asn as valid as_number --------- Signed-off-by: Abhishek Dosi --- src/sonic-config-engine/minigraph.py | 4 +++- src/sonic-config-engine/tests/sample-voq-graph.xml | 9 +-------- src/sonic-config-engine/tests/test_chassis_cfggen.py | 5 ----- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index 0d5d4424c208..b6375b80d03a 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -2120,7 +2120,6 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw results = {} results['DEVICE_METADATA'] = {'localhost': { - 'bgp_asn': bgp_asn, 'region': region, 'cloudtype': cloudtype, 'docker_routing_config_mode': docker_routing_config_mode, @@ -2132,6 +2131,9 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw } } + if bgp_asn: + results['DEVICE_METADATA']['localhost']['bgp_asn'] = bgp_asn + if chassis_hostname: results['DEVICE_METADATA']['localhost']['chassis_hostname'] = chassis_hostname diff --git a/src/sonic-config-engine/tests/sample-voq-graph.xml b/src/sonic-config-engine/tests/sample-voq-graph.xml index b6e8ff1521a0..ab9a1b8b81b8 100644 --- a/src/sonic-config-engine/tests/sample-voq-graph.xml +++ b/src/sonic-config-engine/tests/sample-voq-graph.xml @@ -1,14 +1,7 @@ - - - 65100 - linecard-1 - - - - + diff --git a/src/sonic-config-engine/tests/test_chassis_cfggen.py b/src/sonic-config-engine/tests/test_chassis_cfggen.py index c309e7f2d694..a2be6ed6b8ce 100644 --- a/src/sonic-config-engine/tests/test_chassis_cfggen.py +++ b/src/sonic-config-engine/tests/test_chassis_cfggen.py @@ -433,7 +433,6 @@ def test_device_metadata(self): output = json.loads(self.run_script(argument)) print(output['localhost']) self.assertDictEqual(output['localhost'], { - 'bgp_asn': None, 'region': 'test', 'cloudtype': 'Public', 'docker_routing_config_mode': 'separated', @@ -910,7 +909,6 @@ def test_device_metadata(self): print(output['localhost']) self.assertDictEqual(output['localhost'], { - "bgp_asn": None, "region": "test", "cloudtype": "Public", "docker_routing_config_mode": "separated", @@ -938,7 +936,6 @@ def test_device_metadata_for_namespace(self): print(output['localhost']) self.assertDictEqual(output['localhost'], { - "bgp_asn": None, "region": "test", "cloudtype": None, "docker_routing_config_mode": "separated", @@ -1046,7 +1043,6 @@ def test_device_metadata(self): print(output['localhost']) self.assertDictEqual(output['localhost'], { - "bgp_asn": None, "region": "test", "cloudtype": "Public", "docker_routing_config_mode": "separated", @@ -1074,7 +1070,6 @@ def test_device_metadata_for_namespace(self): print(output['localhost']) self.assertDictEqual(output['localhost'], { - "bgp_asn": None, "region": "test", "cloudtype": None, "docker_routing_config_mode": "separated", From 0bcf2deb5ea7e9363eba25b4814aff1cdd163904 Mon Sep 17 00:00:00 2001 From: zitingguo-ms Date: Wed, 3 Jul 2024 22:32:59 +0800 Subject: [PATCH 08/38] Upgrade xgs SAI version to 10.1.21.0 (#19334) Why I did it Upgrade the xgs SAI version to 10.1.21.0 to include the following changes: 10.1.8.0: Support _brcm_sai_port_unlos_set when external port_phy_addr is 0xff 10.1.9.0: [CS00012330893]With PFC test, egress drop observed for lossless queues 10.1.11.0: Include the bcmsim in the odp package 10.1.13.0: handle bind of egress and ingress groups to same lag 10.1.14.0: Backport SDK-381920 to rel_ocp_sai_10_1 High CPU due to SDK calling soc_dnxc_port_resource_get 10.1.16.0: [CSP CS00012336644] callback called twice with same event type 10.1.17.0: [CSP 00012320736][SAI_BRANCH rel_ocp_sai_10_1]Back port MMU related Fixes to 10.1 specific to LTSW/TH4 devices-HSDK 10.1.18.0: [CSP CS00012351984] Backport SONIC-81526 to 10.1 Fixes for rate class bound setting and UCQ stats 10.1.19.0: Reset EGR_L3_NEXT_HOP_2 for TH3 10.1.20.0: Sonic crash due to unsupported return from SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_OFFSET Work item tracking Microsoft ADO (number only): 28356083 How I did it Upgrade the SAI version in the sai.mk file. How to verify it Run the SONiC basic test: https://elastictest.org/scheduler/testplan/66742d7ef6db3102cef61056 --- platform/broadcom/sai.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/broadcom/sai.mk b/platform/broadcom/sai.mk index a6a9f6f982f5..ddf43a6e7f41 100644 --- a/platform/broadcom/sai.mk +++ b/platform/broadcom/sai.mk @@ -1,4 +1,4 @@ -LIBSAIBCM_XGS_VERSION = 10.1.7.0 +LIBSAIBCM_XGS_VERSION = 10.1.21.0 LIBSAIBCM_DNX_VERSION = 10.1.25.0 LIBSAIBCM_XGS_BRANCH_NAME = SAI_10.1.0_GA LIBSAIBCM_DNX_BRANCH_NAME = SAI_10.1.0_GA From aac617a690c13c24f10c4705f5b7955e80b7237c Mon Sep 17 00:00:00 2001 From: DavidZagury <32644413+DavidZagury@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:59:09 +0300 Subject: [PATCH 09/38] [Mellanox] Use efibootmgr for supported device on fwutil (#19407) - Why I did it Add the force flag to the reboot, which is needed now that we no longer use power cycle due to # 18325 - How I did it Update the onie fw update script to use efibootmgr for the supported devices, and on the reboot command, call the reboot script with the f flag. - How to verify it Run ONIE upgrade using fwutil --- platform/mellanox/mlnx-onie-fw-update.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/platform/mellanox/mlnx-onie-fw-update.sh b/platform/mellanox/mlnx-onie-fw-update.sh index 35fdb55dfd93..56b251a96f86 100755 --- a/platform/mellanox/mlnx-onie-fw-update.sh +++ b/platform/mellanox/mlnx-onie-fw-update.sh @@ -68,8 +68,12 @@ enable_onie_fw_update_mode() { fi register_terminate_handler - - grub-editenv ${os_boot}/grub/grubenv set onie_entry="ONIE" || return $? + if [ -d /sys/firmware/efi/efivars ]; then + onie_boot_num=$(efibootmgr | grep "ONIE:" | awk '{ print $1 }' | cut -b 5-8 ) + efibootmgr -n $onie_boot_num + else + grub-editenv ${os_boot}/grub/grubenv set onie_entry="ONIE" || return $? + fi grub-editenv ${onie_mount}/grub/grubenv set onie_mode="update" || return $? return 0 @@ -80,7 +84,12 @@ disable_onie_fw_update_mode() { return 1 fi - grub-editenv ${os_boot}/grub/grubenv unset onie_entry || return $? + if [ -d /sys/firmware/efi/efivars ]; then + sonic_boot_num=$(efibootmgr | grep "SONiC-OS" | awk '{ print $1 }' | cut -b 5-8 ) + efibootmgr -n $sonic_boot_num + else + grub-editenv ${os_boot}/grub/grubenv unset onie_entry || return $? + fi grub-editenv ${onie_mount}/grub/grubenv set onie_mode="install" || return $? return 0 @@ -106,7 +115,7 @@ system_reboot() { sleep 5s # Use SONiC reboot scenario - /usr/local/bin/reboot + /usr/local/bin/reboot -f exit $? } From 6a6ae553b529242a42c80c7cc0330ae7b295f104 Mon Sep 17 00:00:00 2001 From: wumiao_nokia Date: Wed, 3 Jul 2024 12:39:41 -0400 Subject: [PATCH 10/38] Update Nokia platform submodule to the latest (#19390) Why I did it Update sonic-platform submodule for Nokia-7250IXRE Platform. How I did it Update submodule sonic-platform for Nokia-7250IXRE platform. This contains fix for changing log level so mgmt test cases will not fail because of error log. --- platform/broadcom/sonic-platform-modules-nokia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/broadcom/sonic-platform-modules-nokia b/platform/broadcom/sonic-platform-modules-nokia index 87915b72714d..a04cc6b2291a 160000 --- a/platform/broadcom/sonic-platform-modules-nokia +++ b/platform/broadcom/sonic-platform-modules-nokia @@ -1 +1 @@ -Subproject commit 87915b72714d4f76f3ff1359fea730385235954b +Subproject commit a04cc6b2291ad23ae26ad45dfcaed2715dde05b3 From 4a3deddc65e8aa8d19e15cdde40828b4e4c5e68c Mon Sep 17 00:00:00 2001 From: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:20:44 -0700 Subject: [PATCH 11/38] Expand pattern for dhcp relay discarding interface (#19430) Why I did it Currently yang pattern is restricting interfaces to those that start with Ethernet however interfaces that discard can start with "eth", "Vlan", "PortChannel", and others as well. How I did it Update YANG file and UT How to verify it sonic-mgmt test and UT --- .../yang_model_tests/tests_config/sonic-events-dhcp-relay.json | 2 +- src/sonic-yang-models/yang-models/sonic-events-dhcp-relay.yang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-dhcp-relay.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-dhcp-relay.json index 9d68a99c588d..6dcd71d79786 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-dhcp-relay.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-dhcp-relay.json @@ -2,7 +2,7 @@ "SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISCARD_INCORRECT_IFNAME": { "sonic-events-dhcp-relay:sonic-events-dhcp-relay": { "sonic-events-dhcp-relay:dhcp-relay-discard": { - "ifname": "Eth", + "ifname": "@@@!!!", "timestamp": "1985-04-12T23:20:50.52Z" } } diff --git a/src/sonic-yang-models/yang-models/sonic-events-dhcp-relay.yang b/src/sonic-yang-models/yang-models/sonic-events-dhcp-relay.yang index 4b83c14b4ee7..e38b70e8227d 100644 --- a/src/sonic-yang-models/yang-models/sonic-events-dhcp-relay.yang +++ b/src/sonic-yang-models/yang-models/sonic-events-dhcp-relay.yang @@ -41,7 +41,7 @@ module sonic-events-dhcp-relay { leaf ifname { type string { - pattern 'Ethernet[0-9]{1,3}'; + pattern '[a-zA-Z0-9]+'; } description "Name of the i/f discarding"; } From ec0d1b08a89269f8412f3b86b91b3b091e60471d Mon Sep 17 00:00:00 2001 From: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:22:05 -0700 Subject: [PATCH 12/38] Modify regex for watchdog-timeout (#19383) How I did it Modify regex for rsyslog_plugin to detect watchdog-timeout How to verify it Manual test/Pipeline test once sonic-mgmt test case is merged --- files/build_templates/systemd_regex.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/build_templates/systemd_regex.json b/files/build_templates/systemd_regex.json index 0ffa99156785..ccb063da6692 100644 --- a/files/build_templates/systemd_regex.json +++ b/files/build_templates/systemd_regex.json @@ -6,7 +6,7 @@ }, { "tag": "watchdog-timeout", - "regex": "(?:watchdog|Watchdog) timeout .limit.([0-9])min.", + "regex": ".*(?:watchdog|Watchdog) timeout .limit.([0-9])min.", "params": [ "limit" ] } ] From 6e991a5ecd063916717fae3277a5a94e74673022 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Thu, 4 Jul 2024 04:26:57 +0800 Subject: [PATCH 13/38] fix (#19445) Why I did it DEFAULT_CONTAINER_REGISTRY didn't work as expected in some scenario. How I did it When check for docker arch, use DEFAULT_CONTAINER_REGISTRY if it is not null. --- Makefile.work | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.work b/Makefile.work index c81fe2483096..22dbac2ce755 100644 --- a/Makefile.work +++ b/Makefile.work @@ -68,7 +68,11 @@ SHELL = /bin/bash USER := $(shell id -un) PWD := $(shell pwd) USER_LC := $(shell echo $(USER) | tr A-Z a-z) +ifneq ($(DEFAULT_CONTAINER_REGISTRY),) +DOCKER_MACHINE := $(shell docker run --rm $(DEFAULT_CONTAINER_REGISTRY)/debian:buster uname -m) +else DOCKER_MACHINE := $(shell docker run --rm debian:buster uname -m) +endif HOST_DOCKERD_GID := $(shell getent group docker | cut -d : -f3) comma := , From 11730d52bb17c42bc2760a9174aa2c176211429f Mon Sep 17 00:00:00 2001 From: anamehra <54692434+anamehra@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:18:17 -0700 Subject: [PATCH 14/38] Update cisco-8000.ini to 202405.0.2 release (#19443) Signed-off-by: anamehra anamehra@cisco.com Cisco platform 202405.0.2 release --- platform/checkout/cisco-8000.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index fdfc8c4e5866..c1930b7c35d2 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=202405.0.1 +ref=202405.0.2 From dacab25ec839f2e7a65ac21845612a850d94a006 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:00:59 +0800 Subject: [PATCH 15/38] [submodule] Update submodule sonic-platform-daemons to the latest HEAD automatically (#19498) #### Why I did it src/sonic-platform-daemons ``` * 74881e1 - (HEAD -> master, origin/master, origin/HEAD) [xcvrd] Modify to support regular expression when parsing the key in media_settings.json (#471) (10 hours ago) [DennisChiuEC] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-platform-daemons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index b145f32c10de..74881e1b3137 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit b145f32c10de705bdd1c46a5d2857703e173b895 +Subproject commit 74881e1b31371bbd9c0966c48402a3058181bc4b From e1a52a3bcde1291c3ed0c7bad82605fc5e79e9b4 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:01:15 +0800 Subject: [PATCH 16/38] [submodule] Update submodule sonic-swss to the latest HEAD automatically (#19461) #### Why I did it src/sonic-swss ``` * 43ac585c - (HEAD -> master, origin/master, origin/HEAD) Revamp module build script to make it work for 5.15 on Ubuntu 20.04 (#3212) (3 days ago) [Saikrishna Arcot] * c9c78dc4 - Fix in switchorch: unsupported attribute causes skipping of processing the rest of configurations (#3209) (3 days ago) [Amir] * 0158d27d - [Chassis][voq] do not synchronize the system interface state if there is no rif assciated with the port (#3207) (3 days ago) [Arvindsrinivasan Lakshmi Narasimhan] * fdd5bdc9 - [vxlanmgr]: Add disabling of fdb learning for linux vxlan interfaces (#3205) (3 days ago) [yfedoriachenko] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-swss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss b/src/sonic-swss index b02181ae529f..43ac585cf063 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit b02181ae529f2bc493926b8151f971632fe413fa +Subproject commit 43ac585cf0634d1bc27d28637c6db7069460ee25 From 427b9cd6c09eb2041bb411b0698f5213e06c666b Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:01:20 +0800 Subject: [PATCH 17/38] [submodule] Update submodule sonic-gnmi to the latest HEAD automatically (#19460) #### Why I did it src/sonic-gnmi ``` * 7801415 - (HEAD -> master, origin/master, origin/HEAD) Use server GracefulStop instead of force stop (#219) (3 days ago) [Zain Budhwani] * 7631184 - make save on set only when err is nil (#242) (3 days ago) [Ryan Lucus] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-gnmi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-gnmi b/src/sonic-gnmi index a6107849a5d0..78014155a59e 160000 --- a/src/sonic-gnmi +++ b/src/sonic-gnmi @@ -1 +1 @@ -Subproject commit a6107849a5d02d0477a5c071892f1a6af26ee8fc +Subproject commit 78014155a59ebdaa61ccec5f036835089f289238 From b1519232ac8959600d5d88f6178e1148ea3226ba Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:01:29 +0800 Subject: [PATCH 18/38] [submodule] Update submodule sonic-utilities to the latest HEAD automatically (#19419) #### Why I did it src/sonic-utilities ``` * fb2e5cda - (HEAD -> master, origin/master, origin/HEAD) Remove secret from golden_config_db.json and old_config files (#3390) (2 days ago) [Hua Liu] * 414cf3bb - [DPB]Fix return code in case of failure (#3389) (4 days ago) [Sudharsan Dhamal Gopalarathnam] * 06965df2 - Remove suppress-fib-pending CLI and make route_check.py check suppress-fib in BGP configuration (#3331) (5 days ago) [Stepan Blyshchak] * 3a8f0be0 - [Mellanox] Add support for ACS-4280 (#3368) (8 days ago) [Vivek] * 667a1509 - [pbh]: Fix show PBH counters when cache is partial (#3356) (8 days ago) [Nazarii Hnydyn] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index 0e6a55ef5eac..fb2e5cda90ce 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 0e6a55ef5eac306ef61d6f0241625a6baee42ab8 +Subproject commit fb2e5cda90ced88249e06b18d8c5717a89ff62b9 From b1cb4e70170bff8cd593e360f9abebe8cd0bfcc4 Mon Sep 17 00:00:00 2001 From: Junchao-Mellanox <57339448+Junchao-Mellanox@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:35:44 +0800 Subject: [PATCH 19/38] [Mellanox] implement state machine for always firmware control ports (#19473) - Why I did it When module host management is enabled, all modules are managed by the same state machine which initializes all modules/ports. However, on 5600 and 5400, there is a type of port which we called "service port". Those ports are always under firmware control. In that case, those ports should be managed by a different state machine. This PR is to implement the state machine for always firmware control ports. - How I did it Implement a state machine for always firmware control ports. - How to verify it Manual test unit test --- .../sonic_platform/device_data.py | 19 +++++++ .../mlnx-platform-api/sonic_platform/sfp.py | 53 +++++++++++++++---- .../mlnx-platform-api/tests/test_sfp_sm.py | 13 +++++ 3 files changed, 74 insertions(+), 11 deletions(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py b/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py index 35c40476b93a..1f2b3164a64d 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py @@ -126,6 +126,9 @@ "comex_amb": False, "pch_temp": True } + }, + 'sfp': { + 'fw_control_ports': [64, 65] # 0 based sfp index list } }, 'x86_64-nvidia_sn5600-r0': { @@ -134,6 +137,9 @@ "comex_amb": False, "pch_temp": True } + }, + 'sfp': { + 'fw_control_ports': [64] # 0 based sfp index list } }, 'x86_64-nvidia_sn4280_simx-r0': { @@ -307,3 +313,16 @@ def get_watchdog_max_period(cls): return DEFAULT_WD_PERIOD return watchdog_data.get('max_period', None) + + @classmethod + @utils.read_only_cache() + def get_always_fw_control_ports(cls): + platform_data = DEVICE_DATA.get(cls.get_platform_name()) + if not platform_data: + return None + + sfp_data = platform_data.get('sfp') + if not sfp_data: + return None + + return sfp_data.get('fw_control_ports') diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py index a457b7458072..8ced4a08dad7 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py @@ -253,6 +253,14 @@ ACTION_ON_FW_CONTROL = 'On Firmware Control' ACTION_ON_POWER_LIMIT_ERROR = 'On Power Limit Error' ACTION_ON_CANCEL_WAIT = 'On Cancel Wait' + +# States/actions for always firmware control ports +STATE_FCP_DOWN = 'Down(Firmware Control)' +STATE_FCP_INIT = 'Initializing(Firmware Control)' +STATE_FCP_NOT_PRESENT = 'Not Present(Firmware Control)' +STATE_FCP_PRESENT = 'Present(Firmware Control)' + +ACTION_FCP_ON_START = 'On Start(Firmware Control)' # Module host management definitions end # SFP EEPROM limited bytes @@ -463,7 +471,11 @@ def __init__(self, sfp_index, sfp_type=None, slot_id=0, linecard_port_count=0, l self.slot_id = slot_id self._sfp_type_str = None # SFP state, only applicable for module host management - self.state = STATE_DOWN + fw_control_ports = DeviceDataManager.get_always_fw_control_ports() + if not fw_control_ports or self.sdk_index not in fw_control_ports: + self.state = STATE_DOWN + else: + self.state = STATE_FCP_DOWN def __str__(self): return f'SFP {self.sdk_index}' @@ -1430,7 +1442,7 @@ def get_state_machine(cls): sm.add_state(STATE_POWER_LIMIT_ERROR).set_entry_action(ACTION_ON_POWER_LIMIT_ERROR) \ .add_transition(EVENT_POWER_GOOD, STATE_POWERED_ON) \ .add_transition(EVENT_NOT_PRESENT, STATE_NOT_PRESENT) - + cls.action_table = {} cls.action_table[ACTION_ON_START] = cls.action_on_start cls.action_table[ACTION_ON_RESET] = cls.action_on_reset @@ -1440,6 +1452,16 @@ def get_state_machine(cls): cls.action_table[ACTION_ON_CANCEL_WAIT] = cls.action_on_cancel_wait cls.action_table[ACTION_ON_POWER_LIMIT_ERROR] = cls.action_on_power_limit_error + # For always firewire control ports + sm.add_state(STATE_FCP_DOWN).add_transition(EVENT_START, STATE_FCP_INIT) + sm.add_state(STATE_FCP_INIT).set_entry_action(ACTION_FCP_ON_START) \ + .add_transition(EVENT_NOT_PRESENT, STATE_FCP_NOT_PRESENT) \ + .add_transition(EVENT_PRESENT, STATE_FCP_PRESENT) + sm.add_state(STATE_FCP_NOT_PRESENT).add_transition(EVENT_PRESENT, STATE_FCP_PRESENT) + sm.add_state(STATE_FCP_PRESENT).add_transition(EVENT_NOT_PRESENT, STATE_FCP_NOT_PRESENT) + + cls.action_table[ACTION_FCP_ON_START] = cls.action_fcp_on_start + cls.sm = sm return cls.sm @@ -1468,6 +1490,14 @@ def action_on_start(cls, sfp): sfp.on_event(EVENT_RESET) else: sfp.on_event(EVENT_POWER_ON) + + @classmethod + def action_fcp_on_start(cls, sfp): + present = utils.read_int_from_file(f'/sys/module/sx_core/asic0/module{sfp.sdk_index}/present') + if present: + sfp.on_event(EVENT_PRESENT) + else: + sfp.on_event(EVENT_NOT_PRESENT) @classmethod def action_on_reset(cls, sfp): @@ -1564,10 +1594,12 @@ def in_stable_state(self): Returns: bool: True if the module is in a stable state """ - return self.state in (STATE_NOT_PRESENT, STATE_SW_CONTROL, STATE_FW_CONTROL, STATE_POWER_BAD, STATE_POWER_LIMIT_ERROR) + return self.state in (STATE_NOT_PRESENT, STATE_SW_CONTROL, STATE_FW_CONTROL, + STATE_POWER_BAD, STATE_POWER_LIMIT_ERROR, STATE_FCP_NOT_PRESENT, + STATE_FCP_PRESENT) def get_fds_for_poling(self): - if self.state == STATE_FW_CONTROL: + if self.state == STATE_FW_CONTROL or self.state == STATE_FCP_NOT_PRESENT or self.state == STATE_FCP_PRESENT: return { 'present': self.get_fd('present') } @@ -1583,11 +1615,9 @@ def fill_change_event(self, port_dict): Args: port_dict (dict): {:} """ - if self.state == STATE_NOT_PRESENT: + if self.state == STATE_NOT_PRESENT or self.state == STATE_FCP_NOT_PRESENT: port_dict[self.sdk_index + 1] = SFP_STATUS_REMOVED - elif self.state == STATE_SW_CONTROL: - port_dict[self.sdk_index + 1] = SFP_STATUS_INSERTED - elif self.state == STATE_FW_CONTROL: + elif self.state == STATE_SW_CONTROL or self.state == STATE_FW_CONTROL or self.state == STATE_FCP_PRESENT: port_dict[self.sdk_index + 1] = SFP_STATUS_INSERTED elif self.state == STATE_POWER_BAD or self.state == STATE_POWER_LIMIT_ERROR: sfp_state = SFP.SFP_ERROR_BIT_POWER_BUDGET_EXCEEDED | SFP.SFP_STATUS_BIT_INSERTED @@ -1606,7 +1636,7 @@ def refresh_poll_obj(self, poll_obj, all_registered_fds): # find fds registered by this SFP current_registered_fds = {item[2]: (fileno, item[1]) for fileno, item in all_registered_fds.items() if item[0] == self.sdk_index} logger.log_debug(f'SFP {self.sdk_index} registered fds are: {current_registered_fds}') - if self.state == STATE_FW_CONTROL: + if self.state == STATE_FW_CONTROL or self.state == STATE_FCP_NOT_PRESENT or self.state == STATE_FCP_PRESENT: target_poll_types = ['present'] else: target_poll_types = ['hw_present', 'power_good'] @@ -1642,9 +1672,10 @@ def is_dummy_event(self, fd_type, fd_value): """ if fd_type == 'hw_present' or fd_type == 'present': if fd_value == int(SFP_STATUS_INSERTED): - return self.state in (STATE_SW_CONTROL, STATE_FW_CONTROL, STATE_POWER_BAD, STATE_POWER_LIMIT_ERROR) + return self.state in (STATE_SW_CONTROL, STATE_FW_CONTROL, STATE_POWER_BAD, + STATE_POWER_LIMIT_ERROR, STATE_FCP_PRESENT) elif fd_value == int(SFP_STATUS_REMOVED): - return self.state == STATE_NOT_PRESENT + return self.state in (STATE_NOT_PRESENT, STATE_FCP_NOT_PRESENT) elif fd_type == 'power_good': if fd_value == 1: return self.state in (STATE_SW_CONTROL, STATE_NOT_PRESENT, STATE_RESETTING) diff --git a/platform/mellanox/mlnx-platform-api/tests/test_sfp_sm.py b/platform/mellanox/mlnx-platform-api/tests/test_sfp_sm.py index 9f2154173d32..a1e4a0280037 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_sfp_sm.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_sfp_sm.py @@ -168,3 +168,16 @@ def test_sw_control(self): s.disable_tx_for_sff_optics = mock.MagicMock() s.on_event(sfp.EVENT_START) assert s.get_state() == sfp.STATE_SW_CONTROL + + @mock.patch('sonic_platform.device_data.DeviceDataManager.get_always_fw_control_ports', mock.MagicMock(return_value=[0])) + def test_fcp_state(self): + self.mock_value('present', 1) + s = sfp.SFP(0) + s.on_event(sfp.EVENT_START) + assert s.get_state() == sfp.STATE_FCP_PRESENT + + self.mock_value('present', 0) + s = sfp.SFP(0) + s.on_event(sfp.EVENT_START) + assert s.get_state() == sfp.STATE_FCP_NOT_PRESENT + From 9ca1464f70ffb67f1745867248fd25f63ea5fcbb Mon Sep 17 00:00:00 2001 From: noaOrMlnx <58519608+noaOrMlnx@users.noreply.github.com> Date: Mon, 8 Jul 2024 16:27:38 +0300 Subject: [PATCH 20/38] [Mellanox] Update SDK/FW to 4.6.4072/2012.4072 (#19467) - Why I did it Update SDK/FW to 4.6.4072/2012.4072 Now, CMIS host mgmt feature is enabled to work on every SN4700 PSID Work item tracking - How I did it Update Makefiles - How to verify it Run tests --- platform/mellanox/fw.mk | 10 +++++----- platform/mellanox/sdk.mk | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk index 62014478b3f2..2b6931d5e440 100644 --- a/platform/mellanox/fw.mk +++ b/platform/mellanox/fw.mk @@ -25,29 +25,29 @@ SIMX_VERSION = 24.4-1091 FW_FROM_URL = y -MLNX_FW_ASSETS_RELEASE_TAG = fw-2012.4062 +MLNX_FW_ASSETS_RELEASE_TAG = fw-2012.4072 MLNX_FW_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_FW_ASSETS_RELEASE_TAG) ifeq ($(MLNX_FW_BASE_URL), ) MLNX_FW_BASE_URL = $(MLNX_FW_ASSETS_URL) endif -MLNX_SPC_FW_VERSION = 13.2012.4062 +MLNX_SPC_FW_VERSION = 13.2012.4072 MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa $(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE) -MLNX_SPC2_FW_VERSION = 29.2012.4062 +MLNX_SPC2_FW_VERSION = 29.2012.4072 MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa $(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE) -MLNX_SPC3_FW_VERSION = 30.2012.4062 +MLNX_SPC3_FW_VERSION = 30.2012.4072 MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa $(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE) -MLNX_SPC4_FW_VERSION = 34.2012.4062 +MLNX_SPC4_FW_VERSION = 34.2012.4072 MLNX_SPC4_FW_FILE = fw-SPC4-rel-$(subst .,_,$(MLNX_SPC4_FW_VERSION))-EVB.mfa $(MLNX_SPC4_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC4_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC4_FW_FILE) diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index 15ccedc7b606..422bb9f5ff86 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -MLNX_SDK_VERSION = 4.6.4062 +MLNX_SDK_VERSION = 4.6.4072 MLNX_SDK_ISSU_VERSION = 101 MLNX_SDK_DRIVERS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers From 1c35c627ae6e1313df005379329aa11d16f5bd2b Mon Sep 17 00:00:00 2001 From: Oleksandr Ivantsiv Date: Tue, 9 Jul 2024 09:32:09 -0700 Subject: [PATCH 21/38] [nvidia-bluefield] Update SAI to SAIBuild0.0.32.0, SDK to v24.7-RC4 (#19456) - Why I did it To include the latest fixes and new functionality - How I did it SDK_VERSION 24.7-RC2 -> 24.7-RC4 SAI_VERSION SAIBuild0.0.31.0 -> SAIBuild0.0.32.0 - How to verify it Build an image and run tests from "sonic-mgmt". --- .../bluefield-platform-modules/bin/bfnet.sh | 14 +++++++++++++- .../systemd/dpu.service | 3 ++- .../udev/91-tmfifo_net.rules | 2 +- .../nvidia-bluefield/pinctrl-mlxbf3/Makefile | 2 -- .../pinctrl-mlxbf3/pinctrl-mlxbf3.c.patch | 13 ------------- .../platform-api/sonic_platform/device_data.py | 1 - .../nvidia-bluefield/recipes/bluefield-soc.mk | 18 ++++++++++-------- platform/nvidia-bluefield/recipes/dpu-sai.mk | 2 +- platform/nvidia-bluefield/recipes/fw.mk | 2 +- .../recipes/installer-image.mk | 4 ++-- platform/nvidia-bluefield/recipes/mft.mk | 4 ++-- platform/nvidia-bluefield/recipes/sdk.mk | 2 +- 12 files changed, 33 insertions(+), 34 deletions(-) delete mode 100644 platform/nvidia-bluefield/pinctrl-mlxbf3/pinctrl-mlxbf3.c.patch diff --git a/platform/nvidia-bluefield/bluefield-platform-modules/bin/bfnet.sh b/platform/nvidia-bluefield/bluefield-platform-modules/bin/bfnet.sh index 0c74cfbe5068..76b785c9b536 100755 --- a/platform/nvidia-bluefield/bluefield-platform-modules/bin/bfnet.sh +++ b/platform/nvidia-bluefield/bluefield-platform-modules/bin/bfnet.sh @@ -16,6 +16,7 @@ # limitations under the License. # +pci_iface=eth0-midplane cp_iface=Ethernet0 pidfile=/run/dhcl-internal.$cp_iface.pid leasefile=/var/lib/dhcp/dhcl-internal.$cp_iface.leases @@ -55,12 +56,23 @@ stop() rmmod mlx5_ib mlx5_core } +configure_pci_iface() +{ + mgmt_mac=$(cat /sys/devices/platform/MLNXBF17:00/net/*/address) + + # Set PCI interface MAC address to the MAC address of the mgmt interface + ip link set dev $pci_iface address $mgmt_mac +} + case "$1" in start|stop) $1 ;; + configure-pci-iface) + configure_pci_iface + ;; *) - echo "Usage: $0 {start|stop}" + echo "Usage: $0 {start|stop|configure-pci-iface}" exit 1 ;; esac diff --git a/platform/nvidia-bluefield/bluefield-platform-modules/systemd/dpu.service b/platform/nvidia-bluefield/bluefield-platform-modules/systemd/dpu.service index e713ca18e748..fc4c50d69de7 100644 --- a/platform/nvidia-bluefield/bluefield-platform-modules/systemd/dpu.service +++ b/platform/nvidia-bluefield/bluefield-platform-modules/systemd/dpu.service @@ -5,7 +5,8 @@ After=getty.target [Service] Type=oneshot ExecStartPre=/usr/bin/bfrshlog "Linux up" -ExecStart=/usr/bin/bfrshlog "DPU is ready" +ExecStartPre=/usr/bin/bfrshlog "DPU is ready" +ExecStart=/usr/bin/bfup StandardOutput=journal+console [Install] diff --git a/platform/nvidia-bluefield/bluefield-platform-modules/udev/91-tmfifo_net.rules b/platform/nvidia-bluefield/bluefield-platform-modules/udev/91-tmfifo_net.rules index 540908d69445..af1c3f8e5423 100644 --- a/platform/nvidia-bluefield/bluefield-platform-modules/udev/91-tmfifo_net.rules +++ b/platform/nvidia-bluefield/bluefield-platform-modules/udev/91-tmfifo_net.rules @@ -1 +1 @@ -SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/platform/MLNXBF01:00/virtio1/net/eth*", NAME="tmfifo_net0" \ No newline at end of file +SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/platform/MLNXBF01:00/virtio1/net/eth*", NAME="eth0-midplane", RUN+="/usr/bin/bfnet.sh configure-pci-iface" diff --git a/platform/nvidia-bluefield/pinctrl-mlxbf3/Makefile b/platform/nvidia-bluefield/pinctrl-mlxbf3/Makefile index ca56f30f8324..04fab4b518e4 100644 --- a/platform/nvidia-bluefield/pinctrl-mlxbf3/Makefile +++ b/platform/nvidia-bluefield/pinctrl-mlxbf3/Makefile @@ -32,8 +32,6 @@ $(addprefix $(DEST)/, $(MLXBF3_PINCTRL_DRIVER)): $(DEST)/% : pushd ${MLXBF3_PINCTRL} - patch -p1 < ../../pinctrl-mlxbf3.c.patch - # Build the package make -C /lib/modules/$(KVERSION)/build M=$(MODULE_DIR) diff --git a/platform/nvidia-bluefield/pinctrl-mlxbf3/pinctrl-mlxbf3.c.patch b/platform/nvidia-bluefield/pinctrl-mlxbf3/pinctrl-mlxbf3.c.patch deleted file mode 100644 index c78afc4b2805..000000000000 --- a/platform/nvidia-bluefield/pinctrl-mlxbf3/pinctrl-mlxbf3.c.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/pinctrl-mlxbf3.c b/pinctrl-mlxbf3.c -index 8371d83..d3746f6 100644 ---- a/pinctrl-mlxbf3.c -+++ b/pinctrl-mlxbf3.c -@@ -18,7 +18,7 @@ - - #define DRV_VERSION "1.0" - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) - struct pinfunction { - const char *name; - const char * const *groups; diff --git a/platform/nvidia-bluefield/platform-api/sonic_platform/device_data.py b/platform/nvidia-bluefield/platform-api/sonic_platform/device_data.py index c4d3e902f1e4..5c62ec51ba1a 100644 --- a/platform/nvidia-bluefield/platform-api/sonic_platform/device_data.py +++ b/platform/nvidia-bluefield/platform-api/sonic_platform/device_data.py @@ -30,7 +30,6 @@ def __init__(self, name, thermals=None): self.name = name self.thermals = thermals - class DeviceDataManager: def __init__(self): diff --git a/platform/nvidia-bluefield/recipes/bluefield-soc.mk b/platform/nvidia-bluefield/recipes/bluefield-soc.mk index 3ff258936253..dc256b6b6c11 100644 --- a/platform/nvidia-bluefield/recipes/bluefield-soc.mk +++ b/platform/nvidia-bluefield/recipes/bluefield-soc.mk @@ -16,8 +16,8 @@ # # Bluefied Software Distribution Version -BFSOC_VERSION = 4.6.0 -BFSOC_REVISION = 13035 +BFSOC_VERSION = 4.7.0 +BFSOC_REVISION = 13127 BFB_IMG_TYPE = prod BFSOC_BUILD_DATE = @@ -34,6 +34,7 @@ BSD_BASE_URL = $(BSD_INTERNAL_BASE_URL)/$(BFSOC_BUILD_DATE) endif BSD_BASE_SOURCE_URL = $(BSD_BASE_URL)/build/install/distro/SRPMS/ +QP_BOOTIMAGES_BASE_URL = $(BSD_BASE_URL)/build/install/distro/DEBS/ DEV_BOOTIMAGES_BASE_URL = $(BSD_BASE_URL)/build/install/distro/dev-release/DEBS/ PROD_BOOTIMAGES_BASE_URL = $(BSD_BASE_URL)/build/install/distro/ga-release/DEBS/ endif @@ -133,7 +134,10 @@ $(MLXBF_PTM_DRIVER)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) BF_PLATFORM_DRIVERS += $(MLXBF_PTM_DRIVER) export MLXBF_PTM_DRIVER_VERSION MLXBF_PTM_DRIVER -ifeq ($(BFB_IMG_TYPE), prod) +ifeq ($(BFB_IMG_TYPE), qp) +BOOTIMAGES_BASE_URL = $(QP_BOOTIMAGES_BASE_URL) +BOOTIMAGES = mlxbf-bootimages_$(BFSOC_VERSION)-$(BFSOC_REVISION)_arm64.deb +else ifeq ($(BFB_IMG_TYPE), prod) BOOTIMAGES_BASE_URL = $(PROD_BOOTIMAGES_BASE_URL) BOOTIMAGES = mlxbf-bootimages-signed_$(BFSOC_VERSION)-$(BFSOC_REVISION)_arm64.deb else @@ -160,15 +164,13 @@ $(BF_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/bluefield-platform-modules $(BF_PLATFORM_MODULE)_FILES = $(BF_PLATFORM_DRIVERS) -SONIC_MAKE_DEBS += $(BF_PLATFORM_MODULE) export BF_PLATFORM_MODULE_VERSION BF_PLATFORM_MODULE BF_PLATFORM_DRIVERS ifeq ($(BFSOC_FROM_INTERNAL), y) SONIC_MAKE_FILES += $(BF_PLATFORM_DRIVERS) -SONIC_MAKE_DEBS += $(BFSOC_MAKE_DEBS) +SONIC_MAKE_DEBS += $(BFSOC_MAKE_DEBS) $(BF_PLATFORM_MODULE) SONIC_ONLINE_DEBS += $(BFSOC_ONLINE_DEBS) else -$(eval $(foreach file,$(BF_PLATFORM_DRIVERS) $(BFSOC_MAKE_DEBS) $(BFSOC_MAKE_DEBS_DERIVED) $(BFSOC_ONLINE_DEBS), $(call make_url_bfsoc,$(file)))) -SONIC_ONLINE_FILES += $(BF_PLATFORM_DRIVERS) -SONIC_ONLINE_DEBS += $(BFSOC_MAKE_DEBS) $(BFSOC_MAKE_DEBS_DERIVED) $(BFSOC_ONLINE_DEBS) +$(eval $(foreach file, $(BFSOC_MAKE_DEBS) $(BFSOC_MAKE_DEBS_DERIVED) $(BFSOC_ONLINE_DEBS) $(BF_PLATFORM_MODULE), $(call make_url_bfsoc,$(file)))) +SONIC_ONLINE_DEBS += $(BFSOC_MAKE_DEBS) $(BFSOC_MAKE_DEBS_DERIVED) $(BFSOC_ONLINE_DEBS) $(BF_PLATFORM_MODULE) endif diff --git a/platform/nvidia-bluefield/recipes/dpu-sai.mk b/platform/nvidia-bluefield/recipes/dpu-sai.mk index 6cac410ec104..706fd6d65c4e 100644 --- a/platform/nvidia-bluefield/recipes/dpu-sai.mk +++ b/platform/nvidia-bluefield/recipes/dpu-sai.mk @@ -15,7 +15,7 @@ # limitations under the License. # -DPU_SAI_VERSION = SAIBuild0.0.30.0 +DPU_SAI_VERSION = SAIBuild0.0.32.0 # Place here URL where SAI sources exist DPU_SAI_SOURCE_BASE_URL= diff --git a/platform/nvidia-bluefield/recipes/fw.mk b/platform/nvidia-bluefield/recipes/fw.mk index 94b0486e9e7b..344ed49b18b3 100644 --- a/platform/nvidia-bluefield/recipes/fw.mk +++ b/platform/nvidia-bluefield/recipes/fw.mk @@ -17,7 +17,7 @@ BF3_FW_BASE_URL = -BF3_FW_VERSION = 32.39.1002 +BF3_FW_VERSION = 32.41.1000 BF3_FW_FILE = fw-BlueField-3-rel-$(subst .,_,$(BF3_FW_VERSION)).mfa diff --git a/platform/nvidia-bluefield/recipes/installer-image.mk b/platform/nvidia-bluefield/recipes/installer-image.mk index e3831a54d368..e87fcb03d98d 100644 --- a/platform/nvidia-bluefield/recipes/installer-image.mk +++ b/platform/nvidia-bluefield/recipes/installer-image.mk @@ -67,7 +67,7 @@ $(SONIC_BF_IMAGE_PXE)_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_INSTALLS) $(SONIC_BF_IMAGE_PXE)_DEPENDS += $($(SONIC_BF_IMAGE_BASE)_DEPENDS) $(SONIC_BF_IMAGE_PXE)_DOCKERS += $($(SONIC_BF_IMAGE_BASE)_DOCKERS) $(SONIC_BF_IMAGE_PXE)_LAZY_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_LAZY_INSTALLS) -$(SONIC_BF_IMAGE_PXE)_FILES += $($(SONIC_BF_IMAGE_BASE)_FILES) $(MLX_BOOTCTL_DRIVER) +$(SONIC_BF_IMAGE_PXE)_FILES += $($(SONIC_BF_IMAGE_BASE)_FILES) # The traditional *.bin image. Works for sonic-sonic upgrade. SONIC_BF_IMAGE_BIN = $(SONIC_BF_IMAGE_BASE).bin @@ -87,6 +87,6 @@ $(SONIC_BF_IMAGE_BFB)_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_INSTALLS) $(SONIC_BF_IMAGE_BFB)_DEPENDS += $($(SONIC_BF_IMAGE_BASE)_DEPENDS) $(SONIC_BF_IMAGE_BFB)_DOCKERS += $($(SONIC_BF_IMAGE_BASE)_DOCKERS) $(SONIC_BF_IMAGE_BFB)_LAZY_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_LAZY_INSTALLS) -$(SONIC_BF_IMAGE_BFB)_FILES += $($(SONIC_BF_IMAGE_BASE)_FILES) $(MLX_BOOTCTL_DRIVER) +$(SONIC_BF_IMAGE_BFB)_FILES += $($(SONIC_BF_IMAGE_BASE)_FILES) SONIC_INSTALLERS += $(SONIC_BF_IMAGE_PXE) $(SONIC_BF_IMAGE_BIN) $(SONIC_BF_IMAGE_BFB) diff --git a/platform/nvidia-bluefield/recipes/mft.mk b/platform/nvidia-bluefield/recipes/mft.mk index 7f56158656cb..f4b3722a1ea5 100644 --- a/platform/nvidia-bluefield/recipes/mft.mk +++ b/platform/nvidia-bluefield/recipes/mft.mk @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -MFT_VERSION = 4.26.1 -MFT_REVISION = 3 +MFT_VERSION = 4.28.0 +MFT_REVISION = 96 MFT_INTERNAL_SOURCE_BASE_URL = diff --git a/platform/nvidia-bluefield/recipes/sdk.mk b/platform/nvidia-bluefield/recipes/sdk.mk index 0e0a048aef86..fbe53fddde64 100644 --- a/platform/nvidia-bluefield/recipes/sdk.mk +++ b/platform/nvidia-bluefield/recipes/sdk.mk @@ -19,7 +19,7 @@ SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sonic-bluefield-packages/bin # Place here URL where SDK sources exist SDK_SOURCE_BASE_URL = -SDK_VERSION = 24.4-RC2 +SDK_VERSION = 24.7-RC4 SDK_COLLECTX_URL = https://linux.mellanox.com/public/repo/doca/1.5.2/debian12/aarch64/ From c2055abbcfba01ef1946b7d8eb9b111b6dfd23f2 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Thu, 11 Jul 2024 12:38:56 +0800 Subject: [PATCH 22/38] Fix no standalone lo_v6 entry which break YANG validation (#19514) ### Why I did it The load_mgmt_config generated lo_v6 is missing standalone entry which fail YANG validation ##### Work item tracking - Microsoft ADO **(number only)**:28665800 #### How I did it Add the standalone entry #### How to verify it Manual test in DUT Before change: ``` admin@str-msn2700a1-03:~$ sonic-cfggen -M /etc/sonic/device_desc.xml --print-data { "DEVICE_METADATA": { "localhost": { "hostname": "CPQ21-0101-0509-04T0", "hwsku": "Arista-7260CX3-D108C8" } }, "LOOPBACK_INTERFACE": { "lo_v6|2603:10d0:e:5eb::/128": {} <==== missing standalone entry which fail YANG }, "MGMT_INTERFACE": { "eth0|100.84.101.139/26": { "gwaddr": "100.84.101.129" }, "eth0|2603:10e2:f0:7478::b/64": { "gwaddr": "2603:10e2:f0:7478::1" } } } ``` After change: ``` admin@str-msn2700a1-03:~$ sonic-cfggen -M /etc/sonic/device_desc.xml --print-data { "DEVICE_METADATA": { "localhost": { "hostname": "CPQ21-0101-0509-04T0", "hwsku": "Arista-7260CX3-D108C8" } }, "LOOPBACK_INTERFACE": { "lo_v6": {}, <=== added standalone entry "lo_v6|2603:10d0:e:5eb::/128": {} }, "MGMT_INTERFACE": { "eth0|100.84.101.139/26": { "gwaddr": "100.84.101.129" }, "eth0|2603:10e2:f0:7478::b/64": { "gwaddr": "2603:10e2:f0:7478::1" } } } ``` --- src/sonic-config-engine/minigraph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index b6375b80d03a..b2e87aa0597e 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -2831,9 +2831,9 @@ def parse_device_desc_xml(filename): 'hwsku': hwsku, }} - results['LOOPBACK_INTERFACE'] = {('lo', lo_prefix): {}} + results['LOOPBACK_INTERFACE'] = {'lo': {}, ('lo', lo_prefix): {}} if lo_prefix_v6: - results['LOOPBACK_INTERFACE'] = {('lo_v6', lo_prefix_v6): {}} + results['LOOPBACK_INTERFACE'] = {'lo_v6': {}, ('lo_v6', lo_prefix_v6): {}} results['MGMT_INTERFACE'] = {} if mgmt_prefix: From 12542bf1ba653e82d61d69a777fe731500e3ca7a Mon Sep 17 00:00:00 2001 From: sophiek Date: Thu, 11 Jul 2024 18:36:43 +0300 Subject: [PATCH 23/38] [Mellanox] CMIS host management script (#19509) - Why I did it Added a script for CMIS Host Management enabling and disabling on a running switch. This intend to prevent issues caused by wrong configuration of the feature. The idea is to provide a more convenient way for users to configure the feature. - How I did it Add the script to /usr/bin/ that supports two options: --enable - receives paths to config files for Port SI parameters and Module SI parameters: media_settings.json, optics_si_settings.json, and enables the feature --disable - disables the feature --- .../build_templates/sonic_debian_extension.j2 | 2 + .../mellanox/cmis_host_mgmt/cmis_host_mgmt.py | 171 ++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 platform/mellanox/cmis_host_mgmt/cmis_host_mgmt.py diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 766874571dd1..40d721220d59 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -1060,6 +1060,8 @@ for MLNX_CPLD_ARCHIVE in $MLNX_CPLD_ARCHIVES; do done sudo cp platform/mellanox/get_component_versions/get_component_versions.py $FILESYSTEM_ROOT/usr/bin/get_component_versions.py sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/get_component_versions.py +sudo cp platform/mellanox/cmis_host_mgmt/cmis_host_mgmt.py $FILESYSTEM_ROOT/usr/bin/cmis_host_mgmt.py +sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/cmis_host_mgmt.py j2 platform/mellanox/mlnx-fw-upgrade.j2 | sudo tee $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh diff --git a/platform/mellanox/cmis_host_mgmt/cmis_host_mgmt.py b/platform/mellanox/cmis_host_mgmt/cmis_host_mgmt.py new file mode 100644 index 000000000000..aaedbe4a57ba --- /dev/null +++ b/platform/mellanox/cmis_host_mgmt/cmis_host_mgmt.py @@ -0,0 +1,171 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +# Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import shutil +import click +import re +import os +import subprocess + + +class CMISHostMgmtActivator: + PARAMS = { + "sai_profile": { + "file_name": "sai.profile", + "enabled_param": "SAI_INDEPENDENT_MODULE_MODE=1", + "disabled_param": "SAI_INDEPENDENT_MODULE_MODE=0" + }, + "pmon_daemon_control": { + "file_name": "pmon_daemon_control.json", + "enabled_param": "\"skip_xcvrd_cmis_mgr\": false", + "disabled_param": "\"skip_xcvrd_cmis_mgr\": true", + }, + "sai_xml": { + "file_name": "sai_<>.xml", # will be filled at main, since we can't know the SKU here + "enabled_param": "1", + "disabled_param": "1" # Shouldn't be called + } + } + + @staticmethod + def change_param(param, path, action): + file_path = '{}/{}'.format(path, CMISHostMgmtActivator.PARAMS[param]["file_name"]) + lines = None + + try: + with open(file_path, 'r') as param_file: + lines = param_file.read() + + if lines: + if action == "disable": + lines = re.sub(CMISHostMgmtActivator.PARAMS[param]["enabled_param"], + CMISHostMgmtActivator.PARAMS[param]["disabled_param"], + lines) + elif action == "enable": + if param == "sai_profile" and not re.search(CMISHostMgmtActivator.PARAMS[param]["disabled_param"], lines): + if not re.search(CMISHostMgmtActivator.PARAMS[param]["enabled_param"], lines): + with open(file_path, 'a') as param_file: + param_file.write(CMISHostMgmtActivator.PARAMS[param]["enabled_param"]) + return + + lines = re.sub(CMISHostMgmtActivator.PARAMS[param]["disabled_param"], + CMISHostMgmtActivator.PARAMS[param]["enabled_param"], + lines) + + with open(file_path, 'w') as param_file: + param_file.write(lines) + + except FileNotFoundError as e: + print('Missing file: {}'.format(e.filename)) + + + @staticmethod + def parse_show_platform_summary(): + summary = subprocess.check_output(['show', 'platform', 'summary']) + summary = summary.decode('utf-8') + summary = [x for x in summary.split('\n') if x] + + for field in summary: + key, value = field.split(": ") + + if key == 'Platform': + platform = value + + elif key == 'HwSKU': + sku = value + + return platform, sku + + + @staticmethod + def remove_file(file_path): + if os.path.isfile(file_path): + os.remove(file_path) + + + @staticmethod + def copy_file(src_path, dest_path): + if os.path.isfile(src_path): + shutil.copy(src_path, dest_path) + + + @staticmethod + def is_spc_supported(spc): + return int(spc) >= 4000 + + @staticmethod + def disable(): + platform, sku = CMISHostMgmtActivator.parse_show_platform_summary() + sku_path = '/usr/share/sonic/device/{0}/{1}'.format(platform, sku) + platform_path = '/usr/share/sonic/device/{0}'.format(platform) + CMISHostMgmtActivator.change_param("sai_profile", sku_path, 'disable') + + if os.path.isfile('{0}/{1}'.format(platform_path, 'pmon_daemon_control.json')): + CMISHostMgmtActivator.change_param("pmon_daemon_control", platform_path, 'disable') + CMISHostMgmtActivator.remove_file('{0}/{1}'.format(sku_path, 'pmon_daemon_control.json')) + else: + CMISHostMgmtActivator.change_param("pmon_daemon_control", sku_path, 'disable') + + CMISHostMgmtActivator.remove_file('{0}/{1}'.format(sku_path, 'media_settings.json')) + CMISHostMgmtActivator.remove_file('{0}/{1}'.format(sku_path,'optics_si_settings.json')) + CMISHostMgmtActivator.remove_file('{0}/{1}'.format(platform_path, 'media_settings.json')) + CMISHostMgmtActivator.remove_file('{0}/{1}'.format(platform_path, 'optics_si_settings.json')) + + + @staticmethod + def enable(args): + platform, sku = CMISHostMgmtActivator.parse_show_platform_summary() + sku_path = '/usr/share/sonic/device/{0}/{1}'.format(platform, sku) + platform_path = '/usr/share/sonic/device/{0}'.format(platform) + + sku_num = re.search('[0-9]{4}', sku).group() + + if not CMISHostMgmtActivator.is_spc_supported(sku_num): + print("Error: unsupported platform - feature is supported on SPC3 and higher.") + + CMISHostMgmtActivator.PARAMS["sai_xml"]["file_name"] = "sai_{0}.xml".format(sku_num) + + CMISHostMgmtActivator.copy_file(args[0], sku_path) + CMISHostMgmtActivator.copy_file(args[1], sku_path) + CMISHostMgmtActivator.copy_file('{0}/{1}'.format(platform_path, 'pmon_daemon_control.json'), sku_path) + + CMISHostMgmtActivator.change_param("sai_profile", sku_path, 'enable') + CMISHostMgmtActivator.change_param("pmon_daemon_control", sku_path, 'enable') + CMISHostMgmtActivator.change_param("sai_xml", sku_path, 'enable') + + +@click.command() +@click.option('--disable', is_flag=True, help='Disable CMIS Host Management') +@click.option('--enable', nargs=2, type=click.Path(), help='Enable CMIS Host Management, receives two arguments: media_settings.json path, and optics_si_settings.json path') +def main(disable, enable): + + if disable and enable: + print("Error: can't use both options, please choose one.") + return + + if disable: + CMISHostMgmtActivator.disable() + + elif enable: + CMISHostMgmtActivator.enable(enable) + + else: + print("Error: no option was provided - nothing to execute.") + +if __name__ == '__main__': + main() From 1c2aa3262826034b6b44f299d17584dff3333b38 Mon Sep 17 00:00:00 2001 From: Oleksandr Ivantsiv Date: Thu, 11 Jul 2024 10:20:42 -0700 Subject: [PATCH 24/38] [nvidia-bluefield] Add the possibility to compile BFB image (#19512) - Why I did it Add the possibility to compile BFB (BlueField boot stream) image for the nvidia-bluefield platform. The BFB image fully overwrites the DPU's SSD and can be used for DPU recovery. - How I did it Add new bfb image type to build_image.sh script. Add scripts under the "nvidia-bluefield" platform to create the binary file. - How to verify it Configure nvidia-bluefield platform. Run make target/sonic-nvidia-bluefield.bfb command to compile the image. --- build_image.sh | 11 + onie-image-arm64.conf | 3 + .../installer/create_sonic_image | 420 ++++++++++++++++++ .../nvidia-bluefield/installer/install.sh.j2 | 390 ++++++++++++++++ .../nvidia-bluefield/installer/sonic-grub.cfg | 27 ++ .../recipes/installer-image.dep | 1 - .../recipes/installer-image.mk | 13 +- 7 files changed, 852 insertions(+), 13 deletions(-) create mode 100755 platform/nvidia-bluefield/installer/create_sonic_image create mode 100755 platform/nvidia-bluefield/installer/install.sh.j2 create mode 100644 platform/nvidia-bluefield/installer/sonic-grub.cfg diff --git a/build_image.sh b/build_image.sh index 571febe5cbaa..2ef9be097568 100755 --- a/build_image.sh +++ b/build_image.sh @@ -253,6 +253,17 @@ elif [ "$IMAGE_TYPE" = "dsc" ]; then generate_onie_installer_image +elif [ "$IMAGE_TYPE" = "bfb" ]; then + echo "Build BFB installer" + + if [[ $SECURE_UPGRADE_MODE != "no_sign" ]]; then + secure_upgrade_keys="--signing-key "$SECURE_UPGRADE_DEV_SIGNING_KEY" --signing-cert "$SECURE_UPGRADE_SIGNING_CERT"" + fi + + sudo -E ./platform/${CONFIGURED_PLATFORM}/installer/create_sonic_image --kernel $KVERSION "$secure_upgrade_keys" + + sudo chown $USER $OUTPUT_BFB_IMAGE + else echo "Error: Non supported image type $IMAGE_TYPE" exit 1 diff --git a/onie-image-arm64.conf b/onie-image-arm64.conf index b8a199c70bea..28f83855d77c 100644 --- a/onie-image-arm64.conf +++ b/onie-image-arm64.conf @@ -53,3 +53,6 @@ ABOOT_BOOT_IMAGE=.sonic-boot.swi ## Output file name for dsc installer OUTPUT_DSC_IMAGE=target/sonic-$TARGET_MACHINE.tar + +## Output file name for bfb image +OUTPUT_BFB_IMAGE=target/sonic-$TARGET_MACHINE.bfb diff --git a/platform/nvidia-bluefield/installer/create_sonic_image b/platform/nvidia-bluefield/installer/create_sonic_image new file mode 100755 index 000000000000..8e18f1b7fe80 --- /dev/null +++ b/platform/nvidia-bluefield/installer/create_sonic_image @@ -0,0 +1,420 @@ +#!/bin/bash +# +# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +# Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set -x +set -e + +WDIR= +IMAGE_VERSION= +KERNEL_VERSION= +CHROOT_DIR= +INITRD= +VMLINUZ= +MODULES_DIR= + +SIGNING_CERT= +SIGNING_KEY= +CDIR=/sonic/ +SDIR=$CDIR/platform/${CONFIGURED_PLATFORM}/installer/ +DDIR=$CDIR +CAPSULE=/lib/firmware/mellanox/boot/capsule/boot_update2.cap +BOOTCTL_DRIVER= +TMFIFO_DRIVER= +SDHCI_OF_DWCMSHC_DRIVER= +TARGET_MACHINE=nvidia-bluefield +BFB="${BFB:-/lib/firmware/mellanox/boot/default.bfb}" +GRUB_AA64=grubnetaa64.efi +GRUB_CFG="" # Common Grub Config +BF2_BOOT_ARGS="console=ttyAMA1 console=hvc0 console=ttyAMA0 earlycon=pl011,0x01000000 earlycon=pl011,0x01800000" +BF2_GRUB_CFG="$BF2_BOOT_ARGS isolcpus=1-7 nohz_full=1-7 rcu_nocbs=1-7" +BF3_BOOT_ARGS="console=ttyAMA1 console=hvc0 console=ttyAMA0 earlycon=pl011,0x13010000" +BF3_GRUB_CFG="$BF3_BOOT_ARGS isolcpus=1-13 nohz_full=1-13 rcu_nocbs=1-13" + +usage() { +cat << EOF +Usage: `basename $0` [ OPTIONS ] +OPTIONS: +-k, --kernel Kernel version for the SmartNIC. +-sc, --signing-cert Secure upgrade signing certificate. +-sk, --signing-key Secure upgrade signing key. +-v, --verbose Run script in verbose mode. Will print out each step of execution. +-h, --help Display help +EOF +} +parse_args() { + while [[ $@ != "" ]]; do + case $1 in + -h|--help) + usage + exit 0 + ;; + -v|--verbose) + shift + set -x + ;; + -k|--kernel) + shift + KERNEL_VERSION=$1 + ;; + -sc|--signing-cert) + shift + echo "signing cert $1" + SIGNING_CERT="$1" + ;; + -sk|--signing-key) + shift + echo "signing key $1" + SIGNING_KEY="$1" + ;; + *) + usage + exit 1 + ;; + esac + shift + done +} + +clean_dir() +{ + rm -rf $1 + exit $2 +} + +validate_config() { + if [[ ! -f "$INITRD" ]]; then + echo "[create_sonic_image] Error! SONiC INITRD not found" + exit 1 + fi + + if [[ ! -f "$VMLINUZ" ]]; then + echo "[create_sonic_image] Error! SONiC VMLINUZ not found" + exit 1 + fi + + if [[ ! -d "$MODULES_DIR" ]]; then + echo "[create_sonic_image] Error! Path to Kernel Modules not found" + exit 1 + fi + + if [[ ! -n "$OUTPUT_BFB_IMAGE" ]]; then + echo "[create_sonic_image] Error! OUTPUT_BFB_IMAGE name not defined. Exiting.." + exit 1 + fi + + if [[ ! -f "$CDIR/$INSTALLER_PAYLOAD" ]]; then + echo "$INSTALLER_PAYLOAD not found. Exiting.." + exit 1 + fi + + mkbfb=`which mlx-mkbfb` + if [[ ! -x "${mkbfb}" ]]; then + echo "Error! mlx-mkbfb is required to build BFB image" + exit 1 + fi + + if [[ ! -f $CAPSULE ]]; then + echo "ERROR: Capsule file $CAPSULE does not exist" + exit 1 + fi + + if [[ ! -f $BOOTCTL_DRIVER ]]; then + echo "ERROR: Bootctl driver $BOOTCTL_DRIVER does not exist" + exit 1 + fi + + if [[ ! -f $TMFIFO_DRIVER ]]; then + echo "ERROR: Bootctl driver $TMFIFO_DRIVER does not exist" + exit 1 + fi + + if [[ ! -f $SDHCI_OF_DWCMSHC_DRIVER ]]; then + echo "ERROR: Bootctl driver $SDHCI_OF_DWCMSHC_DRIVER does not exist" + exit 1 + fi + + if [[ ! -f $BFB ]]; then + echo "ERROR: Default BFB $BFB does not exist" + exit 1 + fi +} + +cleanup_workdir() { + rm -rf $boot_args $boot_args2 $boot_path $boot_desc $WDIR +} + +create_workdir() { + if [[ $WDIR == "" ]]; then + WDIR=$(mktemp -d /sonic/bfb-wd-XXXX) + else + rm -rf $WDIR/* + fi + boot_args=$(mktemp /tmp/boot-args-XXXX) + boot_args2=$(mktemp /tmp/boot-args2-XXXX) + boot_path=$(mktemp /tmp/boot-path-XXXX) + boot_desc=$(mktemp /tmp/boot-desc-XXXX) + trap cleanup_workdir EXIT +} + +add_sonic_to_initramfs() { + # Add the logic to put second stage installer into bfb initramfs + mkdir -p debian + + j2 ${SDIR}/install.sh.j2 -o ./debian/install.sh -e SECURE_UPGRADE_MODE="$SECURE_UPGRADE_MODE" + chmod 0755 ./debian/install.sh + + # Copy the INSTALLER payload + cp $CDIR/$INSTALLER_PAYLOAD ./debian/ + +cat > scripts/initrd-install << EOF +#!/bin/bash + +printf_msg() +{ + echo "$@" | tee /dev/kmsg + return 0 +} + +depmod -a $KERNEL_VERSION > /dev/null 2>&1 +insmod /mlx-bootctl.ko +insmod /sdhci-of-dwcmshc.ko +insmod /sbsa_gwdt.ko +/usr/sbin/watchdog + +printf_msg "=================================" +printf_msg "Installing SONiC. Please wait..." +printf_msg "=================================" + +/bin/bash /debian/install.sh +if [ \$? -eq 0 ]; then + printf_msg "===================================" + printf_msg "Installation finished. Rebooting..." + printf_msg "===================================" + printf_msg + reboot -f +else + printf_msg "========================" + printf_msg "Failed to install SONiC" + printf_msg "========================" +fi +EOF + chmod +x scripts/initrd-install + sudo rm -f conf/conf.d/debian-core* + sudo sh -c 'echo "BOOT=initrd-install" > conf/conf.d/initrd_install' + sudo sh -c 'echo "ROOT=\"LABEL=writable\"" > conf/conf.d/default_root' +} + +copy_bin() +{ + from=$(realpath $1) + + if [ -e $from/$2 ]; then + bin=$2 + else + bin=$(sudo chroot $from bash -c "which $2 2> /dev/null") + fi + + echo "copy from" $from file: $bin + + if [ -h $from/$bin ]; then + if [[ $from == "/" ]]; then + tbin=`readlink -f $bin` + else + tbin=`readlink -f $from/$bin | sed -e "s~$from~~"` + fi + + if [ ! -e .$tbin ]; then + sudo mkdir -p .`dirname $tbin` + sudo cp $from/$tbin .$tbin + fi + + if [ ! -e .${bin} ]; then + sudo mkdir -p .`dirname $bin` + sudo cp -a $from/$bin .${bin} + fi + elif [ -e $from/$bin ]; then + sudo mkdir -p .`dirname $bin` + sudo cp -a $from/$bin .${bin} + else + echo "ERROR: Cannot find $2" + exit 1 + fi + + # Copy dependencies + for lib in `ldd $from/$bin 2> /dev/null | grep '=>' | awk '{print $3}'` + do + if [ -e .$lib ]; then + continue + fi + + sudo mkdir -p .`dirname $lib` + sudo cp -a $from/$lib .$lib + echo sudo cp -a $from/$lib .$lib + if [ -h $from/.$lib ]; then + if [[ $from == "/" ]]; then + tlib=`readlink -f $lib` + else + tlib=`readlink -f $from/$lib | sed -e "s~$from~~"` + fi + if [ ! -e .$tlib ]; then + sudo mkdir -p .`dirname $tlib` + sudo cp $from/$tlib .$tlib + fi + fi + done + } + +create_bfb_image() { + + pushd $WDIR + + # Copy the initrd into the work directory + initramfs=$(realpath $INITRD) + cp $initramfs $WDIR/dump-initramfs-v0 + initramfs=$WDIR/dump-initramfs-v0 + + case "$(file --brief --mime-type "$initramfs")" in + "application/x-lzma") + cat_initrd="lzcat" ;; + "application/x-lz4") + cat_initrd="lz4cat" ;; + "application/zstd") + cat_initrd="zstdcat" ;; + *) + cat_initrd="zcat" ;; + esac + + echo "Rebuilding $initramfs" + + mkdir -p ${WDIR}/initramfs + pushd initramfs + $cat_initrd "$initramfs" | cpio -i + + # Remove tools coming with busybox + for tool in `dpkg -L grub2-common` \ + `dpkg -L e2fsprogs` \ + `dpkg -L kmod | grep -v share` \ + `dpkg -L pciutils | grep -v share` \ + `dpkg -L usbutils | grep -v share` \ + `dpkg -L tar` \ + /usr/sbin/watchdog + do + if [ -d $tool ]; then + continue + fi + /bin/rm -f .${tool} + done + + for tool in `dpkg -L bfscripts | grep bin/` \ + `dpkg -L e2fsprogs | grep -v share` \ + `dpkg -L grub2-common` \ + `dpkg -L kmod | grep -v share` \ + `dpkg -L pciutils | grep -v share` \ + `dpkg -L usbutils | grep -v share` \ + `dpkg -L tar | grep -v share` \ + `dpkg -L grub-efi-arm64-bin` \ + `dpkg -L dmidecode | grep -v share` \ + xz efibootmgr bash getopt hexdump lspci perl \ + lsblk shutdown systemctl strings aarch64-linux-gnu-strings \ + mlxbf-bootctl id mkfs fsck watchdog dirname curl openssl + do + if [ -d $tool ]; then + continue + fi + copy_bin / $tool + done + + sudo depmod -a -b ./ $KERNEL_VERSION + mkdir -p usr/share/misc/ bin/ var/log/watchdog + sudo cp /etc/watchdog.conf etc + sudo cp /usr/share/misc/pci.ids usr/share/misc/ + cp $CHROOT_DIR/usr/share/misc/pci.ids usr/share/misc/ + cp $BOOTCTL_DRIVER . + cp $TMFIFO_DRIVER . + cp $SDHCI_OF_DWCMSHC_DRIVER . + cp $WATCHDOG . + mkdir -p ./secure-boot + cp -r $CDIR/$FILESYSTEM_ROOT/boot/* ./secure-boot + + mkdir -p ./lib/firmware/mellanox/boot/ + cp /lib/firmware/mellanox/boot/default.bfb ./lib/firmware/mellanox/boot/default.bfb + cp -a /lib/firmware/mellanox/boot/capsule ./lib/firmware/mellanox/boot/ + mkdir -p mnt dev sys proc + + add_sonic_to_initramfs + + # Make initramfs with new debian + find . -print0 | sudo cpio --null -o --format=newc | gzip -9 > "$initramfs" + + popd + + printf "$BF2_BOOT_ARGS initrd=initramfs" > \ + "$boot_args" + printf "$BF3_BOOT_ARGS initrd=initramfs" > \ + "$boot_args2" + + printf "VenHw(F019E406-8C9C-11E5-8797-001ACA00BFC4)/Image" > "$boot_path" + printf "Linux from rshim" > "$boot_desc" + vmlinuz=$WDIR/vmlinuz + cat $VMLINUZ > "$vmlinuz" + + $mkbfb --image "$vmlinuz" \ + --initramfs "$initramfs" \ + --capsule "$CAPSULE" \ + --boot-args-v0 "$boot_args" \ + --boot-args-v2 "$boot_args2" \ + --boot-path "$boot_path" \ + --boot-desc "$boot_desc" \ + ${BFB} ${DDIR}/${OUTPUT_BFB_IMAGE} + + echo "BFB is ready: $(readlink -f ${DDIR}/${OUTPUT_BFB_IMAGE})" + + popd +} + +main() { + echo $@ + parse_args $@ + . $CDIR/onie-image-arm64.conf + # Export ENV Variables for j2cli + CHROOT_DIR=$CDIR/$FILESYSTEM_ROOT + if [[ ! -d "$CHROOT_DIR" ]]; then + echo "[create_sonic_image] Error! Path to CHROOT not found" + exit 1 + fi + export GRUB_CFG=$(cat $SDIR/sonic-grub.cfg) + export IMAGE_VERSION=$(cat $CHROOT_DIR/etc/sonic/sonic_version.yml | grep "build_version" | sed -e "s/build_version: //g;s/'//g") + export BF2_BOOT_ARGS BF3_BOOT_ARGS BF2_GRUB_CFG BF3_GRUB_CFG INSTALLER_PAYLOAD FILESYSTEM_DOCKERFS DOCKERFS_DIR FILESYSTEM_SQUASHFS KERNEL_VERSION SECURE_UPGRADE_MODE SIGNING_KEY SIGNING_CERT + + INITRD=$CDIR/$FILESYSTEM_ROOT/boot/initrd.img-$KERNEL_VERSION + VMLINUZ=$CDIR/$FILESYSTEM_ROOT/boot/vmlinuz-$KERNEL_VERSION + MODULES_DIR=$CDIR/$FILESYSTEM_ROOT/lib/modules/$KERNEL_VERSION + WATCHDOG=$MODULES_DIR/kernel/drivers/watchdog/sbsa_gwdt.ko + BOOTCTL_DRIVER=$CHROOT_DIR/usr/lib/modules/$KERNEL_VERSION/extra/mlx-bootctl.ko + TMFIFO_DRIVER=$CHROOT_DIR/usr/lib/modules/$KERNEL_VERSION/extra/mlxbf-tmfifo.ko + SDHCI_OF_DWCMSHC_DRIVER=$CHROOT_DIR/usr/lib/modules/$KERNEL_VERSION/extra/sdhci-of-dwcmshc.ko + + validate_config + + create_workdir + echo "Work directory: $WDIR" + + create_bfb_image +} + +main $@ diff --git a/platform/nvidia-bluefield/installer/install.sh.j2 b/platform/nvidia-bluefield/installer/install.sh.j2 new file mode 100755 index 000000000000..e8167f4ab6d0 --- /dev/null +++ b/platform/nvidia-bluefield/installer/install.sh.j2 @@ -0,0 +1,390 @@ +# +# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +# Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#!/bin/bash + +# This script will run after being booted into a installer kernel +# This will setup the disk, grub etc for the actual SONiC to boot from + +# NOTE: Replace these flag at build time +IMAGE_VERSION="{{IMAGE_VERSION}}" +INSTALLER_PAYLOAD="{{INSTALLER_PAYLOAD}}" +FILESYSTEM_DOCKERFS="{{FILESYSTEM_DOCKERFS}}" +DOCKERFS_DIR="{{DOCKERFS_DIR}}" +FILESYSTEM_SQUASHFS="{{FILESYSTEM_SQUASHFS}}" +KERNEL_VERSION="{{KERNEL_VERSION}}" +BF2_GRUB_CFG="{{BF2_GRUB_CFG}}" +BF3_GRUB_CFG="{{BF3_GRUB_CFG}}" + +image_dir="image-$IMAGE_VERSION" +demo_volume_revision_label="SONiC-OS-${IMAGE_VERSION}" + +PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/mellanox/scripts" +CHROOT_PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +rshimlog=`which bfrshlog 2> /dev/null` +distro="SONiC" + +device_nvmv=/dev/nvme0n1 +device_emmc=/dev/mmcblk0 + +capsule=/lib/firmware/mellanox/boot/capsule/boot_update2.cap + +rshim_log() +{ + # Write a message to rshim. Rshim can handle only a limited number of bites. + # It should be used only for critical messages. + echo "INFO: $*" + if [ -n "$rshimlog" ]; then + $rshimlog "INFO: $*" + fi +} + +log() +{ + # Write message to serial concole + if [ -e /dev/ttyAMA0 ]; then + echo "INFO: $*" > /dev/ttyAMA0 + fi +} + +function_exists() +{ + declare -f -F "$1" > /dev/null + return $? +} + +# +# Check auto configuration passed from boot-fifo +# + +boot_fifo_path="/sys/bus/platform/devices/MLNXBF04:00/bootfifo" +if [ -e "${boot_fifo_path}" ]; then + cfg_file=$(mktemp) + # Get 16KB assuming it's big enough to hold the config file. + dd if=${boot_fifo_path} of=${cfg_file} bs=4096 count=4 + + # + # Check the .xz signature {0xFD, '7', 'z', 'X', 'Z', 0x00} and extract the + # config file from it. Then start decompression in the background. + # + offset=$(strings -a -t d ${cfg_file} | grep -m 1 "7zXZ" | awk '{print $1}') + if [ -s "${cfg_file}" -a ."${offset}" != ."1" ]; then + log "Found bf.cfg" + cat ${cfg_file} | tr -d '\0' > /etc/bf.cfg + fi + rm -f $cfg_file +fi + +if [ -e /etc/bf.cfg ]; then + . /etc/bf.cfg +fi + +ex() { + echo "Executing command: $@" > /dev/ttyAMA0 + + local rc=0 + $@ 2>&1 > /dev/ttyAMA0 + rc=$? + + if [[ $rc -ne 0 ]]; then + echo "RC: $rc" > /dev/ttyAMA0 + fi +} + +if (lspci -n -d 15b3: | grep -wq 'a2dc'); then + module=BF3 + if [[ $DHCP_CLASS_ID != "" ]]; then + DHCP_CLASS_ID="BF3Client" + fi +else + module=BF2 + if [[ $DHCP_CLASS_ID != "" ]]; then + DHCP_CLASS_ID="BF2Client" + fi +fi + +log "$distro installation started on $module module" + +default_device_label="SONiC-OS" + +device_label=${device_label:-$default_device_label} + +if [[ $module == "BF3" ]]; then + default_device=$device_nvmv + if [[ $(blkid -L $device_label) =~ ${device_emmc} ]] && [[ -b ${device_emmc}p1 ]]; then + # Delete EFi boot partition on eMMC device. This is required to migrate to NVME device and boot from NVME correctly + sfdisk --force ${device_emmc} --delete 1 + fi +else + default_device=$device_emmc +fi + +device=${device:-$default_device} + +log "Using $device device and $device_label device label" + +# We cannot use wait-for-root as it expects the device to contain a +# known filesystem, which might not be the case here. +while [ ! -b $device ]; do + log "Waiting for $device to be ready" + sleep 1 +done + +# Flash image +bs=512 +reserved=34 +boot_size_megs=50 +mega=$((2**20)) +boot_size_bytes=$(($boot_size_megs * $mega)) + +disk_sectors=`fdisk -l $device | grep "Disk $device:" | awk '{print $7}'` +disk_end=$((disk_sectors - reserved)) +boot_start=2048 +boot_size=$(($boot_size_bytes/$bs)) +root_start=$((2048 + $boot_size)) +root_end=$disk_end +root_size=$(($root_end - $root_start + 1)) + +dd if=/dev/zero of="$device" bs="$bs" count=1 +sfdisk -f "$device" << EOF +label: gpt +label-id: A2DF9E70-6329-4679-9C1F-1DAF38AE25AE +device: ${device} +unit: sectors +first-lba: $reserved +last-lba: $disk_end + +${device}p1 : start=$boot_start, size=$boot_size, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=CEAEF8AC-B559-4D83-ACB1-A4F45B26E7F0, name="EFI System", bootable +${device}p2 : start=$root_start ,size=$root_size, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=F093FF4B-CC26-408F-81F5-FF2DD6AE139F, name=$device_label +EOF +sync + +# Refresh partition table +ex blockdev --rereadpt ${device} + +if function_exists bfb_pre_install; then + log "Running bfb_pre_install from bf.cfg" + bfb_pre_install +fi + +# Generate some entropy +ex mke2fs -F ${device}p2 +ex mkdosfs ${device}p1 -n "system-boot" +ex mkfs.ext4 -F ${device}p2 -L $device_label +ex fsck.vfat -a ${device}p1 +mkdir -p /mnt +ex mount -t ext4 ${device}p2 /mnt +mkdir -p /mnt/boot/efi +ex mount -t vfat ${device}p1 /mnt/boot/efi +log "Extracting SONiC files" + +mkdir -p /mnt/$image_dir + +# Extract the INSTALLER_PAYLOAD to the $image_dir +export EXTRACT_UNSAFE_SYMLINKS=1 +ex unzip -o /debian/$INSTALLER_PAYLOAD -x $FILESYSTEM_DOCKERFS "platform.tar.gz" -d /mnt/$image_dir +mkdir -p /mnt/$image_dir/$DOCKERFS_DIR +unzip -op /debian/$INSTALLER_PAYLOAD "$FILESYSTEM_DOCKERFS" | tar xz --warning=no-timestamp -f - -C /mnt/$image_dir/$DOCKERFS_DIR + +mkdir -p /mnt/$image_dir/platform +unzip -op /debian/$INSTALLER_PAYLOAD "platform.tar.gz" | tar xz --warning=no-timestamp -f - -C /mnt/$image_dir/platform + +platform=$(dmidecode -t 4 | grep "Part Number" | awk '{split($NF,a,"-"); print tolower(a[1])}') +platform=arm64-nvda_bf-$platform + +# Copy in the machine.conf file +cat < /mnt/machine.conf +onie_arch=arm64 +onie_platform=$platform +EOF + +chmod a+r /mnt/machine.conf + +sync +{% if SECURE_UPGRADE_MODE in ['dev', 'prod'] %} +demo_volume_label="SONiC-OS" +log "creating demo_volume_label=$demo_volume_label dir under EFI partition to include all boot related modules" +mkdir -p /mnt/boot/efi/EFI/$demo_volume_label + +if [ ! -f /secure-boot/mmaa64.efi ]; then + echo "ERROR: /secure-boot/mmaa64.efi file does not exist" + exit 1 +fi + +if [ ! -f /secure-boot/shimaa64.efi ]; then + echo "ERROR: /secure-boot/shimaa64.efi file does not exist" + exit 1 +fi + +if [ ! -f /secure-boot/grubaa64.efi ]; then + echo "ERROR: /secure-boot/grubaa64.efi file does not exist" + exit 1 +fi + +log "copying signed shim, mm, grub, grub.cfg from /secure-boot to /boot/efi/EFI/$demo_volume_label directory" +MNT_DIR="/mnt/boot/efi/EFI/$demo_volume_label" +cp /secure-boot/shimaa64.efi $MNT_DIR +cp /secure-boot/grubaa64.efi $MNT_DIR +cp /secure-boot/mmaa64.efi $MNT_DIR +{% else %} +log "Installing GRUB" +{% endif %} +# Create a minimal grub.cfg that allows for: +# - configure the serial console +# - allows for grub-reboot to work +# - a menu entry for the DEMO OS + +grub_cfg=$(mktemp) + +# Modify GRUB_CMDLINE_LINUX from bf.cfg file if required + +if [[ $module == "BF3" ]]; then + DEFAULT_GRUB_CMDLINE_LINUX=$BF3_GRUB_CFG +else + DEFAULT_GRUB_CMDLINE_LINUX=$BF2_GRUB_CFG +fi + +GRUB_CMDLINE_LINUX=${GRUB_CMDLINE_LINUX:-"$DEFAULT_GRUB_CMDLINE_LINUX"} +export GRUB_CMDLINE_LINUX + +# Add a menu entry for the SONiC OS +# Note: assume that apparmor is supported in the kernel +demo_grub_entry="$demo_volume_revision_label" + +# Find the grub_cfg_root +uuid=$(blkid ${device}p2 | sed -ne 's/.* UUID=\"\([^"]*\)\".*/\1/p') +if [ -z "$uuid" ]; then + grub_cfg_root=${device}p2 +else + grub_cfg_root=UUID=$uuid +fi + +cat <> $grub_cfg +{{GRUB_CFG}} +EOF + +# Copy the grub.cfg onto the boot-directory as specified in the grub-install +{% if SECURE_UPGRADE_MODE in ['dev', 'prod'] %} +ex cp $grub_cfg /mnt/boot/efi/EFI/$demo_volume_label/grub.cfg +ex mkdir -p /mnt/grub +ex cp $grub_cfg /mnt/grub/grub.cfg +{% else %} +ex mkdir -p /mnt/grub +ex cp $grub_cfg /mnt/grub/grub.cfg + +{% endif %} +sync + +log "GRUB CFG Updated" + +# Update HW-dependant files + +umount /mnt/boot/efi +umount /mnt + +ex blockdev --rereadpt ${device} + +ex fsck.vfat -a ${device}p1 +sync + +if function_exists bfb_pre_bootmgr_update; then + log "Running bfb_pre_bootmgr_update from bf.cfg" + bfb_pre_bootmgr_update +fi + +if [ -e ${capsule} ]; then + log "Update capsule: ${capsule}" + ex bfrec --capsule ${capsule} +fi + +log "Updating EFIBootMgr" + +if [ ! -d /sys/firmware/efi/efivars ]; then + ex mount -t efivarfs none /sys/firmware/efi/efivars +fi + +# Cleanup boot partition +ex bfbootmgr --cleanall +ex rm -f /sys/firmware/efi/efivars/Boot* +ex rm -f /sys/firmware/efi/efivars/dump-* + +# If any of the following commands fail or the image is not booting after the installation check if efivars driver is available and loaded +if [[ $(which grub-install) != "" ]]; then + log "Installing grub with grub-install utility" + + ex mount ${device}p2 /mnt/ + ex mount ${device}p1 /mnt/boot/efi/ + ex grub-install ${device}p1 --bootloader-id=$device_label --locale-directory=/mnt/usr/share/locale --efi-directory=/mnt/boot/efi/ --boot-directory=/mnt/ + ex umount /mnt/boot/efi + ex umount /mnt +else + log "Updating bootmgr with efibootmgr utility" + + if efibootmgr | grep $device_label; then + ex efibootmgr --delete-bootnum -b "$(efibootmgr | grep $device_label | cut -c 5-8)" + fi + ex efibootmgr -c -d "$device" -p 1 -L $device_label -l "\EFI\\$device_label\grubaa64.efi" +fi +{% if SECURE_UPGRADE_MODE in ['dev', 'prod'] %} +uefi_part=1 +ex efibootmgr --create \ + --label "$demo_volume_label" \ + --disk "$device" --part $uefi_part \ + --loader "\EFI\$demo_volume_label\shimaa64.efi" || { + echo "ERROR: efibootmgr failed to create new boot variable on: $device" + exit 1 +} +echo "uefi_shim: Secure Boot components installed successfully" +{% endif %} +BFCFG=`which bfcfg 2> /dev/null` +if [ -n "$BFCFG" ]; then + # Create PXE boot entries + # Not adding CX ifaces because presumably they'll not be used for PXE + if [ -e /etc/bf.cfg ]; then + mv /etc/bf.cfg /etc/bf.cfg.orig + fi + + cat > /etc/bf.cfg << EOF +BOOT0=DISK +BOOT1=NET-OOB-IPV4 +BOOT2=NET-OOB-IPV6 +BOOT3=NET-RSHIM-IPV4 +BOOT4=NET-RSHIM-IPV6 +PXE_DHCP_CLASS_ID=$DHCP_CLASS_ID +EOF + + ex $BFCFG + + # Restore the original bf.cfg + /bin/rm -f /etc/bf.cfg + if [ -e /etc/bf.cfg.orig ]; then + mv /etc/bf.cfg.orig /etc/bf.cfg + fi +fi + +if [ -n "$BFCFG" ]; then + ex $BFCFG +fi + +if function_exists bfb_post_install; then + ex bfb_post_install +fi + +rshim_log "Installation finished" +rshim_log "Rebooting..." +# Wait for these messages to be pulled by the rshim service +sleep 3 diff --git a/platform/nvidia-bluefield/installer/sonic-grub.cfg b/platform/nvidia-bluefield/installer/sonic-grub.cfg new file mode 100644 index 000000000000..59b037b5abf1 --- /dev/null +++ b/platform/nvidia-bluefield/installer/sonic-grub.cfg @@ -0,0 +1,27 @@ +set timeout=5 + +if [ -s \$prefix/grubenv ]; then + load_env +fi +if [ "\${saved_entry}" ]; then + set default="\${saved_entry}" +fi +if [ "\${next_entry}" ]; then + set default="\${next_entry}" + unset next_entry + save_env next_entry +fi + +menuentry '$demo_grub_entry' { + insmod gzio + insmod part_gpt + insmod ext2 + search --no-floppy --label --set=root $device_label + if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi + echo 'Loading SONiC-OS Kernel' + linux /$image_dir/boot/vmlinuz-$KERNEL_VERSION root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX fixrtc \ + loop=$image_dir/$FILESYSTEM_SQUASHFS loopfstype=squashfs systemd.unified_cgroup_hierarchy=0 \ + apparmor=1 security=apparmor varlog_size=4096 systemd.unified_cgroup_hierarchy=0 + echo 'Loading SONiC-OS initial ramdisk ...' + initrd /$image_dir/boot/initrd.img-$KERNEL_VERSION +} diff --git a/platform/nvidia-bluefield/recipes/installer-image.dep b/platform/nvidia-bluefield/recipes/installer-image.dep index 74214c6485a4..43a4d4e1f856 100644 --- a/platform/nvidia-bluefield/recipes/installer-image.dep +++ b/platform/nvidia-bluefield/recipes/installer-image.dep @@ -1,5 +1,4 @@ # DPKG FRK -(SONIC_BF_IMAGE_PXE)_CACHE_MODE := none (SONIC_BF_IMAGE_BIN)_CACHE_MODE := none (SONIC_BF_IMAGE_BFB)_CACHE_MODE := none diff --git a/platform/nvidia-bluefield/recipes/installer-image.mk b/platform/nvidia-bluefield/recipes/installer-image.mk index e87fcb03d98d..08592bcd30e7 100644 --- a/platform/nvidia-bluefield/recipes/installer-image.mk +++ b/platform/nvidia-bluefield/recipes/installer-image.mk @@ -58,17 +58,6 @@ $(foreach feature, $(DISABLED_FEATURE_FLAGS), $(eval override $(feature)=n )) $(SONIC_BF_IMAGE_BASE)_DOCKERS = $(filter-out $(DISABLED_DOCKERS), $(SONIC_INSTALL_DOCKER_IMAGES)) $(SONIC_BF_IMAGE_BASE)_FILES = $(BF_FW_FILES) -# A compressed archive which contains individual files required for PXE boot -# A BFB image is also generated as a by-product of PXE image generation -SONIC_BF_IMAGE_PXE = $(SONIC_BF_IMAGE_BASE).tar.gz -$(SONIC_BF_IMAGE_PXE)_IMAGE_TYPE = pxe -$(SONIC_BF_IMAGE_PXE)_MACHINE = $($(SONIC_BF_IMAGE_BASE)_MACHINE) -$(SONIC_BF_IMAGE_PXE)_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_INSTALLS) -$(SONIC_BF_IMAGE_PXE)_DEPENDS += $($(SONIC_BF_IMAGE_BASE)_DEPENDS) -$(SONIC_BF_IMAGE_PXE)_DOCKERS += $($(SONIC_BF_IMAGE_BASE)_DOCKERS) -$(SONIC_BF_IMAGE_PXE)_LAZY_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_LAZY_INSTALLS) -$(SONIC_BF_IMAGE_PXE)_FILES += $($(SONIC_BF_IMAGE_BASE)_FILES) - # The traditional *.bin image. Works for sonic-sonic upgrade. SONIC_BF_IMAGE_BIN = $(SONIC_BF_IMAGE_BASE).bin $(SONIC_BF_IMAGE_BIN)_IMAGE_TYPE = onie @@ -89,4 +78,4 @@ $(SONIC_BF_IMAGE_BFB)_DOCKERS += $($(SONIC_BF_IMAGE_BASE)_DOCKERS) $(SONIC_BF_IMAGE_BFB)_LAZY_INSTALLS += $($(SONIC_BF_IMAGE_BASE)_LAZY_INSTALLS) $(SONIC_BF_IMAGE_BFB)_FILES += $($(SONIC_BF_IMAGE_BASE)_FILES) -SONIC_INSTALLERS += $(SONIC_BF_IMAGE_PXE) $(SONIC_BF_IMAGE_BIN) $(SONIC_BF_IMAGE_BFB) +SONIC_INSTALLERS += $(SONIC_BF_IMAGE_BIN) $(SONIC_BF_IMAGE_BFB) From b87521d59ff6c81470c851d5ccc90a5f4c6a7fc2 Mon Sep 17 00:00:00 2001 From: Yakiv Huryk <62013282+Yakiv-Huryk@users.noreply.github.com> Date: Thu, 11 Jul 2024 20:22:14 +0300 Subject: [PATCH 25/38] [nvidia-bluefield] add arm64-nvda_bf-bf3comdpu platform (#19408) - Why I did it To add support for the arm64-nvda_bf-bf3comdpu platform - How I did it Added arm64-nvda_bf-bf3comdpu directory to the devices Signed-off-by: Yakiv Huryk --- .../Nvidia-bf3-com-dpu/hwsku.json | 9 ++++ .../Nvidia-bf3-com-dpu/port_config.ini | 18 +++++++ .../Nvidia-bf3-com-dpu/sai.profile | 5 ++ .../arm64-nvda_bf-bf3comdpu/default_sku | 1 + .../arm64-nvda_bf-bf3comdpu/installer.conf | 2 + .../arm64-nvda_bf-bf3comdpu/pcie.yaml | 47 +++++++++++++++++++ .../arm64-nvda_bf-bf3comdpu/platform.json | 21 +++++++++ .../arm64-nvda_bf-bf3comdpu/platform_asic | 1 + .../plugins/ssd_util.py | 10 ++++ .../pmon_daemon_control.json | 7 +++ .../system_health_monitoring_config.json | 6 +++ 11 files changed, 127 insertions(+) create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/hwsku.json create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/port_config.ini create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/sai.profile create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/default_sku create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/installer.conf create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pcie.yaml create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/platform.json create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/platform_asic create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/plugins/ssd_util.py create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pmon_daemon_control.json create mode 100644 device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/system_health_monitoring_config.json diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/hwsku.json b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/hwsku.json new file mode 100644 index 000000000000..a0f9dda6b250 --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/hwsku.json @@ -0,0 +1,9 @@ +{ + "interfaces": { + "Ethernet0": { + "default_brkout_mode": "1x400G", + "autoneg": "on", + "role": "Dpc" + } + } +} diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/port_config.ini b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/port_config.ini new file mode 100644 index 000000000000..6cfe733cb65f --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/port_config.ini @@ -0,0 +1,18 @@ +## +## Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +## Apache-2.0 +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +# name lanes alias index +Ethernet0 0,1,2,3 etp1 1 diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/sai.profile b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/sai.profile new file mode 100644 index 000000000000..d86d58acb003 --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/Nvidia-bf3-com-dpu/sai.profile @@ -0,0 +1,5 @@ +SAI_DUMP_STORE_PATH=/var/log/bluefield/sdk-dumps +SAI_DUMP_STORE_AMOUNT=10 +DASH_ACL_DEFAULT_RULE_ACTION=permit +PORT_LAYOUT=1x400G +HAIRPIN=false diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/default_sku b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/default_sku new file mode 100644 index 000000000000..41bda2fe9583 --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/default_sku @@ -0,0 +1 @@ +Nvidia-bf3-com-dpu appliance diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/installer.conf b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/installer.conf new file mode 100644 index 000000000000..66c2a99a31e4 --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/installer.conf @@ -0,0 +1,2 @@ +GRUB_CMDLINE_LINUX="console=ttyAMA1 console=hvc0 console=ttyAMA0 earlycon=pl011,0x13010000 quiet" +ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="isolcpus=1-13 nohz_full=1-13 rcu_nocbs=1-13" diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pcie.yaml b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pcie.yaml new file mode 100644 index 000000000000..bb2a783fe2bc --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pcie.yaml @@ -0,0 +1,47 @@ +- bus: '00' + dev: '00' + fn: '0' + id: a2da + name: 'PCI bridge: Mellanox Technologies MT43244 BlueField-3 SoC Crypto enabled + (rev 01)' +- bus: '01' + dev: '00' + fn: '0' + id: 197b + name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] + (rev 01)' +- bus: '02' + dev: '00' + fn: '0' + id: 197b + name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] + (rev 01)' +- bus: '02' + dev: '03' + fn: '0' + id: 197b + name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] + (rev 01)' +- bus: '03' + dev: '00' + fn: '0' + id: a2dc + name: 'Ethernet controller: Mellanox Technologies MT43244 BlueField-3 integrated + ConnectX-7 network controller (rev 01)' +- bus: '04' + dev: '00' + fn: '0' + id: 197b + name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] + (rev 01)' +- bus: '05' + dev: '00' + fn: '0' + id: 197b + name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] + (rev 01)' +- bus: '06' + dev: '00' + fn: '0' + id: '5765' + name: 'Non-Volatile memory controller: Device 1f9f:5765 (rev 01)' diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/platform.json b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/platform.json new file mode 100644 index 000000000000..b50809fd4225 --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/platform.json @@ -0,0 +1,21 @@ +{ + "chassis": { + "name": "Nvidia-bf3-com-dpu", + "components": [], + "fans": [], + "fan_drawers": [], + "psus": [], + "thermals": [], + "sfps": [] + }, + "interfaces": { + "Ethernet0": { + "index": "1,1,1,1", + "lanes": "0,1,2,3", + "breakout_modes": { + "1x400G": ["etp1"] + } + } + }, + "DPU": {} +} diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/platform_asic b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/platform_asic new file mode 100644 index 000000000000..ce453ec804ad --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/platform_asic @@ -0,0 +1 @@ +nvidia-bluefield diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/plugins/ssd_util.py b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/plugins/ssd_util.py new file mode 100644 index 000000000000..22a6f3eca14f --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/plugins/ssd_util.py @@ -0,0 +1,10 @@ + +import os + +from sonic_platform_base.sonic_storage.emmc import EmmcUtil +from sonic_platform_base.sonic_storage.ssd import SsdUtil as SsdUtilDefault + +def SsdUtil(diskdev): + if os.path.basename(diskdev).startswith('mmcblk'): + return EmmcUtil(diskdev) + return SsdUtilDefault(diskdev) diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pmon_daemon_control.json b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pmon_daemon_control.json new file mode 100644 index 000000000000..86f807221ef5 --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/pmon_daemon_control.json @@ -0,0 +1,7 @@ +{ + "skip_ledd": true, + "skip_psud": true, + "skip_fancontrol": true, + "skip_chassisd": true, + "skip_ycabled": true +} diff --git a/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/system_health_monitoring_config.json b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/system_health_monitoring_config.json new file mode 100644 index 000000000000..fff1c7ca7492 --- /dev/null +++ b/device/nvidia-bluefield/arm64-nvda_bf-bf3comdpu/system_health_monitoring_config.json @@ -0,0 +1,6 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": ["psu", "fan"], + "user_defined_checkers": [], + "polling_interval": 60 +} From 990a72546e9dc8db0c846b2b515aa1cb768a146b Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Thu, 11 Jul 2024 16:14:58 -0700 Subject: [PATCH 26/38] Enable iburst option for NTP servers loaded from minigraph (#19424) Why I did it In #15058, the NTP server configuration was modified to add additional options, such as conditionally enabling iburst, specifying the association type, and specifying the NTP version. One side effect of this was that the iburst option which was previously always enabled now requires it to be explicitly enabled in the config_db. Fixes #19425. How I did it To restore the old behavior, when loading from minigraph, add "iburst": "true" for each NTP server loaded from minigraph. How to verify it Tested on a KVM setup, verified that the generated ntp.conf file had the iburst option. Signed-off-by: Saikrishna Arcot --- src/sonic-config-engine/minigraph.py | 2 +- src/sonic-config-engine/tests/test_cfggen.py | 2 +- src/sonic-config-engine/tests/test_chassis_cfggen.py | 8 ++++---- src/sonic-config-engine/tests/test_minigraph_case.py | 2 +- src/sonic-config-engine/tests/test_multinpu_cfggen.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index b2e87aa0597e..ca34726d56cf 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -2612,7 +2612,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw results['SYSLOG_SERVER'] = dict((item, {}) for item in syslog_servers) results['DHCP_SERVER'] = dict((item, {}) for item in dhcp_servers) results['DHCP_RELAY'] = dhcp_relay_table - results['NTP_SERVER'] = dict((item, {}) for item in ntp_servers) + results['NTP_SERVER'] = dict((item, {'iburst': 'on'}) for item in ntp_servers) # Set default DNS nameserver from dns.j2 results['DNS_NAMESERVER'] = {} if os.environ.get("CFGGEN_UNIT_TESTING", "0") == "2": diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 6126522bb6dd..19e0af5cd4dd 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -696,7 +696,7 @@ def test_metadata_tacacs(self): def test_metadata_ntp(self): argument = ['-m', self.sample_graph_metadata, '-p', self.port_config, '-v', "NTP_SERVER"] output = self.run_script(argument) - self.assertEqual(utils.to_dict(output.strip()), utils.to_dict("{'10.0.10.1': {}, '10.0.10.2': {}}")) + self.assertEqual(utils.to_dict(output.strip()), utils.to_dict("{'10.0.10.1': {'iburst': 'on'}, '10.0.10.2': {'iburst': 'on'}}")) def test_dns_nameserver(self): argument = ['-m', self.sample_graph_metadata, '-p', self.port_config, '-v', "DNS_NAMESERVER"] diff --git a/src/sonic-config-engine/tests/test_chassis_cfggen.py b/src/sonic-config-engine/tests/test_chassis_cfggen.py index a2be6ed6b8ce..c5f1e148e9f1 100644 --- a/src/sonic-config-engine/tests/test_chassis_cfggen.py +++ b/src/sonic-config-engine/tests/test_chassis_cfggen.py @@ -104,7 +104,7 @@ def test_ntp(self): argument = ['-m', self.sample_graph, '-p', self.sample_port_config, '--var-json', 'NTP_SERVER'] output = json.loads(self.run_script(argument)) - self.assertDictEqual(output, {'17.39.1.130': {}, '17.39.1.129': {}}) + self.assertDictEqual(output, {'17.39.1.130': {'iburst': 'on'}, '17.39.1.129': {'iburst': 'on'}}) # NTP data is present only in the host config argument = ['-m', self.sample_graph, '--var-json', 'NTP_SERVER'] @@ -416,7 +416,7 @@ def test_ntp(self): argument = ['-m', self.sample_graph, '-p', self.sample_port_config, '--var-json', 'NTP_SERVER'] output = json.loads(self.run_script(argument)) - self.assertDictEqual(output, {'17.39.1.130': {}, '17.39.1.129': {}}) + self.assertDictEqual(output, {'17.39.1.130': {'iburst': 'on'}, '17.39.1.129': {'iburst': 'on'}}) # NTP data is present only in the host config argument = ['-m', self.sample_graph, '--var-json', 'NTP_SERVER'] @@ -884,7 +884,7 @@ def test_ntp(self): '--var-json', 'NTP_SERVER' ] output = json.loads(self.run_script(argument)) - self.assertDictEqual(output, {'17.39.1.130': {}, '17.39.1.129': {}}) + self.assertDictEqual(output, {'17.39.1.130': {'iburst': 'on'}, '17.39.1.129': {'iburst': 'on'}}) def test_mgmt_port(self): @@ -1019,7 +1019,7 @@ def test_ntp(self): '--var-json', 'NTP_SERVER' ] output = json.loads(self.run_script(argument)) - self.assertDictEqual(output, {'17.39.1.130': {}, '17.39.1.129': {}}) + self.assertDictEqual(output, {'17.39.1.130': {'iburst': 'on'}, '17.39.1.129': {'iburst': 'on'}}) # NTP data is present only in the host config argument = ['-m', self.sample_graph, '--var-json', 'NTP_SERVER'] diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index a5578b841df4..9e19fbdaeaff 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -283,7 +283,7 @@ def test_minigraph_mgmt_port(self): def test_metadata_ntp(self): argument = ['-m', self.sample_graph, '-p', self.port_config, '-v', "NTP_SERVER"] output = self.run_script(argument) - self.assertEqual(output.strip(), "{'10.0.10.1': {}, '10.0.10.2': {}}") + self.assertEqual(output.strip(), "{'10.0.10.1': {'iburst': 'on'}, '10.0.10.2': {'iburst': 'on'}}") def test_minigraph_vnet(self): argument = ['-m', self.sample_graph, '-p', self.port_config, '-v', "VNET"] diff --git a/src/sonic-config-engine/tests/test_multinpu_cfggen.py b/src/sonic-config-engine/tests/test_multinpu_cfggen.py index bba0adeae752..5f7646f48f1c 100644 --- a/src/sonic-config-engine/tests/test_multinpu_cfggen.py +++ b/src/sonic-config-engine/tests/test_multinpu_cfggen.py @@ -151,7 +151,7 @@ def test_metadata_tacacs(self): def test_metadata_ntp(self): argument = ['-m', self.sample_graph, '-p', self.sample_port_config, '--var-json', "NTP_SERVER"] output = json.loads(self.run_script(argument)) - self.assertDictEqual(output, {'17.39.1.130': {}, '17.39.1.129': {}}) + self.assertDictEqual(output, {'17.39.1.130': {'iburst': 'on'}, '17.39.1.129': {'iburst': 'on'}}) #NTP data is present only in the host config argument = ['-m', self.sample_graph, '--var-json', "NTP_SERVER"] for asic in range(NUM_ASIC): From ecb1d1e82ed0ed778e9d03e1ec5cb38a1ad5f08c Mon Sep 17 00:00:00 2001 From: fountzou <169114916+fountzou@users.noreply.github.com> Date: Fri, 12 Jul 2024 04:09:58 +0300 Subject: [PATCH 27/38] Reliable TSA: Addressing review comments to use SpineRouter in checks instead of 'voq' and fix few echo msgs. (#19527) use 'SpineRouter' in checks instead of 'voq' and fix few echo msgs. Signed-off-by: fountzou --- dockers/docker-fpm-frr/base_image_files/TS | 4 ++-- dockers/docker-fpm-frr/base_image_files/TSA | 2 +- dockers/docker-fpm-frr/base_image_files/TSB | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dockers/docker-fpm-frr/base_image_files/TS b/dockers/docker-fpm-frr/base_image_files/TS index 0084bd5f27bd..fb1c077cb371 100755 --- a/dockers/docker-fpm-frr/base_image_files/TS +++ b/dockers/docker-fpm-frr/base_image_files/TS @@ -4,10 +4,10 @@ [ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`} -switch_type=`sonic-db-cli CONFIG_DB hget 'DEVICE_METADATA|localhost' 'switch_type'` +type=`sonic-db-cli CONFIG_DB hget 'DEVICE_METADATA|localhost' 'type'` TSA_CHASSIS_STATE=false -if [[ $switch_type == 'voq' ]]; then +if [[ $type == *"SpineRouter"* ]]; then TSA_CHASSIS_STATE="$(sonic-db-cli CHASSIS_APP_DB HGET "BGP_DEVICE_GLOBAL|STATE" tsa_enabled)" fi diff --git a/dockers/docker-fpm-frr/base_image_files/TSA b/dockers/docker-fpm-frr/base_image_files/TSA index 2cd29e92afb1..beeb86819f67 100755 --- a/dockers/docker-fpm-frr/base_image_files/TSA +++ b/dockers/docker-fpm-frr/base_image_files/TSA @@ -19,7 +19,7 @@ if [ -f /etc/sonic/chassisdb.conf ]; then echo "Chassis Mode: Normal -> Maintenance" logger -t TSA -p user.info "Chassis Mode: Normal -> Maintenance" fi - echo "Please execute \"rexec all -c 'sudo config save -y'\" to preserve System mode in Maintenance after reboot\ + echo "Please execute 'sudo config save' to preserve System mode in Maintenance after reboot\ or config reload on all linecards" exit 0 fi diff --git a/dockers/docker-fpm-frr/base_image_files/TSB b/dockers/docker-fpm-frr/base_image_files/TSB index c09126e1d12d..36c69843b1b3 100755 --- a/dockers/docker-fpm-frr/base_image_files/TSB +++ b/dockers/docker-fpm-frr/base_image_files/TSB @@ -19,7 +19,7 @@ if [ -f /etc/sonic/chassisdb.conf ]; then echo "Chassis Mode: Maintenance -> Normal" logger -t TSB -p user.info "Chassis Mode: Maintenance -> Normal" fi - echo "Please execute \"rexec all -c 'sudo config save -y'\" to preserve System mode in Normal state after reboot\ + echo "Please execute 'sudo config save' to preserve System mode in Normal state after reboot\ or config reload on all linecards" exit 0 fi From 287500285cde1d6276a80651241f64a3a725bee9 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:01:29 +0800 Subject: [PATCH 28/38] [submodule] Update submodule sonic-host-services to the latest HEAD automatically (#19415) #### Why I did it src/sonic-host-services ``` * 02d9b55 - (HEAD -> master, origin/master, origin/HEAD) Added support to render template format of `delayed` flag on Feature Table. (#135) (28 hours ago) [abdosi] * 60fdfea - Fixed determine/process reboot-cause service dependency (#17406) (#132) (13 days ago) [anamehra] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-host-services | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-host-services b/src/sonic-host-services index 37c24a935420..02d9b55c2939 160000 --- a/src/sonic-host-services +++ b/src/sonic-host-services @@ -1 +1 @@ -Subproject commit 37c24a9354200e147ed2aaf3dccb11d65d4f24ec +Subproject commit 02d9b55c29394510cdab9725bbbdbf3e9ae2cadf From a5aee14653c200b66fca8b7c4c55feb126176048 Mon Sep 17 00:00:00 2001 From: Yutong Zhang <90831468+yutongzhang-microsoft@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:03:22 +0800 Subject: [PATCH 29/38] Add onboarding dualtor PR checker (#19503) In this PR, we add a new PR checker called onboarding dualtor. This new PR checker is for onboarding dualtor speific test scripts. --- azure-pipelines.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 966ebc551a17..b72aa967cc2e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -295,6 +295,23 @@ stages: MGMT_BRANCH: $(BUILD_BRANCH) TEST_SET: onboarding_t1 + - job: onboarding_elastictest_dualtor + displayName: "onboarding dualtor testcases by Elastictest - optional" + timeoutInMinutes: 240 + continueOnError: true + pool: sonic-ubuntu-1c + steps: + - template: .azure-pipelines/run-test-elastictest-template.yml@sonic-mgmt + parameters: + TOPOLOGY: dualtor + STOP_ON_FAILURE: "False" + RETRY_TIMES: 0 + MIN_WORKER: $(T0_DUALTOR_INSTANCE_NUM) + MAX_WORKER: $(T0_DUALTOR_INSTANCE_NUM) + KVM_IMAGE_BRANCH: $(BUILD_BRANCH) + MGMT_BRANCH: $(BUILD_BRANCH) + TEST_SET: onboarding_dualtor + # - job: wan_elastictest # displayName: "kvmtest-wan by Elastictest" # pool: sonic-ubuntu-1c From 4397a85564f0991339536a7ce15dd00743df999b Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com> Date: Fri, 12 Jul 2024 07:47:44 +0300 Subject: [PATCH 30/38] Revert suppress FIB pending feature (#19027) Why I did it Revert BGP suppress FIB pending due to unresolved FRR issues in current version Work item tracking Microsoft ADO (number only): How I did it Revert it How to verify it Build and run --- .../docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 | 1 - .../frr/supervisord/supervisord.conf.j2 | 2 +- .../vs/docker-sonic-vs/supervisord.conf.j2 | 2 +- src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py | 5 ++-- .../data/sonic-cfggen/bgpd.conf.j2/all.conf | 1 - .../sonic-cfggen/bgpd.main.conf.j2/all.conf | 1 - .../sonic-cfggen/bgpd.main.conf.j2/base.conf | 1 - .../bgpd.main.conf.j2/defaults.conf | 1 - .../bgpd.main.conf.j2/defaults_router_id.conf | 1 - .../bgpd.main.conf.j2/ipv6_lo.conf | 1 - .../bgpd.main.conf.j2/lo0_ipv6_only.conf | 1 - .../lo0_ipv6_only_router_id.conf | 1 - .../bgpd.main.conf.j2/packet_chassis.conf | 1 - .../packet_chassis_ipv6_lo4096.conf | 1 - .../packet_chassis_ipv6_lo4096_router_id.conf | 1 - .../packet_chassis_router_id.conf | 1 - .../bgpd.main.conf.j2/voq_chassis.conf | 1 - .../data/sonic-cfggen/frr.conf.j2/all.conf | 1 - src/sonic-config-engine/minigraph.py | 5 ---- .../tests/sample_output/py2/bgpd_frr.conf | 1 - .../py2/bgpd_frr_backend_asic.conf | 1 - .../sample_output/py2/bgpd_frr_dualtor.conf | 1 - .../py2/bgpd_frr_frontend_asic.conf | 1 - .../tests/sample_output/py2/frr.conf | 1 - .../sample_output/py2/t2-chassis-fe-bgpd.conf | 1 - .../tests/sample_output/py3/bgpd_frr.conf | 1 - .../py3/bgpd_frr_backend_asic.conf | 1 - .../sample_output/py3/bgpd_frr_dualtor.conf | 1 - .../py3/bgpd_frr_frontend_asic.conf | 1 - .../tests/sample_output/py3/frr.conf | 1 - .../sample_output/py3/t2-chassis-fe-bgpd.conf | 1 - .../tests/device_metadata.json | 10 ------- .../tests_config/device_metadata.json | 30 ------------------- .../yang-models/sonic-device_metadata.yang | 12 -------- 34 files changed, 4 insertions(+), 89 deletions(-) diff --git a/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 index da6358a00ca6..1b920e7a52d8 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 @@ -70,7 +70,6 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} ! {% block bgp_init %} bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy {% if (DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'].lower() == 'dualtor') %} diff --git a/dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.j2 b/dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.j2 index 0b26be8d3c45..4ee96cf845c3 100644 --- a/dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.j2 +++ b/dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.j2 @@ -30,7 +30,7 @@ stderr_logfile=syslog dependent_startup=true [program:zebra] -command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl -M snmp --asic-offload=notify_on_offload +command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl -M snmp priority=4 autostart=false autorestart=false diff --git a/platform/vs/docker-sonic-vs/supervisord.conf.j2 b/platform/vs/docker-sonic-vs/supervisord.conf.j2 index 5b988a5a5d92..ae32fe41d4d0 100644 --- a/platform/vs/docker-sonic-vs/supervisord.conf.j2 +++ b/platform/vs/docker-sonic-vs/supervisord.conf.j2 @@ -164,7 +164,7 @@ environment=ASAN_OPTIONS="log_path=/var/log/asan/teammgrd-asan.log{{ asan_extra_ {% endif %} [program:zebra] -command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl --asic-offload=notify_on_offload +command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl priority=13 autostart=false autorestart=false diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py b/src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py index 3708b5b30dfc..ce3f60fad144 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py @@ -311,11 +311,10 @@ def apply_op(self, cmd, vrf): :return: True if no errors, False if there are errors """ bgp_asn = self.directory.get_slot("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME)["localhost"]["bgp_asn"] - enable_bgp_suppress_fib_pending_cmd = 'bgp suppress-fib-pending' if vrf == 'default': - cmd = ('router bgp %s\n %s\n' % (bgp_asn, enable_bgp_suppress_fib_pending_cmd)) + cmd + cmd = ('router bgp %s\n' % bgp_asn) + cmd else: - cmd = ('router bgp %s vrf %s\n %s\n' % (bgp_asn, vrf, enable_bgp_suppress_fib_pending_cmd)) + cmd + cmd = ('router bgp %s vrf %s\n' % (bgp_asn, vrf)) + cmd self.cfg_mgr.push(cmd) return True diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.conf.j2/all.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.conf.j2/all.conf index a7f34245873a..c39115706d79 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.conf.j2/all.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.conf.j2/all.conf @@ -55,7 +55,6 @@ route-map HIDE_INTERNAL permit 20 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/all.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/all.conf index d2dc9e40e892..c5ba79d34392 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/all.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/all.conf @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/base.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/base.conf index 27d04b953a3e..77cc9d6fffd8 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/base.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/base.conf @@ -12,7 +12,6 @@ ip prefix-list PL_LoopbackV4 permit 55.55.55.55/32 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults.conf index b85dd67a5ca0..00b09bd40d9a 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults.conf @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.conf index 96a30d0ab5df..c042f00a7c2a 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.conf @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.conf index 5ee5ce5443aa..50414a89a389 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.conf @@ -14,7 +14,6 @@ ipv6 prefix-list PL_LoopbackV6 permit fc00::1/128 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.conf index b181dbd5e430..31e0e66cb5af 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.conf @@ -32,7 +32,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.conf index c41fa0cfedc9..f0526d73976e 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.conf @@ -32,7 +32,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis.conf index 6b2e1f257948..a949ce6e4512 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis.conf @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_ipv6_lo4096.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_ipv6_lo4096.conf index 381c5b05a1f0..81c7d0f2bf42 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_ipv6_lo4096.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_ipv6_lo4096.conf @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_ipv6_lo4096_router_id.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_ipv6_lo4096_router_id.conf index 213872f45c70..3acce1ffb6c1 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_ipv6_lo4096_router_id.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_ipv6_lo4096_router_id.conf @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_router_id.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_router_id.conf index 213872f45c70..3acce1ffb6c1 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_router_id.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/packet_chassis_router_id.conf @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/voq_chassis.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/voq_chassis.conf index efd45eda1ea9..0d9eeebe9e8e 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/voq_chassis.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/voq_chassis.conf @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/frr.conf.j2/all.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/frr.conf.j2/all.conf index 8856e58db686..af2e974ee9b7 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/frr.conf.j2/all.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/frr.conf.j2/all.conf @@ -71,7 +71,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 55555 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index ca34726d56cf..d6c811552778 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -52,7 +52,6 @@ console_device_types = ['MgmtTsToR'] dhcp_server_enabled_device_types = ['BmcMgmtToRRouter'] mgmt_device_types = ['BmcMgmtToRRouter', 'MgmtToRRouter', 'MgmtTsToR'] -leafrouter_device_types = ['LeafRouter'] # Counters disabled on management devices mgmt_disabled_counters = ["BUFFER_POOL_WATERMARK", "PFCWD", "PG_DROP", "PG_WATERMARK", "PORT_BUFFER_DROP", "QUEUE", "QUEUE_WATERMARK"] @@ -2708,10 +2707,6 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw if current_device and current_device['type'] in mgmt_device_types: results["FLEX_COUNTER_TABLE"] = {counter: {"FLEX_COUNTER_STATUS": "disable"} for counter in mgmt_disabled_counters} - # Enable bgp-suppress-fib by default for leafrouter - if current_device and current_device['type'] in leafrouter_device_types: - results['DEVICE_METADATA']['localhost']['suppress-fib-pending'] = 'enabled' - return results def get_tunnel_entries(tunnel_intfs, tunnel_intfs_qos_remap_config, lo_intfs, tunnel_qos_remap, mux_tunnel_name, peer_switch_ip): diff --git a/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr.conf b/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr.conf index 3828af13fd71..2c146698a960 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr.conf @@ -42,7 +42,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_backend_asic.conf b/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_backend_asic.conf index 45cd03a540a8..d793dfa39a98 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_backend_asic.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_backend_asic.conf @@ -53,7 +53,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_dualtor.conf b/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_dualtor.conf index eda11ab9f285..364a2c34bcaa 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_dualtor.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_dualtor.conf @@ -42,7 +42,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy coalesce-time 10000 diff --git a/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_frontend_asic.conf b/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_frontend_asic.conf index 8daeff2a61e9..94bd37e3b90f 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_frontend_asic.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/bgpd_frr_frontend_asic.conf @@ -53,7 +53,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py2/frr.conf b/src/sonic-config-engine/tests/sample_output/py2/frr.conf index 032adb8c5106..2653f8fc0893 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/frr.conf @@ -62,7 +62,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-bgpd.conf b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-bgpd.conf index 32a9abf88bac..20744efaa40f 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-bgpd.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-bgpd.conf @@ -58,7 +58,6 @@ ip prefix-list PL_LoopbackV4 permit 4.0.0.0/32 router bgp 4000 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr.conf b/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr.conf index e5ad8964454a..e7534d4b9781 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr.conf @@ -42,7 +42,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_backend_asic.conf b/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_backend_asic.conf index 45cd03a540a8..d793dfa39a98 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_backend_asic.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_backend_asic.conf @@ -53,7 +53,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_dualtor.conf b/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_dualtor.conf index 0ada9a4f8d60..4f606b80838c 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_dualtor.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_dualtor.conf @@ -42,7 +42,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy coalesce-time 10000 diff --git a/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_frontend_asic.conf b/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_frontend_asic.conf index 8daeff2a61e9..94bd37e3b90f 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_frontend_asic.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/bgpd_frr_frontend_asic.conf @@ -53,7 +53,6 @@ route-map HIDE_INTERNAL permit 10 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py3/frr.conf b/src/sonic-config-engine/tests/sample_output/py3/frr.conf index d0821f1b11ca..5b7eacefe8ba 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/frr.conf @@ -62,7 +62,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27 router bgp 65100 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-bgpd.conf b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-bgpd.conf index 32a9abf88bac..20744efaa40f 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-bgpd.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-bgpd.conf @@ -58,7 +58,6 @@ ip prefix-list PL_LoopbackV4 permit 4.0.0.0/32 router bgp 4000 ! bgp log-neighbor-changes - bgp suppress-fib-pending no bgp default ipv4-unicast no bgp ebgp-requires-policy ! diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json index 3acfff5c42ad..11d0c9e9daab 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json @@ -132,16 +132,6 @@ "DEVICE_METADATA_ADVERTISE_LO_PREFIX_AS_128": { "desc": "Verifying advertising lo prefix as /128." }, - "DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED": { - "desc": "Enable bgp-suppress-fib-pending" - }, - "DEVICE_METADATA_SUPPRESS_PENDING_FIB_DISABLED": { - "desc": "Disable bgp-suppress-fib-pending" - }, - "DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED_SYNCHRONOUS_MODE_DISABLED": { - "desc": "Enable bgp-suppress-fib-pending when synchronous mode is disabled", - "eStr": ["ASIC synchronous mode must be enabled in order to enable suppress FIB pending feature"] - }, "DEVICE_METADATA_VALID_RACK_MGMT_MAP": { "desc": "Verifying rack_mgmt_map configuration." }, diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json index 74f4d17dd518..bc977e7da076 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json @@ -361,36 +361,6 @@ } } }, - "DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED": { - "sonic-device_metadata:sonic-device_metadata": { - "sonic-device_metadata:DEVICE_METADATA": { - "sonic-device_metadata:localhost": { - "synchronous_mode": "enable", - "suppress-fib-pending": "enabled" - } - } - } - }, - "DEVICE_METADATA_SUPPRESS_PENDING_FIB_DISABLED": { - "sonic-device_metadata:sonic-device_metadata": { - "sonic-device_metadata:DEVICE_METADATA": { - "sonic-device_metadata:localhost": { - "synchronous_mode": "disable", - "suppress-fib-pending": "disabled" - } - } - } - }, - "DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED_SYNCHRONOUS_MODE_DISABLED": { - "sonic-device_metadata:sonic-device_metadata": { - "sonic-device_metadata:DEVICE_METADATA": { - "sonic-device_metadata:localhost": { - "synchronous_mode": "disable", - "suppress-fib-pending": "enabled" - } - } - } - }, "DEVICE_METADATA_VALID_RACK_MGMT_MAP": { "sonic-device_metadata:sonic-device_metadata": { "sonic-device_metadata:DEVICE_METADATA": { diff --git a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang index 61f6888ded6d..7bd936e831c3 100644 --- a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang +++ b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang @@ -212,18 +212,6 @@ module sonic-device_metadata { By default SONiC advertises /128 subnet prefix in Loopback0 as /64 subnet route"; } - leaf suppress-fib-pending { - description "Enable BGP suppress FIB pending feature. BGP will wait for route FIB installation before announcing routes"; - type enumeration { - enum enabled; - enum disabled; - } - default disabled; - - must "((current() = 'disabled') or (current() = 'enabled' and ../synchronous_mode = 'enable'))" { - error-message "ASIC synchronous mode must be enabled in order to enable suppress FIB pending feature"; - } - } leaf rack_mgmt_map { type string { length 0..128 { From c52462808fa737bc640d389db7b82ee9f74bf0d4 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 12 Jul 2024 19:57:08 +0800 Subject: [PATCH 31/38] [submodule] Update submodule sonic-dash-api to the latest HEAD automatically (#19459) #### Why I did it src/sonic-dash-api ``` * 5809048 - (HEAD -> master, origin/master, origin/HEAD) [build]Update pool sonicbld to sonic-ububtu-1c since it's deprecated (#21) (10 days ago) [Jianquan Ye] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-dash-api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-dash-api b/src/sonic-dash-api index d033898e7e47..5809048abbc5 160000 --- a/src/sonic-dash-api +++ b/src/sonic-dash-api @@ -1 +1 @@ -Subproject commit d033898e7e4774fad88229610a5bb502b4152a5a +Subproject commit 5809048abbc52ce1762f3ed29eb77483051176dd From 339a4e62ce88c90b3fde5b2e192576740f2ce757 Mon Sep 17 00:00:00 2001 From: abdosi <58047199+abdosi@users.noreply.github.com> Date: Fri, 12 Jul 2024 19:29:51 -0700 Subject: [PATCH 32/38] [healthd] Added change to handle Feature Table exception (#19480) *Fix: #18818 Handle any exception in API get_service_from_feature_table() gracefully . --------- Signed-off-by: Abhishek Dosi --- .../health_checker/sysmonitor.py | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/system-health/health_checker/sysmonitor.py b/src/system-health/health_checker/sysmonitor.py index 115dbfbe9ea0..c07b58b5489b 100755 --- a/src/system-health/health_checker/sysmonitor.py +++ b/src/system-health/health_checker/sysmonitor.py @@ -204,20 +204,23 @@ def get_service_from_feature_table(self, dir_list): while max_retry > 0: success = True - feature_table = self.config_db.get_table("FEATURE") - device_config = {} - device_config['DEVICE_METADATA'] = self.config_db.get_table('DEVICE_METADATA') - device_config.update(device_info.get_device_runtime_metadata()) - for srv, fields in feature_table.items(): - if 'state' not in fields: - success = False - logger.log_warning("FEATURE table is not fully ready: {}, retrying".format(feature_table)) - break - state = self.get_render_value_for_field(fields["state"], device_config, ['enabled', 'disabled', 'always_enabled', 'always_disabled']) - if state not in ["disabled", "always_disabled"]: - srvext = srv + ".service" - if srvext not in dir_list: - dir_list.append(srvext) + try: + feature_table = self.config_db.get_table("FEATURE") + device_config = {} + device_config['DEVICE_METADATA'] = self.config_db.get_table('DEVICE_METADATA') + device_config.update(device_info.get_device_runtime_metadata()) + for srv, fields in feature_table.items(): + if 'state' not in fields: + success = False + logger.log_warning("FEATURE table is not fully ready: {}, retrying".format(feature_table)) + break + state = self.get_render_value_for_field(fields["state"], device_config, ['enabled', 'disabled', 'always_enabled', 'always_disabled']) + if state not in ["disabled", "always_disabled"]: + srvext = srv + ".service" + if srvext not in dir_list: + dir_list.append(srvext) + except: + success = False if not success: max_retry -= 1 time.sleep(retry_delay) From a14681fb23cb3e899151584ebf0e2fa43a4b755b Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:00:58 +0800 Subject: [PATCH 33/38] [submodule] Update submodule sonic-host-services to the latest HEAD automatically (#19568) #### Why I did it src/sonic-host-services ``` * cfb3cb8 - (HEAD -> master, origin/master, origin/HEAD) Modified scripts: replaced deprecated 'logger' with 'syslogger' (#136) (2 hours ago) [Ashwin Srinivasan] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-host-services | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-host-services b/src/sonic-host-services index 02d9b55c2939..cfb3cb89aff0 160000 --- a/src/sonic-host-services +++ b/src/sonic-host-services @@ -1 +1 @@ -Subproject commit 02d9b55c29394510cdab9725bbbdbf3e9ae2cadf +Subproject commit cfb3cb89aff003290db547b78657528d0f20914c From dd09d9ea98d8f5138a3478e06b00271f0e116c35 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:01:27 +0800 Subject: [PATCH 34/38] [submodule] Update submodule sonic-linux-kernel to the latest HEAD automatically (#19548) #### Why I did it src/sonic-linux-kernel ``` * 88c1826 - (HEAD -> master, origin/master, origin/HEAD) [Micas] Kernel configuration is enabled to support mdio-gpio and spi-gpio (#411) (27 hours ago) [Philo] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-linux-kernel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index a128c86539ab..88c1826e5e1e 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit a128c86539ab63afbce811a364ded5f670d4b8c3 +Subproject commit 88c1826e5e1e96cc016f633f1d3c250b6694abda From a74777d25f3223c0735853477c467f76456b6da7 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:01:43 +0800 Subject: [PATCH 35/38] [submodule] Update submodule sonic-utilities to the latest HEAD automatically (#19522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### Why I did it src/sonic-utilities ``` * b6f7c2b7 - (HEAD -> master, origin/master, origin/HEAD) [sfputil] Add loopback sub-command for debugging and module diagnosti… (#3369) (27 hours ago) [Xinyu Lin] * 1f944447 - Fix multi-asic behaviour for pg-drop (#3058) (2 days ago) [bktsim] * 789ef634 - Add Parallel option for apply-patch (#3373) (3 days ago) [Xincun Li] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index fb2e5cda90ce..b6f7c2b7d138 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit fb2e5cda90ced88249e06b18d8c5717a89ff62b9 +Subproject commit b6f7c2b7d138299475d994d251721455deab668f From 293bc71f35bd2f8ce47b843336f7b5b0d119066f Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:01:47 +0800 Subject: [PATCH 36/38] [submodule] Update submodule sonic-gnmi to the latest HEAD automatically (#19513) #### Why I did it src/sonic-gnmi ``` * a85dfc1 - (HEAD -> master, origin/master, origin/HEAD) Subscribe COUNTERS_DB (#268) (4 days ago) [ganglv] * 1e90d23 - Update gnmi-native to support subscribe poll mode (#267) (5 days ago) [ganglv] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-gnmi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-gnmi b/src/sonic-gnmi index 78014155a59e..a85dfc112da3 160000 --- a/src/sonic-gnmi +++ b/src/sonic-gnmi @@ -1 +1 @@ -Subproject commit 78014155a59ebdaa61ccec5f036835089f289238 +Subproject commit a85dfc112da34e2577272484b2ecbbb7f629a3b9 From 3c6e347f4ef9a8ba6c110e7c06efeb00f8bb40e6 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:01:52 +0800 Subject: [PATCH 37/38] [submodule] Update submodule linkmgrd to the latest HEAD automatically (#19458) #### Why I did it src/linkmgrd ``` * 6fcab47 - (HEAD -> master, origin/master, origin/HEAD) [active-standby] raising log level to notice for timed oscillation config change (#262) (28 hours ago) [Jing Zhang] * 2b7e4f9 - [active-standby] Fix the oscillation logic (#261) (11 days ago) [Longxiang Lyu] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/linkmgrd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linkmgrd b/src/linkmgrd index 9768268cf11c..6fcab4740650 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit 9768268cf11cdfab1eccb194c0ce762e372aa536 +Subproject commit 6fcab47406502cd41d60267b36dc362555487d7c From e2b30cc49cae3d4f91126ca8dc4dd2d7b232c708 Mon Sep 17 00:00:00 2001 From: Arvindsrinivasan Lakshmi Narasimhan <55814491+arlakshm@users.noreply.github.com> Date: Sat, 13 Jul 2024 15:26:52 -0700 Subject: [PATCH 38/38] [Chassis][Voq][Yang] Make asic_name case sensitive in yang models (#19486) * make asic_name case sensitive * address comment --- .../tests_config/system_port.json | 76 +++++++++++++++++++ .../yang-models/sonic-buffer-queue.yang | 4 +- .../yang-models/sonic-queue.yang | 4 +- .../yang-models/sonic-system-port.yang | 4 +- .../yang-templates/sonic-types.yang.j2 | 6 ++ 5 files changed, 85 insertions(+), 9 deletions(-) diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/system_port.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/system_port.json index 28edae5727a1..837d5a67797d 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/system_port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/system_port.json @@ -86,6 +86,82 @@ ] } } + }, + "SYSTEM_ASIC_NAME_UPPERCASE": { + "sonic-system-port:sonic-system-port": { + "sonic-system-port:SYSTEM_PORT": { + "SYSTEM_PORT_LIST": [ + { + "hostname": "host456", + "asic_name": "ASIC0", + "ifname": "Ethernet0", + "core_index": "1", + "core_port_index": "20", + "num_voq": "8", + "speed": "900000", + "switch_id": "1", + "system_port_id": "200" + } + ] + } + } + }, + "SYSTEM_ASIC_NAME_INVALID": { + "sonic-system-port:sonic-system-port": { + "sonic-system-port:SYSTEM_PORT": { + "SYSTEM_PORT_LIST": [ + { + "hostname": "host456", + "asic_name": "INVALIDASIC0", + "ifname": "Ethernet0", + "core_index": "1", + "core_port_index": "20", + "num_voq": "8", + "speed": "900000", + "switch_id": "1", + "system_port_id": "200" + } + ] + } + } + }, + "SYSTEM_ASIC_NAME_SUP": { + "sonic-system-port:sonic-system-port": { + "sonic-system-port:SYSTEM_PORT": { + "SYSTEM_PORT_LIST": [ + { + "hostname": "host456", + "asic_name": "ASIC12", + "ifname": "Ethernet0", + "core_index": "1", + "core_port_index": "20", + "num_voq": "8", + "speed": "900000", + "switch_id": "1", + "system_port_id": "200" + } + ] + } + } + }, + "SYSTEM_ASIC_NAME_MIXED_CASE": { + "sonic-system-port:sonic-system-port": { + "sonic-system-port:SYSTEM_PORT": { + "SYSTEM_PORT_LIST": [ + { + "hostname": "host456", + "asic_name": "Asic2", + "ifname": "Ethernet0", + "core_index": "1", + "core_port_index": "20", + "num_voq": "8", + "speed": "900000", + "switch_id": "1", + "system_port_id": "200" + } + ] + } + } } } diff --git a/src/sonic-yang-models/yang-models/sonic-buffer-queue.yang b/src/sonic-yang-models/yang-models/sonic-buffer-queue.yang index 3e96db23c16c..685ed026dbfa 100644 --- a/src/sonic-yang-models/yang-models/sonic-buffer-queue.yang +++ b/src/sonic-yang-models/yang-models/sonic-buffer-queue.yang @@ -84,9 +84,7 @@ module sonic-buffer-queue { } leaf asic_name { - type string { - pattern "[Aa]sic[0-4]"; - } + type stypes:asic_name; } leaf port { diff --git a/src/sonic-yang-models/yang-models/sonic-queue.yang b/src/sonic-yang-models/yang-models/sonic-queue.yang index e491a50b01d2..453950f8b944 100644 --- a/src/sonic-yang-models/yang-models/sonic-queue.yang +++ b/src/sonic-yang-models/yang-models/sonic-queue.yang @@ -105,9 +105,7 @@ module sonic-queue { } leaf asic_name { - type string { - pattern "[Aa]sic[0-4]"; - } + type stypes:asic_name; } leaf ifname { diff --git a/src/sonic-yang-models/yang-models/sonic-system-port.yang b/src/sonic-yang-models/yang-models/sonic-system-port.yang index f95405ac662f..25d18e9a5515 100644 --- a/src/sonic-yang-models/yang-models/sonic-system-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-system-port.yang @@ -34,9 +34,7 @@ module sonic-system-port { } leaf asic_name { - type string { - pattern "[Aa]sic[0-4]"; - } + type stypes:asic_name; } leaf ifname { diff --git a/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 b/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 index 6d3d3db00526..df9b3c91dd8f 100644 --- a/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 +++ b/src/sonic-yang-models/yang-templates/sonic-types.yang.j2 @@ -386,6 +386,12 @@ module sonic-types { } } + typedef asic_name { + type string { + pattern '[Aa][Ss][Ii][Cc][0-9]{1,2}'; + } + } + {% if yang_model_type == "cvl" %} /* Required for CVL */ container operation {