diff --git a/.gitmodules b/.gitmodules index 30243faf3260..2a2a11079076 100644 --- a/.gitmodules +++ b/.gitmodules @@ -73,9 +73,6 @@ [submodule "src/sonic-telemetry"] path = src/sonic-telemetry url = https://github.com/sonic-net/sonic-gnmi -[submodule "Switch-SDK-drivers"] - path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers - url = https://github.com/Mellanox/Switch-SDK-drivers [submodule "src/sonic-ztp"] path = src/sonic-ztp url = https://github.com/sonic-net/sonic-ztp diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index c3633fc79898..b67a3adb3f67 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -27,7 +27,8 @@ RUN apt-get update && \ i2c-tools \ psmisc \ python3-jsonschema \ - libpci3 + libpci3 \ + pciutils # On Arista devices, the sonic_platform wheel is not installed in the container. # Instead, the installation directory is mounted from the host OS. However, this method @@ -43,6 +44,10 @@ RUN pip2 install enum34 RUN pip2 install thrift==0.13.0 RUN pip3 install thrift==0.13.0 +# We install the libpci module in order to be able to do PCI transactions +RUN pip2 install libpci +RUN pip3 install libpci + {% if docker_platform_monitor_debs.strip() -%} # Copy locally-built Debian package dependencies {{ copy_files("debs/", docker_platform_monitor_debs.split(' '), "/debs/") }} diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-git b/files/build/versions/build/build-sonic-slave-buster/versions-git index f3659dd09d04..b2525ffced3e 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -3,12 +3,12 @@ https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564 https://github.com/jeroennijhof/pam_tacplus.git==7908a7faa0205beda9ea198bdd3aa37868be6da2 https://github.com/jpirko/libteam.git==61e27812c1074a865d7e1a778c0ce442837c28d7 https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 -https://github.com/sflow/host-sflow==b7d12c7fe18f2c4b2377f1b34c1e848d1a5ea16c +https://github.com/sflow/host-sflow==f1ffaa93b5ef2221ca7299e6db953917fba03b40 https://github.com/sflow/sflowtool==8c914e79ecb7930adcba2e5296041c3f9eb8e450 https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0 https://salsa.debian.org/debian/libteam.git==48142125234a665ad5367b724af36a58fb484d3d https://salsa.debian.org/dhcp-team/isc-dhcp.git==7a6f5a9d178439a56a8eb0cd4446329a8d5631ce -https://salsa.debian.org/kernel-team/ethtool/==b24474c5f4cad2bb690ced33a3c7df397170a699 +https://salsa.debian.org/kernel-team/ethtool/==68409b09a969b49a07fbf3930409f155b953434b https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d -https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549 +https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py2-all-arm64 b/files/build/versions/build/build-sonic-slave-buster/versions-py2-all-arm64 index 8492dcc26744..c7b43db04ec2 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py2-all-arm64 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py2-all-arm64 @@ -1,2 +1,2 @@ ipaddress==1.0.23 -lxml==4.6.3 \ No newline at end of file +lxml==4.9.1 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3 b/files/build/versions/build/build-sonic-slave-buster/versions-py3 index 7e940600fc67..41bda4e47e42 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3 @@ -1,4 +1,4 @@ -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 click==7.0 docker==6.0.1 ijson==2.6.1 diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 index 949c3055bf13..5b4fcbd1590a 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 @@ -1,4 +1,4 @@ bitarray==1.5.3 -lxml==4.6.3 +lxml==4.9.1 requests==2.28.2 urllib3==1.26.14 \ No newline at end of file diff --git a/files/build/versions/default/versions-docker b/files/build/versions/default/versions-docker index 7dc449776ba3..fe8679513101 100644 --- a/files/build/versions/default/versions-docker +++ b/files/build/versions/default/versions-docker @@ -7,4 +7,4 @@ arm64:debian:buster==sha256:2d356e1e22c0902f88ef65cb7159ecd5a96feb62345747edfd43 arm64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be armhf:arm32v7/debian:buster==sha256:43b845d5864322e89773a602535f5db85debe3356e50488c63dd99bf2cc16899 armhf:debian:buster==sha256:2d356e1e22c0902f88ef65cb7159ecd5a96feb62345747edfd4324b0d83a2923 -armhf:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be +armhf:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be \ No newline at end of file diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index 87f7ba38d45c..2098babd013a 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,4 +1,4 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f https://github.com/CESNET/libyang.git==d57c8888922d1663508ad0f0a5b66f8ad600276d https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b @@ -9,12 +9,12 @@ https://github.com/lguohan/gnxi.git==f2b11e45b16ab13485ae14933f30c18ee6336499 https://github.com/Marvell-switching/mrvl-prestera.git==21a100e01b2ab00229da35dd178d9b294c66303f https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 https://github.com/p4lang/scapy-vxlan.git==85ffe83da156568ee47a0750f638227e6e1d7479 -https://github.com/sflow/host-sflow==b7d12c7fe18f2c4b2377f1b34c1e848d1a5ea16c +https://github.com/sflow/host-sflow==f1ffaa93b5ef2221ca7299e6db953917fba03b40 https://github.com/sflow/sflowtool==8c914e79ecb7930adcba2e5296041c3f9eb8e450 https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0 https://salsa.debian.org/debian/libteam.git==48142125234a665ad5367b724af36a58fb484d3d https://salsa.debian.org/dhcp-team/isc-dhcp.git==7a6f5a9d178439a56a8eb0cd4446329a8d5631ce -https://salsa.debian.org/kernel-team/ethtool/==b24474c5f4cad2bb690ced33a3c7df397170a699 +https://salsa.debian.org/kernel-team/ethtool/==68409b09a969b49a07fbf3930409f155b953434b https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d -https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549 +https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549 \ No newline at end of file diff --git a/files/build/versions/default/versions-web b/files/build/versions/default/versions-web index b66efba23b4c..1e3b4714099c 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -49,6 +49,7 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/liby/libyang/libyang https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.debian.tar.xz==ad957e90207d0669beb2109e4e325def https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.dsc==2443e4dffbdb020e7ab4f947a7904912 https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209 +https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d https://sonicstorage.blob.core.windows.net/packages/cmake/cmake-data_3.13.2-1_bpo9%2B1_all.deb?st=2020-03-27T02%3A22%3A24Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=Xby%2Bm3OZOjPB%2FSlDbHD65yDcPzAgoys%2FA3vK8RB4BzA%3D==147cf42f3a68f6d6f1e53d95a599a1af https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_amd64.deb?st=2020-03-27T02%3A27%3A21Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=4MvmmDBQuicFEJYakLm7xCNU19yJ8GIP4ankFSnITKY%3D==e75c741e8b6918b8f03625e456fa0275 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_arm64.deb?st=2020-03-27T02%3A28%3A38Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=rrHMkLi29aI8yH6s52ILCY8VcEbNFrzYT2DmC5RwOgs%3D==9bcc989e6ed168717f67c07e79177d4a @@ -71,4 +72,4 @@ https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1_bp https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1~bpo10+1_amd64.deb?sv=2015-04-05&sr=b&sig=73zbmjkf3pi%2Bn0R8Hy7CWT2EUvOAyzM5aLYJWCLySGM%3D&se=2030-09-06T19%3A44%3A59Z&sp=r==2d58c3c3358290c04d5e0ba70f297f18 https://storage.googleapis.com/golang/go1.14.2.linux-amd64.tar.gz==856d248e3ea8a287d13e5f6afd086282 https://storage.googleapis.com/golang/go1.14.2.linux-arm64.tar.gz==e5f79b403701e00f20d13f0ea561b064 -https://storage.googleapis.com/golang/go1.14.2.linux-armv6l.tar.gz==04467414e783b18de4278e9f24baf4be +https://storage.googleapis.com/golang/go1.14.2.linux-armv6l.tar.gz==04467414e783b18de4278e9f24baf4be \ No newline at end of file diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-py3 b/files/build/versions/dockers/docker-config-engine-buster/versions-py3 index fb011461608f..faad4632051e 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-py3 +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-py3 @@ -1,6 +1,6 @@ bitarray==1.5.3 ipaddress==1.0.23 -lxml==4.6.3 +lxml==4.9.1 natsort==6.2.1 netaddr==0.8.0 pyang==2.5.3 diff --git a/files/build/versions/dockers/docker-config-engine-stretch/versions-py2 b/files/build/versions/dockers/docker-config-engine-stretch/versions-py2 index ad70857eef4a..9092f9c71ce4 100644 --- a/files/build/versions/dockers/docker-config-engine-stretch/versions-py2 +++ b/files/build/versions/dockers/docker-config-engine-stretch/versions-py2 @@ -3,7 +3,7 @@ contextlib2==0.6.0.post1 future==0.18.3 importlib-resources==3.3.1 ipaddress==1.0.23 -lxml==4.6.3 +lxml==4.9.1 natsort==6.2.1 netaddr==0.8.0 pathlib2==2.3.7.post1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster index 031e96ee644b..2c3e6fdecb38 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster @@ -102,6 +102,7 @@ lm-sensors-dbgsym==1:3.5.0-3 make==4.2.1-1.2 openssh-client==1:7.9p1-10+deb10u2 patch==2.7.6-3+deb10u1 +pciutils==1:3.5.2-1 psmisc==23.2-1+deb10u1 python==2.7.16-1 python-dev==2.7.16-1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py2 b/files/build/versions/dockers/docker-platform-monitor/versions-py2 index 61c36312f823..ce6b78c718ae 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py2 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py2 @@ -3,11 +3,13 @@ contextlib2==0.6.0.post1 enum34==1.1.10 functools32==3.2.3.post2 future==0.18.3 +guacamole==0.9.2 importlib-resources==3.3.1 ipaddress==1.0.23 jinja2==2.11.3 jsonschema==2.6.0 -lxml==4.6.3 +libpci==0.2 +lxml==4.9.1 markupsafe==1.1.1 natsort==6.2.1 netaddr==0.8.0 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py3 b/files/build/versions/dockers/docker-platform-monitor/versions-py3 index f2debc6aefc2..c36f28d012b1 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py3 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py3 @@ -1,3 +1,5 @@ +guacamole==0.9.2 jsonschema==2.6.0 +libpci==0.2 python_sdk_api==4.5.3196 thrift==0.13.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 index e53395334666..3333ef049b81 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -1,6 +1,6 @@ attrs==22.2.0 certifi==2017.4.17 -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 click==8.1.3 clickclick==20.10.2 connexion==2.7.0 @@ -19,7 +19,7 @@ openapi-schema-validator==0.4.3 openapi-spec-validator==0.5.5 pathable==0.4.3 pkgutil_resolve_name==1.3.10 -protobuf==4.22.0 +protobuf==4.22.1 pyrsistent==0.19.3 python-dateutil==2.6.0 requests==2.28.2 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions/dockers/docker-sonic-vs/versions-py3 index 4156fc6f5b33..520d95fc351b 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -1,5 +1,5 @@ certifi==2022.12.7 -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 click==7.0 idna==3.4 ijson==2.6.1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster index a14b1ede742c..516d94d5d4be 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -413,7 +413,7 @@ libdbi1==0.9.0-5 libdbus-1-3==1.12.24-0+deb10u1 libdbus-1-dev==1.12.24-0+deb10u1 libdconf1==0.30.1-2 -libde265-0==1.0.3-1+deb10u3 +libde265-0==1.0.11-0+deb10u4 libdevel-callchecker-perl==0.008-1 libdevel-caller-perl==2.06-2+b1 libdevel-globaldestruction-perl==0.14-1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index b296114fa40e..843ae5b79903 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-git +++ b/files/build/versions/dockers/sonic-slave-buster/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb -https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08 +https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-stretch/versions-git b/files/build/versions/dockers/sonic-slave-stretch/versions-git index b296114fa40e..843ae5b79903 100644 --- a/files/build/versions/dockers/sonic-slave-stretch/versions-git +++ b/files/build/versions/dockers/sonic-slave-stretch/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb -https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08 +https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/host-image/versions-py2 b/files/build/versions/host-image/versions-py2 index 93186520cb3e..a57346ced325 100644 --- a/files/build/versions/host-image/versions-py2 +++ b/files/build/versions/host-image/versions-py2 @@ -8,7 +8,7 @@ ipaddr==2.2.0 ipaddress==1.0.23 jinja2==2.11.3 jsonschema==2.6.0 -lxml==4.6.3 +lxml==4.9.1 markupsafe==1.1.1 natsort==6.2.1 netaddr==0.8.0 diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions/host-image/versions-py3 index 6cf705cd50b5..ec023eb5c7ce 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -4,7 +4,7 @@ azure-storage==0.36.0 bitarray==1.5.3 certifi==2022.12.7 cffi==1.15.1 -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 click==7.0 cryptography==39.0.2 docker==4.3.1 @@ -15,7 +15,7 @@ j2cli==0.3.10 jinja2==3.1.2 jsondiff==2.0.0 jsonschema==2.6.0 -lxml==4.6.3 +lxml==4.9.1 m2crypto==0.38.0 markupsafe==2.1.2 natsort==6.2.1 diff --git a/platform/marvell-armhf/platform.conf b/platform/marvell-armhf/platform.conf index 23a191adf7b2..ddc603490dbc 100644 --- a/platform/marvell-armhf/platform.conf +++ b/platform/marvell-armhf/platform.conf @@ -6,9 +6,9 @@ echo "Preparing for installation ... " # global defines kernel_addr=0x1100000 -fdt_addr=0x1000000 -fdt_high=0x10fffff -initrd_addr=0x2000000 +fdt_addr=0x2800000 +fdt_high=0x28fffff +initrd_addr=0x2900000 kernel_fname="/boot/vmlinuz-4.19.0-12-2-armmp" initrd_fname="/boot/initrd.img-4.19.0-12-2-armmp" @@ -175,7 +175,7 @@ prepare_boot_menu() { BOOT3='echo " > Boot3: ONIE - run onie_nand_boot";echo;' fi BORDER='echo "---------------------------------------------------";echo;' - fw_setenv ${FW_ARG} print_menu $BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER > /dev/null + fw_setenv ${FW_ARG} print_menu "$BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER" > /dev/null fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4" > /dev/null fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4" > /dev/null diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk index faef8e6f9395..9026dc153176 100644 --- a/platform/mellanox/fw.mk +++ b/platform/mellanox/fw.mk @@ -5,10 +5,13 @@ MLNX_FW_BASE_PATH = $(MLNX_SDK_BASE_PATH) # Place an URL here to FW if you want to download FW instead MLNX_FW_BASE_URL = -ifneq ($(MLNX_FW_BASE_URL), ) FW_FROM_URL = y -else -FW_FROM_URL = n + +MLNX_FW_ASSETS_RELEASE_TAG = fw-2010.3196 +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.2010.3196 diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py index 6cfe253aa3fb..5d26b7d43618 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py @@ -263,7 +263,6 @@ REGISTER_NUM = 1 DEVICE_ID = 1 SWITCH_ID = 0 -SX_PORT_ATTR_ARR_SIZE = 64 PMAOS_ASE = 1 PMAOS_EE = 1 @@ -1978,14 +1977,17 @@ def set_port_admin_status_by_log_port(self, log_port, admin_status): def get_logical_ports(self): # Get all the ports related to the sfp, if port admin status is up, put it to list - port_attributes_list = new_sx_port_attributes_t_arr(SX_PORT_ATTR_ARR_SIZE) port_cnt_p = new_uint32_t_p() - uint32_t_p_assign(port_cnt_p, SX_PORT_ATTR_ARR_SIZE) + uint32_t_p_assign(port_cnt_p, 0) + rc = sx_api_port_device_get(self.sdk_handle, DEVICE_ID, SWITCH_ID, None, port_cnt_p) + assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc + port_cnt = uint32_t_p_value(port_cnt_p) + port_attributes_list = new_sx_port_attributes_t_arr(port_cnt) + rc = sx_api_port_device_get(self.sdk_handle, DEVICE_ID , SWITCH_ID, port_attributes_list, port_cnt_p) assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc - port_cnt = uint32_t_p_value(port_cnt_p) log_port_list = [] for i in range(0, port_cnt): port_attributes = sx_port_attributes_t_arr_getitem(port_attributes_list, i) diff --git a/platform/mellanox/sdk-src/sx-kernel/Makefile b/platform/mellanox/sdk-src/sx-kernel/Makefile index 422f2ae95aae..179594798129 100644 --- a/platform/mellanox/sdk-src/sx-kernel/Makefile +++ b/platform/mellanox/sdk-src/sx-kernel/Makefile @@ -5,6 +5,8 @@ MAIN_TARGET = sx-kernel_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb DERIVED_TARGETS = sx-kernel-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb PACKAGE_NAME = sx_kernel +MLNX_SX_KERNEL_GITHUB_URL_BASE = https://github.com/Mellanox/Spectrum-SDK-Drivers/archive/refs/heads + $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # get sources @@ -13,9 +15,15 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : wget -c $(MLNX_SDK_SOURCE_BASE_URL)/$(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION).tar.gz -O - | tar -xz pushd sx_kernel-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION) else - pushd Switch-SDK-drivers - git reset --hard - git clean -xfd + rm -rf Spectrum-SDK-Drivers-$(MLNX_SDK_VERSION) + wget -c $(MLNX_SX_KERNEL_GITHUB_URL_BASE)/$(MLNX_SDK_VERSION).zip + unzip $(MLNX_SDK_VERSION).zip + rm -rf $(MLNX_SDK_VERSION).zip + + pushd Spectrum-SDK-Drivers-$(MLNX_SDK_VERSION) + ln -s ./sx_scripts/Makefile ./Makefile + ln -s ./sx_scripts/makefile ./makefile + ln -s ./sx_scripts/configure ./configure fi # build diff --git a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers deleted file mode 160000 index a12968f165f6..000000000000 --- a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a12968f165f623ff3c27d6ebaabd34cc6316497e diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index 06c067cc1984..a7a2bb20b43a 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -1,8 +1,9 @@ -MLNX_SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel/Switch-SDK-drivers/bin/ -MLNX_SDK_PKG_BASE_PATH = $(MLNX_SDK_BASE_PATH)/$(BLDENV)/$(CONFIGURED_ARCH)/ MLNX_SDK_VERSION = 4.5.3196 MLNX_SDK_ISSU_VERSION = 101 +MLNX_ASSETS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins +MLNX_SDK_ASSETS_RELEASE_TAG = sdk-$(MLNX_SDK_VERSION)-$(BLDENV)-$(CONFIGURED_ARCH) +MLNX_SDK_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_SDK_ASSETS_RELEASE_TAG) MLNX_SDK_DEB_VERSION = $(subst -,.,$(subst _,.,$(MLNX_SDK_VERSION))) # Place here URL where SDK sources exist @@ -14,7 +15,7 @@ else SDK_FROM_SRC = n endif -export MLNX_SDK_SOURCE_BASE_URL MLNX_SDK_VERSION MLNX_SDK_ISSU_VERSION MLNX_SDK_DEB_VERSION +export MLNX_SDK_SOURCE_BASE_URL MLNX_SDK_VERSION MLNX_SDK_ISSU_VERSION MLNX_SDK_DEB_VERSION MLNX_ASSETS_GITHUB_URL MLNX_SDK_RDEBS += $(APPLIBS) $(IPROUTE2_MLNX) $(SX_COMPLIB) $(SX_EXAMPLES) \ $(SX_GEN_UTILS) $(SX_SCEW) $(SXD_LIBS) $(WJH_LIBS) $(SX_ACL_HELPER) @@ -136,21 +137,19 @@ $(SX_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel SX_KERNEL_DEV = sx-kernel-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb $(eval $(call add_derived_package,$(SX_KERNEL),$(SX_KERNEL_DEV))) -define make_path - $(1)_PATH = $(MLNX_SDK_PKG_BASE_PATH) +define make_url + $(1)_URL = $(MLNX_SDK_ASSETS_URL)/$(1) endef -$(eval $(foreach deb,$(MLNX_SDK_DEBS),$(call make_path,$(deb)))) -$(eval $(foreach deb,$(MLNX_SDK_RDEBS),$(call make_path,$(deb)))) -$(eval $(foreach deb,$(PYTHON_SDK_API) $(SX_KERNEL) $(SX_KERNEL_DEV),$(call make_path,$(deb)))) +$(eval $(foreach deb,$(MLNX_SDK_DEBS) $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API),$(call make_url,$(deb)))) SONIC_MAKE_DEBS += $(SX_KERNEL) ifeq ($(SDK_FROM_SRC), y) SONIC_MAKE_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API) else -SONIC_COPY_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API) +SONIC_ONLINE_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API) endif mlnx-sdk-packages: $(addprefix $(DEBS_PATH)/, $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API) $(SX_KERNEL)) diff --git a/src/sonic-restapi b/src/sonic-restapi index 99c467d8e727..47e4b534df75 160000 --- a/src/sonic-restapi +++ b/src/sonic-restapi @@ -1 +1 @@ -Subproject commit 99c467d8e727775085fbf962e2c3d9f9886b8161 +Subproject commit 47e4b534df75fd71af6f902759f69cc0fc8b7a3c