diff --git a/.gitignore b/.gitignore index 069e663c196..74998573e49 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,9 @@ src/libnl3/* !src/libnl3/Makefile src/libteam/* !src/libteam/Makefile +src/lldpd/* +!src/lldpd/Makefile +!src/lldpd/patch/ src/mpdecimal/* !src/mpdecimal/Makefile src/python3/* @@ -35,6 +38,7 @@ src/sonic-device-data/src/device/ src/sonic-device-data/src/debian/ src/supervisor/* !src/supervisor/Makefile +!src/supervisor/patch/ src/thrift/* !src/thrift/Makefile @@ -53,6 +57,7 @@ dockers/docker-router-advertiser/Dockerfile dockers/docker-snmp-sv2/Dockerfile dockers/docker-teamd/Dockerfile dockers/docker-sonic-mgmt/Dockerfile +dockers/docker-sonic-telemetry/Dockerfile platform/*/docker-syncd-*/Dockerfile platform/*/docker-syncd-*-rpc/Dockerfile platform/vs/docker-sonic-vs/Dockerfile diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 index 1c7a6da0281..e0cfc0869d0 --- a/.gitmodules +++ b/.gitmodules @@ -26,9 +26,6 @@ [submodule "src/sonic-py-swsssdk"] path = src/sonic-py-swsssdk url = https://github.com/Azure/sonic-py-swsssdk.git -[submodule "src/lldpd"] - path = src/lldpd - url = https://github.com/vincentbernat/lldpd.git [submodule "src/sonic-snmpagent"] path = src/sonic-snmpagent url = https://github.com/Azure/sonic-snmpagent @@ -50,6 +47,9 @@ [submodule "platform/broadcom/sonic-platform-modules-ingrasys"] path = platform/broadcom/sonic-platform-modules-ingrasys url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys +[submodule "src/sonic-platform-common"] + path = src/sonic-platform-common + url = https://github.com/Azure/sonic-platform-common [submodule "src/sonic-platform-daemons"] path = src/sonic-platform-daemons url = https://github.com/Azure/sonic-platform-daemons @@ -71,3 +71,9 @@ [submodule "platform/nephos/sonic-platform-modules-ingrasys"] path = platform/nephos/sonic-platform-modules-ingrasys url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys-nephos.git +[submodule "platform/broadcom/sonic-platform-modules-quanta"] + path = platform/broadcom/sonic-platform-modules-quanta + url = https://github.com/QuantaSwitchONIE/sonic-platform-modules-quanta.git +[submodule "platform/broadcom/sonic-platform-modules-mitac"] + path = platform/broadcom/sonic-platform-modules-mitac + url = https://github.com/MiTAC-EBU/sonic-platform-modules-mitac.git diff --git a/Makefile b/Makefile index aa3492561cb..c954402ab31 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,13 @@ # * ENABLE_DHCP_GRAPH_SERVICE: Enables get-graph service to fetch minigraph files # through http. # * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart. +# * ENABLE_PFCWD_ON_START: Enable PFC Watchdog (PFCWD) on server-facing ports +# * by default for TOR switch. # * SONIC_ENABLE_SYNCD_RPC: Enables rpc-based syncd builds. # * USERNAME: Desired username -- default at rules/config # * PASSWORD: Desired password -- default at rules/config # * KEEP_SLAVE_ON: Keeps slave container up after building-process concludes. -# * SOURCE_FOLDER: host path to be mount as /var/src, only effective when KEEP_SLAVE_ON=yes +# * SOURCE_FOLDER: host path to be mount as /var/$(USER)/src, only effective when KEEP_SLAVE_ON=yes # * SONIC_BUILD_JOB: Specifying number of concurrent build job(s) to run # ############################################################################### @@ -62,12 +64,14 @@ SONIC_BUILD_INSTRUCTION := make \ BUILD_NUMBER=$(BUILD_NUMBER) \ ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \ SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \ + SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \ ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \ PASSWORD=$(PASSWORD) \ USERNAME=$(USERNAME) \ SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \ HTTP_PROXY=$(http_proxy) \ - HTTPS_PROXY=$(https_proxy) + HTTPS_PROXY=$(https_proxy) \ + SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) .PHONY: sonic-slave-build sonic-slave-bash init reset @@ -82,7 +86,7 @@ SONIC_BUILD_INSTRUCTION := make \ $(DOCKER_BUILD) ; } ifeq "$(KEEP_SLAVE_ON)" "yes" ifdef SOURCE_FOLDER - @$(DOCKER_RUN) -v $(SOURCE_FOLDER):/var/src $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash" + @$(DOCKER_RUN) -v $(SOURCE_FOLDER):/var/$(USER)/src $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash" else @$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash" endif diff --git a/README.buildsystem.md b/README.buildsystem.md index d68e190e1f1..6735e1ce896 100644 --- a/README.buildsystem.md +++ b/README.buildsystem.md @@ -60,13 +60,13 @@ and directories with more complcated components, that provide their own Makefile Every **platform/[VENDOR]/** directory is a derived part of buildimage frontend, that defines rules and targets for a concrete vendor. ### Build output -**target/** is basically a build output. You can find all biuld artifacts there. +**target/** is basically a build output. You can find all build artifacts there. ## Recipes and target groups Now let's go over a definition of recipes and target groups. **Recipe** is a small makefile that defines a target and set of variables for building it. If you want to add a new target to buildimage (.deb package or docker image), you have to create a recipe for this target. -**Target group** is a set of targets that are built according to the same rulels. +**Target group** is a set of targets that are built according to the same rules. Every recipe sets a target group to which this target belongs. ### Recipe example @@ -119,7 +119,7 @@ SONIC_PYTHON_STDEB_DEBS += $(SOME_NEW_DEB) # add package to this target group **SONIC_MAKE_DEBS** This is a bit more flexible case. -If you have to do some specific type of build or apply pathes prior to build, just define your owm Makefile and add it to buildomage. +If you have to do some specific type of build or apply pathes prior to build, just define your own Makefile and add it to buildimage. Define: ```make SOME_NEW_DEB = some_new_deb.deb # name of your package @@ -194,7 +194,7 @@ Although every target is built inside a sonic-slave container, which exits at th ``` $ make sonic-slave-bash ``` -It is very useful for debugging when you add a new target and facing some trubles. +It is very useful for debugging when you add a new target and facing some troubles. sonic-slave environment is built only once, but if sonic-slave/Dockerfile was updated, you can rebuild it with this command: ``` diff --git a/README.md b/README.md index ea721a48e9e..20cc432cbbe 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,23 @@ *master*: Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all) Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all) +Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all) P4: [![P4](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all) VS: [![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all) +*201712*: +Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201712/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201712/) +Barefoot: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-201712/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-201712/) +Centec: [![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-201712/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-201712/) +Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201712/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201712/) +Marvell: [![Marvell](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-201712/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-201712/) +Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201712/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201712/) + *201709*: Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201709/) -Cavium: [![Cavium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/) -Centec: [![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/) -Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/) -Marvell: [![Marvell](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-all/) +Cavium: [![Cavium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-201709/) +Centec: [![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-201709/) +Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201709/) +Marvell: [![Marvell](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-201709/) Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201709/) # sonic-buildimage @@ -30,12 +39,17 @@ Please refer to [SONiC roadmap](https://github.com/Azure/SONiC/wiki/Sonic-Roadma ## Clone or fetch the code repository with all git submodules To clone the code repository recursively, assuming git version 1.9 or newer: - git clone --recursive https://github.com/Azure/sonic-buildimage.git + git clone https://github.com/Azure/sonic-buildimage.git ## Usage To build SONiC installer image and docker images, run the following commands: + cd sonic-buildimage + + # (Optional) Checkout a specific branch. By default, it uses master branch + git checkout [branch_name] + # Execute make init once after cloning the repo, or fetched remote repo with submodule updates make init @@ -46,8 +60,9 @@ To build SONiC installer image and docker images, run the following commands: **NOTE**: -- We recommend reserving 50G free space to build one platform. -- Use ```http_proxy=[your_proxy] https_proxy=[your_proxy] make``` to enable http(s) proxy in the build process. +- Recommend reserving 50G free space to build one platform. +- Use `http_proxy=[your_proxy] https_proxy=[your_proxy] make` to enable http(s) proxy in the build process. +- Add your user account to `docker` group and use your user account to make. `root` or `sudo` are not supported. The SONiC installer contains all docker images needed. SONiC uses one image for all devices of a same ASIC vendor. The supported ASIC vendors are: diff --git a/build_debian.sh b/build_debian.sh index 1aaa660eefd..2b2294194d7 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -68,7 +68,7 @@ touch $FILESYSTEM_ROOT/$PLATFORM_DIR/firsttime ## Build a basic Debian system by debootstrap echo '[INFO] Debootstrap...' -sudo http_proxy=$http_proxy debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://ftp.us.debian.org/debian +sudo http_proxy=$http_proxy debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://debian-archive.trafficmanager.net/debian ## Config hostname and hosts, otherwise 'sudo ...' will complain 'sudo: unable to resolve host ...' sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '$HOSTNAME' > /etc/hostname" @@ -114,7 +114,7 @@ echo '[INFO] Install SONiC linux kernel image' ## Note: duplicate apt-get command to ensure every line return zero sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/initramfs-tools_*.deb || \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f -sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/linux-image-3.16.0-4-amd64_*.deb || \ +sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/linux-image-3.16.0-5-amd64_*.deb || \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f ## Update initramfs for booting with squashfs+aufs @@ -133,6 +133,10 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/setfacl sudo cp files/initramfs-tools/arista-net $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-net sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-net +# Hook into initramfs: resize root partition after migration from another NOS to SONiC on Dell switches +sudo cp files/initramfs-tools/resize-rootfs $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/resize-rootfs +sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/resize-rootfs + ## Hook into initramfs: after partition mount and loop file mount ## 1. Prepare layered file system ## 2. Bind-mount docker working directory (docker aufs cannot work over aufs rootfs) @@ -140,15 +144,18 @@ sudo cp files/initramfs-tools/union-mount $FILESYSTEM_ROOT/etc/initramfs-tools/s sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/union-mount sudo cp files/initramfs-tools/varlog $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/varlog sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/varlog +# Management interface (eth0) dhcp can be optionally turned off (during a migration from another NOS to SONiC) +sudo cp files/initramfs-tools/mgmt-intf-dhcp $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/mgmt-intf-dhcp +sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/mgmt-intf-dhcp sudo cp files/initramfs-tools/union-fsck $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck sudo chroot $FILESYSTEM_ROOT update-initramfs -u ## Install latest intel igb driver -sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko +sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-5-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko ## Install latest intel ixgbe driver -sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko +sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-5-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko ## Install docker echo '[INFO] Install docker' @@ -216,13 +223,18 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in less \ unzip \ gdisk \ - grub2-common + sysfsutils \ + grub2-common \ + ethtool sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \ grub-pc-bin sudo mv $FILESYSTEM_ROOT/grub-pc-bin*.deb $FILESYSTEM_ROOT/$PLATFORM_DIR/x86_64-grub +sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/libwrap0_*.deb || \ + sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f + ## Disable kexec supported reboot which was installed by default sudo sed -i 's/LOAD_KEXEC=true/LOAD_KEXEC=false/' $FILESYSTEM_ROOT/etc/default/kexec @@ -232,6 +244,8 @@ sudo cp files/sshd/host-ssh-keygen.sh $FILESYSTEM_ROOT/usr/local/bin/ sudo cp -f files/sshd/sshd.service $FILESYSTEM_ROOT/lib/systemd/system/ssh.service ## Config sshd sudo augtool --autosave "set /files/etc/ssh/sshd_config/UseDNS no" -r $FILESYSTEM_ROOT +sudo sed -i 's/^ListenAddress ::/#ListenAddress ::/' $FILESYSTEM_ROOT/etc/ssh/sshd_config +sudo sed -i 's/^#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' $FILESYSTEM_ROOT/etc/ssh/sshd_config ## Config monit sudo sed -i ' @@ -290,6 +304,7 @@ set /files/etc/sysctl.conf/net.ipv6.conf.all.accept_dad 0 set /files/etc/sysctl.conf/net.ipv6.conf.eth0.accept_ra_defrtr 0 set /files/etc/sysctl.conf/net.core.rmem_max 2097152 +set /files/etc/sysctl.conf/net.core.wmem_max 2097152 " -r $FILESYSTEM_ROOT ## docker-py is needed by Ansible docker module @@ -317,11 +332,11 @@ sudo cp files/dhcp/dhclient.conf $FILESYSTEM_ROOT/etc/dhcp/ ## Version file sudo mkdir -p $FILESYSTEM_ROOT/etc/sonic sudo tee $FILESYSTEM_ROOT/etc/sonic/sonic_version.yml > /dev/null < ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -1014,224 +1014,224 @@ DeviceInterfaceLink - switch1 + sonic tenGigE0 ARISTA01T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE1 ARISTA02T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE2 ARISTA03T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE3 ARISTA04T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE4 ARISTA05T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE5 ARISTA06T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE6 ARISTA07T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE7 ARISTA08T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE8 ARISTA09T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE9 ARISTA10T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE10 ARISTA11T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE11 ARISTA12T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE12 ARISTA13T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE13 ARISTA14T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE14 ARISTA15T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE15 ARISTA16T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE16 ARISTA01T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE17 ARISTA02T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE18 ARISTA03T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE19 ARISTA04T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE20 ARISTA05T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE21 ARISTA06T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE22 ARISTA07T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE23 ARISTA08T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE24 ARISTA09T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE25 ARISTA10T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE26 ARISTA11T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE27 ARISTA12T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE28 ARISTA13T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE29 ARISTA14T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE30 ARISTA15T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE31 ARISTA16T0 tenGigE1 @@ -1239,7 +1239,7 @@ - switch1 + sonic Accton-AS5712-54X @@ -1247,7 +1247,7 @@ - switch1 + sonic DhcpResources @@ -1269,6 +1269,6 @@ - switch1 + sonic Accton-AS5712-54X diff --git a/device/accton/x86_64-accton_as5712_54x-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as5712_54x-r0/plugins/psuutil.py new file mode 100755 index 00000000000..841070637b3 --- /dev/null +++ b/device/accton/x86_64-accton_as5712_54x-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 1: "57-0038", + 2: "58-003b", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py index d554910ac5c..c30ba62c51b 100755 --- a/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py +++ b/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py @@ -20,84 +20,87 @@ class SfpUtil(SfpUtilBase): QSFP_PORT_END = 72 BASE_VAL_PATH = "/sys/class/i2c-adapter/i2c-{0}/{1}-0050/" + BASE_OOM_PATH = "/sys/bus/i2c/devices/{0}-0050/" + BASE_CPLD2_PATH = "/sys/bus/i2c/devices/0-0061/" + BASE_CPLD3_PATH = "/sys/bus/i2c/devices/0-0062/" _port_to_is_present = {} _port_to_lp_mode = {} _port_to_eeprom_mapping = {} _port_to_i2c_mapping = { - 0: [2, 2], - 1: [3, 3], - 2: [4, 4], - 3: [5, 5], - 4: [6, 6], - 5: [7, 7], - 6: [8, 8], - 7: [9, 9], - 8: [10, 10], - 9: [11, 11], - 10: [12, 12], - 11: [13, 13], - 12: [14, 14], - 13: [15, 15], - 14: [16, 16], - 15: [17, 17], - 16: [18, 18], - 17: [19, 19], - 18: [20, 20], - 19: [21, 21], - 20: [22, 22], - 21: [23, 23], - 22: [24, 24], - 23: [25, 25], - 24: [26, 26], - 25: [27, 27], - 26: [28, 28], - 27: [29, 29], - 28: [30, 30], - 29: [31, 31], - 30: [32, 32], - 31: [33, 33], - 32: [34, 34], - 33: [35, 35], - 34: [36, 36], - 35: [37, 37], - 36: [38, 38], - 37: [39, 39], - 38: [40, 40], - 39: [41, 41], - 40: [42, 42], - 41: [43, 43], - 42: [44, 44], - 43: [45, 45], - 44: [46, 46], - 45: [47, 47], - 46: [48, 48], - 47: [49, 49], - 48: [50, 50], #QSFP49 - 49: [50, 50], - 50: [50, 50], - 51: [50, 50], - 52: [52, 52], #QSFP50 - 53: [52, 52], - 54: [52, 52], - 55: [52, 52], - 56: [54, 54], #QSFP51 - 57: [54, 54], - 58: [54, 54], - 59: [54, 54], - 60: [51, 51], #QSFP52 - 61: [51, 51], - 62: [51, 51], - 63: [51, 51], + 0: [1, 2], + 1: [2, 3], + 2: [3, 4], + 3: [4, 5], + 4: [5, 6], + 5: [6, 7], + 6: [7, 8], + 7: [8, 9], + 8: [9, 10], + 9: [10, 11], + 10: [11, 12], + 11: [12, 13], + 12: [13, 14], + 13: [14, 15], + 14: [15, 16], + 15: [16, 17], + 16: [17, 18], + 17: [18, 19], + 18: [19, 20], + 19: [20, 21], + 20: [21, 22], + 21: [22, 23], + 22: [23, 24], + 23: [24, 25], + 24: [25, 26], + 25: [26, 27], + 26: [27, 28], + 27: [28, 29], + 28: [29, 30], + 29: [30, 31], + 30: [31, 32], + 31: [32, 33], + 32: [33, 34], + 33: [34, 35], + 34: [35, 36], + 35: [36, 37], + 36: [37, 38], + 37: [38, 39], + 38: [39, 40], + 39: [40, 41], + 40: [41, 42], + 41: [42, 43], + 42: [43, 44], + 43: [44, 45], + 44: [45, 46], + 45: [46, 47], + 46: [47, 48], + 47: [48, 49], + 48: [49, 50],#QSFP49 + 49: [49, 50], + 50: [49, 50], + 51: [49, 50], + 52: [50, 52],#QSFP50 + 53: [50, 52], + 54: [50, 52], + 55: [50, 52], + 56: [51, 54],#QSFP51 + 57: [51, 54], + 58: [51, 54], + 59: [51, 54], + 60: [52, 51],#QSFP52 + 61: [52, 51], + 62: [52, 51], + 63: [52, 51], 64: [53, 53], #QSFP53 65: [53, 53], 66: [53, 53], 67: [53, 53], - 68: [55, 55], #QSFP54 - 69: [55, 55], - 70: [55, 55], - 71: [55, 55], + 68: [54, 55],#QSFP54 + 69: [54, 55], + 70: [54, 55], + 71: [54, 55], } @property @@ -125,12 +128,12 @@ def port_to_eeprom_mapping(self): return self._port_to_eeprom_mapping def __init__(self): - eeprom_path = self.BASE_VAL_PATH + "sfp_eeprom" + eeprom_path = self.BASE_OOM_PATH + "eeprom" for x in range(0, self.port_end+1): self.port_to_eeprom_mapping[x] = eeprom_path.format( - self._port_to_i2c_mapping[x][0], - self._port_to_i2c_mapping[x][1]) + self._port_to_i2c_mapping[x][1] + ) SfpUtilBase.__init__(self) @@ -139,8 +142,13 @@ def get_presence(self, port_num): if port_num < self.port_start or port_num > self.port_end: return False - present_path = self.BASE_VAL_PATH + "sfp_is_present" - self.__port_to_is_present = present_path.format(self._port_to_i2c_mapping[port_num][0], self._port_to_i2c_mapping[port_num][1]) + if port_num < 24: + present_path = self.BASE_CPLD2_PATH + "module_present_" + str(self._port_to_i2c_mapping[port_num][0]) + else: + present_path = self.BASE_CPLD3_PATH + "module_present_" + str(self._port_to_i2c_mapping[port_num][0]) + + self.__port_to_is_present = present_path + try: val_file = open(self.__port_to_is_present) @@ -161,11 +169,10 @@ def get_low_power_mode(self, port_num): if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: return False - lp_mode_path = self.BASE_VAL_PATH + "sfp_lp_mode" - self.__port_to_lp_mode = lp_mode_path.format(self._port_to_i2c_mapping[port_num][0], self._port_to_i2c_mapping[port_num][1]) + lp_mode_path = self.BASE_CPLD3_PATH + "module_lp_mode_" + str(self._port_to_i2c_mapping[port_num][0]) try: - val_file = open(self.__port_to_lp_mode) + val_file = open(lp_mode_path) except IOError as e: print "Error: unable to open file: %s" % str(e) return False @@ -183,11 +190,10 @@ def set_low_power_mode(self, port_num, lpmode): if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: return False - lp_mode_path = self.BASE_VAL_PATH + "sfp_lp_mode" - self.__port_to_lp_mode = lp_mode_path.format(self._port_to_i2c_mapping[port_num][0], self._port_to_i2c_mapping[port_num][1]) + lp_mode_path = self.BASE_CPLD3_PATH + "module_lp_mode_" + str(self._port_to_i2c_mapping[port_num][0]) try: - reg_file = open(self.__port_to_lp_mode, 'r+') + reg_file = open(lp_mode_path, 'r+') except IOError as e: print "Error: unable to open file: %s" % str(e) return False @@ -206,10 +212,10 @@ def reset(self, port_num): if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: return False - mod_rst_path = self.BASE_VAL_PATH + "sfp_mod_rst" - self.__port_to_mod_rst = mod_rst_path.format(self._port_to_i2c_mapping[port_num][0], self._port_to_i2c_mapping[port_num][1]) + mod_rst_path = lp_mode_path = self.BASE_CPLD3_PATH + "module_reset_" + str(self._port_to_i2c_mapping[port_num][0]) + try: - reg_file = open(self.__port_to_mod_rst, 'r+') + reg_file = open(mod_rst_path, 'r+') except IOError as e: print "Error: unable to open file: %s" % str(e) return False diff --git a/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/port_config.ini b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/port_config.ini new file mode 100644 index 00000000000..6e5276fc726 --- /dev/null +++ b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/port_config.ini @@ -0,0 +1,58 @@ +# name lanes alias index +Ethernet0 8 Ethernet1/1 0 +Ethernet1 9 Ethernet2/1 1 +Ethernet2 10 Ethernet3/1 2 +Ethernet3 11 Ethernet4/1 3 +Ethernet4 12 Ethernet5/1 4 +Ethernet5 13 Ethernet6/1 5 +Ethernet6 14 Ethernet7/1 6 +Ethernet7 15 Ethernet8/1 7 +Ethernet8 16 Ethernet9/1 8 +Ethernet9 17 Ethernet10/1 9 +Ethernet10 18 Ethernet11/1 10 +Ethernet11 19 Ethernet12/1 11 +Ethernet12 20 Ethernet13/1 12 +Ethernet13 21 Ethernet14/1 13 +Ethernet14 22 Ethernet15/1 14 +Ethernet15 23 Ethernet16/1 15 +Ethernet16 32 Ethernet17/1 16 +Ethernet17 33 Ethernet18/1 17 +Ethernet18 34 Ethernet19/1 18 +Ethernet19 35 Ethernet20/1 19 +Ethernet20 40 Ethernet21/1 20 +Ethernet21 41 Ethernet22/1 21 +Ethernet22 42 Ethernet23/1 22 +Ethernet23 43 Ethernet24/1 23 +Ethernet24 48 Ethernet25/1 24 +Ethernet25 49 Ethernet26/1 25 +Ethernet26 50 Ethernet27/1 26 +Ethernet27 51 Ethernet28/1 27 +Ethernet28 56 Ethernet29/1 28 +Ethernet29 57 Ethernet30/1 29 +Ethernet30 58 Ethernet31/1 30 +Ethernet31 59 Ethernet32/1 31 +Ethernet32 64 Ethernet33/1 32 +Ethernet33 65 Ethernet34/1 33 +Ethernet34 66 Ethernet35/1 34 +Ethernet35 67 Ethernet36/1 35 +Ethernet36 68 Ethernet37/1 36 +Ethernet37 69 Ethernet38/1 37 +Ethernet38 70 Ethernet39/1 38 +Ethernet39 71 Ethernet40/1 39 +Ethernet40 72 Ethernet41/1 40 +Ethernet41 73 Ethernet42/1 41 +Ethernet42 74 Ethernet43/1 42 +Ethernet43 75 Ethernet44/1 43 +Ethernet44 76 Ethernet45/1 44 +Ethernet45 77 Ethernet46/1 45 +Ethernet46 78 Ethernet47/1 46 +Ethernet47 79 Ethernet48/1 47 +Ethernet48 80 Ethernet49/1 48 +Ethernet49 81 Ethernet50/1 49 +Ethernet50 82 Ethernet51/1 50 +Ethernet51 83 Ethernet52/1 51 +Ethernet52 84,85,86,87 Ethernet53/1 52 +Ethernet53 104,105,106,107 Ethernet54/1 53 +Ethernet54 108,109,110,111 Ethernet55/1 54 +Ethernet55 112,113,114,115 Ethernet56/1 55 +Ethernet56 116,117,118,119 Ethernet57/1 56 diff --git a/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/port_config_as7116.ini b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/port_config_as7116.ini new file mode 100644 index 00000000000..0c124743d9e --- /dev/null +++ b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/port_config_as7116.ini @@ -0,0 +1,55 @@ +# name lanes alias index +Ethernet0 8 Ethernet1/1 0 +Ethernet1 9 Ethernet2/1 1 +Ethernet2 10 Ethernet3/1 2 +Ethernet3 11 Ethernet4/1 3 +Ethernet4 12 Ethernet5/1 4 +Ethernet5 13 Ethernet6/1 5 +Ethernet6 14 Ethernet7/1 6 +Ethernet7 15 Ethernet8/1 7 +Ethernet8 16 Ethernet9/1 8 +Ethernet9 17 Ethernet10/1 9 +Ethernet10 18 Ethernet11/1 10 +Ethernet11 19 Ethernet12/1 11 +Ethernet12 20 Ethernet13/1 12 +Ethernet13 21 Ethernet14/1 13 +Ethernet14 22 Ethernet15/1 14 +Ethernet15 23 Ethernet16/1 15 +Ethernet16 32 Ethernet17/1 16 +Ethernet17 33 Ethernet18/1 17 +Ethernet18 34 Ethernet19/1 18 +Ethernet19 35 Ethernet20/1 19 +Ethernet20 40 Ethernet21/1 20 +Ethernet21 41 Ethernet22/1 21 +Ethernet22 42 Ethernet23/1 22 +Ethernet23 43 Ethernet24/1 23 +Ethernet24 48 Ethernet25/1 24 +Ethernet25 49 Ethernet26/1 25 +Ethernet26 50 Ethernet27/1 26 +Ethernet27 51 Ethernet28/1 27 +Ethernet28 56 Ethernet29/1 28 +Ethernet29 57 Ethernet30/1 29 +Ethernet30 58 Ethernet31/1 30 +Ethernet31 59 Ethernet32/1 31 +Ethernet32 64 Ethernet33/1 32 +Ethernet33 65 Ethernet34/1 33 +Ethernet34 66 Ethernet35/1 34 +Ethernet35 67 Ethernet36/1 35 +Ethernet36 68 Ethernet37/1 36 +Ethernet37 69 Ethernet38/1 37 +Ethernet38 70 Ethernet39/1 38 +Ethernet39 71 Ethernet40/1 39 +Ethernet40 72 Ethernet41/1 40 +Ethernet41 73 Ethernet42/1 41 +Ethernet42 74 Ethernet43/1 42 +Ethernet43 75 Ethernet44/1 43 +Ethernet44 76 Ethernet45/1 44 +Ethernet45 77 Ethernet46/1 45 +Ethernet46 78 Ethernet47/1 46 +Ethernet47 79 Ethernet48/1 47 +Ethernet48 80,81,82,83 Ethernet49/1 48 +Ethernet49 84,85,86,87 Ethernet50/1 49 +Ethernet50 104,105,106,107 Ethernet51/1 50 +Ethernet51 108,109,110,111 Ethernet52/1 51 +Ethernet52 112,113,114,115 Ethernet53/1 52 +Ethernet53 116,117,118,119 Ethernet54/1 56 \ No newline at end of file diff --git a/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/sai.profile b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/sai.profile new file mode 100644 index 00000000000..d43b2a33f42 --- /dev/null +++ b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X/sai.profile @@ -0,0 +1,2 @@ +SAI_INIT_CONFIG_FILE=/etc/nps/tau-as7116-4806.cfg +SAI_DSH_CONFIG_FILE=/etc/nps/tau-as7116-4806.dsh diff --git a/device/accton/x86_64-accton_as7116_54x-r0/installer.conf b/device/accton/x86_64-accton_as7116_54x-r0/installer.conf new file mode 100644 index 00000000000..925a32fc0c3 --- /dev/null +++ b/device/accton/x86_64-accton_as7116_54x-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 +CONSOLE_SPEED=115200 diff --git a/device/accton/x86_64-accton_as7116_54x-r0/led_proc_init.nps b/device/accton/x86_64-accton_as7116_54x-r0/led_proc_init.nps new file mode 100644 index 00000000000..9a97d94c0b0 --- /dev/null +++ b/device/accton/x86_64-accton_as7116_54x-r0/led_proc_init.nps @@ -0,0 +1,20 @@ +#This configuration file is for customer init value feature. Please refer to mtk_cfg.h/mtk_cfg.c for detail. +#1. The lines beginning with # are comment lines. The lines beginning with number are the setting lines. +#2. There are five parameters which can be set. +# 1) the first is unit. +# 2) the second is NPS_CFG_TYPE_XXX. Refer to NPS_CFG_TYPE_T. +# 3) the 3-5 are {param0, param1, value} pairs. Refer to NPS_CFG_VALUE_T. Support HEX format. +# 4) the (unit, NPS_CFG_TYPE_XXX, param0, param1) group is the key to get the correspingding value. +# There should be no same (unit, NPS_CFG_TYPE_XXX, param0, param1) group. +#3. User must follow correct format to apply the setting. Please refer to below commentted example(#0 NPS_CFG_TYPE_L2_ADDR_MODE 0 0 1); +#4. Usage under the linux shell: +# 1) ./image-path/image-name -c cfg-path/NPS_Ari_EVB_24.cfg : mamually specify directory path if they are not in current work dirctory. +# 2) ./image-name -c NPS_Ari_EVB_24.cfg : the image and the NPS_Ari_EVB_24.cfg are in the current work directory. + +#unit NPS_CFG_TYPE_XXX param0 param1 value +#---- ---------------- ------ ------ ----- +0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 +0 NPS_CFG_TYPE_LED_CFG 0 0 3 +0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 1 diff --git a/device/accton/x86_64-accton_as7116_54x-r0/minigraph.xml b/device/accton/x86_64-accton_as7116_54x-r0/minigraph.xml new file mode 100644 index 00000000000..d538a8cbd70 --- /dev/null +++ b/device/accton/x86_64-accton_as7116_54x-r0/minigraph.xml @@ -0,0 +1,1074 @@ + + + + + + ARISTA01T0 + 10.1.1.33 + switch1 + 10.0.0.32 + 1 + 180 + 60 + + + switch1 + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + switch1 + 10.0.0.34 + 1 + 180 + 60 + + + switch1 + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + switch1 + 10.0.0.36 + 1 + 180 + 60 + + + switch1 + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + switch1 + 10.0.0.38 + 1 + 180 + 60 + + + switch1 + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + switch1 + 10.0.0.40 + 1 + 180 + 60 + + + switch1 + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + switch1 + 10.0.0.42 + 1 + 180 + 60 + + + switch1 + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + switch1 + 10.0.0.44 + 1 + 180 + 60 + + + switch1 + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + switch1 + 10.0.0.46 + 1 + 180 + 60 + + + switch1 + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + switch1 + 10.0.0.48 + 1 + 180 + 60 + + + switch1 + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + switch1 + 10.0.0.50 + 1 + 180 + 60 + + + switch1 + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + switch1 + 10.0.0.52 + 1 + 180 + 60 + + + switch1 + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + switch1 + 10.0.0.54 + 1 + 180 + 60 + + + switch1 + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + switch1 + 10.0.0.56 + 1 + 180 + 60 + + + switch1 + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + switch1 + 10.0.0.58 + 1 + 180 + 60 + + + switch1 + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + switch1 + 10.0.0.60 + 1 + 180 + 60 + + + switch1 + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + switch1 + 10.0.0.62 + 1 + 180 + 60 + + + switch1 + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + switch1 + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + switch1 + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + switch1 + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + switch1 + Accton-AS7116-54X + + + + + + + switch1 + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + switch1 + Accton-AS7116-54X +
diff --git a/device/accton/x86_64-accton_as7116_54x-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as7116_54x-r0/plugins/eeprom.py new file mode 100644 index 00000000000..1e7d1046d93 --- /dev/null +++ b/device/accton/x86_64-accton_as7116_54x-r0/plugins/eeprom.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_as7116_54x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7116_54x-r0/plugins/sfputil.py new file mode 100644 index 00000000000..974bedc4db1 --- /dev/null +++ b/device/accton/x86_64-accton_as7116_54x-r0/plugins/sfputil.py @@ -0,0 +1,155 @@ +#!/usr/bin/env python + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + + +class SfpUtil(SfpUtilBase): + """Platform specific SfpUtill class""" + + _port_start = 0 + _port_end = 53 + _qsfp_port_start = 48 + _ports_in_block = 54 + + _port_to_eeprom_mapping = {} + _port_to_i2c_mapping = { + 0 : 37, + 1 : 38, + 2 : 39, + 3 : 40, + 4 : 41, + 5 : 42, + 6 : 43, + 7 : 44, + 8 : 45, + 9 : 46, + 10 : 47, + 11 : 48, + 12 : 49, + 13 : 50, + 14 : 51, + 15 : 52, + 16 : 53, + 17 : 54, + 18 : 55, + 19 : 56, + 20 : 57, + 21 : 58, + 22 : 59, + 23 : 60, + 24 : 61, + 25 : 62, + 26 : 63, + 27 : 64, + 28 : 65, + 29 : 66, + 30 : 67, + 31 : 68, + 32 : 69, + 33 : 70, + 34 : 71, + 35 : 72, + 36 : 73, + 37 : 74, + 38 : 75, + 39 : 76, + 40 : 77, + 41 : 78, + 42 : 79, + 43 : 80, + 44 : 81, + 45 : 82, + 46 : 83, + 47 : 84, + 48 : 21, + 49 : 22, + 50 : 23, + 51 : 24, + 52 : 25, + 53 : 26, + } + + _qsfp_ports = range(_qsfp_port_start, _ports_in_block + 1) + + def __init__(self): + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_eeprom' + for x in range(self._port_start, self._port_end + 1): + port_eeprom_path = eeprom_path.format(self._port_to_i2c_mapping[x]) + if x == 53: + self._port_to_eeprom_mapping[56] = port_eeprom_path # ugly!!!! + else: + self._port_to_eeprom_mapping[x] = port_eeprom_path + + SfpUtilBase.__init__(self) + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_port_reset" + port_ps = path.format(self._port_to_i2c_mapping[port_num]) + + try: + reg_file = open(port_ps, 'w') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + #toggle reset + reg_file.seek(0) + reg_file.write('1') + time.sleep(1) + reg_file.seek(0) + reg_file.write('0') + reg_file.close() + return True + + def set_low_power_mode(self, port_nuM, lpmode): + raise NotImplementedError + + def get_low_power_mode(self, port_num): + raise NotImplementedError + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_is_present" + port_ps = path.format(self._port_to_i2c_mapping[port_num]) + + + try: + reg_file = open(port_ps) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_file.readline().rstrip() + if reg_value == '1': + return True + + return False + + @property + def port_start(self): + return self._port_start + + @property + def port_end(self): + return self._port_end + + @property + def qsfp_ports(self): + return self._qsfp_ports + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + diff --git a/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/port_config.ini b/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/port_config.ini new file mode 100755 index 00000000000..74865956f61 --- /dev/null +++ b/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/port_config.ini @@ -0,0 +1,55 @@ +# name lanes +Ethernet0 0 +Ethernet1 1 +Ethernet2 2 +Ethernet3 3 +Ethernet4 4 +Ethernet5 5 +Ethernet6 6 +Ethernet7 7 +Ethernet8 8 +Ethernet9 9 +Ethernet10 10 +Ethernet11 11 +Ethernet12 12 +Ethernet13 13 +Ethernet14 14 +Ethernet15 15 +Ethernet16 16 +Ethernet17 17 +Ethernet18 18 +Ethernet19 19 +Ethernet20 20 +Ethernet21 21 +Ethernet22 22 +Ethernet23 23 +Ethernet24 24 +Ethernet25 25 +Ethernet26 26 +Ethernet27 27 +Ethernet28 28 +Ethernet29 29 +Ethernet30 30 +Ethernet31 31 +Ethernet32 32 +Ethernet33 33 +Ethernet34 34 +Ethernet35 35 +Ethernet36 36 +Ethernet37 37 +Ethernet38 38 +Ethernet39 39 +Ethernet40 40 +Ethernet41 41 +Ethernet42 42 +Ethernet43 43 +Ethernet44 44 +Ethernet45 45 +Ethernet46 46 +Ethernet47 47 +Ethernet48 48 +Ethernet49 49 +Ethernet50 50 +Ethernet51 51 +Ethernet52 52 +Ethernet53 53 diff --git a/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/qos.json b/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/qos.json new file mode 100755 index 00000000000..3e01af3f2c6 --- /dev/null +++ b/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/qos.json @@ -0,0 +1,166 @@ +{ + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0":"0", + "1":"0", + "2":"0", + "3":"3", + "4":"4", + "5":"0", + "6":"0", + "7":"0", + "8":"1", + "9":"0", + "10":"0", + "11":"0", + "12":"0", + "13":"0", + "14":"0", + "15":"0", + "16":"0", + "17":"0", + "18":"0", + "19":"0", + "20":"0", + "21":"0", + "22":"0", + "23":"0", + "24":"0", + "25":"0", + "26":"0", + "27":"0", + "28":"0", + "29":"0", + "30":"0", + "31":"0", + "32":"0", + "33":"0", + "34":"0", + "35":"0", + "36":"0", + "37":"0", + "38":"0", + "39":"0", + "40":"0", + "41":"0", + "42":"0", + "43":"0", + "44":"0", + "45":"0", + "46":"0", + "47":"0", + "48":"0", + "49":"0", + "50":"0", + "51":"0", + "52":"0", + "53":"0", + "54":"0", + "55":"0", + "56":"0", + "57":"0", + "58":"0", + "59":"0", + "60":"0", + "61":"0", + "62":"0", + "63":"0" + } + }, + "SCHEDULER": { + "scheduler.0": { + "type":"DWRR", + "weight": "25" + }, + "scheduler.1": { + "type":"DWRR", + "weight": "30" + }, + "scheduler.2": { + "type":"DWRR", + "weight": "20" + } + }, + "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "PORT_QOS_MAP": { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_enable": "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSY": { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"516096", + "red_min_threshold":"516096", + "yellow_max_threshold":"516096", + "yellow_min_threshold":"516096", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + }, + "AZURE_LOSSLESS": { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"516096", + "red_min_threshold":"516096", + "yellow_max_threshold":"516096", + "yellow_min_threshold":"516096", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + } + }, + "QUEUE": { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0": { + "scheduler" : "[SCHEDULER|scheduler.1]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|1": { + "scheduler" : "[SCHEDULER|scheduler.2]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0-1": { + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|3-4": { + "scheduler" : "[SCHEDULER|scheduler.0]", + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]" + } + } +} + diff --git a/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/sai.profile b/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/sai.profile new file mode 100755 index 00000000000..178dcd00285 --- /dev/null +++ b/device/accton/x86_64-accton_as7212_54x-r0/AS7212-54x/sai.profile @@ -0,0 +1,2 @@ +mode=1 +hwId=as7212-54x diff --git a/device/accton/x86_64-accton_as7212_54x-r0/installer.conf b/device/accton/x86_64-accton_as7212_54x-r0/installer.conf new file mode 100755 index 00000000000..14404194ef5 --- /dev/null +++ b/device/accton/x86_64-accton_as7212_54x-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x2f8 +CONSOLE_DEV=1 +CONSOLE_SPEED=115200 diff --git a/device/accton/x86_64-accton_as7212_54x-r0/minigraph.xml b/device/accton/x86_64-accton_as7212_54x-r0/minigraph.xml new file mode 100755 index 00000000000..8dd87023110 --- /dev/null +++ b/device/accton/x86_64-accton_as7212_54x-r0/minigraph.xml @@ -0,0 +1,1074 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + switch1 + 10.0.0.32 + 1 + 180 + 60 + + + switch1 + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + switch1 + 10.0.0.34 + 1 + 180 + 60 + + + switch1 + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + switch1 + 10.0.0.36 + 1 + 180 + 60 + + + switch1 + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + switch1 + 10.0.0.38 + 1 + 180 + 60 + + + switch1 + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + switch1 + 10.0.0.40 + 1 + 180 + 60 + + + switch1 + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + switch1 + 10.0.0.42 + 1 + 180 + 60 + + + switch1 + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + switch1 + 10.0.0.44 + 1 + 180 + 60 + + + switch1 + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + switch1 + 10.0.0.46 + 1 + 180 + 60 + + + switch1 + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + switch1 + 10.0.0.48 + 1 + 180 + 60 + + + switch1 + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + switch1 + 10.0.0.50 + 1 + 180 + 60 + + + switch1 + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + switch1 + 10.0.0.52 + 1 + 180 + 60 + + + switch1 + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + switch1 + 10.0.0.54 + 1 + 180 + 60 + + + switch1 + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + switch1 + 10.0.0.56 + 1 + 180 + 60 + + + switch1 + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + switch1 + 10.0.0.58 + 1 + 180 + 60 + + + switch1 + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + switch1 + 10.0.0.60 + 1 + 180 + 60 + + + switch1 + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + switch1 + 10.0.0.62 + 1 + 180 + 60 + + + switch1 + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + switch1 + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + switch1 + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + switch1 + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + switch1 + AS7212-54x + + + + + + + switch1 + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + switch1 + AS7212-54x +
diff --git a/device/accton/x86_64-accton_as7212_54x-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as7212_54x-r0/plugins/eeprom.py new file mode 100755 index 00000000000..7681caafeef --- /dev/null +++ b/device/accton/x86_64-accton_as7212_54x-r0/plugins/eeprom.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom" + #Two i2c buses might get flipped order, check them both. + if not os.path.exists(self.eeprom_path): + self.eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_as7212_54x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7212_54x-r0/plugins/sfputil.py new file mode 100755 index 00000000000..925c6cb0d73 --- /dev/null +++ b/device/accton/x86_64-accton_as7212_54x-r0/plugins/sfputil.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + + +class sfputil(SfpUtilBase): + """Platform specific sfputil class""" + + port_start = 0 + port_end = 31 + ports_in_block = 32 + + port_to_eeprom_mapping = {} + port_to_i2c_mapping = { + 9 : 18, + 10 : 19, + 11 : 20, + 12 : 21, + 1 : 22, + 2 : 23, + 3 : 24, + 4 : 25, + 6 : 26, + 5 : 27, + 8 : 28, + 7 : 29, + 13 : 30, + 14 : 31, + 15 : 32, + 16 : 33, + 17 : 34, + 18 : 35, + 19 : 36, + 20 : 37, + 25 : 38, + 26 : 39, + 27 : 40, + 28 : 41, + 29 : 42, + 30 : 43, + 31 : 44, + 32 : 45, + 21 : 46, + 22 : 47, + 23 : 48, + 24 : 49, + } + + _qsfp_ports = range(0, ports_in_block + 1) + + def __init__(self): + # Override port_to_eeprom_mapping for class initialization + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_eeprom' + for x in range(self.port_start, self.port_end + 1): + port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x+1]) + self.port_to_eeprom_mapping[x] = port_eeprom_path + SfpUtilBase.__init__(self) + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_port_reset" + port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + + try: + reg_file = open(port_ps, 'w') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + #toggle reset + reg_file.seek(0) + reg_file.write('1') + time.sleep(1) + reg_file.seek(0) + reg_file.write('0') + reg_file.close() + return True + + def set_low_power_mode(self, port_nuM, lpmode): + raise NotImplementedErro + + def get_low_power_mode(self, port_num): + raise NotImplementedErro + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_is_present" + port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + + + try: + reg_file = open(port_ps) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_file.readline().rstrip() + if reg_value == '1': + return True + + return False + + @property + def port_start(self): + return self._port_start + + @property + def port_end(self): + return self._port_end + + @property + def qsfp_ports(self): + return range(0, self.ports_in_block + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping diff --git a/device/accton/x86_64-accton_as7312_54x-r0/Accton-AS7312-54X/port_config.ini b/device/accton/x86_64-accton_as7312_54x-r0/Accton-AS7312-54X/port_config.ini index 8eeb6a993cb..2c4d0c02377 100644 --- a/device/accton/x86_64-accton_as7312_54x-r0/Accton-AS7312-54X/port_config.ini +++ b/device/accton/x86_64-accton_as7312_54x-r0/Accton-AS7312-54X/port_config.ini @@ -1,55 +1,55 @@ -# name lanes alias -Ethernet0 41 twentyfiveGigE1 -Ethernet1 42 twentyfiveGigE2 -Ethernet2 43 twentyfiveGigE3 -Ethernet3 44 twentyfiveGigE4 -Ethernet4 49 twentyfiveGigE5 -Ethernet5 50 twentyfiveGigE6 -Ethernet6 51 twentyfiveGigE7 -Ethernet7 52 twentyfiveGigE8 -Ethernet8 53 twentyfiveGigE9 -Ethernet9 54 twentyfiveGigE10 -Ethernet10 55 twentyfiveGigE11 -Ethernet11 56 twentyfiveGigE12 -Ethernet12 65 twentyfiveGigE13 -Ethernet13 66 twentyfiveGigE14 -Ethernet14 67 twentyfiveGigE15 -Ethernet15 68 twentyfiveGigE16 -Ethernet16 33 twentyfiveGigE17 -Ethernet17 34 twentyfiveGigE18 -Ethernet18 35 twentyfiveGigE19 -Ethernet19 36 twentyfiveGigE20 -Ethernet20 37 twentyfiveGigE21 -Ethernet21 38 twentyfiveGigE22 -Ethernet22 39 twentyfiveGigE23 -Ethernet23 40 twentyfiveGigE24 -Ethernet24 69 twentyfiveGigE25 -Ethernet25 70 twentyfiveGigE26 -Ethernet26 71 twentyfiveGigE27 -Ethernet27 72 twentyfiveGigE28 -Ethernet28 81 twentyfiveGigE29 -Ethernet29 82 twentyfiveGigE30 -Ethernet30 83 twentyfiveGigE31 -Ethernet31 84 twentyfiveGigE32 -Ethernet32 85 twentyfiveGigE33 -Ethernet33 86 twentyfiveGigE34 -Ethernet34 87 twentyfiveGigE35 -Ethernet35 88 twentyfiveGigE36 -Ethernet36 97 twentyfiveGigE37 -Ethernet37 98 twentyfiveGigE38 -Ethernet38 99 twentyfiveGigE39 -Ethernet39 100 twentyfiveGigE40 -Ethernet40 101 twentyfiveGigE41 -Ethernet41 102 twentyfiveGigE42 -Ethernet42 103 twentyfiveGigE43 -Ethernet43 104 twentyfiveGigE44 -Ethernet44 105 twentyfiveGigE45 -Ethernet45 106 twentyfiveGigE46 -Ethernet46 107 twentyfiveGigE47 -Ethernet47 108 twentyfiveGigE48 -Ethernet48 5,6,7,8 hundredGigE49 -Ethernet52 1,2,3,4 hundredGigE50 -Ethernet56 109,110,111,112 hundredGigE51 -Ethernet60 21,22,23,24 hundredGigE52 -Ethernet64 9,10,11,12 hundredGigE53 -Ethernet68 117,118,119,120 hundredGigE54 +# name lanes alias index +Ethernet0 41 twentyfiveGigE1 0 +Ethernet1 42 twentyfiveGigE2 1 +Ethernet2 43 twentyfiveGigE3 2 +Ethernet3 44 twentyfiveGigE4 3 +Ethernet4 49 twentyfiveGigE5 4 +Ethernet5 50 twentyfiveGigE6 5 +Ethernet6 51 twentyfiveGigE7 6 +Ethernet7 52 twentyfiveGigE8 7 +Ethernet8 53 twentyfiveGigE9 8 +Ethernet9 54 twentyfiveGigE10 9 +Ethernet10 55 twentyfiveGigE11 10 +Ethernet11 56 twentyfiveGigE12 11 +Ethernet12 65 twentyfiveGigE13 12 +Ethernet13 66 twentyfiveGigE14 13 +Ethernet14 67 twentyfiveGigE15 14 +Ethernet15 68 twentyfiveGigE16 15 +Ethernet16 33 twentyfiveGigE17 16 +Ethernet17 34 twentyfiveGigE18 17 +Ethernet18 35 twentyfiveGigE19 18 +Ethernet19 36 twentyfiveGigE20 19 +Ethernet20 37 twentyfiveGigE21 20 +Ethernet21 38 twentyfiveGigE22 21 +Ethernet22 39 twentyfiveGigE23 22 +Ethernet23 40 twentyfiveGigE24 23 +Ethernet24 69 twentyfiveGigE25 24 +Ethernet25 70 twentyfiveGigE26 25 +Ethernet26 71 twentyfiveGigE27 26 +Ethernet27 72 twentyfiveGigE28 27 +Ethernet28 81 twentyfiveGigE29 28 +Ethernet29 82 twentyfiveGigE30 29 +Ethernet30 83 twentyfiveGigE31 30 +Ethernet31 84 twentyfiveGigE32 31 +Ethernet32 85 twentyfiveGigE33 32 +Ethernet33 86 twentyfiveGigE34 33 +Ethernet34 87 twentyfiveGigE35 34 +Ethernet35 88 twentyfiveGigE36 35 +Ethernet36 97 twentyfiveGigE37 36 +Ethernet37 98 twentyfiveGigE38 37 +Ethernet38 99 twentyfiveGigE39 38 +Ethernet39 100 twentyfiveGigE40 39 +Ethernet40 101 twentyfiveGigE41 40 +Ethernet41 102 twentyfiveGigE42 41 +Ethernet42 103 twentyfiveGigE43 42 +Ethernet43 104 twentyfiveGigE44 43 +Ethernet44 105 twentyfiveGigE45 44 +Ethernet45 106 twentyfiveGigE46 45 +Ethernet46 107 twentyfiveGigE47 46 +Ethernet47 108 twentyfiveGigE48 47 +Ethernet48 5,6,7,8 hundredGigE49 48 +Ethernet52 1,2,3,4 hundredGigE50 52 +Ethernet56 109,110,111,112 hundredGigE51 56 +Ethernet60 21,22,23,24 hundredGigE52 60 +Ethernet64 9,10,11,12 hundredGigE53 64 +Ethernet68 117,118,119,120 hundredGigE54 68 diff --git a/device/accton/x86_64-accton_as7312_54x-r0/minigraph.xml b/device/accton/x86_64-accton_as7312_54x-r0/minigraph.xml index 8547ceacbc5..a967047b237 100644 --- a/device/accton/x86_64-accton_as7312_54x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7312_54x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -924,224 +924,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet1 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet2 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet3 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet5 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet6 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet7 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet9 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet10 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet11 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet13 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet14 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet15 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet17 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet18 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet19 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet21 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet22 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet23 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet25 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet26 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet27 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet29 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet30 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet31 ARISTA16T0 Ethernet1 @@ -1149,7 +1149,7 @@ - switch1 + sonic Accton-AS7312-54X @@ -1157,7 +1157,7 @@ - switch1 + sonic DhcpResources @@ -1179,6 +1179,6 @@ - switch1 + sonic Accton-AS7312-54X diff --git a/device/accton/x86_64-accton_as7312_54x-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as7312_54x-r0/plugins/eeprom.py new file mode 100644 index 00000000000..7681caafeef --- /dev/null +++ b/device/accton/x86_64-accton_as7312_54x-r0/plugins/eeprom.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom" + #Two i2c buses might get flipped order, check them both. + if not os.path.exists(self.eeprom_path): + self.eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_as7312_54x-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as7312_54x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..d73e65bf798 --- /dev/null +++ b/device/accton/x86_64-accton_as7312_54x-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 2: "11-0053", + 1: "10-0050", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as7312_54x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7312_54x-r0/plugins/sfputil.py new file mode 100644 index 00000000000..956b6b352f9 --- /dev/null +++ b/device/accton/x86_64-accton_as7312_54x-r0/plugins/sfputil.py @@ -0,0 +1,215 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 71 + PORTS_IN_BLOCK = 72 + QSFP_PORT_START = 48 + QSFP_PORT_END = 72 + + BASE_VAL_PATH = "/sys/class/i2c-adapter/i2c-{0}/{1}-0050/" + + _port_to_is_present = {} + _port_to_lp_mode = {} + + _port_to_eeprom_mapping = {} + _cpld_mapping = { + 0: "4-0060", + 1: "5-0062", + 2: "6-0064", + } + _port_to_i2c_mapping = { + 0: 18, + 1: 19, + 2: 20, + 3: 21, + 4: 22, + 5: 23, + 6: 24, + 7: 25, + 8: 26, + 9: 27, + 10: 28, + 11: 29, + 12: 30, + 13: 31, + 14: 32, + 15: 33, + 16: 34, + 17: 35, + 18: 36, + 19: 37, + 20: 38, + 21: 39, + 22: 40, + 23: 41, + 24: 42, + 25: 43, + 26: 44, + 27: 45, + 28: 46, + 29: 47, + 30: 48, + 31: 49, + 32: 50, + 33: 51, + 34: 52, + 35: 53, + 36: 54, + 37: 55, + 38: 56, + 39: 57, + 40: 58, + 41: 59, + 42: 60, + 43: 61, + 44: 62, + 45: 63, + 46: 64, + 47: 65, + 48: 66, #QSFP49 + 49: 66, + 50: 66, + 51: 66, + 52: 67, #QSFP50 + 53: 67, + 54: 67, + 55: 67, + 56: 68, #QSFP51 + 57: 68, + 58: 68, + 59: 68, + 60: 69, #QSFP52 + 61: 69, + 62: 69, + 63: 69, + 64: 70, #QSFP53 + 65: 70, + 66: 70, + 67: 70, + 68: 71, #QSFP54 + 69: 71, + 70: 71, + 71: 71, + } + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_port_start(self): + return self.QSFP_PORT_START + + @property + def qsfp_port_end(self): + return self.QSFP_PORT_END + + @property + def qsfp_ports(self): + return range(self.QSFP_PORT_START, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/eeprom' + for x in range(0, self.port_end+1): + self.port_to_eeprom_mapping[x] = eeprom_path.format( + self._port_to_i2c_mapping[x]) + + SfpUtilBase.__init__(self) + + + # For port 48~51 are QSFP, here presumed they're all split to 4 lanes. + def get_cage_num(self, port_num): + cage_num = port_num + if (port_num >= self.QSFP_PORT_START): + cage_num = (port_num - self.QSFP_PORT_START)/4 + cage_num = cage_num + self.QSFP_PORT_START + + return cage_num + + # For cage 0~23 and 48~51 are at cpld2, others are at cpld3. + def get_cpld_num(self, port_num): + cpld_i = 1 + cage_num = self.get_cage_num(port_num) + if (port_num > 23 and port_num < self.QSFP_PORT_START): + cpld_i = 2 + + if (cage_num >= 52): + cpld_i = 2 + + return cpld_i + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + cage_num = self.get_cage_num(port_num) + cpld_i = self.get_cpld_num(port_num) + + cpld_ps = self._cpld_mapping[cpld_i] + path = "/sys/bus/i2c/devices/{0}/module_present_{1}" + port_ps = path.format(cpld_ps, cage_num+1) + + try: + val_file = open(port_ps) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = val_file.readline().rstrip() + val_file.close() + + # content is a string, either "0" or "1" + if content == "1": + return True + + return False + + def get_low_power_mode(self, port_num): + raise NotImplementedError + + def set_low_power_mode(self, port_num, lpmode): + raise NotImplementedError + + def reset(self, port_num): + if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: + return False + + cage_num = self.get_cage_num(port_num) + cpld_i = self.get_cpld_num(port_num) + cpld_ps = self._cpld_mapping[cpld_i] + path = "/sys/bus/i2c/devices/{0}/module_reset_{1}" + port_ps = path.format(cpld_ps, cage_num+1) + try: + reg_file = open(port_ps, 'w') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = '0' + + reg_file.write(reg_value) + reg_file.close() + + return True diff --git a/device/accton/x86_64-accton_as7326_56x-r0/Accton-AS7326-56X/port_config.ini b/device/accton/x86_64-accton_as7326_56x-r0/Accton-AS7326-56X/port_config.ini new file mode 100644 index 00000000000..2c4d0c02377 --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/Accton-AS7326-56X/port_config.ini @@ -0,0 +1,55 @@ +# name lanes alias index +Ethernet0 41 twentyfiveGigE1 0 +Ethernet1 42 twentyfiveGigE2 1 +Ethernet2 43 twentyfiveGigE3 2 +Ethernet3 44 twentyfiveGigE4 3 +Ethernet4 49 twentyfiveGigE5 4 +Ethernet5 50 twentyfiveGigE6 5 +Ethernet6 51 twentyfiveGigE7 6 +Ethernet7 52 twentyfiveGigE8 7 +Ethernet8 53 twentyfiveGigE9 8 +Ethernet9 54 twentyfiveGigE10 9 +Ethernet10 55 twentyfiveGigE11 10 +Ethernet11 56 twentyfiveGigE12 11 +Ethernet12 65 twentyfiveGigE13 12 +Ethernet13 66 twentyfiveGigE14 13 +Ethernet14 67 twentyfiveGigE15 14 +Ethernet15 68 twentyfiveGigE16 15 +Ethernet16 33 twentyfiveGigE17 16 +Ethernet17 34 twentyfiveGigE18 17 +Ethernet18 35 twentyfiveGigE19 18 +Ethernet19 36 twentyfiveGigE20 19 +Ethernet20 37 twentyfiveGigE21 20 +Ethernet21 38 twentyfiveGigE22 21 +Ethernet22 39 twentyfiveGigE23 22 +Ethernet23 40 twentyfiveGigE24 23 +Ethernet24 69 twentyfiveGigE25 24 +Ethernet25 70 twentyfiveGigE26 25 +Ethernet26 71 twentyfiveGigE27 26 +Ethernet27 72 twentyfiveGigE28 27 +Ethernet28 81 twentyfiveGigE29 28 +Ethernet29 82 twentyfiveGigE30 29 +Ethernet30 83 twentyfiveGigE31 30 +Ethernet31 84 twentyfiveGigE32 31 +Ethernet32 85 twentyfiveGigE33 32 +Ethernet33 86 twentyfiveGigE34 33 +Ethernet34 87 twentyfiveGigE35 34 +Ethernet35 88 twentyfiveGigE36 35 +Ethernet36 97 twentyfiveGigE37 36 +Ethernet37 98 twentyfiveGigE38 37 +Ethernet38 99 twentyfiveGigE39 38 +Ethernet39 100 twentyfiveGigE40 39 +Ethernet40 101 twentyfiveGigE41 40 +Ethernet41 102 twentyfiveGigE42 41 +Ethernet42 103 twentyfiveGigE43 42 +Ethernet43 104 twentyfiveGigE44 43 +Ethernet44 105 twentyfiveGigE45 44 +Ethernet45 106 twentyfiveGigE46 45 +Ethernet46 107 twentyfiveGigE47 46 +Ethernet47 108 twentyfiveGigE48 47 +Ethernet48 5,6,7,8 hundredGigE49 48 +Ethernet52 1,2,3,4 hundredGigE50 52 +Ethernet56 109,110,111,112 hundredGigE51 56 +Ethernet60 21,22,23,24 hundredGigE52 60 +Ethernet64 9,10,11,12 hundredGigE53 64 +Ethernet68 117,118,119,120 hundredGigE54 68 diff --git a/device/accton/x86_64-accton_as7326_56x-r0/Accton-AS7326-56X/sai.profile b/device/accton/x86_64-accton_as7326_56x-r0/Accton-AS7326-56X/sai.profile new file mode 100644 index 00000000000..0e465ce12ed --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/Accton-AS7326-56X/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/td3-as7326-48x25G+8x100G.config.bcm diff --git a/device/accton/x86_64-accton_as7326_56x-r0/installer.conf b/device/accton/x86_64-accton_as7326_56x-r0/installer.conf new file mode 100644 index 00000000000..5e62742c11b --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/installer.conf @@ -0,0 +1 @@ +CONSOLE_SPEED=115200 diff --git a/device/accton/x86_64-accton_as7326_56x-r0/led_proc_init.soc b/device/accton/x86_64-accton_as7326_56x-r0/led_proc_init.soc new file mode 100755 index 00000000000..d96b2d00c58 --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/led_proc_init.soc @@ -0,0 +1,79 @@ +# accton_as7326_56x 48x25G+8x100G SDK port LED macro init SOC +s CMIC_LEDUP0_DATA_RAM 0 +s CMIC_LEDUP1_DATA_RAM 0 + +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=63 REMAP_PORT_1=63 REMAP_PORT_2=63 REMAP_PORT_3=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=63 REMAP_PORT_5=63 REMAP_PORT_6=63 REMAP_PORT_7=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=27 REMAP_PORT_9=26 REMAP_PORT_10=25 REMAP_PORT_11=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63 REMAP_PORT_13=63 REMAP_PORT_14=63 REMAP_PORT_15=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 REMAP_PORT_17=63 REMAP_PORT_18=63 REMAP_PORT_19=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=31 REMAP_PORT_21=30 REMAP_PORT_22=29 REMAP_PORT_23=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=15 REMAP_PORT_25=14 REMAP_PORT_26=13 REMAP_PORT_27=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=19 REMAP_PORT_29=18 REMAP_PORT_30=17 REMAP_PORT_31=16 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=63 REMAP_PORT_33=63 REMAP_PORT_34=63 REMAP_PORT_35=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=63 REMAP_PORT_37=63 REMAP_PORT_38=63 REMAP_PORT_39=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=35 REMAP_PORT_41=34 REMAP_PORT_42=33 REMAP_PORT_43=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=63 REMAP_PORT_45=63 REMAP_PORT_46=63 REMAP_PORT_47=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=23 REMAP_PORT_49=22 REMAP_PORT_50=21 REMAP_PORT_51=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0 + +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=19 REMAP_PORT_1=18 REMAP_PORT_2=17 REMAP_PORT_3=16 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=23 REMAP_PORT_5=22 REMAP_PORT_6=21 REMAP_PORT_7=20 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=3 REMAP_PORT_9=2 REMAP_PORT_10=1 REMAP_PORT_11=0 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63 REMAP_PORT_13=63 REMAP_PORT_14=63 REMAP_PORT_15=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=7 REMAP_PORT_17=6 REMAP_PORT_18=5 REMAP_PORT_19=4 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=11 REMAP_PORT_21=10 REMAP_PORT_22=9 REMAP_PORT_23=8 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=63 REMAP_PORT_25=63 REMAP_PORT_26=63 REMAP_PORT_27=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=63 REMAP_PORT_29=63 REMAP_PORT_30=63 REMAP_PORT_31=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=15 REMAP_PORT_33=14 REMAP_PORT_34=13 REMAP_PORT_35=12 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=27 REMAP_PORT_37=26 REMAP_PORT_38=25 REMAP_PORT_39=24 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=63 REMAP_PORT_41=63 REMAP_PORT_42=63 REMAP_PORT_43=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=63 REMAP_PORT_45=63 REMAP_PORT_46=63 REMAP_PORT_47=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=31 REMAP_PORT_49=30 REMAP_PORT_50=29 REMAP_PORT_51=28 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=35 REMAP_PORT_53=34 REMAP_PORT_54=33 REMAP_PORT_55=32 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=63 REMAP_PORT_57=63 REMAP_PORT_58=63 REMAP_PORT_59=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=63 REMAP_PORT_62=63 REMAP_PORT_63=63 + +led 0 stop +led 0 prog \ + 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 7E \ + 02 FB 42 24 06 F9 D2 00 74 1E 02 F9 42 03 67 AC \ + 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 \ + 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC \ + 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 \ + 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 \ + 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 \ + F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 \ + 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF \ + 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 \ + 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC \ + 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 \ + 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 \ + 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 98 67 \ + 84 57 80 18 71 EB 67 84 67 98 57 67 84 67 84 57 \ + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +led 0 start +led auto on + +led 1 stop +led 1 prog \ + 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 7E \ + 02 FB 42 24 06 F9 D2 00 74 1E 02 F9 42 03 67 AC \ + 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 \ + 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC \ + 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 \ + 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 \ + 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 \ + F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 \ + 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF \ + 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 \ + 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC \ + 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 \ + 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 \ + 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 98 67 \ + 84 57 80 18 71 EB 67 84 67 98 57 67 84 67 84 57 \ + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +led 1 start +led auto on diff --git a/device/accton/x86_64-accton_as7326_56x-r0/minigraph.xml b/device/accton/x86_64-accton_as7326_56x-r0/minigraph.xml new file mode 100644 index 00000000000..0aa3f02144e --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/minigraph.xml @@ -0,0 +1,1184 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + sonic + 10.0.0.32 + 1 + 180 + 60 + + + sonic + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + sonic + 10.0.0.34 + 1 + 180 + 60 + + + sonic + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + sonic + 10.0.0.36 + 1 + 180 + 60 + + + sonic + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + sonic + 10.0.0.38 + 1 + 180 + 60 + + + sonic + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + sonic + 10.0.0.40 + 1 + 180 + 60 + + + sonic + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + sonic + 10.0.0.42 + 1 + 180 + 60 + + + sonic + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + sonic + 10.0.0.44 + 1 + 180 + 60 + + + sonic + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + sonic + 10.0.0.46 + 1 + 180 + 60 + + + sonic + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + sonic + 10.0.0.48 + 1 + 180 + 60 + + + sonic + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + sonic + 10.0.0.50 + 1 + 180 + 60 + + + sonic + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + sonic + 10.0.0.52 + 1 + 180 + 60 + + + sonic + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + sonic + 10.0.0.54 + 1 + 180 + 60 + + + sonic + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + sonic + 10.0.0.56 + 1 + 180 + 60 + + + sonic + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + sonic + 10.0.0.58 + 1 + 180 + 60 + + + sonic + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + sonic + 10.0.0.60 + 1 + 180 + 60 + + + sonic + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + sonic + 10.0.0.62 + 1 + 180 + 60 + + + sonic + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + sonic + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + sonic + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet1 + 10.0.0.2/31 + + + + Ethernet2 + 10.0.0.4/31 + + + + Ethernet3 + 10.0.0.6/31 + + + + Ethernet4 + 10.0.0.8/31 + + + + Ethernet5 + 10.0.0.10/31 + + + + Ethernet6 + 10.0.0.12/31 + + + + Ethernet7 + 10.0.0.14/31 + + + + Ethernet8 + 10.0.0.16/31 + + + + Ethernet9 + 10.0.0.18/31 + + + + Ethernet10 + 10.0.0.20/31 + + + + Ethernet11 + 10.0.0.22/31 + + + + Ethernet12 + 10.0.0.24/31 + + + + Ethernet13 + 10.0.0.26/31 + + + + Ethernet14 + 10.0.0.28/31 + + + + Ethernet15 + 10.0.0.30/31 + + + + Ethernet16 + 10.0.0.32/31 + + + + Ethernet17 + 10.0.0.34/31 + + + + Ethernet18 + 10.0.0.36/31 + + + + Ethernet19 + 10.0.0.38/31 + + + + Ethernet20 + 10.0.0.40/31 + + + + Ethernet21 + 10.0.0.42/31 + + + + Ethernet22 + 10.0.0.44/31 + + + + Ethernet23 + 10.0.0.46/31 + + + + Ethernet24 + 10.0.0.48/31 + + + + Ethernet25 + 10.0.0.50/31 + + + + Ethernet26 + 10.0.0.52/31 + + + + Ethernet27 + 10.0.0.54/31 + + + + Ethernet28 + 10.0.0.56/31 + + + + Ethernet29 + 10.0.0.58/31 + + + + Ethernet30 + 10.0.0.60/31 + + + + Ethernet31 + 10.0.0.62/31 + + + + Ethernet32 + 10.0.0.64/31 + + + + Ethernet33 + 10.0.0.66/31 + + + + Ethernet34 + 10.0.0.68/31 + + + + Ethernet35 + 10.0.0.70/31 + + + + Ethernet36 + 10.0.0.72/31 + + + + Ethernet37 + 10.0.0.74/31 + + + + Ethernet38 + 10.0.0.76/31 + + + + Ethernet39 + 10.0.0.78/31 + + + + Ethernet40 + 10.0.0.80/31 + + + + Ethernet41 + 10.0.0.82/31 + + + + Ethernet42 + 10.0.0.84/31 + + + + Ethernet43 + 10.0.0.86/31 + + + + Ethernet44 + 10.0.0.88/31 + + + + Ethernet45 + 10.0.0.90/31 + + + + Ethernet46 + 10.0.0.92/31 + + + + Ethernet47 + 10.0.0.94/31 + + + + Ethernet48 + 10.0.0.96/31 + + + + Ethernet52 + 10.0.0.98/31 + + + + Ethernet56 + 10.0.0.100/31 + + + + Ethernet60 + 10.0.0.102/31 + + + + Ethernet64 + 10.0.0.104/31 + + + + Ethernet68 + 10.0.0.106/31 + + + + + + + + + + + + DeviceInterfaceLink + sonic + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet1 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet2 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet3 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet4 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet5 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet6 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet7 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet8 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet9 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet10 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet11 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet12 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet13 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet14 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet15 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet16 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet17 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet18 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet19 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet20 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet21 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet22 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet23 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet24 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet25 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet26 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet27 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet28 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet29 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet30 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet31 + ARISTA16T0 + Ethernet1 + + + + + sonic + Accton-AS7326-56X + + + + + + + sonic + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + sonic + Accton-AS7326-56X +
diff --git a/device/accton/x86_64-accton_as7326_56x-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as7326_56x-r0/plugins/eeprom.py new file mode 100644 index 00000000000..1e7d1046d93 --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/plugins/eeprom.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_as7326_56x-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as7326_56x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..a3c30bc478e --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 2: "13-0053", + 1: "17-0051", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as7326_56x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7326_56x-r0/plugins/sfputil.py new file mode 100644 index 00000000000..a09dd0d7c7b --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/plugins/sfputil.py @@ -0,0 +1,203 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 81 + PORTS_IN_BLOCK = 82 + QSFP_PORT_START = 48 + QSFP_PORT_END = 82 + + BASE_VAL_PATH = "/sys/class/i2c-adapter/i2c-{0}/{1}-0050/" + + _port_to_is_present = {} + _port_to_lp_mode = {} + + _port_to_eeprom_mapping = {} + _cpld_mapping = { + 1: "12-0062", + 2: "18-0060", + 3: "19-0064", + } + + _port_to_i2c_mapping = { + 0: 42, + 1: 41, + 2: 44, + 3: 43, + 4: 47, + 5: 45, + 6: 46, + 7: 50, + 8: 48, + 9: 49, + 10: 51, + 11: 52, + 12: 53, + 13: 56, + 14: 55, + 15: 54, + 16: 58, + 17: 57, + 18: 59, + 19: 60, + 20: 61, + 21: 63, + 22: 62, + 23: 64, + 24: 66, + 25: 68, + 26: 65, + 27: 67, + 28: 69, + 29: 71, + 30: 72, + 31: 70, + 32: 74, + 33: 73, + 34: 76, + 35: 75, + 36: 77, + 37: 79, + 38: 78, + 39: 80, + 40: 81, + 41: 82, + 42: 84, + 43: 85, + 44: 83, + 45: 87, + 46: 88, + 47: 86, + 48: 25, #QSFP49 + 49: 25, + 50: 25, + 51: 25, + 52: 26, #QSFP50 + 53: 26, + 54: 26, + 55: 26, + 56: 27, #QSFP51 + 57: 26, + 58: 26, + 59: 26, + 60: 28, #QSFP52 + 61: 26, + 62: 26, + 63: 26, + 64: 29, #QSFP53 + 65: 26, + 66: 26, + 67: 26, + 68: 30, #QSFP54 + 69: 26, + 70: 26, + 71: 26, + 72: 31, #QSFP55 + 73: 26, + 74: 26, + 75: 26, + 76: 32, #QSFP56 + 77: 26, + 78: 26, + 79: 26, + 80: 22, + 81: 23} + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_port_start(self): + return self.QSFP_PORT_START + + @property + def qsfp_port_end(self): + return self.QSFP_PORT_END + + @property + def qsfp_ports(self): + return range(self.QSFP_PORT_START, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/eeprom' + for x in range(0, self.port_end+1): + self.port_to_eeprom_mapping[x] = eeprom_path.format( + self._port_to_i2c_mapping[x]) + + SfpUtilBase.__init__(self) + + + # For port 48~51 are QSFP, here presumed they're all split to 4 lanes. + def get_cage_num(self, port_num): + cage_num = port_num + if (port_num >= self.QSFP_PORT_START): + cage_num = (port_num - self.QSFP_PORT_START)/4 + cage_num = cage_num + self.QSFP_PORT_START + + return cage_num + + # For cage 0~23 and 48~51 are at cpld2, others are at cpld3. + def get_cpld_num(self, port_num): + cpld_i = 1 + cage_num = self.get_cage_num(port_num) + if (port_num > 29): + cpld_i = 2 + return cpld_i + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + cage_num = self.get_cage_num(port_num) + cpld_i = self.get_cpld_num(port_num) + #print "[ROY] cpld:%d" % cpld_i + + cpld_ps = self._cpld_mapping[cpld_i] + path = "/sys/bus/i2c/devices/{0}/module_present_{1}" + port_ps = path.format(cpld_ps, cage_num+1) + + try: + val_file = open(port_ps) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = val_file.readline().rstrip() + val_file.close() + + # content is a string, either "0" or "1" + if content == "1": + return True + + return False + + def get_low_power_mode(self, port_num): + raise NotImplementedError + + def set_low_power_mode(self, port_num, lpmode): + raise NotImplementedError + + def reset(self, port_num): + raise NotImplementedError diff --git a/device/accton/x86_64-accton_as7512_32x-r0/minigraph.xml b/device/accton/x86_64-accton_as7512_32x-r0/minigraph.xml index 758aca3551d..ac05be93960 100644 --- a/device/accton/x86_64-accton_as7512_32x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7512_32x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic AS7512 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic AS7512 diff --git a/device/accton/x86_64-accton_as7512_32x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7512_32x-r0/plugins/sfputil.py index 378a18c6b8b..f2e59d40334 100644 --- a/device/accton/x86_64-accton_as7512_32x-r0/plugins/sfputil.py +++ b/device/accton/x86_64-accton_as7512_32x-r0/plugins/sfputil.py @@ -1,25 +1,72 @@ #! /usr/bin/python try: - from sonic_sfp.sfputilbase import sfputilbase + from sonic_sfp.sfputilbase import SfpUtilBase except ImportError, e: raise ImportError (str(e) + "- required module not found") -class sfputil(sfputilbase): +class SfpUtil(SfpUtilBase): """Platform specific sfputil class""" - port_start = 0 - port_end = 31 + _port_start = 0 + _port_end = 31 ports_in_block = 32 - port_to_eeprom_mapping = {} + _port_to_eeprom_mapping = {} + _qsfp_ports = range(0, ports_in_block + 1) - def __init__(self, port_num): + def __init__(self): # Override port_to_eeprom_mapping for class initialization eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_eeprom' for x in range(self.port_start, self.port_end + 1): - self.port_to_eeprom_mapping[x] = eeprom_path.format(x + 18) - sfputilbase.__init__(self, port_num) + self._port_to_eeprom_mapping[x] = eeprom_path.format(x + 18) + SfpUtilBase.__init__(self) + + def reset(self, port_num): + raise NotImplementedErro + + def set_low_power_mode(self, port_nuM, lpmode): + raise NotImplementedErro + + def get_low_power_mode(self, port_num): + raise NotImplementedErro + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_is_present" + port_ps = path.format(port_num+18) + + + try: + reg_file = open(port_ps) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_file.readline().rstrip() + if reg_value == '1': + return True + + return False + + @property + def port_start(self): + return self._port_start + + @property + def port_end(self): + return self._port_end + + @property + def qsfp_ports(self): + return range(0, self.ports_in_block + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping diff --git a/device/accton/x86_64-accton_as7712_32x-r0/fancontrol b/device/accton/x86_64-accton_as7712_32x-r0/fancontrol new file mode 100644 index 00000000000..9d057024f94 --- /dev/null +++ b/device/accton/x86_64-accton_as7712_32x-r0/fancontrol @@ -0,0 +1,9 @@ +INTERVAL=10 +FCTEMPS=/sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/sys_temp +FCFANS=/sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan1_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan2_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan3_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan4_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan5_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan6_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan11_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan12_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan13_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan14_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan15_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan16_input +MINTEMP=/sys/bus/i2c/devices/2-0066/pwm1=135 +MAXTEMP=/sys/bus/i2c/devices/2-0066/pwm1=160 +MINSTART=/sys/bus/i2c/devices/2-0066/pwm1=100 +MINSTOP=/sys/bus/i2c/devices/2-0066/pwm1=32 +MINPWM=/sys/bus/i2c/devices/2-0066/pwm1=32 +MAXPWM=/sys/bus/i2c/devices/2-0066/pwm1=69 diff --git a/device/accton/x86_64-accton_as7712_32x-r0/minigraph.xml b/device/accton/x86_64-accton_as7712_32x-r0/minigraph.xml index 025985c8367..d252de01ca8 100644 --- a/device/accton/x86_64-accton_as7712_32x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7712_32x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Accton-AS7712-32X @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1069,6 +1069,6 @@ - switch1 + sonic Accton-AS7712-32X diff --git a/device/accton/x86_64-accton_as7712_32x-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as7712_32x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..d7600a2af4b --- /dev/null +++ b/device/accton/x86_64-accton_as7712_32x-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 1: "11-0053", + 2: "10-0050", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py index 2e636292bfa..fd117ee3886 100644 --- a/device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py +++ b/device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py @@ -53,7 +53,7 @@ class SfpUtil(SfpUtilBase): _qsfp_ports = range(0, ports_in_block + 1) def __init__(self): - eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_eeprom' + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/eeprom' for x in range(0, self._port_end + 1): port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x+1]) self._port_to_eeprom_mapping[x] = port_eeprom_path @@ -64,9 +64,9 @@ def reset(self, port_num): if port_num < self._port_start or port_num > self._port_end: return False - path = "/sys/bus/i2c/devices/{0}-0050/sfp_port_reset" - port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) - + path = "/sys/bus/i2c/devices/4-0060/module_reset_{0}" + port_ps = path.format(port_num+1) + try: reg_file = open(port_ps, 'w') except IOError as e: @@ -93,8 +93,8 @@ def get_presence(self, port_num): if port_num < self._port_start or port_num > self._port_end: return False - path = "/sys/bus/i2c/devices/{0}-0050/sfp_is_present" - port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + path = "/sys/bus/i2c/devices/4-0060/module_present_{0}" + port_ps = path.format(port_num+1) try: diff --git a/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf b/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf new file mode 100644 index 00000000000..33d75d59812 --- /dev/null +++ b/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf @@ -0,0 +1,23 @@ +# libsensors configuration file for AS7712-32X +# ------------------------------------------------ +# + +#Comment out the following for sku-sensors-data.yml +#chip "ym2651-*" +# label power1 "PSU Output Power" +# label temp1 "Power Supply Temp" +# label fan1 "Fan Speed" +# +#chip "as7712_32x_fan-*" +# label fan1 "Fan tray 1 front" +# label fan2 "Fan tray 2 front" +# label fan3 "Fan tray 3 front" +# label fan4 "Fan tray 4 front" +# label fan5 "Fan tray 5 front" +# label fan6 "Fan tray 6 front" +# label fan11 "Fan tray 1 rear" +# label fan12 "Fan tray 2 rear" +# label fan13 "Fan tray 3 rear" +# label fan14 "Fan tray 4 rear" +# label fan15 "Fan tray 5 rear" +# label fan16 "Fan tray 6 rear" diff --git a/device/accton/x86_64-accton_as7716_32x-r0/led_proc_init.soc b/device/accton/x86_64-accton_as7716_32x-r0/led_proc_init.soc new file mode 100755 index 00000000000..719cb777719 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32x-r0/led_proc_init.soc @@ -0,0 +1,41 @@ +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=31 REMAP_PORT_1=30 REMAP_PORT_2=29 REMAP_PORT_3=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=27 REMAP_PORT_5=26 REMAP_PORT_6=25 REMAP_PORT_7=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=23 REMAP_PORT_9=22 REMAP_PORT_10=21 REMAP_PORT_11=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=19 REMAP_PORT_13=18 REMAP_PORT_14=17 REMAP_PORT_15=16 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 REMAP_PORT_17=62 REMAP_PORT_18=61 REMAP_PORT_19=60 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=59 REMAP_PORT_21=58 REMAP_PORT_22=57 REMAP_PORT_23=56 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=55 REMAP_PORT_25=54 REMAP_PORT_26=53 REMAP_PORT_27=52 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=51 REMAP_PORT_29=50 REMAP_PORT_30=49 REMAP_PORT_31=48 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=47 REMAP_PORT_33=46 REMAP_PORT_34=45 REMAP_PORT_35=44 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=43 REMAP_PORT_37=42 REMAP_PORT_38=41 REMAP_PORT_39=40 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=39 REMAP_PORT_41=38 REMAP_PORT_42=37 REMAP_PORT_43=36 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=35 REMAP_PORT_45=34 REMAP_PORT_46=33 REMAP_PORT_47=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15 REMAP_PORT_49=14 REMAP_PORT_50=13 REMAP_PORT_51=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0 + +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=35 REMAP_PORT_1=34 REMAP_PORT_2=33 REMAP_PORT_3=32 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=39 REMAP_PORT_5=38 REMAP_PORT_6=37 REMAP_PORT_7=36 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=43 REMAP_PORT_9=42 REMAP_PORT_10=41 REMAP_PORT_11=40 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=47 REMAP_PORT_13=46 REMAP_PORT_14=45 REMAP_PORT_15=44 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=3 REMAP_PORT_17=2 REMAP_PORT_18=1 REMAP_PORT_19=0 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=7 REMAP_PORT_21=6 REMAP_PORT_22=5 REMAP_PORT_23=4 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=11 REMAP_PORT_25=10 REMAP_PORT_26=9 REMAP_PORT_27=8 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=15 REMAP_PORT_29=14 REMAP_PORT_30=13 REMAP_PORT_31=12 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=19 REMAP_PORT_33=18 REMAP_PORT_34=17 REMAP_PORT_35=16 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=23 REMAP_PORT_37=22 REMAP_PORT_38=21 REMAP_PORT_39=20 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=27 REMAP_PORT_41=26 REMAP_PORT_42=25 REMAP_PORT_43=24 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=31 REMAP_PORT_45=30 REMAP_PORT_46=29 REMAP_PORT_47=28 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=51 REMAP_PORT_49=50 REMAP_PORT_50=49 REMAP_PORT_51=48 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 REMAP_PORT_53=54 REMAP_PORT_54=53 REMAP_PORT_55=52 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=59 REMAP_PORT_57=58 REMAP_PORT_58=57 REMAP_PORT_59=56 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=62 REMAP_PORT_62=61 REMAP_PORT_63=60 + +led 0 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +led 0 start + +led 1 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +led 1 start + +led auto on \ No newline at end of file diff --git a/device/accton/x86_64-accton_as7716_32x-r0/minigraph.xml b/device/accton/x86_64-accton_as7716_32x-r0/minigraph.xml index e197d4cd717..148a1776912 100644 --- a/device/accton/x86_64-accton_as7716_32x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7716_32x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Accton-AS7716-32X @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1069,6 +1069,6 @@ - switch1 + sonic Accton-AS7716-32X diff --git a/device/accton/x86_64-accton_as7716_32x-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as7716_32x-r0/plugins/eeprom.py new file mode 100755 index 00000000000..c0122e65844 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32x-r0/plugins/eeprom.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/1-0056/eeprom" + #Two i2c buses might get flipped order, check them both. + if not os.path.exists(self.eeprom_path): + self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_as7716_32x-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as7716_32x-r0/plugins/psuutil.py new file mode 100755 index 00000000000..d8fddc23550 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32x-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 1: "18-0053", + 2: "17-0050", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as7716_32x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7716_32x-r0/plugins/sfputil.py new file mode 100755 index 00000000000..7a36db7cf45 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32x-r0/plugins/sfputil.py @@ -0,0 +1,134 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 31 + PORTS_IN_BLOCK = 32 + + BASE_OOM_PATH = "/sys/bus/i2c/devices/{0}-0050/" + BASE_CPLD_PATH = "/sys/bus/i2c/devices/11-0060/" + + _port_to_is_present = {} + _port_to_lp_mode = {} + + _port_to_eeprom_mapping = {} + _port_to_i2c_mapping = { + 0: [1, 29], + 1: [2, 30], + 2: [3, 31], + 3: [4, 32], + 4: [5, 34], + 5: [6, 33], + 6: [7, 36], + 7: [8, 35], + 8: [9, 25], + 9: [10, 26], + 10: [11, 27], + 11: [12, 28], + 12: [14, 37], + 13: [15, 38], + 14: [16, 39], + 15: [17, 40], + 16: [18, 41], + 17: [19, 42], + 18: [20, 43], + 19: [21, 44], + 20: [22, 53], + 21: [23, 54], + 22: [24, 55], + 23: [25, 56], + 24: [26, 45], + 25: [27, 46], + 26: [28, 47], + 27: [29, 48], + 28: [30, 49], + 29: [31, 50], + 30: [32, 51], + 31: [33, 52], + } + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_ports(self): + return range(self.PORT_START, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = self.BASE_OOM_PATH + "eeprom" + + for x in range(0, self.port_end+1): + self.port_to_eeprom_mapping[x] = eeprom_path.format( + self._port_to_i2c_mapping[x][1] + ) + + SfpUtilBase.__init__(self) + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + present_path = self.BASE_CPLD_PATH + "module_present_" + str(port_num+1) + self.__port_to_is_present = present_path + + try: + val_file = open(self.__port_to_is_present) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = val_file.readline().rstrip() + val_file.close() + + # content is a string, either "0" or "1" + if content == "1": + return True + + return False + + def get_low_power_mode(self, port_num): + raise NotImplementedError + + def set_low_power_mode(self, port_num, lpmode): + raise NotImplementedError + + def reset(self, port_num): + if port_num < self.port_start or port_num > self.port_end: + return False + + mod_rst_path = self.BASE_CPLD_PATH + "module_reset_" + str(port_num+1) + self.__port_to_mod_rst = mod_rst_path + try: + reg_file = open(self.__port_to_mod_rst, 'r+') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = '1' + + reg_file.write(reg_value) + reg_file.close() + + return True \ No newline at end of file diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/Accton-AS7716-32XB/port_config.ini b/device/accton/x86_64-accton_as7716_32xb-r0/Accton-AS7716-32XB/port_config.ini new file mode 100755 index 00000000000..1fa6d21d960 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32xb-r0/Accton-AS7716-32XB/port_config.ini @@ -0,0 +1,33 @@ +# name lanes alias +Ethernet0 49,50,51,52 hundredGigE1 +Ethernet4 53,54,55,56 hundredGigE2 +Ethernet8 57,58,59,60 hundredGigE3 +Ethernet12 61,62,63,64 hundredGigE4 +Ethernet16 65,66,67,68 hundredGigE5 +Ethernet20 69,70,71,72 hundredGigE6 +Ethernet24 73,74,75,76 hundredGigE7 +Ethernet28 77,78,79,80 hundredGigE8 +Ethernet32 33,34,35,36 hundredGigE9 +Ethernet36 37,38,39,40 hundredGigE10 +Ethernet40 41,42,43,44 hundredGigE11 +Ethernet44 45,46,47,48 hundredGigE12 +Ethernet48 81,82,83,84 hundredGigE13 +Ethernet52 85,86,87,88 hundredGigE14 +Ethernet56 89,90,91,92 hundredGigE15 +Ethernet60 93,94,95,96 hundredGigE16 +Ethernet64 97,98,99,100 hundredGigE17 +Ethernet68 101,102,103,104 hundredGigE18 +Ethernet72 105,106,107,108 hundredGigE19 +Ethernet76 109,110,111,112 hundredGigE20 +Ethernet80 17,18,19,20 hundredGigE21 +Ethernet84 21,22,23,24 hundredGigE22 +Ethernet88 25,26,27,28 hundredGigE23 +Ethernet92 29,30,31,32 hundredGigE24 +Ethernet96 113,114,115,116 hundredGigE25 +Ethernet100 117,118,119,120 hundredGigE26 +Ethernet104 121,122,123,124 hundredGigE27 +Ethernet108 125,126,127,128 hundredGigE28 +Ethernet112 1,2,3,4 hundredGigE29 +Ethernet116 5,6,7,8 hundredGigE30 +Ethernet120 9,10,11,12 hundredGigE31 +Ethernet124 13,14,15,16 hundredGigE32 diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/Accton-AS7716-32XB/sai.profile b/device/accton/x86_64-accton_as7716_32xb-r0/Accton-AS7716-32XB/sai.profile new file mode 100755 index 00000000000..de1e16b4954 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32xb-r0/Accton-AS7716-32XB/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th-as7716-32x100G.config.bcm diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/installer.conf b/device/accton/x86_64-accton_as7716_32xb-r0/installer.conf new file mode 100755 index 00000000000..925a32fc0c3 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32xb-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 +CONSOLE_SPEED=115200 diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/led_proc_init.soc b/device/accton/x86_64-accton_as7716_32xb-r0/led_proc_init.soc new file mode 100755 index 00000000000..719cb777719 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32xb-r0/led_proc_init.soc @@ -0,0 +1,41 @@ +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=31 REMAP_PORT_1=30 REMAP_PORT_2=29 REMAP_PORT_3=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=27 REMAP_PORT_5=26 REMAP_PORT_6=25 REMAP_PORT_7=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=23 REMAP_PORT_9=22 REMAP_PORT_10=21 REMAP_PORT_11=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=19 REMAP_PORT_13=18 REMAP_PORT_14=17 REMAP_PORT_15=16 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 REMAP_PORT_17=62 REMAP_PORT_18=61 REMAP_PORT_19=60 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=59 REMAP_PORT_21=58 REMAP_PORT_22=57 REMAP_PORT_23=56 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=55 REMAP_PORT_25=54 REMAP_PORT_26=53 REMAP_PORT_27=52 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=51 REMAP_PORT_29=50 REMAP_PORT_30=49 REMAP_PORT_31=48 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=47 REMAP_PORT_33=46 REMAP_PORT_34=45 REMAP_PORT_35=44 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=43 REMAP_PORT_37=42 REMAP_PORT_38=41 REMAP_PORT_39=40 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=39 REMAP_PORT_41=38 REMAP_PORT_42=37 REMAP_PORT_43=36 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=35 REMAP_PORT_45=34 REMAP_PORT_46=33 REMAP_PORT_47=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15 REMAP_PORT_49=14 REMAP_PORT_50=13 REMAP_PORT_51=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0 + +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=35 REMAP_PORT_1=34 REMAP_PORT_2=33 REMAP_PORT_3=32 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=39 REMAP_PORT_5=38 REMAP_PORT_6=37 REMAP_PORT_7=36 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=43 REMAP_PORT_9=42 REMAP_PORT_10=41 REMAP_PORT_11=40 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=47 REMAP_PORT_13=46 REMAP_PORT_14=45 REMAP_PORT_15=44 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=3 REMAP_PORT_17=2 REMAP_PORT_18=1 REMAP_PORT_19=0 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=7 REMAP_PORT_21=6 REMAP_PORT_22=5 REMAP_PORT_23=4 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=11 REMAP_PORT_25=10 REMAP_PORT_26=9 REMAP_PORT_27=8 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=15 REMAP_PORT_29=14 REMAP_PORT_30=13 REMAP_PORT_31=12 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=19 REMAP_PORT_33=18 REMAP_PORT_34=17 REMAP_PORT_35=16 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=23 REMAP_PORT_37=22 REMAP_PORT_38=21 REMAP_PORT_39=20 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=27 REMAP_PORT_41=26 REMAP_PORT_42=25 REMAP_PORT_43=24 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=31 REMAP_PORT_45=30 REMAP_PORT_46=29 REMAP_PORT_47=28 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=51 REMAP_PORT_49=50 REMAP_PORT_50=49 REMAP_PORT_51=48 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 REMAP_PORT_53=54 REMAP_PORT_54=53 REMAP_PORT_55=52 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=59 REMAP_PORT_57=58 REMAP_PORT_58=57 REMAP_PORT_59=56 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=62 REMAP_PORT_62=61 REMAP_PORT_63=60 + +led 0 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +led 0 start + +led 1 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +led 1 start + +led auto on \ No newline at end of file diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/minigraph.xml b/device/accton/x86_64-accton_as7716_32xb-r0/minigraph.xml new file mode 100755 index 00000000000..5cefa847181 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32xb-r0/minigraph.xml @@ -0,0 +1,1074 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + sonic + 10.0.0.32 + 1 + 180 + 60 + + + sonic + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + sonic + 10.0.0.34 + 1 + 180 + 60 + + + sonic + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + sonic + 10.0.0.36 + 1 + 180 + 60 + + + sonic + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + sonic + 10.0.0.38 + 1 + 180 + 60 + + + sonic + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + sonic + 10.0.0.40 + 1 + 180 + 60 + + + sonic + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + sonic + 10.0.0.42 + 1 + 180 + 60 + + + sonic + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + sonic + 10.0.0.44 + 1 + 180 + 60 + + + sonic + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + sonic + 10.0.0.46 + 1 + 180 + 60 + + + sonic + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + sonic + 10.0.0.48 + 1 + 180 + 60 + + + sonic + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + sonic + 10.0.0.50 + 1 + 180 + 60 + + + sonic + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + sonic + 10.0.0.52 + 1 + 180 + 60 + + + sonic + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + sonic + 10.0.0.54 + 1 + 180 + 60 + + + sonic + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + sonic + 10.0.0.56 + 1 + 180 + 60 + + + sonic + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + sonic + 10.0.0.58 + 1 + 180 + 60 + + + sonic + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + sonic + 10.0.0.60 + 1 + 180 + 60 + + + sonic + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + sonic + 10.0.0.62 + 1 + 180 + 60 + + + sonic + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + sonic + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + sonic + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + sonic + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + sonic + Accton-AS7716-32XB + + + + + + + sonic + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + sonic + Accton-AS7716-32XB +
diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as7716_32xb-r0/plugins/eeprom.py new file mode 100755 index 00000000000..6fa5719afba --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32xb-r0/plugins/eeprom.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom" + #Two i2c buses might get flipped order, check them both. + if not os.path.exists(self.eeprom_path): + self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as7716_32xb-r0/plugins/psuutil.py new file mode 100755 index 00000000000..5a4b0fe83d8 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32xb-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 1: "0-0053", + 2: "0-0050", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7716_32xb-r0/plugins/sfputil.py new file mode 100755 index 00000000000..d57f10e016d --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32xb-r0/plugins/sfputil.py @@ -0,0 +1,138 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + import os + import sys, getopt + import commands + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 31 + PORTS_IN_BLOCK = 32 + + BASE_OOM_PATH = "/sys/bus/i2c/devices/{0}-0050/" + BASE_CPLD_PATH = "/sys/bus/i2c/devices/0-0060/" + BASE_I2C_PATH = "/sys/bus/i2c/devices/" + + _port_to_is_present = {} + _port_to_lp_mode = {} + + _port_to_eeprom_mapping = {} + _port_to_i2c_mapping = { + 0: [1, 29], + 1: [2, 30], + 2: [3, 31], + 3: [4, 32], + 4: [5, 34], + 5: [6, 33], + 6: [7, 36], + 7: [8, 35], + 8: [9, 25], + 9: [10, 26], + 10: [11, 27], + 11: [12, 28], + 12: [14, 37], + 13: [15, 38], + 14: [16, 39], + 15: [17, 40], + 16: [18, 41], + 17: [19, 42], + 18: [20, 43], + 19: [21, 44], + 20: [22, 53], + 21: [23, 54], + 22: [24, 55], + 23: [25, 56], + 24: [26, 45], + 25: [27, 46], + 26: [28, 47], + 27: [29, 48], + 28: [30, 49], + 29: [31, 50], + 30: [32, 51], + 31: [33, 52], + } + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_ports(self): + return range(self.PORT_START, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + present_path = self.BASE_CPLD_PATH + "module_present_" + str(port_num+1) + self.__port_to_is_present = present_path + + try: + val_file = open(self.__port_to_is_present) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = val_file.readline().rstrip() + val_file.close() + + # content is a string, either "0" or "1" + if content == "1": + return True + + return False + + def __init__(self): + eeprom_path = self.BASE_I2C_PATH + + for x in range(0, self.port_end+1): + self.port_to_eeprom_mapping[x] = eeprom_path.format( + self._port_to_i2c_mapping[x][1] + ) + if(x < 9): + if(self.get_presence(x)==1): + self.port_to_eeprom_mapping[x] = self.BASE_I2C_PATH + "0-000" +str(x+1) + "/eeprom" + + else: + if(self.get_presence(x)==1): + self.port_to_eeprom_mapping[x] = self.BASE_I2C_PATH + "0-00" +str(x+1)+ "/eeprom" + + SfpUtilBase.__init__(self) + + + + def get_low_power_mode(self, port_num): + raise NotImplementedError + + def set_low_power_mode(self, port_num, lpmode): + raise NotImplementedError + + def reset(self, port_num): + if port_num < self.port_start or port_num > self.port_end: + return False + + mod_rst_cmd = "ipmitool raw 0x34 0x11 " + str(port_num+1) + " 0x11 0x1" + (status, output) = commands.getstatusoutput (mod_rst_cmd) + return True + + \ No newline at end of file diff --git a/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/port_config.ini b/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/port_config.ini index f6c7b0c4a87..20d1b84edce 100644 --- a/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/port_config.ini +++ b/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/port_config.ini @@ -1 +1,65 @@ # name lanes alias +Ethernet0 73,74,75,76 hundredGigE1 +Ethernet4 65,66,67,68 hundredGigE2 +Ethernet8 81,82,83,84 hundredGigE3 +Ethernet12 89,90,91,92 hundredGigE4 +Ethernet16 105,106,107,108 hundredGigE5 +Ethernet20 97,98,99,100 hundredGigE6 +Ethernet24 113,114,115,116 hundredGigE7 +Ethernet28 121,122,123,124 hundredGigE8 +Ethernet32 41,42,43,44 hundredGigE9 +Ethernet36 33,34,35,36 hundredGigE10 +Ethernet40 49,50,51,52 hundredGigE11 +Ethernet44 57,58,59,60 hundredGigE12 +Ethernet48 137,138,139,140 hundredGigE13 +Ethernet52 129,130,131,132 hundredGigE14 +Ethernet56 145,146,147,148 hundredGigE15 +Ethernet60 153,154,155,156 hundredGigE16 +Ethernet64 173,174,175,176 hundredGigE17 +Ethernet68 165,166,167,168 hundredGigE18 +Ethernet72 181,182,183,184 hundredGigE19 +Ethernet76 189,190,191,192 hundredGigE20 +Ethernet80 13,14,15,16 hundredGigE21 +Ethernet84 5,6,7,8 hundredGigE22 +Ethernet88 29,30,31,32 hundredGigE23 +Ethernet92 21,22,23,24 hundredGigE24 +Ethernet96 205,206,207,208 hundredGigE25 +Ethernet100 197,198,199,200 hundredGigE26 +Ethernet104 213,214,215,216 hundredGigE27 +Ethernet108 221,222,223,224 hundredGigE28 +Ethernet112 229,230,231,232 hundredGigE29 +Ethernet116 237,238,239,240 hundredGigE30 +Ethernet120 245,246,247,248 hundredGigE31 +Ethernet124 253,254,255,256 hundredGigE32 +Ethernet128 69,70,71,72 hundredGigE33 +Ethernet132 77,78,79,80 hundredGigE34 +Ethernet136 93,94,95,96 hundredGigE35 +Ethernet140 85,86,87,88 hundredGigE36 +Ethernet144 101,102,103,104 hundredGigE37 +Ethernet148 109,110,111,112 hundredGigE38 +Ethernet152 125,126,127,128 hundredGigE39 +Ethernet156 117,118,119,120 hundredGigE40 +Ethernet160 37,38,39,40 hundredGigE41 +Ethernet164 45,46,47,48 hundredGigE42 +Ethernet168 61,62,63,64 hundredGigE43 +Ethernet172 53,54,55,56 hundredGigE44 +Ethernet176 133,134,135,136 hundredGigE45 +Ethernet180 141,142,143,144 hundredGigE46 +Ethernet184 157,158,159,160 hundredGigE47 +Ethernet188 149,150,151,152 hundredGigE48 +Ethernet192 161,162,163,164 hundredGigE49 +Ethernet196 169,170,171,172 hundredGigE50 +Ethernet200 185,186,187,188 hundredGigE51 +Ethernet204 177,178,179,180 hundredGigE52 +Ethernet208 1,2,3,4 hundredGigE53 +Ethernet212 9,10,11,12 hundredGigE54 +Ethernet216 25,26,27,28 hundredGigE55 +Ethernet220 17,18,19,20 hundredGigE56 +Ethernet224 193,194,195,196 hundredGigE57 +Ethernet228 201,202,203,204 hundredGigE58 +Ethernet232 217,218,219,220 hundredGigE59 +Ethernet236 209,210,211,212 hundredGigE60 +Ethernet240 225,226,227,228 hundredGigE61 +Ethernet244 233,234,235,236 hundredGigE62 +Ethernet248 249,250,251,252 hundredGigE63 +Ethernet252 241,242,243,244 hundredGigE64 diff --git a/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/sai.profile b/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/sai.profile index e69de29bb2d..f2d9aa96821 100644 --- a/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/sai.profile +++ b/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th2-as7816-64x100G.config.bcm diff --git a/device/accton/x86_64-accton_as7816_64x-r0/led_proc_init.soc b/device/accton/x86_64-accton_as7816_64x-r0/led_proc_init.soc index e69de29bb2d..75a36c6f9c6 100755 --- a/device/accton/x86_64-accton_as7816_64x-r0/led_proc_init.soc +++ b/device/accton/x86_64-accton_as7816_64x-r0/led_proc_init.soc @@ -0,0 +1,155 @@ +m CMIC_LEDUP0_CLK_PARAMS REFRESH_CYCLE_PERIOD=0xc00000 +m CMIC_LEDUP1_CLK_PARAMS REFRESH_CYCLE_PERIOD=0xc00000 +m CMIC_LEDUP2_CLK_PARAMS REFRESH_CYCLE_PERIOD=0xc00000 +m CMIC_LEDUP3_CLK_PARAMS REFRESH_CYCLE_PERIOD=0xc00000 + +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=63 REMAP_PORT_1=62 REMAP_PORT_2=61 REMAP_PORT_3=60 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=59 REMAP_PORT_5=58 REMAP_PORT_6=57 REMAP_PORT_7=56 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=55 REMAP_PORT_9=54 REMAP_PORT_10=53 REMAP_PORT_11=52 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=51 REMAP_PORT_13=50 REMAP_PORT_14=49 REMAP_PORT_15=48 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=47 REMAP_PORT_17=46 REMAP_PORT_18=45 REMAP_PORT_19=44 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=43 REMAP_PORT_21=42 REMAP_PORT_22=41 REMAP_PORT_23=40 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=39 REMAP_PORT_25=38 REMAP_PORT_26=37 REMAP_PORT_27=36 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=35 REMAP_PORT_29=34 REMAP_PORT_30=33 REMAP_PORT_31=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=31 REMAP_PORT_33=30 REMAP_PORT_34=29 REMAP_PORT_35=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=27 REMAP_PORT_37=26 REMAP_PORT_38=25 REMAP_PORT_39=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=23 REMAP_PORT_41=22 REMAP_PORT_42=21 REMAP_PORT_43=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=19 REMAP_PORT_45=18 REMAP_PORT_46=17 REMAP_PORT_47=16 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15 REMAP_PORT_49=14 REMAP_PORT_50=13 REMAP_PORT_51=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0 + +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=3 REMAP_PORT_1=2 REMAP_PORT_2=1 REMAP_PORT_3=0 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=7 REMAP_PORT_5=6 REMAP_PORT_6=5 REMAP_PORT_7=4 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=11 REMAP_PORT_9=10 REMAP_PORT_10=9 REMAP_PORT_11=8 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=15 REMAP_PORT_13=14 REMAP_PORT_14=13 REMAP_PORT_15=12 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=19 REMAP_PORT_17=18 REMAP_PORT_18=17 REMAP_PORT_19=16 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=23 REMAP_PORT_21=22 REMAP_PORT_22=21 REMAP_PORT_23=20 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=27 REMAP_PORT_25=26 REMAP_PORT_26=25 REMAP_PORT_27=24 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=31 REMAP_PORT_29=30 REMAP_PORT_30=29 REMAP_PORT_31=28 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=35 REMAP_PORT_33=34 REMAP_PORT_34=33 REMAP_PORT_35=32 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=39 REMAP_PORT_37=38 REMAP_PORT_38=37 REMAP_PORT_39=36 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=43 REMAP_PORT_41=42 REMAP_PORT_42=41 REMAP_PORT_43=40 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=47 REMAP_PORT_45=46 REMAP_PORT_46=45 REMAP_PORT_47=44 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=51 REMAP_PORT_49=50 REMAP_PORT_50=49 REMAP_PORT_51=48 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 REMAP_PORT_53=54 REMAP_PORT_54=53 REMAP_PORT_55=52 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=59 REMAP_PORT_57=58 REMAP_PORT_58=57 REMAP_PORT_59=56 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=62 REMAP_PORT_62=61 REMAP_PORT_63=60 + +m CMIC_LEDUP2_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=63 REMAP_PORT_1=62 REMAP_PORT_2=61 REMAP_PORT_3=60 +m CMIC_LEDUP2_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=59 REMAP_PORT_5=58 REMAP_PORT_6=57 REMAP_PORT_7=56 +m CMIC_LEDUP2_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=55 REMAP_PORT_9=54 REMAP_PORT_10=53 REMAP_PORT_11=52 +m CMIC_LEDUP2_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=51 REMAP_PORT_13=50 REMAP_PORT_14=49 REMAP_PORT_15=48 +m CMIC_LEDUP2_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=47 REMAP_PORT_17=46 REMAP_PORT_18=45 REMAP_PORT_19=44 +m CMIC_LEDUP2_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=43 REMAP_PORT_21=42 REMAP_PORT_22=41 REMAP_PORT_23=40 +m CMIC_LEDUP2_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=39 REMAP_PORT_25=38 REMAP_PORT_26=37 REMAP_PORT_27=36 +m CMIC_LEDUP2_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=35 REMAP_PORT_29=34 REMAP_PORT_30=33 REMAP_PORT_31=32 +m CMIC_LEDUP2_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=31 REMAP_PORT_33=30 REMAP_PORT_34=29 REMAP_PORT_35=28 +m CMIC_LEDUP2_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=27 REMAP_PORT_37=26 REMAP_PORT_38=25 REMAP_PORT_39=24 +m CMIC_LEDUP2_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=23 REMAP_PORT_41=22 REMAP_PORT_42=21 REMAP_PORT_43=20 +m CMIC_LEDUP2_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=19 REMAP_PORT_45=18 REMAP_PORT_46=17 REMAP_PORT_47=16 +m CMIC_LEDUP2_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15 REMAP_PORT_49=14 REMAP_PORT_50=13 REMAP_PORT_51=12 +m CMIC_LEDUP2_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8 +m CMIC_LEDUP2_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4 +m CMIC_LEDUP2_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0 + +m CMIC_LEDUP3_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=3 REMAP_PORT_1=2 REMAP_PORT_2=1 REMAP_PORT_3=0 +m CMIC_LEDUP3_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=7 REMAP_PORT_5=6 REMAP_PORT_6=5 REMAP_PORT_7=4 +m CMIC_LEDUP3_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=11 REMAP_PORT_9=10 REMAP_PORT_10=9 REMAP_PORT_11=8 +m CMIC_LEDUP3_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=15 REMAP_PORT_13=14 REMAP_PORT_14=13 REMAP_PORT_15=12 +m CMIC_LEDUP3_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=19 REMAP_PORT_17=18 REMAP_PORT_18=17 REMAP_PORT_19=16 +m CMIC_LEDUP3_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=23 REMAP_PORT_21=22 REMAP_PORT_22=21 REMAP_PORT_23=20 +m CMIC_LEDUP3_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=27 REMAP_PORT_25=26 REMAP_PORT_26=25 REMAP_PORT_27=24 +m CMIC_LEDUP3_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=31 REMAP_PORT_29=30 REMAP_PORT_30=29 REMAP_PORT_31=28 +m CMIC_LEDUP3_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=35 REMAP_PORT_33=34 REMAP_PORT_34=33 REMAP_PORT_35=32 +m CMIC_LEDUP3_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=39 REMAP_PORT_37=38 REMAP_PORT_38=37 REMAP_PORT_39=36 +m CMIC_LEDUP3_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=43 REMAP_PORT_41=42 REMAP_PORT_42=41 REMAP_PORT_43=40 +m CMIC_LEDUP3_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=47 REMAP_PORT_45=46 REMAP_PORT_46=45 REMAP_PORT_47=44 +m CMIC_LEDUP3_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=51 REMAP_PORT_49=50 REMAP_PORT_50=49 REMAP_PORT_51=48 +m CMIC_LEDUP3_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 REMAP_PORT_53=54 REMAP_PORT_54=53 REMAP_PORT_55=52 +m CMIC_LEDUP3_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=59 REMAP_PORT_57=58 REMAP_PORT_58=57 REMAP_PORT_59=56 +m CMIC_LEDUP3_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=62 REMAP_PORT_62=61 REMAP_PORT_63=60 + +led 0 stop +led 0 prog \ + 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 \ + 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC \ + 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 \ + 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC \ + 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 \ + 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 \ + 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 \ + F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 \ + 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF \ + 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 \ + 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC \ + 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 \ + 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 \ + 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 98 67 \ + 84 57 80 18 71 EB 67 84 67 98 57 67 84 67 84 57 \ + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + + +led 1 stop +led 1 prog \ + 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 \ + 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC \ + 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 \ + 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC \ + 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 \ + 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 \ + 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 \ + F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 \ + 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF \ + 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 \ + 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC \ + 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 \ + 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 \ + 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 98 67 \ + 84 57 80 18 71 EB 67 84 67 98 57 67 84 67 84 57 \ + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +led 2 stop +led 2 prog \ + 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 \ + 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC \ + 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 \ + 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC \ + 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 \ + 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 \ + 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 \ + F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 \ + 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF \ + 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 \ + 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC \ + 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 \ + 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 \ + 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 98 67 \ + 84 57 80 18 71 EB 67 84 67 98 57 67 84 67 84 57 \ + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +led 3 stop +led 3 prog \ + 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 \ + 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC \ + 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 \ + 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC \ + 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 \ + 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 \ + 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 \ + F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 \ + 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF \ + 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 \ + 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC \ + 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 \ + 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 \ + 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 98 67 \ + 84 57 80 18 71 EB 67 84 67 98 57 67 84 67 84 57 \ + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +led auto on +led 0 start +led 1 start +led 2 start +led 3 start diff --git a/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml b/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml index 025985c8367..b561c2f7b8f 100644 --- a/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml @@ -2,623 +2,8 @@ - - ARISTA01T0 - 10.0.0.33 - switch1 - 10.0.0.32 - 1 - 180 - 60 - - - switch1 - 10.0.0.0 - ARISTA01T2 - 10.0.0.1 - 1 - 180 - 60 - - - ARISTA02T0 - 10.0.0.35 - switch1 - 10.0.0.34 - 1 - 180 - 60 - - - switch1 - 10.0.0.2 - ARISTA02T2 - 10.0.0.3 - 1 - 180 - 60 - - - ARISTA03T0 - 10.0.0.37 - switch1 - 10.0.0.36 - 1 - 180 - 60 - - - switch1 - 10.0.0.4 - ARISTA03T2 - 10.0.0.5 - 1 - 180 - 60 - - - ARISTA04T0 - 10.0.0.39 - switch1 - 10.0.0.38 - 1 - 180 - 60 - - - switch1 - 10.0.0.6 - ARISTA04T2 - 10.0.0.7 - 1 - 180 - 60 - - - ARISTA05T0 - 10.0.0.41 - switch1 - 10.0.0.40 - 1 - 180 - 60 - - - switch1 - 10.0.0.8 - ARISTA05T2 - 10.0.0.9 - 1 - 180 - 60 - - - ARISTA06T0 - 10.0.0.43 - switch1 - 10.0.0.42 - 1 - 180 - 60 - - - switch1 - 10.0.0.10 - ARISTA06T2 - 10.0.0.11 - 1 - 180 - 60 - - - ARISTA07T0 - 10.0.0.45 - switch1 - 10.0.0.44 - 1 - 180 - 60 - - - switch1 - 10.0.0.12 - ARISTA07T2 - 10.0.0.13 - 1 - 180 - 60 - - - ARISTA08T0 - 10.0.0.47 - switch1 - 10.0.0.46 - 1 - 180 - 60 - - - switch1 - 10.0.0.14 - ARISTA08T2 - 10.0.0.15 - 1 - 180 - 60 - - - ARISTA09T0 - 10.0.0.49 - switch1 - 10.0.0.48 - 1 - 180 - 60 - - - switch1 - 10.0.0.16 - ARISTA09T2 - 10.0.0.17 - 1 - 180 - 60 - - - ARISTA10T0 - 10.0.0.51 - switch1 - 10.0.0.50 - 1 - 180 - 60 - - - switch1 - 10.0.0.18 - ARISTA10T2 - 10.0.0.19 - 1 - 180 - 60 - - - ARISTA11T0 - 10.0.0.53 - switch1 - 10.0.0.52 - 1 - 180 - 60 - - - switch1 - 10.0.0.20 - ARISTA11T2 - 10.0.0.21 - 1 - 180 - 60 - - - ARISTA12T0 - 10.0.0.55 - switch1 - 10.0.0.54 - 1 - 180 - 60 - - - switch1 - 10.0.0.22 - ARISTA12T2 - 10.0.0.23 - 1 - 180 - 60 - - - ARISTA13T0 - 10.0.0.57 - switch1 - 10.0.0.56 - 1 - 180 - 60 - - - switch1 - 10.0.0.24 - ARISTA13T2 - 10.0.0.25 - 1 - 180 - 60 - - - ARISTA14T0 - 10.0.0.59 - switch1 - 10.0.0.58 - 1 - 180 - 60 - - - switch1 - 10.0.0.26 - ARISTA14T2 - 10.0.0.27 - 1 - 180 - 60 - - - ARISTA15T0 - 10.0.0.61 - switch1 - 10.0.0.60 - 1 - 180 - 60 - - - switch1 - 10.0.0.28 - ARISTA15T2 - 10.0.0.29 - 1 - 180 - 60 - - - ARISTA16T0 - 10.0.0.63 - switch1 - 10.0.0.62 - 1 - 180 - 60 - - - switch1 - 10.0.0.30 - ARISTA16T2 - 10.0.0.31 - 1 - 180 - 60 - - - 65100 - switch1 - - -
10.0.0.33
- - -
- -
10.0.0.1
- - -
- -
10.0.0.35
- - -
- -
10.0.0.3
- - -
- -
10.0.0.37
- - -
- -
10.0.0.5
- - -
- -
10.0.0.39
- - -
- -
10.0.0.7
- - -
- -
10.0.0.41
- - -
- -
10.0.0.9
- - -
- -
10.0.0.43
- - -
- -
10.0.0.11
- - -
- -
10.0.0.45
- - -
- -
10.0.0.13
- - -
- -
10.0.0.47
- - -
- -
10.0.0.15
- - -
- -
10.0.0.49
- - -
- -
10.0.0.17
- - -
- -
10.0.0.51
- - -
- -
10.0.0.19
- - -
- -
10.0.0.53
- - -
- -
10.0.0.21
- - -
- -
10.0.0.55
- - -
- -
10.0.0.23
- - -
- -
10.0.0.57
- - -
- -
10.0.0.25
- - -
- -
10.0.0.59
- - -
- -
10.0.0.27
- - -
- -
10.0.0.61
- - -
- -
10.0.0.29
- - -
- -
10.0.0.63
- - -
- -
10.0.0.31
- - -
-
- -
- - 64001 - ARISTA01T0 - - - - 65200 - ARISTA01T2 - - - - 64002 - ARISTA02T0 - - - - 65200 - ARISTA02T2 - - - - 64003 - ARISTA03T0 - - - - 65200 - ARISTA03T2 - - - - 64004 - ARISTA04T0 - - - - 65200 - ARISTA04T2 - - - - 64005 - ARISTA05T0 - - - - 65200 - ARISTA05T2 - - - - 64006 - ARISTA06T0 - - - - 65200 - ARISTA06T2 - - - - 64007 - ARISTA07T0 - - - - 65200 - ARISTA07T2 - - - - 64008 - ARISTA08T0 - - - - 65200 - ARISTA08T2 - - - - 64009 - ARISTA09T0 - - - - 65200 - ARISTA09T2 - - - - 64010 - ARISTA10T0 - - - - 65200 - ARISTA10T2 - - - - 64011 - ARISTA11T0 - - - - 65200 - ARISTA11T2 - - - - 64012 - ARISTA12T0 - - - - 65200 - ARISTA12T2 - - - - 64013 - ARISTA13T0 - - - - 65200 - ARISTA13T2 - - - - 64014 - ARISTA14T0 - - - - 65200 - ARISTA14T2 - - - - 64015 - ARISTA15T0 - - - - 65200 - ARISTA15T2 - - - - 64016 - ARISTA16T0 - - - - 65200 - ARISTA16T2 - -
@@ -639,170 +24,330 @@ - switch1 + sonic - Ethernet0 + hundredGigE1 10.0.0.0/31 - Ethernet4 + hundredGigE2 10.0.0.2/31 - Ethernet8 + hundredGigE3 10.0.0.4/31 - Ethernet12 + hundredGigE4 10.0.0.6/31 - Ethernet16 + hundredGigE5 10.0.0.8/31 - Ethernet20 + hundredGigE6 10.0.0.10/31 - Ethernet24 + hundredGigE7 10.0.0.12/31 - Ethernet28 + hundredGigE8 10.0.0.14/31 - Ethernet32 + hundredGigE9 10.0.0.16/31 - Ethernet36 + hundredGigE10 10.0.0.18/31 - Ethernet40 + hundredGigE11 10.0.0.20/31 - Ethernet44 + hundredGigE12 10.0.0.22/31 - Ethernet48 + hundredGigE13 10.0.0.24/31 - Ethernet52 + hundredGigE14 10.0.0.26/31 - Ethernet56 + hundredGigE15 10.0.0.28/31 - Ethernet60 + hundredGigE16 10.0.0.30/31 - Ethernet64 + hundredGigE17 10.0.0.32/31 - Ethernet68 + hundredGigE18 10.0.0.34/31 - Ethernet72 + hundredGigE19 10.0.0.36/31 - Ethernet76 + hundredGigE20 10.0.0.38/31 - Ethernet80 + hundredGigE21 10.0.0.40/31 - Ethernet84 + hundredGigE22 10.0.0.42/31 - Ethernet88 + hundredGigE23 10.0.0.44/31 - Ethernet92 + hundredGigE24 10.0.0.46/31 - Ethernet96 + hundredGigE25 10.0.0.48/31 - Ethernet100 + hundredGigE26 10.0.0.50/31 - Ethernet104 + hundredGigE27 10.0.0.52/31 - Ethernet108 + hundredGigE28 10.0.0.54/31 - Ethernet112 + hundredGigE29 10.0.0.56/31 - Ethernet116 + hundredGigE30 10.0.0.58/31 - Ethernet120 + hundredGigE31 10.0.0.60/31 - Ethernet124 + hundredGigE32 10.0.0.62/31 + + + hundredGigE33 + 10.0.0.64/31 + + + + hundredGigE34 + 10.0.0.66/31 + + + + hundredGigE35 + 10.0.0.68/31 + + + + hundredGigE36 + 10.0.0.70/31 + + + + hundredGigE37 + 10.0.0.72/31 + + + + hundredGigE38 + 10.0.0.74/31 + + + + hundredGigE39 + 10.0.0.76/31 + + + + hundredGigE40 + 10.0.0.78/31 + + + + hundredGigE41 + 10.0.0.80/31 + + + + hundredGigE42 + 10.0.0.82/31 + + + + hundredGigE43 + 10.0.0.84/31 + + + + hundredGigE44 + 10.0.0.86/31 + + + + hundredGigE45 + 10.0.0.88/31 + + + + hundredGigE46 + 10.0.0.90/31 + + + + hundredGigE47 + 10.0.0.92/31 + + + + hundredGigE48 + 10.0.0.94/31 + + + + hundredGigE49 + 10.0.0.96/31 + + + + hundredGigE50 + 10.0.0.98/31 + + + + hundredGigE51 + 10.0.0.100/31 + + + + hundredGigE52 + 10.0.0.102/31 + + + + hundredGigE53 + 10.0.0.104/31 + + + + hundredGigE54 + 10.0.0.106/31 + + + + hundredGigE55 + 10.0.0.108/31 + + + + hundredGigE56 + 10.0.0.110/31 + + + + hundredGigE57 + 10.0.0.112/31 + + + + hundredGigE58 + 10.0.0.114/31 + + + + hundredGigE59 + 10.0.0.116/31 + + + + hundredGigE60 + 10.0.0.118/31 + + + + hundredGigE61 + 10.0.0.120/31 + + + + hundredGigE62 + 10.0.0.122/31 + + + + hundredGigE63 + 10.0.0.124/31 + + + + hundredGigE64 + 10.0.0.126/31 + @@ -814,240 +359,464 @@ DeviceInterfaceLink - switch1 - Ethernet0 - ARISTA01T2 - Ethernet1 + sonic-target + hundredGigE1 + sonic + hundredGigE1 DeviceInterfaceLink - switch1 - Ethernet4 - ARISTA02T2 - Ethernet1 + sonic-target + hundredGigE2 + sonic + hundredGigE2 DeviceInterfaceLink - switch1 - Ethernet8 - ARISTA03T2 - Ethernet1 + sonic-target + hundredGigE3 + sonic + hundredGigE3 DeviceInterfaceLink - switch1 - Ethernet12 - ARISTA04T2 - Ethernet1 + sonic-target + hundredGigE4 + sonic + hundredGigE4 DeviceInterfaceLink - switch1 - Ethernet16 - ARISTA05T2 - Ethernet1 + sonic-target + hundredGigE5 + sonic + hundredGigE5 DeviceInterfaceLink - switch1 - Ethernet20 - ARISTA06T2 - Ethernet1 + sonic-target + hundredGigE6 + sonic + hundredGigE6 DeviceInterfaceLink - switch1 - Ethernet24 - ARISTA07T2 - Ethernet1 + sonic-target + hundredGigE7 + sonic + hundredGigE7 DeviceInterfaceLink - switch1 - Ethernet28 - ARISTA08T2 - Ethernet1 + sonic-target + hundredGigE8 + sonic + hundredGigE8 DeviceInterfaceLink - switch1 - Ethernet32 - ARISTA09T2 - Ethernet1 + sonic-target + hundredGigE9 + sonic + hundredGigE9 DeviceInterfaceLink - switch1 - Ethernet36 - ARISTA10T2 - Ethernet1 + sonic-target + hundredGigE10 + sonic + hundredGigE10 DeviceInterfaceLink - switch1 - Ethernet40 - ARISTA11T2 - Ethernet1 + sonic-target + hundredGigE11 + sonic + hundredGigE11 DeviceInterfaceLink - switch1 - Ethernet44 - ARISTA12T2 - Ethernet1 + sonic-target + hundredGigE12 + sonic + hundredGigE12 DeviceInterfaceLink - switch1 - Ethernet48 - ARISTA13T2 - Ethernet1 + sonic-target + hundredGigE13 + sonic + hundredGigE13 DeviceInterfaceLink - switch1 - Ethernet52 - ARISTA14T2 - Ethernet1 + sonic-target + hundredGigE14 + sonic + hundredGigE14 DeviceInterfaceLink - switch1 - Ethernet56 - ARISTA15T2 - Ethernet1 + sonic-target + hundredGigE15 + sonic + hundredGigE15 DeviceInterfaceLink - switch1 - Ethernet60 - ARISTA16T2 - Ethernet1 + sonic-target + hundredGigE16 + sonic + hundredGigE16 DeviceInterfaceLink - switch1 - Ethernet64 - ARISTA01T0 - Ethernet1 + sonic-target + hundredGigE17 + sonic + hundredGigE17 DeviceInterfaceLink - switch1 - Ethernet68 - ARISTA02T0 - Ethernet1 + sonic-target + hundredGigE18 + sonic + hundredGigE18 DeviceInterfaceLink - switch1 - Ethernet72 - ARISTA03T0 - Ethernet1 + sonic-target + hundredGigE19 + sonic + hundredGigE19 DeviceInterfaceLink - switch1 - Ethernet76 - ARISTA04T0 - Ethernet1 + sonic-target + hundredGigE20 + sonic + hundredGigE20 DeviceInterfaceLink - switch1 - Ethernet80 - ARISTA05T0 - Ethernet1 + sonic-target + hundredGigE21 + sonic + hundredGigE21 DeviceInterfaceLink - switch1 - Ethernet84 - ARISTA06T0 - Ethernet1 + sonic-target + hundredGigE22 + sonic + hundredGigE22 DeviceInterfaceLink - switch1 - Ethernet88 - ARISTA07T0 - Ethernet1 + sonic-target + hundredGigE23 + sonic + hundredGigE23 DeviceInterfaceLink - switch1 - Ethernet92 - ARISTA08T0 - Ethernet1 + sonic-target + hundredGigE24 + sonic + hundredGigE24 DeviceInterfaceLink - switch1 - Ethernet96 - ARISTA09T0 - Ethernet1 + sonic-target + hundredGigE25 + sonic + hundredGigE25 DeviceInterfaceLink - switch1 - Ethernet100 - ARISTA10T0 - Ethernet1 + sonic-target + hundredGigE26 + sonic + hundredGigE26 DeviceInterfaceLink - switch1 - Ethernet104 - ARISTA11T0 - Ethernet1 + sonic-target + hundredGigE27 + sonic + hundredGigE27 DeviceInterfaceLink - switch1 - Ethernet108 - ARISTA12T0 - Ethernet1 + sonic-target + hundredGigE28 + sonic + hundredGigE28 DeviceInterfaceLink - switch1 - Ethernet112 - ARISTA13T0 - Ethernet1 + sonic-target + hundredGigE29 + sonic + hundredGigE29 DeviceInterfaceLink - switch1 - Ethernet116 - ARISTA14T0 - Ethernet1 + sonic-target + hundredGigE30 + sonic + hundredGigE30 DeviceInterfaceLink - switch1 - Ethernet120 - ARISTA15T0 - Ethernet1 + sonic-target + hundredGigE31 + sonic + hundredGigE31 DeviceInterfaceLink - switch1 - Ethernet124 - ARISTA16T0 - Ethernet1 + sonic-target + hundredGigE32 + sonic + hundredGigE32 + + + DeviceInterfaceLink + sonic-target + hundredGigE33 + sonic + hundredGigE33 + + + DeviceInterfaceLink + sonic-target + hundredGigE34 + sonic + hundredGigE34 + + + DeviceInterfaceLink + sonic-target + hundredGigE35 + sonic + hundredGigE35 + + + DeviceInterfaceLink + sonic-target + hundredGigE36 + sonic + hundredGigE36 + + + DeviceInterfaceLink + sonic-target + hundredGigE37 + sonic + hundredGigE37 + + + DeviceInterfaceLink + sonic-target + hundredGigE38 + sonic + hundredGigE38 + + + DeviceInterfaceLink + sonic-target + hundredGigE39 + sonic + hundredGigE39 + + + DeviceInterfaceLink + sonic-target + hundredGigE40 + sonic + hundredGigE40 + + + DeviceInterfaceLink + sonic-target + hundredGigE41 + sonic + hundredGigE41 + + + DeviceInterfaceLink + sonic-target + hundredGigE42 + sonic + hundredGigE42 + + + DeviceInterfaceLink + sonic-target + hundredGigE43 + sonic + hundredGigE43 + + + DeviceInterfaceLink + sonic-target + hundredGigE44 + sonic + hundredGigE44 + + + DeviceInterfaceLink + sonic-target + hundredGigE45 + sonic + hundredGigE45 + + + DeviceInterfaceLink + sonic-target + hundredGigE46 + sonic + hundredGigE46 + + + DeviceInterfaceLink + sonic-target + hundredGigE47 + sonic + hundredGigE47 + + + DeviceInterfaceLink + sonic-target + hundredGigE48 + sonic + hundredGigE48 + + + DeviceInterfaceLink + sonic-target + hundredGigE49 + sonic + hundredGigE49 + + + DeviceInterfaceLink + sonic-target + hundredGigE50 + sonic + hundredGigE50 + + + DeviceInterfaceLink + sonic-target + hundredGigE51 + sonic + hundredGigE51 + + + DeviceInterfaceLink + sonic-target + hundredGigE52 + sonic + hundredGigE52 + + + DeviceInterfaceLink + sonic-target + hundredGigE53 + sonic + hundredGigE53 + + + DeviceInterfaceLink + sonic-target + hundredGigE54 + sonic + hundredGigE54 + + + DeviceInterfaceLink + sonic-target + hundredGigE55 + sonic + hundredGigE55 + + + DeviceInterfaceLink + sonic-target + hundredGigE56 + sonic + hundredGigE56 + + + DeviceInterfaceLink + sonic-target + hundredGigE57 + sonic + hundredGigE57 + + + DeviceInterfaceLink + sonic-target + hundredGigE58 + sonic + hundredGigE58 + + + DeviceInterfaceLink + sonic-target + hundredGigE59 + sonic + hundredGigE59 + + + DeviceInterfaceLink + sonic-target + hundredGigE60 + sonic + hundredGigE60 + + + DeviceInterfaceLink + sonic-target + hundredGigE61 + sonic + hundredGigE61 + + + DeviceInterfaceLink + sonic-target + hundredGigE62 + sonic + hundredGigE62 + + + DeviceInterfaceLink + sonic-target + hundredGigE63 + sonic + hundredGigE63 + + + DeviceInterfaceLink + sonic-target + hundredGigE64 + sonic + hundredGigE64 - switch1 - Accton-AS7712-32X + sonic + Accton-AS7816-64X - switch1 + sonic DhcpResources @@ -1064,11 +833,16 @@ + + ErspanDestinationIpv4 + + 2.2.2.2 + - switch1 - Accton-AS7712-32X + sonic + Accton-AS7816-64X diff --git a/device/accton/x86_64-accton_as7816_64x-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as7816_64x-r0/plugins/psuutil.py new file mode 100755 index 00000000000..707c7c897c8 --- /dev/null +++ b/device/accton/x86_64-accton_as7816_64x-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 1: "10-0053", + 2: "9-0050", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as7816_64x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7816_64x-r0/plugins/sfputil.py index 7c82583c26b..26c2b37c672 100644 --- a/device/accton/x86_64-accton_as7816_64x-r0/plugins/sfputil.py +++ b/device/accton/x86_64-accton_as7816_64x-r0/plugins/sfputil.py @@ -94,9 +94,8 @@ def reset(self, port_num): # Check for invalid port_num if port_num < self._port_start or port_num > self._port_end: return False - - path = "/sys/bus/i2c/devices/{0}-0050/sfp_port_reset" - port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + path = "/sys/bus/i2c/devices/19-0060/module_reset_{0}" + port_ps = path.format(port_num+1) try: reg_file = open(port_ps, 'w') @@ -104,20 +103,17 @@ def reset(self, port_num): print "Error: unable to open file: %s" % str(e) return False - #toggle reset + #HW will clear reset after set. reg_file.seek(0) reg_file.write('1') - time.sleep(1) - reg_file.seek(0) - reg_file.write('0') reg_file.close() return True def set_low_power_mode(self, port_nuM, lpmode): - raise NotImplementedErro + raise NotImplementedError def get_low_power_mode(self, port_num): - raise NotImplementedErro + raise NotImplementedError def get_presence(self, port_num): # Check for invalid port_num diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 new file mode 100644 index 00000000000..551f73ca047 --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 @@ -0,0 +1,128 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "12766208", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "12766208", + "type": "egress", + "mode": "static" + }, + "egress_lossy_pool": { + "size": "8072396", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "xon":"18432", + "xoff":"40560", + "size":"41808", + "dynamic_th":"-4", + "xon_offset":"2496" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"12766208" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json index 2539513d8e1..926911ab59d 100644 --- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json +++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json @@ -92,64 +92,51 @@ } }, "SCHEDULER": { - "scheduler.0": { + "scheduler.0" : { "type":"DWRR", "weight": "25" }, - "scheduler.1": { + "scheduler.1" : { "type":"DWRR", "weight": "30" }, - "scheduler.2": { + "scheduler.2" : { "type":"DWRR", "weight": "20" } }, "PORT_QOS_MAP": { "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP:AZURE]", - "tc_to_queue_map" : "[TC_TO_QUEUE_MAP:AZURE]", - "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP:AZURE]", - "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE:AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", "pfc_enable": "3,4" } }, "WRED_PROFILE": { - "AZURE_LOSSY": { + "AZURE_LOSSLESS" : { "wred_green_enable":"true", "wred_yellow_enable":"true", + "wred_red_enable":"true", "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "green_max_threshold": "184320", - "green_min_threshold": "184320" - }, - "AZURE_LOSSLESS": { - "wred_green_enable":"true", - "wred_yellow_enable":"true", - "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "green_max_threshold": "184320", - "green_min_threshold": "184320" + "red_max_threshold":"312000", + "red_min_threshold":"104000", + "yellow_max_threshold":"312000", + "yellow_min_threshold":"104000", + "green_max_threshold":"312000", + "green_min_threshold":"104000" } }, "QUEUE": { - "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124:0-1" : { - "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]" - }, - "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124:3-4" : { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|3-4" : { "scheduler" : "[SCHEDULER|scheduler.0]", "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]" }, - "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124:0" : { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0" : { "scheduler" : "[SCHEDULER|scheduler.1]" }, - "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124:1" : { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|1" : { "scheduler" : "[SCHEDULER|scheduler.2]" } } diff --git a/device/arista/x86_64-arista_7050_qx32/minigraph.xml b/device/arista/x86_64-arista_7050_qx32/minigraph.xml index bbf2508ce4c..538a0ca61a0 100644 --- a/device/arista/x86_64-arista_7050_qx32/minigraph.xml +++ b/device/arista/x86_64-arista_7050_qx32/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet2/1 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet3/1 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4/1 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet5/1 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet6/1 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet7/1 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8/1 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet9/1 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet10/1 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet11/1 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12/1 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet13/1 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet14/1 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet15/1 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16/1 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet17/1 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet18/1 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet19/1 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20/1 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet21/1 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet22/1 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet23/1 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24/1 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Arista-7050-QX32 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Arista-7050-QX32 diff --git a/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/buffers.json.j2 b/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/buffers.json.j2 new file mode 100644 index 00000000000..551f73ca047 --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/buffers.json.j2 @@ -0,0 +1,128 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "12766208", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "12766208", + "type": "egress", + "mode": "static" + }, + "egress_lossy_pool": { + "size": "8072396", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "xon":"18432", + "xoff":"40560", + "size":"41808", + "dynamic_th":"-4", + "xon_offset":"2496" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"12766208" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/qos.json b/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/qos.json new file mode 100644 index 00000000000..926911ab59d --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/qos.json @@ -0,0 +1,143 @@ +{ + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0":"0", + "1":"0", + "2":"0", + "3":"3", + "4":"4", + "5":"0", + "6":"0", + "7":"0", + "8":"1", + "9":"0", + "10":"0", + "11":"0", + "12":"0", + "13":"0", + "14":"0", + "15":"0", + "16":"0", + "17":"0", + "18":"0", + "19":"0", + "20":"0", + "21":"0", + "22":"0", + "23":"0", + "24":"0", + "25":"0", + "26":"0", + "27":"0", + "28":"0", + "29":"0", + "30":"0", + "31":"0", + "32":"0", + "33":"0", + "34":"0", + "35":"0", + "36":"0", + "37":"0", + "38":"0", + "39":"0", + "40":"0", + "41":"0", + "42":"0", + "43":"0", + "44":"0", + "45":"0", + "46":"0", + "47":"0", + "48":"0", + "49":"0", + "50":"0", + "51":"0", + "52":"0", + "53":"0", + "54":"0", + "55":"0", + "56":"0", + "57":"0", + "58":"0", + "59":"0", + "60":"0", + "61":"0", + "62":"0", + "63":"0" + } + }, + "SCHEDULER": { + "scheduler.0" : { + "type":"DWRR", + "weight": "25" + }, + "scheduler.1" : { + "type":"DWRR", + "weight": "30" + }, + "scheduler.2" : { + "type":"DWRR", + "weight": "20" + } + }, + "PORT_QOS_MAP": { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable": "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "wred_red_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"312000", + "red_min_threshold":"104000", + "yellow_max_threshold":"312000", + "yellow_min_threshold":"104000", + "green_max_threshold":"312000", + "green_min_threshold":"104000" + } + }, + "QUEUE": { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|3-4" : { + "scheduler" : "[SCHEDULER|scheduler.0]", + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0" : { + "scheduler" : "[SCHEDULER|scheduler.1]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|1" : { + "scheduler" : "[SCHEDULER|scheduler.2]" + } + } +} diff --git a/device/arista/x86_64-arista_7050_qx32s/minigraph.xml b/device/arista/x86_64-arista_7050_qx32s/minigraph.xml index efd30582947..f28c9a9ae6c 100644 --- a/device/arista/x86_64-arista_7050_qx32s/minigraph.xml +++ b/device/arista/x86_64-arista_7050_qx32s/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet2/1 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet3/1 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4/1 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet5/1 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet6/1 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet7/1 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8/1 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet9/1 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet10/1 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet11/1 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12/1 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet13/1 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet14/1 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet15/1 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16/1 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet17/1 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet18/1 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet19/1 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20/1 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet21/1 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet22/1 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet23/1 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24/1 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Arista-7050-QX-32S @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Arista-7050-QX-32S diff --git a/device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py b/device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py index f2cb73194e1..8fa0c63a473 100644 --- a/device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py +++ b/device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py @@ -81,13 +81,13 @@ def __init__(self): f.write("1") # Initialize all fan LEDs to green - with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan1_led", "w") as f: + with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon4/fan1_led", "w") as f: f.write("1") - with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan2_led", "w") as f: + with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon4/fan2_led", "w") as f: f.write("1") - with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan3_led", "w") as f: + with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon4/fan3_led", "w") as f: f.write("1") - with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan4_led", "w") as f: + with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon4/fan4_led", "w") as f: f.write("1") diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers.json.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers.json.j2 new file mode 100644 index 00000000000..0b1cb2c541b --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers.json.j2 @@ -0,0 +1,2 @@ +{%- set default_topo = 't1' %} +{%- include 'buffers_config.j2' %} diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers_defaults_t0.j2 new file mode 100644 index 00000000000..3e39d411e8b --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers_defaults_t0.j2 @@ -0,0 +1,47 @@ + +{%- set default_cable = '5m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,128,4) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "11213696", + "type": "ingress", + "mode": "dynamic", + "xoff": "3855488" + }, + "egress_lossy_pool": { + "size": "9532224", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "15982720", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"1518", + "static_th":"3995680" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers_defaults_t1.j2 new file mode 100644 index 00000000000..d9f562f9562 --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers_defaults_t1.j2 @@ -0,0 +1,47 @@ + +{%- set default_cable = '40m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,128,4) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "10443264", + "type": "ingress", + "mode": "dynamic", + "xoff": "4625920" + }, + "egress_lossy_pool": { + "size": "8877440", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "15982720", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"1518", + "static_th":"3995680" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/pg_profile_lookup.ini b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/pg_profile_lookup.ini new file mode 100644 index 00000000000..3b2a417cebc --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset + 10000 5m 1248 2288 35776 -4 2288 + 25000 5m 1248 2288 53248 -4 2288 + 40000 5m 1248 2288 66560 -4 2288 + 50000 5m 1248 2288 90272 -4 2288 + 100000 5m 1248 2288 165568 -4 2288 + 10000 40m 1248 2288 37024 -4 2288 + 25000 40m 1248 2288 53248 -4 2288 + 40000 40m 1248 2288 71552 -4 2288 + 50000 40m 1248 2288 96096 -4 2288 + 100000 40m 1248 2288 177632 -4 2288 + 10000 300m 1248 2288 46176 -4 2288 + 25000 300m 1248 2288 79040 -4 2288 + 40000 300m 1248 2288 108160 -4 2288 + 50000 300m 1248 2288 141856 -4 2288 + 100000 300m 1248 2288 268736 -4 2288 diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/qos.json b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/qos.json new file mode 100644 index 00000000000..b724b48c2c2 --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/qos.json @@ -0,0 +1,167 @@ +{ + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0":"0", + "1":"0", + "2":"0", + "3":"3", + "4":"4", + "5":"0", + "6":"0", + "7":"0", + "8":"1", + "9":"0", + "10":"0", + "11":"0", + "12":"0", + "13":"0", + "14":"0", + "15":"0", + "16":"0", + "17":"0", + "18":"0", + "19":"0", + "20":"0", + "21":"0", + "22":"0", + "23":"0", + "24":"0", + "25":"0", + "26":"0", + "27":"0", + "28":"0", + "29":"0", + "30":"0", + "31":"0", + "32":"0", + "33":"0", + "34":"0", + "35":"0", + "36":"0", + "37":"0", + "38":"0", + "39":"0", + "40":"0", + "41":"0", + "42":"0", + "43":"0", + "44":"0", + "45":"0", + "46":"0", + "47":"0", + "48":"0", + "49":"0", + "50":"0", + "51":"0", + "52":"0", + "53":"0", + "54":"0", + "55":"0", + "56":"0", + "57":"0", + "58":"0", + "59":"0", + "60":"0", + "61":"0", + "62":"0", + "63":"0" + } + }, + "SCHEDULER": { + "scheduler.0" : { + "type":"DWRR", + "weight": "25" + }, + "scheduler.1" : { + "type":"DWRR", + "weight": "30" + }, + "scheduler.2" : { + "type":"DWRR", + "weight": "20" + } + }, + "PORT_QOS_MAP": { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable": "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSY" : { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"512000", + "red_min_threshold":"512000", + "yellow_max_threshold":"512000", + "yellow_min_threshold":"512000", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + }, + "AZURE_LOSSLESS" : { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"512000", + "red_min_threshold":"512000", + "yellow_max_threshold":"512000", + "yellow_min_threshold":"512000", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + } + }, + "QUEUE": { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0-1" : { + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|3-4" : { + "scheduler" : "[SCHEDULER|scheduler.0]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0" : { + "scheduler" : "[SCHEDULER|scheduler.1]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|1" : { + "scheduler" : "[SCHEDULER|scheduler.2]" + } + } +} diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/sai.profile b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/sai.profile index c04ad349858..34d698db36b 100644 --- a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/sai.profile +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/sai.profile @@ -1 +1 @@ -SAI_INIT_CONFIG_FILE=/etc/bcm/th-a7060-cx32s-32x100G.config.bcm +SAI_INIT_CONFIG_FILE=/etc/bcm/th-a7060-cx32s-32x100G-t1.config.bcm diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/buffers.json.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/buffers.json.j2 new file mode 100644 index 00000000000..1083a6210fc --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/buffers.json.j2 @@ -0,0 +1,2 @@ +{%- set default_topo = 't0' %} +{%- include 'buffers_config.j2' %} diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/buffers_defaults_t0.j2 new file mode 100644 index 00000000000..2b7215243f1 --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/buffers_defaults_t0.j2 @@ -0,0 +1,61 @@ +{%- set default_cable = '5m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,6) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4 + 2)) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(10,22) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4 + 2)) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(24,32) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4 + 2)) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(6,10) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(22,24) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "11213696", + "type": "ingress", + "mode": "dynamic", + "xoff": "8356608" + }, + "egress_lossy_pool": { + "size": "9532224", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "15982720", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"1518", + "static_th":"3995680" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/pg_profile_lookup.ini b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/pg_profile_lookup.ini new file mode 100644 index 00000000000..7222f801492 --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset + 10000 5m 1248 2288 35776 -4 2288 + 25000 5m 1248 2288 53248 -4 2288 + 40000 5m 1248 2288 66560 -4 2288 + 50000 5m 1248 2288 79872 -4 2288 + 100000 5m 1248 2288 165568 -4 2288 + 10000 40m 1248 2288 37024 -4 2288 + 25000 40m 1248 2288 56160 -4 2288 + 40000 40m 1248 2288 71552 -4 2288 + 50000 40m 1248 2288 85696 -4 2288 + 100000 40m 1248 2288 177632 -4 2288 + 10000 300m 1248 2288 46176 -4 2288 + 25000 300m 1248 2288 79040 -4 2288 + 40000 300m 1248 2288 108160 -4 2288 + 50000 300m 1248 2288 131456 -4 2288 + 100000 300m 1248 2288 268736 -4 2288 diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/port_config.ini b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/port_config.ini new file mode 100644 index 00000000000..0366a339f6f --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/port_config.ini @@ -0,0 +1,57 @@ +# name lanes alias index speed +Ethernet0 33,34 Ethernet1/1 1 50000 +Ethernet2 35,36 Ethernet1/3 1 50000 +Ethernet4 37,38 Ethernet2/1 2 50000 +Ethernet6 39,40 Ethernet2/3 2 50000 +Ethernet8 41,42 Ethernet3/1 3 50000 +Ethernet10 43,44 Ethernet3/3 3 50000 +Ethernet12 45,46 Ethernet4/1 4 50000 +Ethernet14 47,48 Ethernet4/3 4 50000 +Ethernet16 49,50 Ethernet5/1 5 50000 +Ethernet18 51,52 Ethernet5/3 5 50000 +Ethernet20 53,54 Ethernet6/1 6 50000 +Ethernet22 55,56 Ethernet6/3 6 50000 +Ethernet24 57,58,59,60 Ethernet7/1 7 100000 +Ethernet28 61,62,63,64 Ethernet8/1 8 100000 +Ethernet32 65,66,67,68 Ethernet9/1 9 100000 +Ethernet36 69,70,71,72 Ethernet10/1 10 100000 +Ethernet40 73,74 Ethernet11/1 11 50000 +Ethernet42 75,76 Ethernet11/3 11 50000 +Ethernet44 77,78 Ethernet12/1 12 50000 +Ethernet46 79,80 Ethernet12/3 12 50000 +Ethernet48 81,82 Ethernet13/1 13 50000 +Ethernet50 83,84 Ethernet13/3 13 50000 +Ethernet52 85,86 Ethernet14/1 14 50000 +Ethernet54 87,88 Ethernet14/3 14 50000 +Ethernet56 89,90 Ethernet15/1 15 50000 +Ethernet58 91,92 Ethernet15/3 15 50000 +Ethernet60 93,94 Ethernet16/1 16 50000 +Ethernet62 95,96 Ethernet16/3 16 50000 +Ethernet64 97,98 Ethernet17/1 17 50000 +Ethernet66 99,100 Ethernet17/3 17 50000 +Ethernet68 101,102 Ethernet18/1 18 50000 +Ethernet70 103,104 Ethernet18/3 18 50000 +Ethernet72 105,106 Ethernet19/1 19 50000 +Ethernet74 107,108 Ethernet19/3 19 50000 +Ethernet76 109,110 Ethernet20/1 20 50000 +Ethernet78 111,112 Ethernet20/3 20 50000 +Ethernet80 113,114 Ethernet21/1 21 50000 +Ethernet82 115,116 Ethernet21/3 21 50000 +Ethernet84 117,118 Ethernet22/1 22 50000 +Ethernet86 119,120 Ethernet22/3 22 50000 +Ethernet88 121,122,123,124 Ethernet23/1 23 100000 +Ethernet92 125,126,127,128 Ethernet24/1 24 100000 +Ethernet96 1,2,3,4 Ethernet25/1 25 100000 +Ethernet100 5,6,7,8 Ethernet26/1 26 100000 +Ethernet104 9,10 Ethernet27/1 27 50000 +Ethernet106 11,12 Ethernet27/3 27 50000 +Ethernet108 13,14 Ethernet28/1 28 50000 +Ethernet110 15,16 Ethernet28/3 28 50000 +Ethernet112 17,18 Ethernet29/1 29 50000 +Ethernet114 19,20 Ethernet29/3 29 50000 +Ethernet116 21,22 Ethernet30/1 30 50000 +Ethernet118 23,24 Ethernet30/3 30 50000 +Ethernet120 25,26 Ethernet31/1 31 50000 +Ethernet122 27,28 Ethernet31/3 31 50000 +Ethernet124 29,30 Ethernet32/1 32 50000 +Ethernet126 31,32 Ethernet32/3 32 50000 diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/qos.json b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/qos.json new file mode 100644 index 00000000000..8149f1f111c --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/qos.json @@ -0,0 +1,167 @@ +{ + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0":"0", + "1":"0", + "2":"0", + "3":"3", + "4":"4", + "5":"0", + "6":"0", + "7":"0", + "8":"1", + "9":"0", + "10":"0", + "11":"0", + "12":"0", + "13":"0", + "14":"0", + "15":"0", + "16":"0", + "17":"0", + "18":"0", + "19":"0", + "20":"0", + "21":"0", + "22":"0", + "23":"0", + "24":"0", + "25":"0", + "26":"0", + "27":"0", + "28":"0", + "29":"0", + "30":"0", + "31":"0", + "32":"0", + "33":"0", + "34":"0", + "35":"0", + "36":"0", + "37":"0", + "38":"0", + "39":"0", + "40":"0", + "41":"0", + "42":"0", + "43":"0", + "44":"0", + "45":"0", + "46":"0", + "47":"0", + "48":"0", + "49":"0", + "50":"0", + "51":"0", + "52":"0", + "53":"0", + "54":"0", + "55":"0", + "56":"0", + "57":"0", + "58":"0", + "59":"0", + "60":"0", + "61":"0", + "62":"0", + "63":"0" + } + }, + "SCHEDULER": { + "scheduler.0" : { + "type":"DWRR", + "weight": "25" + }, + "scheduler.1" : { + "type":"DWRR", + "weight": "30" + }, + "scheduler.2" : { + "type":"DWRR", + "weight": "20" + } + }, + "PORT_QOS_MAP": { + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet50,Ethernet52,Ethernet54,Ethernet56,Ethernet58,Ethernet60,Ethernet62,Ethernet64,Ethernet66,Ethernet68,Ethernet70,Ethernet72,Ethernet74,Ethernet76,Ethernet78,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable": "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSY" : { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"512000", + "red_min_threshold":"512000", + "yellow_max_threshold":"512000", + "yellow_min_threshold":"512000", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + }, + "AZURE_LOSSLESS" : { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"512000", + "red_min_threshold":"512000", + "yellow_max_threshold":"512000", + "yellow_min_threshold":"512000", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + } + }, + "QUEUE": { + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet50,Ethernet52,Ethernet54,Ethernet56,Ethernet58,Ethernet60,Ethernet62,Ethernet64,Ethernet66,Ethernet68,Ethernet70,Ethernet72,Ethernet74,Ethernet76,Ethernet78,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126|0-1": { + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]" + }, + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet50,Ethernet52,Ethernet54,Ethernet56,Ethernet58,Ethernet60,Ethernet62,Ethernet64,Ethernet66,Ethernet68,Ethernet70,Ethernet72,Ethernet74,Ethernet76,Ethernet78,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126|3-4": { + "scheduler" : "[SCHEDULER|scheduler.0]" + }, + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet50,Ethernet52,Ethernet54,Ethernet56,Ethernet58,Ethernet60,Ethernet62,Ethernet64,Ethernet66,Ethernet68,Ethernet70,Ethernet72,Ethernet74,Ethernet76,Ethernet78,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126|0": { + "scheduler" : "[SCHEDULER|scheduler.1]" + }, + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet50,Ethernet52,Ethernet54,Ethernet56,Ethernet58,Ethernet60,Ethernet62,Ethernet64,Ethernet66,Ethernet68,Ethernet70,Ethernet72,Ethernet74,Ethernet76,Ethernet78,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126|1": { + "scheduler" : "[SCHEDULER|scheduler.2]" + } + } +} diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/sai.profile b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/sai.profile new file mode 100644 index 00000000000..0c3ab159868 --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th-a7060-cx32s-8x100G+48x50G.config.bcm diff --git a/device/arista/x86_64-arista_7060_cx32s/minigraph.xml b/device/arista/x86_64-arista_7060_cx32s/minigraph.xml index 23282de17af..772325080e7 100644 --- a/device/arista/x86_64-arista_7060_cx32s/minigraph.xml +++ b/device/arista/x86_64-arista_7060_cx32s/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet2/1 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet3/1 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4/1 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet5/1 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet6/1 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet7/1 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8/1 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet9/1 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet10/1 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet11/1 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12/1 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet13/1 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet14/1 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet15/1 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16/1 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet17/1 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet18/1 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet19/1 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20/1 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet21/1 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet22/1 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet23/1 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24/1 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet25/1 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet26/1 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet27/1 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28/1 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet29/1 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet30/1 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet31/1 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32/1 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Arista-7060CX-32S-C32 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Arista-7060CX-32S-C32 diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/port_config.ini b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/port_config.ini index 1119dfd231c..3940948a354 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/port_config.ini +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/port_config.ini @@ -1,67 +1,67 @@ -# name lanes alias index -Ethernet0 77,78,79,80 Ethernet1/1 1 -Ethernet4 65,66,67,68 Ethernet2/1 2 -Ethernet8 85,86,87,88 Ethernet3/1 3 -Ethernet12 89,90,91,92 Ethernet4/1 4 -Ethernet16 109,110,111,112 Ethernet5/1 5 -Ethernet20 97,98,99,100 Ethernet6/1 6 -Ethernet24 5,6,7,8 Ethernet7/1 7 -Ethernet28 13,14,15,16 Ethernet8/1 8 -Ethernet32 25,26,27,28 Ethernet9/1 9 -Ethernet36 21,22,23,24 Ethernet10/1 10 -Ethernet40 37,38,39,40 Ethernet11/1 11 -Ethernet44 45,46,47,48 Ethernet12/1 12 -Ethernet48 57,58,59,60 Ethernet13/1 13 -Ethernet52 53,54,55,56 Ethernet14/1 14 -Ethernet56 117,118,119,120 Ethernet15/1 15 -Ethernet60 121,122,123,124 Ethernet16/1 16 -Ethernet64 141,142,143,144 Ethernet17/1 17 -Ethernet68 133,134,135,136 Ethernet18/1 18 -Ethernet72 197,198,199,200 Ethernet19/1 19 -Ethernet76 205,206,207,208 Ethernet20/1 20 -Ethernet80 217,218,219,220 Ethernet21/1 21 -Ethernet84 213,214,215,216 Ethernet22/1 22 -Ethernet88 229,230,231,232 Ethernet23/1 23 -Ethernet92 237,238,239,240 Ethernet24/1 24 -Ethernet96 249,250,251,252 Ethernet25/1 25 -Ethernet100 245,246,247,248 Ethernet26/1 26 -Ethernet104 149,150,151,152 Ethernet27/1 27 -Ethernet108 153,154,155,156 Ethernet28/1 28 -Ethernet112 173,174,175,176 Ethernet29/1 29 -Ethernet116 161,162,163,164 Ethernet30/1 30 -Ethernet120 181,182,183,184 Ethernet31/1 31 -Ethernet124 185,186,187,188 Ethernet32/1 32 -Ethernet128 69,70,71,72 Ethernet33/1 33 -Ethernet132 73,74,75,76 Ethernet34/1 34 -Ethernet136 93,94,95,96 Ethernet35/1 35 -Ethernet140 81,82,83,84 Ethernet36/1 36 -Ethernet144 101,102,103,104 Ethernet37/1 37 -Ethernet148 105,106,107,108 Ethernet38/1 38 -Ethernet152 9,10,11,12 Ethernet39/1 39 -Ethernet156 1,2,3,4 Ethernet40/1 40 -Ethernet160 17,18,19,20 Ethernet41/1 41 -Ethernet164 29,30,31,32 Ethernet42/1 42 -Ethernet168 41,42,43,44 Ethernet43/1 43 -Ethernet172 33,34,35,36 Ethernet44/1 44 -Ethernet176 49,50,51,52 Ethernet45/1 45 -Ethernet180 61,62,63,64 Ethernet46/1 46 -Ethernet184 125,126,127,128 Ethernet47/1 47 -Ethernet188 113,114,115,116 Ethernet48/1 48 -Ethernet192 129,130,131,132 Ethernet49/1 49 -Ethernet196 137,138,139,140 Ethernet50/1 50 -Ethernet200 201,202,203,204 Ethernet51/1 51 -Ethernet204 193,194,195,196 Ethernet52/1 52 -Ethernet208 209,210,211,212 Ethernet53/1 53 -Ethernet212 221,222,223,224 Ethernet54/1 54 -Ethernet216 233,234,235,236 Ethernet55/1 55 -Ethernet220 225,226,227,228 Ethernet56/1 56 -Ethernet224 241,242,243,244 Ethernet57/1 57 -Ethernet228 253,254,255,256 Ethernet58/1 58 -Ethernet232 157,158,159,160 Ethernet59/1 59 -Ethernet236 145,146,147,148 Ethernet60/1 60 -Ethernet240 165,166,167,168 Ethernet61/1 61 -Ethernet244 169,170,171,172 Ethernet62/1 62 -Ethernet248 189,190,191,192 Ethernet63/1 63 -Ethernet252 177,178,179,180 Ethernet64/1 64 -Ethernet256 257 Ethernet65 65 -Ethernet260 259 Ethernet66 66 +# name lanes alias index speed +Ethernet0 77,78,79,80 Ethernet1/1 1 100000 +Ethernet4 65,66,67,68 Ethernet2/1 2 100000 +Ethernet8 85,86,87,88 Ethernet3/1 3 100000 +Ethernet12 89,90,91,92 Ethernet4/1 4 100000 +Ethernet16 109,110,111,112 Ethernet5/1 5 100000 +Ethernet20 97,98,99,100 Ethernet6/1 6 100000 +Ethernet24 5,6,7,8 Ethernet7/1 7 100000 +Ethernet28 13,14,15,16 Ethernet8/1 8 100000 +Ethernet32 25,26,27,28 Ethernet9/1 9 100000 +Ethernet36 21,22,23,24 Ethernet10/1 10 100000 +Ethernet40 37,38,39,40 Ethernet11/1 11 100000 +Ethernet44 45,46,47,48 Ethernet12/1 12 100000 +Ethernet48 57,58,59,60 Ethernet13/1 13 100000 +Ethernet52 53,54,55,56 Ethernet14/1 14 100000 +Ethernet56 117,118,119,120 Ethernet15/1 15 100000 +Ethernet60 121,122,123,124 Ethernet16/1 16 100000 +Ethernet64 141,142,143,144 Ethernet17/1 17 100000 +Ethernet68 133,134,135,136 Ethernet18/1 18 100000 +Ethernet72 197,198,199,200 Ethernet19/1 19 100000 +Ethernet76 205,206,207,208 Ethernet20/1 20 100000 +Ethernet80 217,218,219,220 Ethernet21/1 21 100000 +Ethernet84 213,214,215,216 Ethernet22/1 22 100000 +Ethernet88 229,230,231,232 Ethernet23/1 23 100000 +Ethernet92 237,238,239,240 Ethernet24/1 24 100000 +Ethernet96 249,250,251,252 Ethernet25/1 25 100000 +Ethernet100 245,246,247,248 Ethernet26/1 26 100000 +Ethernet104 149,150,151,152 Ethernet27/1 27 100000 +Ethernet108 153,154,155,156 Ethernet28/1 28 100000 +Ethernet112 173,174,175,176 Ethernet29/1 29 100000 +Ethernet116 161,162,163,164 Ethernet30/1 30 100000 +Ethernet120 181,182,183,184 Ethernet31/1 31 100000 +Ethernet124 185,186,187,188 Ethernet32/1 32 100000 +Ethernet128 69,70,71,72 Ethernet33/1 33 100000 +Ethernet132 73,74,75,76 Ethernet34/1 34 100000 +Ethernet136 93,94,95,96 Ethernet35/1 35 100000 +Ethernet140 81,82,83,84 Ethernet36/1 36 100000 +Ethernet144 101,102,103,104 Ethernet37/1 37 100000 +Ethernet148 105,106,107,108 Ethernet38/1 38 100000 +Ethernet152 9,10,11,12 Ethernet39/1 39 100000 +Ethernet156 1,2,3,4 Ethernet40/1 40 100000 +Ethernet160 17,18,19,20 Ethernet41/1 41 100000 +Ethernet164 29,30,31,32 Ethernet42/1 42 100000 +Ethernet168 41,42,43,44 Ethernet43/1 43 100000 +Ethernet172 33,34,35,36 Ethernet44/1 44 100000 +Ethernet176 49,50,51,52 Ethernet45/1 45 100000 +Ethernet180 61,62,63,64 Ethernet46/1 46 100000 +Ethernet184 125,126,127,128 Ethernet47/1 47 100000 +Ethernet188 113,114,115,116 Ethernet48/1 48 100000 +Ethernet192 129,130,131,132 Ethernet49/1 49 100000 +Ethernet196 137,138,139,140 Ethernet50/1 50 100000 +Ethernet200 201,202,203,204 Ethernet51/1 51 100000 +Ethernet204 193,194,195,196 Ethernet52/1 52 100000 +Ethernet208 209,210,211,212 Ethernet53/1 53 100000 +Ethernet212 221,222,223,224 Ethernet54/1 54 100000 +Ethernet216 233,234,235,236 Ethernet55/1 55 100000 +Ethernet220 225,226,227,228 Ethernet56/1 56 100000 +Ethernet224 241,242,243,244 Ethernet57/1 57 100000 +Ethernet228 253,254,255,256 Ethernet58/1 58 100000 +Ethernet232 157,158,159,160 Ethernet59/1 59 100000 +Ethernet236 145,146,147,148 Ethernet60/1 60 100000 +Ethernet240 165,166,167,168 Ethernet61/1 61 100000 +Ethernet244 169,170,171,172 Ethernet62/1 62 100000 +Ethernet248 189,190,191,192 Ethernet63/1 63 100000 +Ethernet252 177,178,179,180 Ethernet64/1 64 100000 +Ethernet256 257 Ethernet65 65 10000 +Ethernet260 259 Ethernet66 66 10000 diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers.json.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers.json.j2 new file mode 100644 index 00000000000..e6e9e844469 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers.json.j2 @@ -0,0 +1,3 @@ +{%- set default_topo = 't0' %} +{%- include 'buffers_config.j2' %} + diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_defaults_t0.j2 new file mode 100644 index 00000000000..b3b8e6b13c4 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_defaults_t0.j2 @@ -0,0 +1,54 @@ +{%- set default_cable = '5m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,12) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4 + 2)) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(20,64) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4 + 2)) %}{%- endif %} + {%- endfor %} + {%- for port_idx in range(12,20) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "32799936", + "type": "ingress", + "mode": "dynamic", + "xoff": "8356608" + }, + "egress_lossy_pool": { + "size": "26240448", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "42349632", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "static_th":"11075584" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"10587408" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1664", + "dynamic_th":"-1" + } + }, +{%- endmacro %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/pg_profile_lookup.ini b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/pg_profile_lookup.ini new file mode 100644 index 00000000000..c2bf04950b8 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/pg_profile_lookup.ini @@ -0,0 +1,8 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset + 50000 5m 1248 1248 56160 -3 2496 + 100000 5m 1248 1248 96928 -3 2496 + 50000 40m 1248 1248 56160 -3 2496 + 100000 40m 1248 1248 96928 -3 2496 + 50000 300m 1248 1248 56160 -3 2496 + 100000 300m 1248 1248 96928 -3 2496 diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/port_config.ini b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/port_config.ini index d67a4f1bc01..c06fdd581ec 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/port_config.ini +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/port_config.ini @@ -1,123 +1,123 @@ -# name lanes alias index -Ethernet0 77,78 Ethernet1/1 1 -Ethernet2 79,80 Ethernet1/3 1 -Ethernet4 65,66 Ethernet2/1 2 -Ethernet6 67,68 Ethernet2/3 2 -Ethernet8 85,86 Ethernet3/1 3 -Ethernet10 87,88 Ethernet3/3 3 -Ethernet12 89,90 Ethernet4/1 4 -Ethernet14 91,92 Ethernet4/3 4 -Ethernet16 109,110 Ethernet5/1 5 -Ethernet18 111,112 Ethernet5/3 5 -Ethernet20 97,98 Ethernet6/1 6 -Ethernet22 99,100 Ethernet6/3 6 -Ethernet24 5,6 Ethernet7/1 7 -Ethernet26 7,8 Ethernet7/3 7 -Ethernet28 13,14 Ethernet8/1 8 -Ethernet30 15,16 Ethernet8/3 8 -Ethernet32 25,26 Ethernet9/1 9 -Ethernet34 27,28 Ethernet9/3 9 -Ethernet36 21,22 Ethernet10/1 10 -Ethernet38 23,24 Ethernet10/3 10 -Ethernet40 37,38 Ethernet11/1 11 -Ethernet42 39,40 Ethernet11/3 11 -Ethernet44 45,46 Ethernet12/1 12 -Ethernet46 47,48 Ethernet12/3 12 -Ethernet48 57,58 Ethernet13/1 13 -Ethernet50 59,60 Ethernet13/3 13 -Ethernet52 53,54 Ethernet14/1 14 -Ethernet54 55,56 Ethernet14/3 14 -Ethernet56 117,118 Ethernet15/1 15 -Ethernet58 119,120 Ethernet15/3 15 -Ethernet60 121,122 Ethernet16/1 16 -Ethernet62 123,124 Ethernet16/3 16 -Ethernet64 141,142 Ethernet17/1 17 -Ethernet66 143,144 Ethernet17/3 17 -Ethernet68 133,134 Ethernet18/1 18 -Ethernet70 135,136 Ethernet18/3 18 -Ethernet72 197,198 Ethernet19/1 19 -Ethernet74 199,200 Ethernet19/3 19 -Ethernet76 205,206 Ethernet20/1 20 -Ethernet78 207,208 Ethernet20/3 20 -Ethernet80 217,218 Ethernet21/1 21 -Ethernet82 219,220 Ethernet21/3 21 -Ethernet84 213,214 Ethernet22/1 22 -Ethernet86 215,216 Ethernet22/3 22 -Ethernet88 229,230 Ethernet23/1 23 -Ethernet90 231,232 Ethernet23/3 23 -Ethernet92 237,238 Ethernet24/1 24 -Ethernet94 239,240 Ethernet24/3 24 -Ethernet96 249,250 Ethernet25/1 25 -Ethernet98 251,252 Ethernet25/3 25 -Ethernet100 245,246 Ethernet26/1 26 -Ethernet102 247,248 Ethernet26/3 26 -Ethernet104 149,150 Ethernet27/1 27 -Ethernet106 151,152 Ethernet27/3 27 -Ethernet108 153,154 Ethernet28/1 28 -Ethernet110 155,156 Ethernet28/3 28 -Ethernet112 173,174 Ethernet29/1 29 -Ethernet114 175,176 Ethernet29/3 29 -Ethernet116 161,162 Ethernet30/1 30 -Ethernet118 163,164 Ethernet30/3 30 -Ethernet120 181,182 Ethernet31/1 31 -Ethernet122 183,184 Ethernet31/3 31 -Ethernet124 185,186 Ethernet32/1 32 -Ethernet126 187,188 Ethernet32/3 32 -Ethernet128 69,70 Ethernet33/1 33 -Ethernet130 71,72 Ethernet33/3 33 -Ethernet132 73,74 Ethernet34/1 34 -Ethernet134 75,76 Ethernet34/3 34 -Ethernet136 93,94 Ethernet35/1 35 -Ethernet138 95,96 Ethernet35/3 35 -Ethernet140 81,82 Ethernet36/1 36 -Ethernet142 83,84 Ethernet36/3 36 -Ethernet144 101,102 Ethernet37/1 37 -Ethernet146 103,104 Ethernet37/3 37 -Ethernet148 105,106 Ethernet38/1 38 -Ethernet150 107,108 Ethernet38/3 38 -Ethernet152 9,10 Ethernet39/1 39 -Ethernet154 11,12 Ethernet39/3 39 -Ethernet156 1,2 Ethernet40/1 40 -Ethernet158 3,4 Ethernet40/3 40 -Ethernet160 17,18 Ethernet41/1 41 -Ethernet162 19,20 Ethernet41/3 41 -Ethernet164 29,30 Ethernet42/1 42 -Ethernet166 31,32 Ethernet42/3 42 -Ethernet168 41,42 Ethernet43/1 43 -Ethernet170 43,44 Ethernet43/3 43 -Ethernet172 33,34 Ethernet44/1 44 -Ethernet174 35,36 Ethernet44/3 44 -Ethernet176 49,50,51,52 Ethernet45/1 45 -Ethernet180 61,62,63,64 Ethernet46/1 46 -Ethernet184 125,126,127,128 Ethernet47/1 47 -Ethernet188 113,114,115,116 Ethernet48/1 48 -Ethernet192 129,130,131,132 Ethernet49/1 49 -Ethernet196 137,138,139,140 Ethernet50/1 50 -Ethernet200 201,202,203,204 Ethernet51/1 51 -Ethernet204 193,194,195,196 Ethernet52/1 52 -Ethernet208 209,210 Ethernet53/1 53 -Ethernet210 211,212 Ethernet53/3 53 -Ethernet212 221,222 Ethernet54/1 54 -Ethernet214 223,224 Ethernet54/3 54 -Ethernet216 233,234 Ethernet55/1 55 -Ethernet218 235,236 Ethernet55/3 55 -Ethernet220 225,226 Ethernet56/1 56 -Ethernet222 227,228 Ethernet56/3 56 -Ethernet224 241,242 Ethernet57/1 57 -Ethernet226 243,244 Ethernet57/3 57 -Ethernet228 253,254 Ethernet58/1 58 -Ethernet230 255,256 Ethernet58/3 58 -Ethernet232 157,158 Ethernet59/1 59 -Ethernet234 159,160 Ethernet59/3 59 -Ethernet236 145,146 Ethernet60/1 60 -Ethernet238 147,148 Ethernet60/3 60 -Ethernet240 165,166 Ethernet61/1 61 -Ethernet242 167,168 Ethernet61/3 61 -Ethernet244 169,170 Ethernet62/1 62 -Ethernet246 171,172 Ethernet62/3 62 -Ethernet248 189,190 Ethernet63/1 63 -Ethernet250 191,192 Ethernet63/3 63 -Ethernet252 177,178 Ethernet64/1 64 -Ethernet254 179,180 Ethernet64/3 64 -Ethernet256 257 Ethernet65 65 -Ethernet260 259 Ethernet66 66 +# name lanes alias index speed +Ethernet0 77,78 Ethernet1/1 1 50000 +Ethernet2 79,80 Ethernet1/3 1 50000 +Ethernet4 65,66 Ethernet2/1 2 50000 +Ethernet6 67,68 Ethernet2/3 2 50000 +Ethernet8 85,86 Ethernet3/1 3 50000 +Ethernet10 87,88 Ethernet3/3 3 50000 +Ethernet12 89,90 Ethernet4/1 4 50000 +Ethernet14 91,92 Ethernet4/3 4 50000 +Ethernet16 109,110 Ethernet5/1 5 50000 +Ethernet18 111,112 Ethernet5/3 5 50000 +Ethernet20 97,98 Ethernet6/1 6 50000 +Ethernet22 99,100 Ethernet6/3 6 50000 +Ethernet24 5,6 Ethernet7/1 7 50000 +Ethernet26 7,8 Ethernet7/3 7 50000 +Ethernet28 13,14 Ethernet8/1 8 50000 +Ethernet30 15,16 Ethernet8/3 8 50000 +Ethernet32 25,26 Ethernet9/1 9 50000 +Ethernet34 27,28 Ethernet9/3 9 50000 +Ethernet36 21,22 Ethernet10/1 10 50000 +Ethernet38 23,24 Ethernet10/3 10 50000 +Ethernet40 37,38 Ethernet11/1 11 50000 +Ethernet42 39,40 Ethernet11/3 11 50000 +Ethernet44 45,46 Ethernet12/1 12 50000 +Ethernet46 47,48 Ethernet12/3 12 50000 +Ethernet48 57,58,59,60 Ethernet13/1 13 100000 +Ethernet52 53,54,55,56 Ethernet14/1 14 100000 +Ethernet56 117,118,119,120 Ethernet15/1 15 100000 +Ethernet60 121,122,123,124 Ethernet16/1 16 100000 +Ethernet64 141,142,143,144 Ethernet17/1 17 100000 +Ethernet68 133,134,135,136 Ethernet18/1 18 100000 +Ethernet72 197,198,199,200 Ethernet19/1 19 100000 +Ethernet76 205,206,207,208 Ethernet20/1 20 100000 +Ethernet80 217,218 Ethernet21/1 21 50000 +Ethernet82 219,220 Ethernet21/3 21 50000 +Ethernet84 213,214 Ethernet22/1 22 50000 +Ethernet86 215,216 Ethernet22/3 22 50000 +Ethernet88 229,230 Ethernet23/1 23 50000 +Ethernet90 231,232 Ethernet23/3 23 50000 +Ethernet92 237,238 Ethernet24/1 24 50000 +Ethernet94 239,240 Ethernet24/3 24 50000 +Ethernet96 249,250 Ethernet25/1 25 50000 +Ethernet98 251,252 Ethernet25/3 25 50000 +Ethernet100 245,246 Ethernet26/1 26 50000 +Ethernet102 247,248 Ethernet26/3 26 50000 +Ethernet104 149,150 Ethernet27/1 27 50000 +Ethernet106 151,152 Ethernet27/3 27 50000 +Ethernet108 153,154 Ethernet28/1 28 50000 +Ethernet110 155,156 Ethernet28/3 28 50000 +Ethernet112 173,174 Ethernet29/1 29 50000 +Ethernet114 175,176 Ethernet29/3 29 50000 +Ethernet116 161,162 Ethernet30/1 30 50000 +Ethernet118 163,164 Ethernet30/3 30 50000 +Ethernet120 181,182 Ethernet31/1 31 50000 +Ethernet122 183,184 Ethernet31/3 31 50000 +Ethernet124 185,186 Ethernet32/1 32 50000 +Ethernet126 187,188 Ethernet32/3 32 50000 +Ethernet128 69,70 Ethernet33/1 33 50000 +Ethernet130 71,72 Ethernet33/3 33 50000 +Ethernet132 73,74 Ethernet34/1 34 50000 +Ethernet134 75,76 Ethernet34/3 34 50000 +Ethernet136 93,94 Ethernet35/1 35 50000 +Ethernet138 95,96 Ethernet35/3 35 50000 +Ethernet140 81,82 Ethernet36/1 36 50000 +Ethernet142 83,84 Ethernet36/3 36 50000 +Ethernet144 101,102 Ethernet37/1 37 50000 +Ethernet146 103,104 Ethernet37/3 37 50000 +Ethernet148 105,106 Ethernet38/1 38 50000 +Ethernet150 107,108 Ethernet38/3 38 50000 +Ethernet152 9,10 Ethernet39/1 39 50000 +Ethernet154 11,12 Ethernet39/3 39 50000 +Ethernet156 1,2 Ethernet40/1 40 50000 +Ethernet158 3,4 Ethernet40/3 40 50000 +Ethernet160 17,18 Ethernet41/1 41 50000 +Ethernet162 19,20 Ethernet41/3 41 50000 +Ethernet164 29,30 Ethernet42/1 42 50000 +Ethernet166 31,32 Ethernet42/3 42 50000 +Ethernet168 41,42 Ethernet43/1 43 50000 +Ethernet170 43,44 Ethernet43/3 43 50000 +Ethernet172 33,34 Ethernet44/1 44 50000 +Ethernet174 35,36 Ethernet44/3 44 50000 +Ethernet176 49,50 Ethernet45/1 45 50000 +Ethernet178 51,52 Ethernet45/3 45 50000 +Ethernet180 61,62 Ethernet46/1 46 50000 +Ethernet182 63,64 Ethernet46/3 46 50000 +Ethernet184 125,126 Ethernet47/1 47 50000 +Ethernet186 127,128 Ethernet47/3 47 50000 +Ethernet188 113,114 Ethernet48/1 48 50000 +Ethernet190 115,116 Ethernet48/3 48 50000 +Ethernet192 129,130 Ethernet49/1 49 50000 +Ethernet194 131,132 Ethernet49/3 49 50000 +Ethernet196 137,138 Ethernet50/1 50 50000 +Ethernet198 139,140 Ethernet50/3 50 50000 +Ethernet200 201,202 Ethernet51/1 51 50000 +Ethernet202 203,204 Ethernet51/3 51 50000 +Ethernet204 193,194 Ethernet52/1 52 50000 +Ethernet206 195,196 Ethernet52/3 52 50000 +Ethernet208 209,210 Ethernet53/1 53 50000 +Ethernet210 211,212 Ethernet53/3 53 50000 +Ethernet212 221,222 Ethernet54/1 54 50000 +Ethernet214 223,224 Ethernet54/3 54 50000 +Ethernet216 233,234 Ethernet55/1 55 50000 +Ethernet218 235,236 Ethernet55/3 55 50000 +Ethernet220 225,226 Ethernet56/1 56 50000 +Ethernet222 227,228 Ethernet56/3 56 50000 +Ethernet224 241,242 Ethernet57/1 57 50000 +Ethernet226 243,244 Ethernet57/3 57 50000 +Ethernet228 253,254 Ethernet58/1 58 50000 +Ethernet230 255,256 Ethernet58/3 58 50000 +Ethernet232 157,158 Ethernet59/1 59 50000 +Ethernet234 159,160 Ethernet59/3 59 50000 +Ethernet236 145,146 Ethernet60/1 60 50000 +Ethernet238 147,148 Ethernet60/3 60 50000 +Ethernet240 165,166 Ethernet61/1 61 50000 +Ethernet242 167,168 Ethernet61/3 61 50000 +Ethernet244 169,170 Ethernet62/1 62 50000 +Ethernet246 171,172 Ethernet62/3 62 50000 +Ethernet248 189,190 Ethernet63/1 63 50000 +Ethernet250 191,192 Ethernet63/3 63 50000 +Ethernet252 177,178 Ethernet64/1 64 50000 +Ethernet254 179,180 Ethernet64/3 64 50000 +Ethernet256 257 Ethernet65 65 10000 +Ethernet260 259 Ethernet66 66 10000 diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json new file mode 100644 index 00000000000..2aa5a902448 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json @@ -0,0 +1,167 @@ +{ + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0":"0", + "1":"0", + "2":"0", + "3":"3", + "4":"4", + "5":"0", + "6":"0", + "7":"0", + "8":"1", + "9":"0", + "10":"0", + "11":"0", + "12":"0", + "13":"0", + "14":"0", + "15":"0", + "16":"0", + "17":"0", + "18":"0", + "19":"0", + "20":"0", + "21":"0", + "22":"0", + "23":"0", + "24":"0", + "25":"0", + "26":"0", + "27":"0", + "28":"0", + "29":"0", + "30":"0", + "31":"0", + "32":"0", + "33":"0", + "34":"0", + "35":"0", + "36":"0", + "37":"0", + "38":"0", + "39":"0", + "40":"0", + "41":"0", + "42":"0", + "43":"0", + "44":"0", + "45":"0", + "46":"0", + "47":"0", + "48":"0", + "49":"0", + "50":"0", + "51":"0", + "52":"0", + "53":"0", + "54":"0", + "55":"0", + "56":"0", + "57":"0", + "58":"0", + "59":"0", + "60":"0", + "61":"0", + "62":"0", + "63":"0" + } + }, + "SCHEDULER": { + "scheduler.0" : { + "type":"DWRR", + "weight": "25" + }, + "scheduler.1" : { + "type":"DWRR", + "weight": "30" + }, + "scheduler.2" : { + "type":"DWRR", + "weight": "20" + } + }, + "PORT_QOS_MAP": { + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet26,Ethernet28,Ethernet30,Ethernet32,Ethernet34,Ethernet36,Ethernet38,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet90,Ethernet92,Ethernet94,Ethernet96,Ethernet98,Ethernet100,Ethernet102,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126,Ethernet128,Ethernet130,Ethernet132,Ethernet134,Ethernet136,Ethernet138,Ethernet140,Ethernet142,Ethernet144,Ethernet146,Ethernet148,Ethernet150,Ethernet152,Ethernet154,Ethernet156,Ethernet158,Ethernet160,Ethernet162,Ethernet164,Ethernet166,Ethernet168,Ethernet170,Ethernet172,Ethernet174,Ethernet176,Ethernet178,Ethernet180,Ethernet182,Ethernet184,Ethernet186,Ethernet188,Ethernet190,Ethernet192,Ethernet194,Ethernet196,Ethernet198,Ethernet200,Ethernet202,Ethernet204,Ethernet206,Ethernet208,Ethernet210,Ethernet212,Ethernet214,Ethernet216,Ethernet218,Ethernet220,Ethernet222,Ethernet224,Ethernet226,Ethernet228,Ethernet230,Ethernet232,Ethernet234,Ethernet236,Ethernet238,Ethernet240,Ethernet242,Ethernet244,Ethernet246,Ethernet248,Ethernet250,Ethernet252,Ethernet254": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_enable": "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSY" : { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"512000", + "red_min_threshold":"512000", + "yellow_max_threshold":"512000", + "yellow_min_threshold":"512000", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + }, + "AZURE_LOSSLESS" : { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"512000", + "red_min_threshold":"512000", + "yellow_max_threshold":"512000", + "yellow_min_threshold":"512000", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + } + }, + "QUEUE": { + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet26,Ethernet28,Ethernet30,Ethernet32,Ethernet34,Ethernet36,Ethernet38,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet90,Ethernet92,Ethernet94,Ethernet96,Ethernet98,Ethernet100,Ethernet102,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126,Ethernet128,Ethernet130,Ethernet132,Ethernet134,Ethernet136,Ethernet138,Ethernet140,Ethernet142,Ethernet144,Ethernet146,Ethernet148,Ethernet150,Ethernet152,Ethernet154,Ethernet156,Ethernet158,Ethernet160,Ethernet162,Ethernet164,Ethernet166,Ethernet168,Ethernet170,Ethernet172,Ethernet174,Ethernet176,Ethernet178,Ethernet180,Ethernet182,Ethernet184,Ethernet186,Ethernet188,Ethernet190,Ethernet192,Ethernet194,Ethernet196,Ethernet198,Ethernet200,Ethernet202,Ethernet204,Ethernet206,Ethernet208,Ethernet210,Ethernet212,Ethernet214,Ethernet216,Ethernet218,Ethernet220,Ethernet222,Ethernet224,Ethernet226,Ethernet228,Ethernet230,Ethernet232,Ethernet234,Ethernet236,Ethernet238,Ethernet240,Ethernet242,Ethernet244,Ethernet246,Ethernet248,Ethernet250,Ethernet252,Ethernet254|0-1" : { + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]" + }, + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet26,Ethernet28,Ethernet30,Ethernet32,Ethernet34,Ethernet36,Ethernet38,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet90,Ethernet92,Ethernet94,Ethernet96,Ethernet98,Ethernet100,Ethernet102,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126,Ethernet128,Ethernet130,Ethernet132,Ethernet134,Ethernet136,Ethernet138,Ethernet140,Ethernet142,Ethernet144,Ethernet146,Ethernet148,Ethernet150,Ethernet152,Ethernet154,Ethernet156,Ethernet158,Ethernet160,Ethernet162,Ethernet164,Ethernet166,Ethernet168,Ethernet170,Ethernet172,Ethernet174,Ethernet176,Ethernet178,Ethernet180,Ethernet182,Ethernet184,Ethernet186,Ethernet188,Ethernet190,Ethernet192,Ethernet194,Ethernet196,Ethernet198,Ethernet200,Ethernet202,Ethernet204,Ethernet206,Ethernet208,Ethernet210,Ethernet212,Ethernet214,Ethernet216,Ethernet218,Ethernet220,Ethernet222,Ethernet224,Ethernet226,Ethernet228,Ethernet230,Ethernet232,Ethernet234,Ethernet236,Ethernet238,Ethernet240,Ethernet242,Ethernet244,Ethernet246,Ethernet248,Ethernet250,Ethernet252,Ethernet254|3-4" : { + "scheduler" : "[SCHEDULER|scheduler.0]" + }, + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet26,Ethernet28,Ethernet30,Ethernet32,Ethernet34,Ethernet36,Ethernet38,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet90,Ethernet92,Ethernet94,Ethernet96,Ethernet98,Ethernet100,Ethernet102,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126,Ethernet128,Ethernet130,Ethernet132,Ethernet134,Ethernet136,Ethernet138,Ethernet140,Ethernet142,Ethernet144,Ethernet146,Ethernet148,Ethernet150,Ethernet152,Ethernet154,Ethernet156,Ethernet158,Ethernet160,Ethernet162,Ethernet164,Ethernet166,Ethernet168,Ethernet170,Ethernet172,Ethernet174,Ethernet176,Ethernet178,Ethernet180,Ethernet182,Ethernet184,Ethernet186,Ethernet188,Ethernet190,Ethernet192,Ethernet194,Ethernet196,Ethernet198,Ethernet200,Ethernet202,Ethernet204,Ethernet206,Ethernet208,Ethernet210,Ethernet212,Ethernet214,Ethernet216,Ethernet218,Ethernet220,Ethernet222,Ethernet224,Ethernet226,Ethernet228,Ethernet230,Ethernet232,Ethernet234,Ethernet236,Ethernet238,Ethernet240,Ethernet242,Ethernet244,Ethernet246,Ethernet248,Ethernet250,Ethernet252,Ethernet254|0" : { + "scheduler" : "[SCHEDULER|scheduler.1]" + }, + "Ethernet0,Ethernet2,Ethernet4,Ethernet6,Ethernet8,Ethernet10,Ethernet12,Ethernet14,Ethernet16,Ethernet18,Ethernet20,Ethernet22,Ethernet24,Ethernet26,Ethernet28,Ethernet30,Ethernet32,Ethernet34,Ethernet36,Ethernet38,Ethernet40,Ethernet42,Ethernet44,Ethernet46,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet82,Ethernet84,Ethernet86,Ethernet88,Ethernet90,Ethernet92,Ethernet94,Ethernet96,Ethernet98,Ethernet100,Ethernet102,Ethernet104,Ethernet106,Ethernet108,Ethernet110,Ethernet112,Ethernet114,Ethernet116,Ethernet118,Ethernet120,Ethernet122,Ethernet124,Ethernet126,Ethernet128,Ethernet130,Ethernet132,Ethernet134,Ethernet136,Ethernet138,Ethernet140,Ethernet142,Ethernet144,Ethernet146,Ethernet148,Ethernet150,Ethernet152,Ethernet154,Ethernet156,Ethernet158,Ethernet160,Ethernet162,Ethernet164,Ethernet166,Ethernet168,Ethernet170,Ethernet172,Ethernet174,Ethernet176,Ethernet178,Ethernet180,Ethernet182,Ethernet184,Ethernet186,Ethernet188,Ethernet190,Ethernet192,Ethernet194,Ethernet196,Ethernet198,Ethernet200,Ethernet202,Ethernet204,Ethernet206,Ethernet208,Ethernet210,Ethernet212,Ethernet214,Ethernet216,Ethernet218,Ethernet220,Ethernet222,Ethernet224,Ethernet226,Ethernet228,Ethernet230,Ethernet232,Ethernet234,Ethernet236,Ethernet238,Ethernet240,Ethernet242,Ethernet244,Ethernet246,Ethernet248,Ethernet250,Ethernet252,Ethernet254|1" : { + "scheduler" : "[SCHEDULER|scheduler.2]" + } + } +} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/sai.profile b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/sai.profile index 030527daf9c..235f2423df8 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/sai.profile +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/sai.profile @@ -1 +1 @@ -SAI_INIT_CONFIG_FILE=/etc/bcm/th2-a7260cx3-64-108x50G+10x100G.config.bcm +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th2-a7260cx3-64-112x50G+8x100G.config.bcm diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/th2-a7260cx3-64-112x50G+8x100G.config.bcm b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/th2-a7260cx3-64-112x50G+8x100G.config.bcm new file mode 100644 index 00000000000..120b13c037a --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/th2-a7260cx3-64-112x50G+8x100G.config.bcm @@ -0,0 +1,939 @@ +PHY_AN_ALLOW_PLL_CHANGE=1 +arl_clean_timeout_usec=15000000 +asf_mem_profile=2 +bcm_num_cos=8 +bcm_stat_flags=1 +bcm_stat_jumbo=9236 +cdma_timeout_usec=15000000 +core_clock_frequency=1700 +dma_desc_timeout_usec=15000000 +dpp_clock_ratio=2:3 +higig2_hdr_mode=1 +ipv6_lpm_128b_enable=1 +l3_alpm_enable=2 +lpm_scaling_enable=0 +l2xmsg_mode=1 +max_vp_lags=0 +mem_scan_enable=1 +miim_intr_enable=0 +module_64ports=1 +os=unix +oversubscribe_mode=1 +pbmp_xport_xe=0xfffffffd3fffffff4fffffffc7ffffffe +#pbmp_xport_xe=0x47fffffff1fffffffcfffffffe7ffffffe +phy_an_allow_pll_change_hg=0 +phy_an_c73=1 +phy_chain_rx_lane_map_physical{1.0}=0x3210 +phy_chain_rx_lane_map_physical{101.0}=0x0123 +phy_chain_rx_lane_map_physical{105.0}=0x0123 +phy_chain_rx_lane_map_physical{109.0}=0x0123 +phy_chain_rx_lane_map_physical{113.0}=0x2301 +phy_chain_rx_lane_map_physical{117.0}=0x3210 +phy_chain_rx_lane_map_physical{121.0}=0x3210 +phy_chain_rx_lane_map_physical{125.0}=0x1203 +phy_chain_rx_lane_map_physical{129.0}=0x3210 +phy_chain_rx_lane_map_physical{13.0}=0x0321 +phy_chain_rx_lane_map_physical{133.0}=0x1032 +phy_chain_rx_lane_map_physical{137.0}=0x3210 +phy_chain_rx_lane_map_physical{141.0}=0x0123 +phy_chain_rx_lane_map_physical{145.0}=0x3210 +phy_chain_rx_lane_map_physical{149.0}=0x2310 +phy_chain_rx_lane_map_physical{153.0}=0x0132 +phy_chain_rx_lane_map_physical{157.0}=0x1302 +phy_chain_rx_lane_map_physical{161.0}=0x3021 +phy_chain_rx_lane_map_physical{165.0}=0x2031 +phy_chain_rx_lane_map_physical{169.0}=0x2031 +phy_chain_rx_lane_map_physical{17.0}=0x3210 +phy_chain_rx_lane_map_physical{173.0}=0x1302 +phy_chain_rx_lane_map_physical{177.0}=0x2031 +phy_chain_rx_lane_map_physical{181.0}=0x0213 +phy_chain_rx_lane_map_physical{185.0}=0x0213 +phy_chain_rx_lane_map_physical{189.0}=0x1302 +phy_chain_rx_lane_map_physical{193.0}=0x3120 +phy_chain_rx_lane_map_physical{197.0}=0x0231 +phy_chain_rx_lane_map_physical{201.0}=0x2031 +phy_chain_rx_lane_map_physical{205.0}=0x0213 +phy_chain_rx_lane_map_physical{209.0}=0x2013 +phy_chain_rx_lane_map_physical{21.0}=0x3021 +phy_chain_rx_lane_map_physical{213.0}=0x3021 +phy_chain_rx_lane_map_physical{217.0}=0x0231 +phy_chain_rx_lane_map_physical{221.0}=0x2031 +phy_chain_rx_lane_map_physical{225.0}=0x1203 +phy_chain_rx_lane_map_physical{229.0}=0x1230 +phy_chain_rx_lane_map_physical{233.0}=0x3021 +phy_chain_rx_lane_map_physical{237.0}=0x1032 +phy_chain_rx_lane_map_physical{241.0}=0x2301 +phy_chain_rx_lane_map_physical{245.0}=0x0321 +phy_chain_rx_lane_map_physical{249.0}=0x2301 +phy_chain_rx_lane_map_physical{25.0}=0x2301 +phy_chain_rx_lane_map_physical{253.0}=0x2301 +phy_chain_rx_lane_map_physical{257.0}=0x3210 +phy_chain_rx_lane_map_physical{29.0}=0x3021 +phy_chain_rx_lane_map_physical{33.0}=0x1302 +phy_chain_rx_lane_map_physical{37.0}=0x2031 +phy_chain_rx_lane_map_physical{41.0}=0x3021 +phy_chain_rx_lane_map_physical{45.0}=0x1023 +phy_chain_rx_lane_map_physical{49.0}=0x0213 +phy_chain_rx_lane_map_physical{5.0}=0x3201 +phy_chain_rx_lane_map_physical{53.0}=0x3201 +phy_chain_rx_lane_map_physical{57.0}=0x2013 +phy_chain_rx_lane_map_physical{61.0}=0x0213 +phy_chain_rx_lane_map_physical{65.0}=0x1203 +phy_chain_rx_lane_map_physical{69.0}=0x0213 +phy_chain_rx_lane_map_physical{73.0}=0x0213 +phy_chain_rx_lane_map_physical{77.0}=0x3120 +phy_chain_rx_lane_map_physical{81.0}=0x0213 +phy_chain_rx_lane_map_physical{85.0}=0x2031 +phy_chain_rx_lane_map_physical{89.0}=0x2031 +phy_chain_rx_lane_map_physical{9.0}=0x0321 +phy_chain_rx_lane_map_physical{93.0}=0x3120 +phy_chain_rx_lane_map_physical{97.0}=0x1203 +phy_chain_rx_polarity_flip_physical{1.0}=0x1 +phy_chain_rx_polarity_flip_physical{10.0}=0x0 +phy_chain_rx_polarity_flip_physical{100.0}=0x1 +phy_chain_rx_polarity_flip_physical{101.0}=0x1 +phy_chain_rx_polarity_flip_physical{102.0}=0x0 +phy_chain_rx_polarity_flip_physical{103.0}=0x1 +phy_chain_rx_polarity_flip_physical{104.0}=0x0 +phy_chain_rx_polarity_flip_physical{105.0}=0x1 +phy_chain_rx_polarity_flip_physical{106.0}=0x0 +phy_chain_rx_polarity_flip_physical{107.0}=0x1 +phy_chain_rx_polarity_flip_physical{108.0}=0x0 +phy_chain_rx_polarity_flip_physical{109.0}=0x0 +phy_chain_rx_polarity_flip_physical{11.0}=0x1 +phy_chain_rx_polarity_flip_physical{110.0}=0x1 +phy_chain_rx_polarity_flip_physical{111.0}=0x0 +phy_chain_rx_polarity_flip_physical{112.0}=0x1 +phy_chain_rx_polarity_flip_physical{113.0}=0x1 +phy_chain_rx_polarity_flip_physical{114.0}=0x0 +phy_chain_rx_polarity_flip_physical{115.0}=0x1 +phy_chain_rx_polarity_flip_physical{116.0}=0x0 +phy_chain_rx_polarity_flip_physical{117.0}=0x0 +phy_chain_rx_polarity_flip_physical{118.0}=0x0 +phy_chain_rx_polarity_flip_physical{119.0}=0x1 +phy_chain_rx_polarity_flip_physical{12.0}=0x1 +phy_chain_rx_polarity_flip_physical{120.0}=0x0 +phy_chain_rx_polarity_flip_physical{121.0}=0x1 +phy_chain_rx_polarity_flip_physical{122.0}=0x0 +phy_chain_rx_polarity_flip_physical{123.0}=0x1 +phy_chain_rx_polarity_flip_physical{124.0}=0x0 +phy_chain_rx_polarity_flip_physical{125.0}=0x0 +phy_chain_rx_polarity_flip_physical{126.0}=0x1 +phy_chain_rx_polarity_flip_physical{127.0}=0x1 +phy_chain_rx_polarity_flip_physical{128.0}=0x1 +phy_chain_rx_polarity_flip_physical{129.0}=0x0 +phy_chain_rx_polarity_flip_physical{13.0}=0x1 +phy_chain_rx_polarity_flip_physical{130.0}=0x1 +phy_chain_rx_polarity_flip_physical{131.0}=0x1 +phy_chain_rx_polarity_flip_physical{132.0}=0x0 +phy_chain_rx_polarity_flip_physical{133.0}=0x1 +phy_chain_rx_polarity_flip_physical{134.0}=0x1 +phy_chain_rx_polarity_flip_physical{135.0}=0x1 +phy_chain_rx_polarity_flip_physical{136.0}=0x0 +phy_chain_rx_polarity_flip_physical{137.0}=0x0 +phy_chain_rx_polarity_flip_physical{138.0}=0x0 +phy_chain_rx_polarity_flip_physical{139.0}=0x1 +phy_chain_rx_polarity_flip_physical{14.0}=0x0 +phy_chain_rx_polarity_flip_physical{140.0}=0x0 +phy_chain_rx_polarity_flip_physical{141.0}=0x1 +phy_chain_rx_polarity_flip_physical{142.0}=0x0 +phy_chain_rx_polarity_flip_physical{143.0}=0x1 +phy_chain_rx_polarity_flip_physical{144.0}=0x0 +phy_chain_rx_polarity_flip_physical{145.0}=0x1 +phy_chain_rx_polarity_flip_physical{146.0}=0x0 +phy_chain_rx_polarity_flip_physical{147.0}=0x1 +phy_chain_rx_polarity_flip_physical{148.0}=0x0 +phy_chain_rx_polarity_flip_physical{149.0}=0x0 +phy_chain_rx_polarity_flip_physical{15.0}=0x1 +phy_chain_rx_polarity_flip_physical{150.0}=0x1 +phy_chain_rx_polarity_flip_physical{151.0}=0x1 +phy_chain_rx_polarity_flip_physical{152.0}=0x0 +phy_chain_rx_polarity_flip_physical{153.0}=0x0 +phy_chain_rx_polarity_flip_physical{154.0}=0x1 +phy_chain_rx_polarity_flip_physical{155.0}=0x1 +phy_chain_rx_polarity_flip_physical{156.0}=0x0 +phy_chain_rx_polarity_flip_physical{157.0}=0x0 +phy_chain_rx_polarity_flip_physical{158.0}=0x0 +phy_chain_rx_polarity_flip_physical{159.0}=0x1 +phy_chain_rx_polarity_flip_physical{16.0}=0x0 +phy_chain_rx_polarity_flip_physical{160.0}=0x0 +phy_chain_rx_polarity_flip_physical{161.0}=0x1 +phy_chain_rx_polarity_flip_physical{162.0}=0x1 +phy_chain_rx_polarity_flip_physical{163.0}=0x0 +phy_chain_rx_polarity_flip_physical{164.0}=0x1 +phy_chain_rx_polarity_flip_physical{165.0}=0x0 +phy_chain_rx_polarity_flip_physical{166.0}=0x0 +phy_chain_rx_polarity_flip_physical{167.0}=0x1 +phy_chain_rx_polarity_flip_physical{168.0}=0x1 +phy_chain_rx_polarity_flip_physical{169.0}=0x1 +phy_chain_rx_polarity_flip_physical{17.0}=0x1 +phy_chain_rx_polarity_flip_physical{170.0}=0x1 +phy_chain_rx_polarity_flip_physical{171.0}=0x0 +phy_chain_rx_polarity_flip_physical{172.0}=0x0 +phy_chain_rx_polarity_flip_physical{173.0}=0x0 +phy_chain_rx_polarity_flip_physical{174.0}=0x0 +phy_chain_rx_polarity_flip_physical{175.0}=0x1 +phy_chain_rx_polarity_flip_physical{176.0}=0x1 +phy_chain_rx_polarity_flip_physical{177.0}=0x1 +phy_chain_rx_polarity_flip_physical{178.0}=0x1 +phy_chain_rx_polarity_flip_physical{179.0}=0x0 +phy_chain_rx_polarity_flip_physical{18.0}=0x0 +phy_chain_rx_polarity_flip_physical{180.0}=0x0 +phy_chain_rx_polarity_flip_physical{181.0}=0x1 +phy_chain_rx_polarity_flip_physical{182.0}=0x1 +phy_chain_rx_polarity_flip_physical{183.0}=0x0 +phy_chain_rx_polarity_flip_physical{184.0}=0x0 +phy_chain_rx_polarity_flip_physical{185.0}=0x0 +phy_chain_rx_polarity_flip_physical{186.0}=0x0 +phy_chain_rx_polarity_flip_physical{187.0}=0x1 +phy_chain_rx_polarity_flip_physical{188.0}=0x1 +phy_chain_rx_polarity_flip_physical{189.0}=0x0 +phy_chain_rx_polarity_flip_physical{19.0}=0x1 +phy_chain_rx_polarity_flip_physical{190.0}=0x0 +phy_chain_rx_polarity_flip_physical{191.0}=0x1 +phy_chain_rx_polarity_flip_physical{192.0}=0x0 +phy_chain_rx_polarity_flip_physical{193.0}=0x0 +phy_chain_rx_polarity_flip_physical{194.0}=0x0 +phy_chain_rx_polarity_flip_physical{195.0}=0x1 +phy_chain_rx_polarity_flip_physical{196.0}=0x1 +phy_chain_rx_polarity_flip_physical{197.0}=0x1 +phy_chain_rx_polarity_flip_physical{198.0}=0x1 +phy_chain_rx_polarity_flip_physical{199.0}=0x0 +phy_chain_rx_polarity_flip_physical{2.0}=0x0 +phy_chain_rx_polarity_flip_physical{20.0}=0x0 +phy_chain_rx_polarity_flip_physical{200.0}=0x0 +phy_chain_rx_polarity_flip_physical{201.0}=0x0 +phy_chain_rx_polarity_flip_physical{202.0}=0x0 +phy_chain_rx_polarity_flip_physical{203.0}=0x1 +phy_chain_rx_polarity_flip_physical{204.0}=0x0 +phy_chain_rx_polarity_flip_physical{205.0}=0x1 +phy_chain_rx_polarity_flip_physical{206.0}=0x1 +phy_chain_rx_polarity_flip_physical{207.0}=0x0 +phy_chain_rx_polarity_flip_physical{208.0}=0x0 +phy_chain_rx_polarity_flip_physical{209.0}=0x1 +phy_chain_rx_polarity_flip_physical{21.0}=0x0 +phy_chain_rx_polarity_flip_physical{210.0}=0x1 +phy_chain_rx_polarity_flip_physical{211.0}=0x0 +phy_chain_rx_polarity_flip_physical{212.0}=0x0 +phy_chain_rx_polarity_flip_physical{213.0}=0x0 +phy_chain_rx_polarity_flip_physical{214.0}=0x0 +phy_chain_rx_polarity_flip_physical{215.0}=0x1 +phy_chain_rx_polarity_flip_physical{216.0}=0x0 +phy_chain_rx_polarity_flip_physical{217.0}=0x0 +phy_chain_rx_polarity_flip_physical{218.0}=0x0 +phy_chain_rx_polarity_flip_physical{219.0}=0x1 +phy_chain_rx_polarity_flip_physical{22.0}=0x0 +phy_chain_rx_polarity_flip_physical{220.0}=0x1 +phy_chain_rx_polarity_flip_physical{221.0}=0x0 +phy_chain_rx_polarity_flip_physical{222.0}=0x0 +phy_chain_rx_polarity_flip_physical{223.0}=0x1 +phy_chain_rx_polarity_flip_physical{224.0}=0x1 +phy_chain_rx_polarity_flip_physical{225.0}=0x1 +phy_chain_rx_polarity_flip_physical{226.0}=0x0 +phy_chain_rx_polarity_flip_physical{227.0}=0x0 +phy_chain_rx_polarity_flip_physical{228.0}=0x1 +phy_chain_rx_polarity_flip_physical{229.0}=0x0 +phy_chain_rx_polarity_flip_physical{23.0}=0x1 +phy_chain_rx_polarity_flip_physical{230.0}=0x0 +phy_chain_rx_polarity_flip_physical{231.0}=0x1 +phy_chain_rx_polarity_flip_physical{232.0}=0x1 +phy_chain_rx_polarity_flip_physical{233.0}=0x1 +phy_chain_rx_polarity_flip_physical{234.0}=0x0 +phy_chain_rx_polarity_flip_physical{235.0}=0x0 +phy_chain_rx_polarity_flip_physical{236.0}=0x0 +phy_chain_rx_polarity_flip_physical{237.0}=0x1 +phy_chain_rx_polarity_flip_physical{238.0}=0x0 +phy_chain_rx_polarity_flip_physical{239.0}=0x1 +phy_chain_rx_polarity_flip_physical{24.0}=0x0 +phy_chain_rx_polarity_flip_physical{240.0}=0x0 +phy_chain_rx_polarity_flip_physical{241.0}=0x1 +phy_chain_rx_polarity_flip_physical{242.0}=0x0 +phy_chain_rx_polarity_flip_physical{243.0}=0x1 +phy_chain_rx_polarity_flip_physical{244.0}=0x0 +phy_chain_rx_polarity_flip_physical{245.0}=0x1 +phy_chain_rx_polarity_flip_physical{246.0}=0x1 +phy_chain_rx_polarity_flip_physical{247.0}=0x1 +phy_chain_rx_polarity_flip_physical{248.0}=0x0 +phy_chain_rx_polarity_flip_physical{249.0}=0x0 +phy_chain_rx_polarity_flip_physical{25.0}=0x1 +phy_chain_rx_polarity_flip_physical{250.0}=0x1 +phy_chain_rx_polarity_flip_physical{251.0}=0x0 +phy_chain_rx_polarity_flip_physical{252.0}=0x1 +phy_chain_rx_polarity_flip_physical{253.0}=0x1 +phy_chain_rx_polarity_flip_physical{254.0}=0x0 +phy_chain_rx_polarity_flip_physical{255.0}=0x1 +phy_chain_rx_polarity_flip_physical{256.0}=0x0 +phy_chain_rx_polarity_flip_physical{257.0}=0x0 +phy_chain_rx_polarity_flip_physical{259.0}=0x0 +phy_chain_rx_polarity_flip_physical{26.0}=0x0 +phy_chain_rx_polarity_flip_physical{27.0}=0x1 +phy_chain_rx_polarity_flip_physical{28.0}=0x0 +phy_chain_rx_polarity_flip_physical{29.0}=0x0 +phy_chain_rx_polarity_flip_physical{3.0}=0x1 +phy_chain_rx_polarity_flip_physical{30.0}=0x0 +phy_chain_rx_polarity_flip_physical{31.0}=0x0 +phy_chain_rx_polarity_flip_physical{32.0}=0x1 +phy_chain_rx_polarity_flip_physical{33.0}=0x0 +phy_chain_rx_polarity_flip_physical{34.0}=0x0 +phy_chain_rx_polarity_flip_physical{35.0}=0x1 +phy_chain_rx_polarity_flip_physical{36.0}=0x1 +phy_chain_rx_polarity_flip_physical{37.0}=0x1 +phy_chain_rx_polarity_flip_physical{38.0}=0x1 +phy_chain_rx_polarity_flip_physical{39.0}=0x0 +phy_chain_rx_polarity_flip_physical{4.0}=0x0 +phy_chain_rx_polarity_flip_physical{40.0}=0x0 +phy_chain_rx_polarity_flip_physical{41.0}=0x0 +phy_chain_rx_polarity_flip_physical{42.0}=0x1 +phy_chain_rx_polarity_flip_physical{43.0}=0x1 +phy_chain_rx_polarity_flip_physical{44.0}=0x1 +phy_chain_rx_polarity_flip_physical{45.0}=0x1 +phy_chain_rx_polarity_flip_physical{46.0}=0x0 +phy_chain_rx_polarity_flip_physical{47.0}=0x0 +phy_chain_rx_polarity_flip_physical{48.0}=0x1 +phy_chain_rx_polarity_flip_physical{49.0}=0x1 +phy_chain_rx_polarity_flip_physical{5.0}=0x1 +phy_chain_rx_polarity_flip_physical{50.0}=0x1 +phy_chain_rx_polarity_flip_physical{51.0}=0x0 +phy_chain_rx_polarity_flip_physical{52.0}=0x0 +phy_chain_rx_polarity_flip_physical{53.0}=0x0 +phy_chain_rx_polarity_flip_physical{54.0}=0x0 +phy_chain_rx_polarity_flip_physical{55.0}=0x1 +phy_chain_rx_polarity_flip_physical{56.0}=0x0 +phy_chain_rx_polarity_flip_physical{57.0}=0x0 +phy_chain_rx_polarity_flip_physical{58.0}=0x0 +phy_chain_rx_polarity_flip_physical{59.0}=0x1 +phy_chain_rx_polarity_flip_physical{6.0}=0x0 +phy_chain_rx_polarity_flip_physical{60.0}=0x1 +phy_chain_rx_polarity_flip_physical{61.0}=0x0 +phy_chain_rx_polarity_flip_physical{62.0}=0x0 +phy_chain_rx_polarity_flip_physical{63.0}=0x1 +phy_chain_rx_polarity_flip_physical{64.0}=0x1 +phy_chain_rx_polarity_flip_physical{65.0}=0x1 +phy_chain_rx_polarity_flip_physical{66.0}=0x1 +phy_chain_rx_polarity_flip_physical{67.0}=0x0 +phy_chain_rx_polarity_flip_physical{68.0}=0x1 +phy_chain_rx_polarity_flip_physical{69.0}=0x0 +phy_chain_rx_polarity_flip_physical{7.0}=0x0 +phy_chain_rx_polarity_flip_physical{70.0}=0x0 +phy_chain_rx_polarity_flip_physical{71.0}=0x1 +phy_chain_rx_polarity_flip_physical{72.0}=0x1 +phy_chain_rx_polarity_flip_physical{73.0}=0x1 +phy_chain_rx_polarity_flip_physical{74.0}=0x1 +phy_chain_rx_polarity_flip_physical{75.0}=0x0 +phy_chain_rx_polarity_flip_physical{76.0}=0x0 +phy_chain_rx_polarity_flip_physical{77.0}=0x0 +phy_chain_rx_polarity_flip_physical{78.0}=0x0 +phy_chain_rx_polarity_flip_physical{79.0}=0x1 +phy_chain_rx_polarity_flip_physical{8.0}=0x1 +phy_chain_rx_polarity_flip_physical{80.0}=0x1 +phy_chain_rx_polarity_flip_physical{81.0}=0x1 +phy_chain_rx_polarity_flip_physical{82.0}=0x1 +phy_chain_rx_polarity_flip_physical{83.0}=0x0 +phy_chain_rx_polarity_flip_physical{84.0}=0x0 +phy_chain_rx_polarity_flip_physical{85.0}=0x1 +phy_chain_rx_polarity_flip_physical{86.0}=0x1 +phy_chain_rx_polarity_flip_physical{87.0}=0x0 +phy_chain_rx_polarity_flip_physical{88.0}=0x0 +phy_chain_rx_polarity_flip_physical{89.0}=0x0 +phy_chain_rx_polarity_flip_physical{9.0}=0x1 +phy_chain_rx_polarity_flip_physical{90.0}=0x0 +phy_chain_rx_polarity_flip_physical{91.0}=0x1 +phy_chain_rx_polarity_flip_physical{92.0}=0x1 +phy_chain_rx_polarity_flip_physical{93.0}=0x0 +phy_chain_rx_polarity_flip_physical{94.0}=0x0 +phy_chain_rx_polarity_flip_physical{95.0}=0x1 +phy_chain_rx_polarity_flip_physical{96.0}=0x0 +phy_chain_rx_polarity_flip_physical{97.0}=0x1 +phy_chain_rx_polarity_flip_physical{98.0}=0x1 +phy_chain_rx_polarity_flip_physical{99.0}=0x0 +phy_chain_tx_lane_map_physical{1.0}=0x2031 +phy_chain_tx_lane_map_physical{101.0}=0x1023 +phy_chain_tx_lane_map_physical{105.0}=0x1302 +phy_chain_tx_lane_map_physical{109.0}=0x0321 +phy_chain_tx_lane_map_physical{113.0}=0x2301 +phy_chain_tx_lane_map_physical{117.0}=0x3120 +phy_chain_tx_lane_map_physical{121.0}=0x3102 +phy_chain_tx_lane_map_physical{125.0}=0x3210 +phy_chain_tx_lane_map_physical{129.0}=0x1023 +phy_chain_tx_lane_map_physical{13.0}=0x3021 +phy_chain_tx_lane_map_physical{133.0}=0x3210 +phy_chain_tx_lane_map_physical{137.0}=0x2031 +phy_chain_tx_lane_map_physical{141.0}=0x1302 +phy_chain_tx_lane_map_physical{145.0}=0x3210 +phy_chain_tx_lane_map_physical{149.0}=0x0213 +phy_chain_tx_lane_map_physical{153.0}=0x3210 +phy_chain_tx_lane_map_physical{157.0}=0x1320 +phy_chain_tx_lane_map_physical{161.0}=0x3210 +phy_chain_tx_lane_map_physical{165.0}=0x0231 +phy_chain_tx_lane_map_physical{169.0}=0x3120 +phy_chain_tx_lane_map_physical{17.0}=0x1032 +phy_chain_tx_lane_map_physical{173.0}=0x0312 +phy_chain_tx_lane_map_physical{177.0}=0x0231 +phy_chain_tx_lane_map_physical{181.0}=0x3210 +phy_chain_tx_lane_map_physical{185.0}=0x3210 +phy_chain_tx_lane_map_physical{189.0}=0x1320 +phy_chain_tx_lane_map_physical{193.0}=0x0321 +phy_chain_tx_lane_map_physical{197.0}=0x3120 +phy_chain_tx_lane_map_physical{201.0}=0x3120 +phy_chain_tx_lane_map_physical{205.0}=0x0123 +phy_chain_tx_lane_map_physical{209.0}=0x3120 +phy_chain_tx_lane_map_physical{21.0}=0x0213 +phy_chain_tx_lane_map_physical{213.0}=0x3021 +phy_chain_tx_lane_map_physical{217.0}=0x0312 +phy_chain_tx_lane_map_physical{221.0}=0x2301 +phy_chain_tx_lane_map_physical{225.0}=0x0123 +phy_chain_tx_lane_map_physical{229.0}=0x2031 +phy_chain_tx_lane_map_physical{233.0}=0x0231 +phy_chain_tx_lane_map_physical{237.0}=0x0213 +phy_chain_tx_lane_map_physical{241.0}=0x1320 +phy_chain_tx_lane_map_physical{245.0}=0x2031 +phy_chain_tx_lane_map_physical{249.0}=0x3120 +phy_chain_tx_lane_map_physical{25.0}=0x0231 +phy_chain_tx_lane_map_physical{253.0}=0x0321 +phy_chain_tx_lane_map_physical{257.0}=0x3210 +phy_chain_tx_lane_map_physical{29.0}=0x1230 +phy_chain_tx_lane_map_physical{33.0}=0x1032 +phy_chain_tx_lane_map_physical{37.0}=0x0123 +phy_chain_tx_lane_map_physical{41.0}=0x0213 +phy_chain_tx_lane_map_physical{45.0}=0x0132 +phy_chain_tx_lane_map_physical{49.0}=0x2031 +phy_chain_tx_lane_map_physical{5.0}=0x2301 +phy_chain_tx_lane_map_physical{53.0}=0x2301 +phy_chain_tx_lane_map_physical{57.0}=0x2031 +phy_chain_tx_lane_map_physical{61.0}=0x2031 +phy_chain_tx_lane_map_physical{65.0}=0x1230 +phy_chain_tx_lane_map_physical{69.0}=0x2013 +phy_chain_tx_lane_map_physical{73.0}=0x0213 +phy_chain_tx_lane_map_physical{77.0}=0x2310 +phy_chain_tx_lane_map_physical{81.0}=0x0321 +phy_chain_tx_lane_map_physical{85.0}=0x2013 +phy_chain_tx_lane_map_physical{89.0}=0x0213 +phy_chain_tx_lane_map_physical{9.0}=0x3012 +phy_chain_tx_lane_map_physical{93.0}=0x3102 +phy_chain_tx_lane_map_physical{97.0}=0x3210 +phy_chain_tx_polarity_flip_physical{1.0}=0x0 +phy_chain_tx_polarity_flip_physical{10.0}=0x1 +phy_chain_tx_polarity_flip_physical{100.0}=0x0 +phy_chain_tx_polarity_flip_physical{101.0}=0x0 +phy_chain_tx_polarity_flip_physical{102.0}=0x1 +phy_chain_tx_polarity_flip_physical{103.0}=0x0 +phy_chain_tx_polarity_flip_physical{104.0}=0x0 +phy_chain_tx_polarity_flip_physical{105.0}=0x0 +phy_chain_tx_polarity_flip_physical{106.0}=0x1 +phy_chain_tx_polarity_flip_physical{107.0}=0x1 +phy_chain_tx_polarity_flip_physical{108.0}=0x1 +phy_chain_tx_polarity_flip_physical{109.0}=0x0 +phy_chain_tx_polarity_flip_physical{11.0}=0x1 +phy_chain_tx_polarity_flip_physical{110.0}=0x0 +phy_chain_tx_polarity_flip_physical{111.0}=0x0 +phy_chain_tx_polarity_flip_physical{112.0}=0x1 +phy_chain_tx_polarity_flip_physical{113.0}=0x1 +phy_chain_tx_polarity_flip_physical{114.0}=0x1 +phy_chain_tx_polarity_flip_physical{115.0}=0x1 +phy_chain_tx_polarity_flip_physical{116.0}=0x0 +phy_chain_tx_polarity_flip_physical{117.0}=0x1 +phy_chain_tx_polarity_flip_physical{118.0}=0x0 +phy_chain_tx_polarity_flip_physical{119.0}=0x0 +phy_chain_tx_polarity_flip_physical{12.0}=0x0 +phy_chain_tx_polarity_flip_physical{120.0}=0x0 +phy_chain_tx_polarity_flip_physical{121.0}=0x0 +phy_chain_tx_polarity_flip_physical{122.0}=0x0 +phy_chain_tx_polarity_flip_physical{123.0}=0x0 +phy_chain_tx_polarity_flip_physical{124.0}=0x1 +phy_chain_tx_polarity_flip_physical{125.0}=0x0 +phy_chain_tx_polarity_flip_physical{126.0}=0x1 +phy_chain_tx_polarity_flip_physical{127.0}=0x1 +phy_chain_tx_polarity_flip_physical{128.0}=0x1 +phy_chain_tx_polarity_flip_physical{129.0}=0x1 +phy_chain_tx_polarity_flip_physical{13.0}=0x0 +phy_chain_tx_polarity_flip_physical{130.0}=0x0 +phy_chain_tx_polarity_flip_physical{131.0}=0x1 +phy_chain_tx_polarity_flip_physical{132.0}=0x0 +phy_chain_tx_polarity_flip_physical{133.0}=0x1 +phy_chain_tx_polarity_flip_physical{134.0}=0x1 +phy_chain_tx_polarity_flip_physical{135.0}=0x1 +phy_chain_tx_polarity_flip_physical{136.0}=0x1 +phy_chain_tx_polarity_flip_physical{137.0}=0x1 +phy_chain_tx_polarity_flip_physical{138.0}=0x1 +phy_chain_tx_polarity_flip_physical{139.0}=0x1 +phy_chain_tx_polarity_flip_physical{14.0}=0x1 +phy_chain_tx_polarity_flip_physical{140.0}=0x1 +phy_chain_tx_polarity_flip_physical{141.0}=0x0 +phy_chain_tx_polarity_flip_physical{142.0}=0x1 +phy_chain_tx_polarity_flip_physical{143.0}=0x1 +phy_chain_tx_polarity_flip_physical{144.0}=0x1 +phy_chain_tx_polarity_flip_physical{145.0}=0x1 +phy_chain_tx_polarity_flip_physical{146.0}=0x1 +phy_chain_tx_polarity_flip_physical{147.0}=0x1 +phy_chain_tx_polarity_flip_physical{148.0}=0x0 +phy_chain_tx_polarity_flip_physical{149.0}=0x1 +phy_chain_tx_polarity_flip_physical{15.0}=0x0 +phy_chain_tx_polarity_flip_physical{150.0}=0x0 +phy_chain_tx_polarity_flip_physical{151.0}=0x0 +phy_chain_tx_polarity_flip_physical{152.0}=0x0 +phy_chain_tx_polarity_flip_physical{153.0}=0x1 +phy_chain_tx_polarity_flip_physical{154.0}=0x0 +phy_chain_tx_polarity_flip_physical{155.0}=0x0 +phy_chain_tx_polarity_flip_physical{156.0}=0x0 +phy_chain_tx_polarity_flip_physical{157.0}=0x0 +phy_chain_tx_polarity_flip_physical{158.0}=0x0 +phy_chain_tx_polarity_flip_physical{159.0}=0x0 +phy_chain_tx_polarity_flip_physical{16.0}=0x0 +phy_chain_tx_polarity_flip_physical{160.0}=0x0 +phy_chain_tx_polarity_flip_physical{161.0}=0x0 +phy_chain_tx_polarity_flip_physical{162.0}=0x1 +phy_chain_tx_polarity_flip_physical{163.0}=0x1 +phy_chain_tx_polarity_flip_physical{164.0}=0x0 +phy_chain_tx_polarity_flip_physical{165.0}=0x1 +phy_chain_tx_polarity_flip_physical{166.0}=0x1 +phy_chain_tx_polarity_flip_physical{167.0}=0x1 +phy_chain_tx_polarity_flip_physical{168.0}=0x0 +phy_chain_tx_polarity_flip_physical{169.0}=0x0 +phy_chain_tx_polarity_flip_physical{17.0}=0x0 +phy_chain_tx_polarity_flip_physical{170.0}=0x1 +phy_chain_tx_polarity_flip_physical{171.0}=0x1 +phy_chain_tx_polarity_flip_physical{172.0}=0x1 +phy_chain_tx_polarity_flip_physical{173.0}=0x0 +phy_chain_tx_polarity_flip_physical{174.0}=0x0 +phy_chain_tx_polarity_flip_physical{175.0}=0x1 +phy_chain_tx_polarity_flip_physical{176.0}=0x0 +phy_chain_tx_polarity_flip_physical{177.0}=0x1 +phy_chain_tx_polarity_flip_physical{178.0}=0x0 +phy_chain_tx_polarity_flip_physical{179.0}=0x0 +phy_chain_tx_polarity_flip_physical{18.0}=0x1 +phy_chain_tx_polarity_flip_physical{180.0}=0x0 +phy_chain_tx_polarity_flip_physical{181.0}=0x0 +phy_chain_tx_polarity_flip_physical{182.0}=0x0 +phy_chain_tx_polarity_flip_physical{183.0}=0x0 +phy_chain_tx_polarity_flip_physical{184.0}=0x1 +phy_chain_tx_polarity_flip_physical{185.0}=0x0 +phy_chain_tx_polarity_flip_physical{186.0}=0x1 +phy_chain_tx_polarity_flip_physical{187.0}=0x1 +phy_chain_tx_polarity_flip_physical{188.0}=0x1 +phy_chain_tx_polarity_flip_physical{189.0}=0x0 +phy_chain_tx_polarity_flip_physical{19.0}=0x1 +phy_chain_tx_polarity_flip_physical{190.0}=0x0 +phy_chain_tx_polarity_flip_physical{191.0}=0x0 +phy_chain_tx_polarity_flip_physical{192.0}=0x0 +phy_chain_tx_polarity_flip_physical{193.0}=0x1 +phy_chain_tx_polarity_flip_physical{194.0}=0x1 +phy_chain_tx_polarity_flip_physical{195.0}=0x1 +phy_chain_tx_polarity_flip_physical{196.0}=0x0 +phy_chain_tx_polarity_flip_physical{197.0}=0x0 +phy_chain_tx_polarity_flip_physical{198.0}=0x1 +phy_chain_tx_polarity_flip_physical{199.0}=0x1 +phy_chain_tx_polarity_flip_physical{2.0}=0x1 +phy_chain_tx_polarity_flip_physical{20.0}=0x1 +phy_chain_tx_polarity_flip_physical{200.0}=0x1 +phy_chain_tx_polarity_flip_physical{201.0}=0x1 +phy_chain_tx_polarity_flip_physical{202.0}=0x1 +phy_chain_tx_polarity_flip_physical{203.0}=0x1 +phy_chain_tx_polarity_flip_physical{204.0}=0x1 +phy_chain_tx_polarity_flip_physical{205.0}=0x0 +phy_chain_tx_polarity_flip_physical{206.0}=0x1 +phy_chain_tx_polarity_flip_physical{207.0}=0x1 +phy_chain_tx_polarity_flip_physical{208.0}=0x1 +phy_chain_tx_polarity_flip_physical{209.0}=0x1 +phy_chain_tx_polarity_flip_physical{21.0}=0x0 +phy_chain_tx_polarity_flip_physical{210.0}=0x1 +phy_chain_tx_polarity_flip_physical{211.0}=0x1 +phy_chain_tx_polarity_flip_physical{212.0}=0x0 +phy_chain_tx_polarity_flip_physical{213.0}=0x0 +phy_chain_tx_polarity_flip_physical{214.0}=0x1 +phy_chain_tx_polarity_flip_physical{215.0}=0x0 +phy_chain_tx_polarity_flip_physical{216.0}=0x1 +phy_chain_tx_polarity_flip_physical{217.0}=0x1 +phy_chain_tx_polarity_flip_physical{218.0}=0x1 +phy_chain_tx_polarity_flip_physical{219.0}=0x0 +phy_chain_tx_polarity_flip_physical{22.0}=0x0 +phy_chain_tx_polarity_flip_physical{220.0}=0x1 +phy_chain_tx_polarity_flip_physical{221.0}=0x0 +phy_chain_tx_polarity_flip_physical{222.0}=0x0 +phy_chain_tx_polarity_flip_physical{223.0}=0x0 +phy_chain_tx_polarity_flip_physical{224.0}=0x1 +phy_chain_tx_polarity_flip_physical{225.0}=0x1 +phy_chain_tx_polarity_flip_physical{226.0}=0x1 +phy_chain_tx_polarity_flip_physical{227.0}=0x1 +phy_chain_tx_polarity_flip_physical{228.0}=0x0 +phy_chain_tx_polarity_flip_physical{229.0}=0x0 +phy_chain_tx_polarity_flip_physical{23.0}=0x0 +phy_chain_tx_polarity_flip_physical{230.0}=0x1 +phy_chain_tx_polarity_flip_physical{231.0}=0x1 +phy_chain_tx_polarity_flip_physical{232.0}=0x1 +phy_chain_tx_polarity_flip_physical{233.0}=0x0 +phy_chain_tx_polarity_flip_physical{234.0}=0x0 +phy_chain_tx_polarity_flip_physical{235.0}=0x0 +phy_chain_tx_polarity_flip_physical{236.0}=0x0 +phy_chain_tx_polarity_flip_physical{237.0}=0x1 +phy_chain_tx_polarity_flip_physical{238.0}=0x1 +phy_chain_tx_polarity_flip_physical{239.0}=0x1 +phy_chain_tx_polarity_flip_physical{24.0}=0x0 +phy_chain_tx_polarity_flip_physical{240.0}=0x0 +phy_chain_tx_polarity_flip_physical{241.0}=0x1 +phy_chain_tx_polarity_flip_physical{242.0}=0x1 +phy_chain_tx_polarity_flip_physical{243.0}=0x1 +phy_chain_tx_polarity_flip_physical{244.0}=0x0 +phy_chain_tx_polarity_flip_physical{245.0}=0x1 +phy_chain_tx_polarity_flip_physical{246.0}=0x1 +phy_chain_tx_polarity_flip_physical{247.0}=0x1 +phy_chain_tx_polarity_flip_physical{248.0}=0x1 +phy_chain_tx_polarity_flip_physical{249.0}=0x1 +phy_chain_tx_polarity_flip_physical{25.0}=0x1 +phy_chain_tx_polarity_flip_physical{250.0}=0x0 +phy_chain_tx_polarity_flip_physical{251.0}=0x0 +phy_chain_tx_polarity_flip_physical{252.0}=0x0 +phy_chain_tx_polarity_flip_physical{253.0}=0x1 +phy_chain_tx_polarity_flip_physical{254.0}=0x1 +phy_chain_tx_polarity_flip_physical{255.0}=0x1 +phy_chain_tx_polarity_flip_physical{256.0}=0x0 +phy_chain_tx_polarity_flip_physical{257.0}=0x0 +phy_chain_tx_polarity_flip_physical{259.0}=0x0 +phy_chain_tx_polarity_flip_physical{26.0}=0x0 +phy_chain_tx_polarity_flip_physical{27.0}=0x0 +phy_chain_tx_polarity_flip_physical{28.0}=0x0 +phy_chain_tx_polarity_flip_physical{29.0}=0x1 +phy_chain_tx_polarity_flip_physical{3.0}=0x1 +phy_chain_tx_polarity_flip_physical{30.0}=0x1 +phy_chain_tx_polarity_flip_physical{31.0}=0x1 +phy_chain_tx_polarity_flip_physical{32.0}=0x0 +phy_chain_tx_polarity_flip_physical{33.0}=0x0 +phy_chain_tx_polarity_flip_physical{34.0}=0x0 +phy_chain_tx_polarity_flip_physical{35.0}=0x0 +phy_chain_tx_polarity_flip_physical{36.0}=0x1 +phy_chain_tx_polarity_flip_physical{37.0}=0x1 +phy_chain_tx_polarity_flip_physical{38.0}=0x1 +phy_chain_tx_polarity_flip_physical{39.0}=0x1 +phy_chain_tx_polarity_flip_physical{4.0}=0x1 +phy_chain_tx_polarity_flip_physical{40.0}=0x0 +phy_chain_tx_polarity_flip_physical{41.0}=0x0 +phy_chain_tx_polarity_flip_physical{42.0}=0x0 +phy_chain_tx_polarity_flip_physical{43.0}=0x0 +phy_chain_tx_polarity_flip_physical{44.0}=0x0 +phy_chain_tx_polarity_flip_physical{45.0}=0x1 +phy_chain_tx_polarity_flip_physical{46.0}=0x0 +phy_chain_tx_polarity_flip_physical{47.0}=0x1 +phy_chain_tx_polarity_flip_physical{48.0}=0x1 +phy_chain_tx_polarity_flip_physical{49.0}=0x0 +phy_chain_tx_polarity_flip_physical{5.0}=0x1 +phy_chain_tx_polarity_flip_physical{50.0}=0x0 +phy_chain_tx_polarity_flip_physical{51.0}=0x0 +phy_chain_tx_polarity_flip_physical{52.0}=0x1 +phy_chain_tx_polarity_flip_physical{53.0}=0x0 +phy_chain_tx_polarity_flip_physical{54.0}=0x1 +phy_chain_tx_polarity_flip_physical{55.0}=0x1 +phy_chain_tx_polarity_flip_physical{56.0}=0x0 +phy_chain_tx_polarity_flip_physical{57.0}=0x0 +phy_chain_tx_polarity_flip_physical{58.0}=0x1 +phy_chain_tx_polarity_flip_physical{59.0}=0x1 +phy_chain_tx_polarity_flip_physical{6.0}=0x1 +phy_chain_tx_polarity_flip_physical{60.0}=0x1 +phy_chain_tx_polarity_flip_physical{61.0}=0x0 +phy_chain_tx_polarity_flip_physical{62.0}=0x1 +phy_chain_tx_polarity_flip_physical{63.0}=0x1 +phy_chain_tx_polarity_flip_physical{64.0}=0x1 +phy_chain_tx_polarity_flip_physical{65.0}=0x0 +phy_chain_tx_polarity_flip_physical{66.0}=0x1 +phy_chain_tx_polarity_flip_physical{67.0}=0x1 +phy_chain_tx_polarity_flip_physical{68.0}=0x0 +phy_chain_tx_polarity_flip_physical{69.0}=0x1 +phy_chain_tx_polarity_flip_physical{7.0}=0x1 +phy_chain_tx_polarity_flip_physical{70.0}=0x1 +phy_chain_tx_polarity_flip_physical{71.0}=0x1 +phy_chain_tx_polarity_flip_physical{72.0}=0x0 +phy_chain_tx_polarity_flip_physical{73.0}=0x1 +phy_chain_tx_polarity_flip_physical{74.0}=0x0 +phy_chain_tx_polarity_flip_physical{75.0}=0x0 +phy_chain_tx_polarity_flip_physical{76.0}=0x0 +phy_chain_tx_polarity_flip_physical{77.0}=0x0 +phy_chain_tx_polarity_flip_physical{78.0}=0x0 +phy_chain_tx_polarity_flip_physical{79.0}=0x1 +phy_chain_tx_polarity_flip_physical{8.0}=0x0 +phy_chain_tx_polarity_flip_physical{80.0}=0x0 +phy_chain_tx_polarity_flip_physical{81.0}=0x1 +phy_chain_tx_polarity_flip_physical{82.0}=0x1 +phy_chain_tx_polarity_flip_physical{83.0}=0x1 +phy_chain_tx_polarity_flip_physical{84.0}=0x0 +phy_chain_tx_polarity_flip_physical{85.0}=0x1 +phy_chain_tx_polarity_flip_physical{86.0}=0x0 +phy_chain_tx_polarity_flip_physical{87.0}=0x0 +phy_chain_tx_polarity_flip_physical{88.0}=0x0 +phy_chain_tx_polarity_flip_physical{89.0}=0x1 +phy_chain_tx_polarity_flip_physical{9.0}=0x0 +phy_chain_tx_polarity_flip_physical{90.0}=0x1 +phy_chain_tx_polarity_flip_physical{91.0}=0x1 +phy_chain_tx_polarity_flip_physical{92.0}=0x0 +phy_chain_tx_polarity_flip_physical{93.0}=0x0 +phy_chain_tx_polarity_flip_physical{94.0}=0x0 +phy_chain_tx_polarity_flip_physical{95.0}=0x0 +phy_chain_tx_polarity_flip_physical{96.0}=0x0 +phy_chain_tx_polarity_flip_physical{97.0}=0x0 +phy_chain_tx_polarity_flip_physical{98.0}=0x1 +phy_chain_tx_polarity_flip_physical{99.0}=0x1 + +port_init_cl72_hg=1 + + + + + + + +robust_hash_disable_egress_vlan=1 +robust_hash_disable_mpls=1 +robust_hash_disable_vlan=1 +scache_filename=/tmp/scache +scache_filename=/tmp/scache +sram_scan_enable=0 +stable_size=0x5500000 +stable_size=0x5500000 +tdma_timeout_usec=15000000 +tslam_timeout_usec=15000000 +dport_map_direct=1 +portmap_1=5:50 +portmap_2=7:50 +portmap_3=13:50 +portmap_4=15:50 +portmap_5=25:50 +portmap_6=27:50 +portmap_7=21:50 +portmap_8=23:50 +portmap_9=37:50 +portmap_10=39:50 +portmap_11=45:50 +portmap_12=47:50 +portmap_13=57:100 +portmap_14=53:100 +portmap_15=9:50 +portmap_16=11:50 +portmap_17=1:50 +portmap_18=3:50 +portmap_19=17:50 +portmap_20=19:50 +portmap_21=29:50 +portmap_22=31:50 +portmap_23=41:50 +portmap_24=43:50 +portmap_25=33:50 +portmap_26=35:50 +portmap_27=49:50 +portmap_28=51:50 +portmap_29=61:50 +portmap_30=63:50 +portmap_34=77:50 +portmap_35=79:50 +portmap_36=65:50 +portmap_37=67:50 +portmap_38=85:50 +portmap_39=87:50 +portmap_40=89:50 +portmap_41=91:50 +portmap_42=109:50 +portmap_43=111:50 +portmap_44=97:50 +portmap_45=99:50 +portmap_46=117:100 +portmap_47=121:100 +portmap_48=69:50 +portmap_49=71:50 +portmap_50=73:50 +portmap_51=75:50 +portmap_52=93:50 +portmap_53=95:50 +portmap_54=81:50 +portmap_55=83:50 +portmap_56=101:50 +portmap_57=103:50 +portmap_58=105:50 +portmap_59=107:50 +portmap_60=125:50 +portmap_61=127:50 +portmap_62=113:50 +portmap_63=115:50 +portmap_66=257:10 +portmap_68=141:100 +portmap_69=133:100 +portmap_70=149:50 +portmap_71=151:50 +portmap_72=153:50 +portmap_73=155:50 +portmap_74=173:50 +portmap_75=175:50 +portmap_76=161:50 +portmap_77=163:50 +portmap_78=181:50 +portmap_79=183:50 +portmap_80=185:50 +portmap_81=187:50 +portmap_82=129:50 +portmap_83=131:50 +portmap_84=137:50 +portmap_85=139:50 +portmap_86=157:50 +portmap_87=159:50 +portmap_88=145:50 +portmap_89=147:50 +portmap_90=165:50 +portmap_91=167:50 +portmap_92=169:50 +portmap_93=171:50 +portmap_94=189:50 +portmap_95=191:50 +portmap_96=177:50 +portmap_97=179:50 +portmap_100=259:10 +portmap_102=197:100 +portmap_103=205:100 +portmap_104=217:50 +portmap_105=219:50 +portmap_106=213:50 +portmap_107=215:50 +portmap_108=229:50 +portmap_109=231:50 +portmap_110=237:50 +portmap_111=239:50 +portmap_112=249:50 +portmap_113=251:50 +portmap_114=245:50 +portmap_115=247:50 +portmap_116=201:50 +portmap_117=203:50 +portmap_118=193:50 +portmap_119=195:50 +portmap_120=209:50 +portmap_121=211:50 +portmap_122=221:50 +portmap_123=223:50 +portmap_124=233:50 +portmap_125=235:50 +portmap_126=225:50 +portmap_127=227:50 +portmap_128=241:50 +portmap_129=243:50 +portmap_130=253:50 +portmap_131=255:50 + +# tuning parameters +serdes_preemphasis_1=0x580c +serdes_preemphasis_2=0x580c +serdes_preemphasis_3=0x580c +serdes_preemphasis_4=0x580c +serdes_preemphasis_5=0x580c +serdes_preemphasis_6=0x580c +serdes_preemphasis_7=0x580c +serdes_preemphasis_8=0x580c +serdes_preemphasis_9=0x580c +serdes_preemphasis_10=0x580c +serdes_preemphasis_11=0x580c +serdes_preemphasis_12=0x580c +serdes_preemphasis_13=0x144108 +serdes_preemphasis_14=0x144108 +serdes_preemphasis_15=0x580c +serdes_preemphasis_16=0x580c +serdes_preemphasis_17=0x580c +serdes_preemphasis_18=0x580c +serdes_preemphasis_19=0x580c +serdes_preemphasis_20=0x580c +serdes_preemphasis_21=0x580c +serdes_preemphasis_22=0x580c +serdes_preemphasis_23=0x580c +serdes_preemphasis_24=0x580c +serdes_preemphasis_25=0x580c +serdes_preemphasis_26=0x580c +serdes_preemphasis_27=0x580c +serdes_preemphasis_28=0x580c +serdes_preemphasis_29=0x580c +serdes_preemphasis_30=0x580c +serdes_preemphasis_34=0x580c +serdes_preemphasis_35=0x580c +serdes_preemphasis_36=0x580c +serdes_preemphasis_37=0x580c +serdes_preemphasis_38=0x580c +serdes_preemphasis_39=0x580c +serdes_preemphasis_40=0x580c +serdes_preemphasis_41=0x580c +serdes_preemphasis_42=0x580c +serdes_preemphasis_43=0x580c +serdes_preemphasis_44=0x580c +serdes_preemphasis_45=0x580c +serdes_preemphasis_46=0x144108 +serdes_preemphasis_47=0x103a07 +serdes_preemphasis_48=0x580c +serdes_preemphasis_49=0x580c +serdes_preemphasis_50=0x580c +serdes_preemphasis_51=0x580c +serdes_preemphasis_52=0x580c +serdes_preemphasis_53=0x580c +serdes_preemphasis_54=0x580c +serdes_preemphasis_55=0x580c +serdes_preemphasis_56=0x580c +serdes_preemphasis_57=0x580c +serdes_preemphasis_58=0x580c +serdes_preemphasis_59=0x580c +serdes_preemphasis_60=0x580c +serdes_preemphasis_61=0x580c +serdes_preemphasis_62=0x580c +serdes_preemphasis_63=0x580c +serdes_preemphasis_66=0x62f01 +serdes_preemphasis_68=0x184606 +serdes_preemphasis_69=0x184407 +serdes_preemphasis_70=0x580c +serdes_preemphasis_71=0x580c +serdes_preemphasis_72=0x580c +serdes_preemphasis_73=0x580c +serdes_preemphasis_74=0x580c +serdes_preemphasis_75=0x580c +serdes_preemphasis_76=0x580c +serdes_preemphasis_77=0x580c +serdes_preemphasis_78=0x580c +serdes_preemphasis_79=0x580c +serdes_preemphasis_80=0x580c +serdes_preemphasis_81=0x580c +serdes_preemphasis_82=0x580c +serdes_preemphasis_83=0x580c +serdes_preemphasis_84=0x580c +serdes_preemphasis_85=0x580c +serdes_preemphasis_86=0x580c +serdes_preemphasis_87=0x580c +serdes_preemphasis_88=0x580c +serdes_preemphasis_89=0x580c +serdes_preemphasis_90=0x580c +serdes_preemphasis_91=0x580c +serdes_preemphasis_92=0x580c +serdes_preemphasis_93=0x580c +serdes_preemphasis_94=0x580c +serdes_preemphasis_95=0x580c +serdes_preemphasis_96=0x580c +serdes_preemphasis_97=0x580c +serdes_preemphasis_100=0x62f01 +serdes_preemphasis_102=0x174507 +serdes_preemphasis_103=0x184606 +serdes_preemphasis_104=0x580c +serdes_preemphasis_105=0x580c +serdes_preemphasis_106=0x580c +serdes_preemphasis_107=0x580c +serdes_preemphasis_108=0x580c +serdes_preemphasis_109=0x580c +serdes_preemphasis_110=0x580c +serdes_preemphasis_111=0x580c +serdes_preemphasis_112=0x580c +serdes_preemphasis_113=0x580c +serdes_preemphasis_114=0x580c +serdes_preemphasis_115=0x580c +serdes_preemphasis_116=0x580c +serdes_preemphasis_117=0x580c +serdes_preemphasis_118=0x580c +serdes_preemphasis_119=0x580c +serdes_preemphasis_120=0x580c +serdes_preemphasis_121=0x580c +serdes_preemphasis_122=0x580c +serdes_preemphasis_123=0x580c +serdes_preemphasis_124=0x580c +serdes_preemphasis_125=0x580c +serdes_preemphasis_126=0x580c +serdes_preemphasis_127=0x580c +serdes_preemphasis_128=0x580c +serdes_preemphasis_129=0x580c +serdes_preemphasis_130=0x580c +serdes_preemphasis_131=0x580c + +mmu_init_config="MSFT-TH2-Tier0" diff --git a/device/arista/x86_64-arista_7260cx3_64/platform_reboot b/device/arista/x86_64-arista_7260cx3_64/platform_reboot new file mode 100755 index 00000000000..8a372246115 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/platform_reboot @@ -0,0 +1,87 @@ +#!/usr/bin/env python +# Copyright (c) 2018 Arista Networks, Inc. All rights reserved. +# Arista Networks, Inc. Confidential and Proprietary. + +# Reboot script for 7260CX3 + +from __future__ import print_function +import sys +import mmap, os +import subprocess +from struct import pack, unpack + +class MmapResource( object ): + """Resource implementation for a directly-mapped memory region.""" + + def __init__( self, path ): + try: + fd = os.open( path, os.O_RDWR ) + except EnvironmentError: + print( "FAIL can not open scd memory-map resource file" ) + print( "FAIL are you running on the proper platform?" ) + sys.exit( 1 ) + try: + size = os.fstat( fd ).st_size + except EnvironmentError: + print( "FAIL can not fstat scd memory-map resource file" ) + print( "FAIL are you running on the proper platform?" ) + sys.exit( 1 ) + try: + self.mmap_ = mmap.mmap( fd, size, mmap.MAP_SHARED, + mmap.PROT_READ | mmap.PROT_WRITE ) + except EnvironmentError: + print( "FAIL can not map scd memory-map file" ) + print( "FAIL are you running on the proper platform?" ) + sys.exit( 1 ) + finally: + try: + # Note that closing the file descriptor has no effect on the memory map + os.close( fd ) + except EnvironmentError: + print( "FAIL failed to close scd memory-map file" ) + sys.exit( 1 ) + + def read32( self, addr ): + return unpack( ' ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60
- switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,568 +639,568 @@ - switch1 + sonic - tenGigE1/1 + Eth1/1 10.0.0.0/31 - tenGigE1/2 + Eth1/2 10.0.0.2/31 - tenGigE1/3 + Eth1/3 10.0.0.4/31 - tenGigE1/4 + Eth1/4 10.0.0.6/31 - tenGigE1/5 + Eth2/1 10.0.0.8/31 - tenGigE1/6 + Eth2/2 10.0.0.10/31 - tenGigE1/7 + Eth2/3 10.0.0.12/31 - tenGigE1/8 + Eth2/4 10.0.0.14/31 - tenGigE1/9 + Eth3/1 10.0.0.16/31 - tenGigE1/10 + Eth3/2 10.0.0.18/31 - tenGigE1/11 + Eth3/3 10.0.0.20/31 - tenGigE1/12 + Eth3/4 10.0.0.22/31 - tenGigE1/13 + Eth4/1 10.0.0.24/31 - tenGigE1/14 + Eth4/2 10.0.0.26/31 - tenGigE1/15 + Eth4/3 10.0.0.28/31 - tenGigE1/16 + Eth4/4 10.0.0.30/31 - tenGigE1/17 + Eth5/1 10.0.0.32/31 - tenGigE1/18 + Eth5/2 10.0.0.34/31 - tenGigE1/19 + Eth5/3 10.0.0.36/31 - tenGigE1/20 + Eth5/4 10.0.0.38/31 - tenGigE1/21 + Eth6/1 10.0.0.40/31 - tenGigE1/22 + Eth6/2 10.0.0.42/31 - tenGigE1/23 + Eth6/3 10.0.0.44/31 - tenGigE1/24 + Eth6/4 10.0.0.46/31 - tenGigE1/25 + Eth7/1 10.0.0.48/31 - tenGigE1/26 + Eth7/2 10.0.0.50/31 - tenGigE1/27 + Eth7/3 10.0.0.52/31 - tenGigE1/28 + Eth7/4 10.0.0.54/31 - tenGigE1/29 + Eth8/1 10.0.0.56/31 - tenGigE1/30 + Eth8/2 10.0.0.58/31 - tenGigE1/31 + Eth8/3 10.0.0.60/31 - tenGigE1/32 + Eth8/4 10.0.0.62/31 - tenGigE1/33 + Eth9/1 10.0.0.64/31 - tenGigE1/34 + Eth9/2 10.0.0.66/31 - tenGigE1/35 + Eth9/3 10.0.0.68/31 - tenGigE1/36 + Eth9/4 10.0.0.70/31 - tenGigE1/37 + Eth10/1 10.0.0.72/31 - tenGigE1/38 + Eth10/2 10.0.0.74/31 - tenGigE1/39 + Eth10/3 10.0.0.76/31 - tenGigE1/40 + Eth10/4 10.0.0.78/31 - tenGigE1/41 + Eth11/1 10.0.0.80/31 - tenGigE1/42 + Eth11/2 10.0.0.82/31 - tenGigE1/43 + Eth11/3 10.0.0.84/31 - tenGigE1/44 + Eth11/4 10.0.0.86/31 - tenGigE1/45 + Eth12/1 10.0.0.88/31 - tenGigE1/46 + Eth12/2 10.0.0.90/31 - tenGigE1/47 + Eth12/3 10.0.0.92/31 - tenGigE1/48 + Eth12/4 10.0.0.94/31 - tenGigE1/49 + Eth13/1 10.0.0.96/31 - tenGigE1/50 + Eth13/2 10.0.0.98/31 - tenGigE1/51 + Eth13/3 10.0.0.100/31 - tenGigE1/52 + Eth13/4 10.0.0.102/31 - tenGigE1/53 + Eth14/1 10.0.0.104/31 - tenGigE1/54 + Eth14/2 10.0.0.106/31 - tenGigE1/55 + Eth14/3 10.0.0.108/31 - tenGigE1/56 + Eth14/4 10.0.0.110/31 - tenGigE1/57 + Eth15/1 10.0.0.112/31 - tenGigE1/58 + Eth15/2 10.0.0.114/31 - tenGigE1/59 + Eth15/3 10.0.0.116/31 - tenGigE1/60 + Eth15/4 10.0.0.118/31 - tenGigE1/61 + Eth16/1 10.0.0.120/31 - tenGigE1/62 + Eth16/2 10.0.0.122/31 - tenGigE1/63 + Eth16/3 10.0.0.124/31 - tenGigE1/64 + Eth16/4 10.0.0.126/31 - tenGigE1/65 + Eth17/1 10.0.0.128/31 - tenGigE1/66 + Eth17/2 10.0.0.130/31 - tenGigE1/67 + Eth17/3 10.0.0.132/31 - tenGigE1/68 + Eth17/4 10.0.0.134/31 - tenGigE1/69 + Eth18/1 10.0.0.136/31 - tenGigE1/70 + Eth18/2 10.0.0.138/31 - tenGigE1/71 + Eth18/3 10.0.0.140/31 - tenGigE1/72 + Eth18/4 10.0.0.142/31 - tenGigE1/73 + Eth19/1 10.0.0.144/31 - tenGigE1/74 + Eth19/2 10.0.0.146/31 - tenGigE1/75 + Eth19/3 10.0.0.148/31 - tenGigE1/76 + Eth19/4 10.0.0.150/31 - tenGigE1/77 + Eth20/1 10.0.0.152/31 - tenGigE1/78 + Eth20/2 10.0.0.154/31 - tenGigE1/79 + Eth20/3 10.0.0.156/31 - tenGigE1/80 + Eth20/4 10.0.0.158/31 - tenGigE1/81 + Eth21/1 10.0.0.160/31 - tenGigE1/82 + Eth21/2 10.0.0.162/31 - tenGigE1/83 + Eth21/3 10.0.0.164/31 - tenGigE1/84 + Eth21/4 10.0.0.166/31 - tenGigE1/85 + Eth22/1 10.0.0.168/31 - tenGigE1/86 + Eth22/2 10.0.0.170/31 - tenGigE1/87 + Eth22/3 10.0.0.172/31 - tenGigE1/88 + Eth22/4 10.0.0.174/31 - tenGigE1/89 + Eth23/1 10.0.0.176/31 - tenGigE1/90 + Eth23/2 10.0.0.178/31 - tenGigE1/91 + Eth23/3 10.0.0.180/31 - tenGigE1/92 + Eth23/4 10.0.0.182/31 - tenGigE1/93 + Eth24/1 10.0.0.184/31 - tenGigE1/94 + Eth24/2 10.0.0.186/31 - tenGigE1/95 + Eth24/3 10.0.0.188/31 - tenGigE1/96 + Eth24/4 10.0.0.190/31 - fiftyGigE1/1 + Eth25/1 10.0.1.0/31 - fiftyGigE1/2 + Eth25/2 10.0.1.2/31 - fiftyGigE1/3 + Eth26/1 10.0.1.4/31 - fiftyGigE1/4 + Eth26/2 10.0.1.6/31 - fiftyGigE1/5 + Eth27/1 10.0.1.8/31 - fiftyGigE1/6 + Eth27/2 10.0.1.10/31 - fiftyGigE1/7 + Eth28/1 10.0.1.12/31 - fiftyGigE1/8 + Eth28/2 10.0.1.14/31 - fiftyGigE1/9 + Eth29/1 10.0.1.16/31 - fiftyGigE1/10 + Eth29/2 10.0.1.18/31 - fiftyGigE1/11 + Eth30/1 10.0.1.20/31 - fiftyGigE1/12 + Eth30/2 10.0.1.22/31 - fiftyGigE1/13 + Eth31/1 10.0.1.24/31 - fiftyGigE1/14 + Eth31/2 10.0.1.26/31 - fiftyGigE1/15 + Eth32/1 10.0.1.28/31 - fiftyGigE1/16 + Eth32/2 10.0.1.30/31 @@ -1211,235 +1211,9 @@
- - - DeviceInterfaceLink - switch1 - tenGigE1/1 - ARISTA01T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/2 - ARISTA02T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/3 - ARISTA03T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/4 - ARISTA04T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/5 - ARISTA05T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/6 - ARISTA06T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/7 - ARISTA07T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/8 - ARISTA08T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/9 - ARISTA09T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/10 - ARISTA10T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/11 - ARISTA11T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/12 - ARISTA12T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/13 - ARISTA13T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/14 - ARISTA14T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/15 - ARISTA15T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/16 - ARISTA16T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/17 - ARISTA01T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/18 - ARISTA02T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/19 - ARISTA03T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/20 - ARISTA04T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/21 - ARISTA05T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/22 - ARISTA06T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/23 - ARISTA07T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/24 - ARISTA08T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/25 - ARISTA09T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/26 - ARISTA10T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/27 - ARISTA11T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/28 - ARISTA12T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/29 - ARISTA13T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/30 - ARISTA14T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/31 - ARISTA15T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - tenGigE1/32 - ARISTA16T0 - Ethernet1 - - - switch1 + sonic Seastone-DX010-10-50 @@ -1447,7 +1221,7 @@ - switch1 + sonic DhcpResources @@ -1474,6 +1248,6 @@ - switch1 + sonic Seastone-DX010-10-50 diff --git a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-10-50/port_config.ini b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-10-50/port_config.ini index 8ffb58f2aef..16b89088aab 100644 --- a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-10-50/port_config.ini +++ b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-10-50/port_config.ini @@ -1,113 +1,113 @@ # name lanes alias -Ethernet0 65 tenGigE1/1 -Ethernet1 66 tenGigE1/2 -Ethernet2 67 tenGigE1/3 -Ethernet3 68 tenGigE1/4 -Ethernet4 69 tenGigE1/5 -Ethernet5 70 tenGigE1/6 -Ethernet6 71 tenGigE1/7 -Ethernet7 72 tenGigE1/8 -Ethernet8 73 tenGigE1/9 -Ethernet9 74 tenGigE1/10 -Ethernet10 75 tenGigE1/11 -Ethernet11 76 tenGigE1/12 -Ethernet12 77 tenGigE1/13 -Ethernet13 78 tenGigE1/14 -Ethernet14 79 tenGigE1/15 -Ethernet15 80 tenGigE1/16 -Ethernet16 33 tenGigE1/17 -Ethernet17 34 tenGigE1/18 -Ethernet18 35 tenGigE1/19 -Ethernet19 36 tenGigE1/20 -Ethernet20 37 tenGigE1/21 -Ethernet21 38 tenGigE1/22 -Ethernet22 39 tenGigE1/23 -Ethernet23 40 tenGigE1/24 -Ethernet24 41 tenGigE1/25 -Ethernet25 42 tenGigE1/26 -Ethernet26 43 tenGigE1/27 -Ethernet27 44 tenGigE1/28 -Ethernet28 45 tenGigE1/29 -Ethernet29 46 tenGigE1/30 -Ethernet30 47 tenGigE1/31 -Ethernet31 48 tenGigE1/32 -Ethernet32 49 tenGigE1/33 -Ethernet33 50 tenGigE1/34 -Ethernet34 51 tenGigE1/35 -Ethernet35 52 tenGigE1/36 -Ethernet36 53 tenGigE1/37 -Ethernet37 54 tenGigE1/38 -Ethernet38 55 tenGigE1/39 -Ethernet39 56 tenGigE1/40 -Ethernet40 57 tenGigE1/41 -Ethernet41 58 tenGigE1/42 -Ethernet42 59 tenGigE1/43 -Ethernet43 60 tenGigE1/44 -Ethernet44 61 tenGigE1/45 -Ethernet45 62 tenGigE1/46 -Ethernet46 63 tenGigE1/47 -Ethernet47 64 tenGigE1/48 -Ethernet48 81 tenGigE1/49 -Ethernet49 82 tenGigE1/50 -Ethernet50 83 tenGigE1/51 -Ethernet51 84 tenGigE1/52 -Ethernet52 85 tenGigE1/53 -Ethernet53 86 tenGigE1/54 -Ethernet54 87 tenGigE1/55 -Ethernet55 88 tenGigE1/56 -Ethernet56 89 tenGigE1/57 -Ethernet57 90 tenGigE1/58 -Ethernet58 91 tenGigE1/59 -Ethernet59 92 tenGigE1/60 -Ethernet60 93 tenGigE1/61 -Ethernet61 94 tenGigE1/62 -Ethernet62 95 tenGigE1/63 -Ethernet63 96 tenGigE1/64 -Ethernet64 97 tenGigE1/65 -Ethernet65 98 tenGigE1/66 -Ethernet66 99 tenGigE1/67 -Ethernet67 100 tenGigE1/68 -Ethernet68 101 tenGigE1/69 -Ethernet69 102 tenGigE1/70 -Ethernet70 103 tenGigE1/71 -Ethernet71 104 tenGigE1/72 -Ethernet72 105 tenGigE1/73 -Ethernet73 106 tenGigE1/74 -Ethernet74 107 tenGigE1/75 -Ethernet75 108 tenGigE1/76 -Ethernet76 109 tenGigE1/77 -Ethernet77 110 tenGigE1/78 -Ethernet78 111 tenGigE1/79 -Ethernet79 112 tenGigE1/80 -Ethernet80 1 tenGigE1/81 -Ethernet81 2 tenGigE1/82 -Ethernet82 3 tenGigE1/83 -Ethernet83 4 tenGigE1/84 -Ethernet84 5 tenGigE1/85 -Ethernet85 6 tenGigE1/86 -Ethernet86 7 tenGigE1/87 -Ethernet87 8 tenGigE1/88 -Ethernet88 9 tenGigE1/89 -Ethernet89 10 tenGigE1/90 -Ethernet90 11 tenGigE1/91 -Ethernet91 12 tenGigE1/92 -Ethernet92 13 tenGigE1/93 -Ethernet93 14 tenGigE1/94 -Ethernet94 15 tenGigE1/95 -Ethernet95 16 tenGigE1/96 -Ethernet96 17,18 fiftyGigE1/1 -Ethernet98 19,20 fiftyGigE1/2 -Ethernet100 21,22 fiftyGigE1/3 -Ethernet102 23,24 fiftyGigE1/4 -Ethernet104 25,26 fiftyGigE1/5 -Ethernet106 27,28 fiftyGigE1/6 -Ethernet108 29,30 fiftyGigE1/7 -Ethernet110 31,32 fiftyGigE1/8 -Ethernet112 113,114 fiftyGigE1/9 -Ethernet114 115,116 fiftyGigE1/10 -Ethernet116 117,118 fiftyGigE1/11 -Ethernet118 119,120 fiftyGigE1/12 -Ethernet120 121,122 fiftyGigE1/13 -Ethernet122 123,124 fiftyGigE1/14 -Ethernet124 125,126 fiftyGigE1/15 -Ethernet126 127,128 fiftyGigE1/16 +Ethernet0 65 Eth1/1 +Ethernet1 66 Eth1/2 +Ethernet2 67 Eth1/3 +Ethernet3 68 Eth1/4 +Ethernet4 69 Eth2/1 +Ethernet5 70 Eth2/2 +Ethernet6 71 Eth2/3 +Ethernet7 72 Eth2/4 +Ethernet8 73 Eth3/1 +Ethernet9 74 Eth3/2 +Ethernet10 75 Eth3/3 +Ethernet11 76 Eth3/4 +Ethernet12 77 Eth4/1 +Ethernet13 78 Eth4/2 +Ethernet14 79 Eth4/3 +Ethernet15 80 Eth4/4 +Ethernet16 33 Eth5/1 +Ethernet17 34 Eth5/2 +Ethernet18 35 Eth5/3 +Ethernet19 36 Eth5/4 +Ethernet20 37 Eth6/1 +Ethernet21 38 Eth6/2 +Ethernet22 39 Eth6/3 +Ethernet23 40 Eth6/4 +Ethernet24 41 Eth7/1 +Ethernet25 42 Eth7/2 +Ethernet26 43 Eth7/3 +Ethernet27 44 Eth7/4 +Ethernet28 45 Eth8/1 +Ethernet29 46 Eth8/2 +Ethernet30 47 Eth8/3 +Ethernet31 48 Eth8/4 +Ethernet32 49 Eth9/1 +Ethernet33 50 Eth9/2 +Ethernet34 51 Eth9/3 +Ethernet35 52 Eth9/4 +Ethernet36 53 Eth10/1 +Ethernet37 54 Eth10/2 +Ethernet38 55 Eth10/3 +Ethernet39 56 Eth10/4 +Ethernet40 57 Eth11/1 +Ethernet41 58 Eth11/2 +Ethernet42 59 Eth11/3 +Ethernet43 60 Eth11/4 +Ethernet44 61 Eth12/1 +Ethernet45 62 Eth12/2 +Ethernet46 63 Eth12/3 +Ethernet47 64 Eth12/4 +Ethernet48 81 Eth13/1 +Ethernet49 82 Eth13/2 +Ethernet50 83 Eth13/3 +Ethernet51 84 Eth13/4 +Ethernet52 85 Eth14/1 +Ethernet53 86 Eth14/2 +Ethernet54 87 Eth14/3 +Ethernet55 88 Eth14/4 +Ethernet56 89 Eth15/1 +Ethernet57 90 Eth15/2 +Ethernet58 91 Eth15/3 +Ethernet59 92 Eth15/4 +Ethernet60 93 Eth16/1 +Ethernet61 94 Eth16/2 +Ethernet62 95 Eth16/3 +Ethernet63 96 Eth16/4 +Ethernet64 97 Eth17/1 +Ethernet65 98 Eth17/2 +Ethernet66 99 Eth17/3 +Ethernet67 100 Eth17/4 +Ethernet68 101 Eth18/1 +Ethernet69 102 Eth18/2 +Ethernet70 103 Eth18/3 +Ethernet71 104 Eth18/4 +Ethernet72 105 Eth19/1 +Ethernet73 106 Eth19/2 +Ethernet74 107 Eth19/3 +Ethernet75 108 Eth19/4 +Ethernet76 109 Eth20/1 +Ethernet77 110 Eth20/2 +Ethernet78 111 Eth20/3 +Ethernet79 112 Eth20/4 +Ethernet80 1 Eth21/1 +Ethernet81 2 Eth21/2 +Ethernet82 3 Eth21/3 +Ethernet83 4 Eth21/4 +Ethernet84 5 Eth22/1 +Ethernet85 6 Eth22/2 +Ethernet86 7 Eth22/3 +Ethernet87 8 Eth22/4 +Ethernet88 9 Eth23/1 +Ethernet89 10 Eth23/2 +Ethernet90 11 Eth23/3 +Ethernet91 12 Eth23/4 +Ethernet92 13 Eth24/1 +Ethernet93 14 Eth24/2 +Ethernet94 15 Eth24/3 +Ethernet95 16 Eth24/4 +Ethernet96 17,18 Eth25/1 +Ethernet98 19,20 Eth25/2 +Ethernet100 21,22 Eth26/1 +Ethernet102 23,24 Eth26/2 +Ethernet104 25,26 Eth27/1 +Ethernet106 27,28 Eth27/2 +Ethernet108 29,30 Eth28/1 +Ethernet110 31,32 Eth28/2 +Ethernet112 113,114 Eth29/1 +Ethernet114 115,116 Eth29/2 +Ethernet116 117,118 Eth30/1 +Ethernet118 119,120 Eth30/2 +Ethernet120 121,122 Eth31/1 +Ethernet122 123,124 Eth31/2 +Ethernet124 125,126 Eth32/1 +Ethernet126 127,128 Eth32/2 diff --git a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/minigraph.xml b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/minigraph.xml index 47dc749df6f..e009fa8d61e 100644 --- a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/minigraph.xml +++ b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,328 +639,328 @@ - switch1 + sonic - fiftyGigE1/1 + Eth1/1 10.0.0.0/31 - fiftyGigE1/2 + Eth1/2 10.0.0.2/31 - fiftyGigE1/3 + Eth2/1 10.0.0.4/31 - fiftyGigE1/4 + Eth2/2 10.0.0.6/31 - fiftyGigE1/5 + Eth3/1 10.0.0.8/31 - fiftyGigE1/6 + Eth3/2 10.0.0.10/31 - fiftyGigE1/7 + Eth4/1 10.0.0.12/31 - fiftyGigE1/8 + Eth4/2 10.0.0.14/31 - fiftyGigE1/9 + Eth5/1 10.0.0.16/31 - fiftyGigE1/10 + Eth5/2 10.0.0.18/31 - fiftyGigE1/11 + Eth6/1 10.0.0.20/31 - fiftyGigE1/12 + Eth6/2 10.0.0.22/31 - fiftyGigE1/13 + Eth7/1 10.0.0.24/31 - fiftyGigE1/14 + Eth7/2 10.0.0.26/31 - fiftyGigE1/15 + Eth8/1 10.0.0.28/31 - fiftyGigE1/16 + Eth8/2 10.0.0.30/31 - fiftyGigE1/17 + Eth9/1 10.0.0.32/31 - fiftyGigE1/18 + Eth9/2 10.0.0.34/31 - fiftyGigE1/19 + Eth10/1 10.0.0.36/31 - fiftyGigE1/20 + Eth10/2 10.0.0.38/31 - fiftyGigE1/21 + Eth11/1 10.0.0.40/31 - fiftyGigE1/22 + Eth11/2 10.0.0.42/31 - fiftyGigE1/23 + Eth12/1 10.0.0.44/31 - fiftyGigE1/24 + Eth12/2 10.0.0.46/31 - fiftyGigE1/25 + Eth13/1 10.0.0.48/31 - fiftyGigE1/26 + Eth13/2 10.0.0.50/31 - fiftyGigE1/27 + Eth14/1 10.0.0.52/31 - fiftyGigE1/28 + Eth14/2 10.0.0.54/31 - fiftyGigE1/29 + Eth15/1 10.0.0.56/31 - fiftyGigE1/30 + Eth15/2 10.0.0.58/31 - fiftyGigE1/31 + Eth16/1 10.0.0.60/31 - fiftyGigE1/32 + Eth16/2 10.0.0.62/31 - fiftyGigE1/33 + Eth17/1 10.0.0.64/31 - fiftyGigE1/34 + Eth17/2 10.0.0.66/31 - fiftyGigE1/35 + Eth18/1 10.0.0.68/31 - fiftyGigE1/36 + Eth18/2 10.0.0.70/31 - fiftyGigE1/37 + Eth19/1 10.0.0.72/31 - fiftyGigE1/38 + Eth19/2 10.0.0.74/31 - fiftyGigE1/39 + Eth20/1 10.0.0.76/31 - fiftyGigE1/40 + Eth20/2 10.0.0.78/31 - fiftyGigE1/41 + Eth21/1 10.0.0.80/31 - fiftyGigE1/42 + Eth21/2 10.0.0.82/31 - fiftyGigE1/43 + Eth22/1 10.0.0.84/31 - fiftyGigE1/44 + Eth22/2 10.0.0.86/31 - fiftyGigE1/45 + Eth23/1 10.0.0.88/31 - fiftyGigE1/46 + Eth23/2 10.0.0.90/31 - fiftyGigE1/47 + Eth24/1 10.0.0.92/31 - fiftyGigE1/48 + Eth24/2 10.0.0.94/31 - fiftyGigE1/49 + Eth25/1 10.0.0.96/31 - fiftyGigE1/50 + Eth25/2 10.0.0.98/31 - fiftyGigE1/51 + Eth26/1 10.0.0.100/31 - fiftyGigE1/52 + Eth26/2 10.0.0.102/31 - fiftyGigE1/53 + Eth27/1 10.0.0.104/31 - fiftyGigE1/54 + Eth27/2 10.0.0.106/31 - fiftyGigE1/55 + Eth28/1 10.0.0.108/31 - fiftyGigE1/56 + Eth28/2 10.0.0.110/31 - fiftyGigE1/57 + Eth29/1 10.0.0.112/31 - fiftyGigE1/58 + Eth29/2 10.0.0.114/31 - fiftyGigE1/59 + Eth30/1 10.0.0.116/31 - fiftyGigE1/60 + Eth30/2 10.0.0.118/31 - fiftyGigE1/61 + Eth31/1 10.0.0.120/31 - fiftyGigE1/62 + Eth31/2 10.0.0.122/31 - fiftyGigE1/63 + Eth32/1 10.0.0.124/31 - fiftyGigE1/64 + Eth32/2 10.0.0.126/31 @@ -971,235 +971,9 @@ - - - DeviceInterfaceLink - switch1 - fiftyGigE1/1 - ARISTA01T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/2 - ARISTA02T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/3 - ARISTA03T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/4 - ARISTA04T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/5 - ARISTA05T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/6 - ARISTA06T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/7 - ARISTA07T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/8 - ARISTA08T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/9 - ARISTA09T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/10 - ARISTA10T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/11 - ARISTA11T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/12 - ARISTA12T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/13 - ARISTA13T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/14 - ARISTA14T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/15 - ARISTA15T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/16 - ARISTA16T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/17 - ARISTA01T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/18 - ARISTA02T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/19 - ARISTA03T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/20 - ARISTA04T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/21 - ARISTA05T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/22 - ARISTA06T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/23 - ARISTA07T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/24 - ARISTA08T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/25 - ARISTA09T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/26 - ARISTA10T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/27 - ARISTA11T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/28 - ARISTA12T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/29 - ARISTA13T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/30 - ARISTA14T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/31 - ARISTA15T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - fiftyGigE1/32 - ARISTA16T0 - Ethernet1 - - - switch1 + sonic Seastone-DX010-50 @@ -1207,7 +981,7 @@ - switch1 + sonic DhcpResources @@ -1234,6 +1008,6 @@ - switch1 + sonic Seastone-DX010-50 diff --git a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/port_config.ini b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/port_config.ini index 10ed3a14827..70553360da2 100644 --- a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/port_config.ini +++ b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/port_config.ini @@ -1,65 +1,65 @@ # name lanes alias -Ethernet0 65,66 fiftyGigE1/1 -Ethernet2 67,68 fiftyGigE1/2 -Ethernet4 69,70 fiftyGigE1/3 -Ethernet6 71,72 fiftyGigE1/4 -Ethernet8 73,74 fiftyGigE1/5 -Ethernet10 75,76 fiftyGigE1/6 -Ethernet12 77,78 fiftyGigE1/7 -Ethernet14 79,80 fiftyGigE1/8 -Ethernet16 33,34 fiftyGigE1/9 -Ethernet18 35,36 fiftyGigE1/10 -Ethernet20 37,38 fiftyGigE1/11 -Ethernet22 39,40 fiftyGigE1/12 -Ethernet24 41,42 fiftyGigE1/13 -Ethernet26 43,44 fiftyGigE1/14 -Ethernet28 45,46 fiftyGigE1/15 -Ethernet30 47,48 fiftyGigE1/16 -Ethernet32 49,50 fiftyGigE1/17 -Ethernet34 51,52 fiftyGigE1/18 -Ethernet36 53,54 fiftyGigE1/19 -Ethernet38 55,56 fiftyGigE1/20 -Ethernet40 57,58 fiftyGigE1/21 -Ethernet42 59,60 fiftyGigE1/22 -Ethernet44 61,62 fiftyGigE1/23 -Ethernet46 63,64 fiftyGigE1/24 -Ethernet48 81,82 fiftyGigE1/25 -Ethernet50 83,84 fiftyGigE1/26 -Ethernet52 85,86 fiftyGigE1/27 -Ethernet54 87,88 fiftyGigE1/28 -Ethernet56 89,90 fiftyGigE1/29 -Ethernet58 91,92 fiftyGigE1/30 -Ethernet60 93,94 fiftyGigE1/31 -Ethernet62 95,96 fiftyGigE1/32 -Ethernet64 97,98 fiftyGigE1/33 -Ethernet66 99,100 fiftyGigE1/34 -Ethernet68 101,102 fiftyGigE1/35 -Ethernet70 103,104 fiftyGigE1/36 -Ethernet72 105,106 fiftyGigE1/37 -Ethernet74 107,108 fiftyGigE1/38 -Ethernet76 109,110 fiftyGigE1/39 -Ethernet78 111,112 fiftyGigE1/40 -Ethernet80 1,2 fiftyGigE1/41 -Ethernet82 3,4 fiftyGigE1/42 -Ethernet84 5,6 fiftyGigE1/43 -Ethernet86 7,8 fiftyGigE1/44 -Ethernet88 9,10 fiftyGigE1/45 -Ethernet90 11,12 fiftyGigE1/46 -Ethernet92 13,14 fiftyGigE1/47 -Ethernet94 15,16 fiftyGigE1/48 -Ethernet96 17,18 fiftyGigE1/49 -Ethernet98 19,20 fiftyGigE1/50 -Ethernet100 21,22 fiftyGigE1/51 -Ethernet102 23,24 fiftyGigE1/52 -Ethernet104 25,26 fiftyGigE1/53 -Ethernet106 27,28 fiftyGigE1/54 -Ethernet108 29,30 fiftyGigE1/55 -Ethernet110 31,32 fiftyGigE1/56 -Ethernet112 113,114 fiftyGigE1/57 -Ethernet114 115,116 fiftyGigE1/58 -Ethernet116 117,118 fiftyGigE1/59 -Ethernet118 119,120 fiftyGigE1/60 -Ethernet120 121,122 fiftyGigE1/61 -Ethernet122 123,124 fiftyGigE1/62 -Ethernet124 125,126 fiftyGigE1/63 -Ethernet126 127,128 fiftyGigE1/64 +Ethernet0 65,66 Eth1/1 +Ethernet2 67,68 Eth1/2 +Ethernet4 69,70 Eth2/1 +Ethernet6 71,72 Eth2/2 +Ethernet8 73,74 Eth3/1 +Ethernet10 75,76 Eth3/2 +Ethernet12 77,78 Eth4/1 +Ethernet14 79,80 Eth4/2 +Ethernet16 33,34 Eth5/1 +Ethernet18 35,36 Eth5/2 +Ethernet20 37,38 Eth6/1 +Ethernet22 39,40 Eth6/2 +Ethernet24 41,42 Eth7/1 +Ethernet26 43,44 Eth7/2 +Ethernet28 45,46 Eth8/1 +Ethernet30 47,48 Eth8/2 +Ethernet32 49,50 Eth9/1 +Ethernet34 51,52 Eth9/2 +Ethernet36 53,54 Eth10/1 +Ethernet38 55,56 Eth10/2 +Ethernet40 57,58 Eth11/1 +Ethernet42 59,60 Eth11/2 +Ethernet44 61,62 Eth12/1 +Ethernet46 63,64 Eth12/2 +Ethernet48 81,82 Eth13/1 +Ethernet50 83,84 Eth13/2 +Ethernet52 85,86 Eth14/1 +Ethernet54 87,88 Eth14/2 +Ethernet56 89,90 Eth15/1 +Ethernet58 91,92 Eth15/2 +Ethernet60 93,94 Eth16/1 +Ethernet62 95,96 Eth16/2 +Ethernet64 97,98 Eth17/1 +Ethernet66 99,100 Eth17/2 +Ethernet68 101,102 Eth18/1 +Ethernet70 103,104 Eth18/2 +Ethernet72 105,106 Eth19/1 +Ethernet74 107,108 Eth19/2 +Ethernet76 109,110 Eth20/1 +Ethernet78 111,112 Eth20/2 +Ethernet80 1,2 Eth21/1 +Ethernet82 3,4 Eth21/2 +Ethernet84 5,6 Eth22/1 +Ethernet86 7,8 Eth22/2 +Ethernet88 9,10 Eth23/1 +Ethernet90 11,12 Eth23/2 +Ethernet92 13,14 Eth24/1 +Ethernet94 15,16 Eth24/2 +Ethernet96 17,18 Eth25/1 +Ethernet98 19,20 Eth25/2 +Ethernet100 21,22 Eth26/1 +Ethernet102 23,24 Eth26/2 +Ethernet104 25,26 Eth27/1 +Ethernet106 27,28 Eth27/2 +Ethernet108 29,30 Eth28/1 +Ethernet110 31,32 Eth28/2 +Ethernet112 113,114 Eth29/1 +Ethernet114 115,116 Eth29/2 +Ethernet116 117,118 Eth30/1 +Ethernet118 119,120 Eth30/2 +Ethernet120 121,122 Eth31/1 +Ethernet122 123,124 Eth31/2 +Ethernet124 125,126 Eth32/1 +Ethernet126 127,128 Eth32/2 diff --git a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/minigraph.xml b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/minigraph.xml index 921839b0d72..0b7698bb925 100644 --- a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/minigraph.xml +++ b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,168 +639,168 @@ - switch1 + sonic - hundredGigE1/1 + Eth1 10.0.0.0/31 - hundredGigE1/2 + Eth2 10.0.0.2/31 - hundredGigE1/3 + Eth3 10.0.0.4/31 - hundredGigE1/4 + Eth4 10.0.0.6/31 - hundredGigE1/5 + Eth5 10.0.0.8/31 - hundredGigE1/6 + Eth6 10.0.0.10/31 - hundredGigE1/7 + Eth7 10.0.0.12/31 - hundredGigE1/8 + Eth8 10.0.0.14/31 - hundredGigE1/9 + Eth9 10.0.0.16/31 - hundredGigE1/10 + Eth10 10.0.0.18/31 - hundredGigE1/11 + Eth11 10.0.0.20/31 - hundredGigE1/12 + Eth12 10.0.0.22/31 - hundredGigE1/13 + Eth13 10.0.0.24/31 - hundredGigE1/14 + Eth14 10.0.0.26/31 - hundredGigE1/15 + Eth15 10.0.0.28/31 - hundredGigE1/16 + Eth16 10.0.0.30/31 - hundredGigE1/17 + Eth17 10.0.0.32/31 - hundredGigE1/18 + Eth18 10.0.0.34/31 - hundredGigE1/19 + Eth19 10.0.0.36/31 - hundredGigE1/20 + Eth20 10.0.0.38/31 - hundredGigE1/21 + Eth21 10.0.0.40/31 - hundredGigE1/22 + Eth22 10.0.0.42/31 - hundredGigE1/23 + Eth23 10.0.0.44/31 - hundredGigE1/24 + Eth24 10.0.0.46/31 - hundredGigE1/25 + Eth25 10.0.0.48/31 - hundredGigE1/26 + Eth26 10.0.0.50/31 - hundredGigE1/27 + Eth27 10.0.0.52/31 - hundredGigE1/28 + Eth28 10.0.0.54/31 - hundredGigE1/29 + Eth29 10.0.0.56/31 - hundredGigE1/30 + Eth30 10.0.0.58/31 - hundredGigE1/31 + Eth31 10.0.0.60/31 - hundredGigE1/32 + Eth32 10.0.0.62/31 @@ -811,235 +811,9 @@ - - - DeviceInterfaceLink - switch1 - hundredGigE1/1 - ARISTA01T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/2 - ARISTA02T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/3 - ARISTA03T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/4 - ARISTA04T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/5 - ARISTA05T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/6 - ARISTA06T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/7 - ARISTA07T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/8 - ARISTA08T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/9 - ARISTA09T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/10 - ARISTA10T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/11 - ARISTA11T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/12 - ARISTA12T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/13 - ARISTA13T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/14 - ARISTA14T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/15 - ARISTA15T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/16 - ARISTA16T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/17 - ARISTA01T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/18 - ARISTA02T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/19 - ARISTA03T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/20 - ARISTA04T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/21 - ARISTA05T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/22 - ARISTA06T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/23 - ARISTA07T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/24 - ARISTA08T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/25 - ARISTA09T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/26 - ARISTA10T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/27 - ARISTA11T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/28 - ARISTA12T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/29 - ARISTA13T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/30 - ARISTA14T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/31 - ARISTA15T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/32 - ARISTA16T0 - Ethernet1 - - - switch1 + sonic Seastone-DX010 @@ -1047,7 +821,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +848,6 @@ - switch1 + sonic Seastone-DX010 diff --git a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/port_config.ini b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/port_config.ini index 5336dbdb550..9f039e00348 100644 --- a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/port_config.ini +++ b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/port_config.ini @@ -1,33 +1,33 @@ # name lanes alias -Ethernet0 65,66,67,68 hundredGigE1/1 -Ethernet4 69,70,71,72 hundredGigE1/2 -Ethernet8 73,74,75,76 hundredGigE1/3 -Ethernet12 77,78,79,80 hundredGigE1/4 -Ethernet16 33,34,35,36 hundredGigE1/5 -Ethernet20 37,38,39,40 hundredGigE1/6 -Ethernet24 41,42,43,44 hundredGigE1/7 -Ethernet28 45,46,47,48 hundredGigE1/8 -Ethernet32 49,50,51,52 hundredGigE1/9 -Ethernet36 53,54,55,56 hundredGigE1/10 -Ethernet40 57,58,59,60 hundredGigE1/11 -Ethernet44 61,62,63,64 hundredGigE1/12 -Ethernet48 81,82,83,84 hundredGigE1/13 -Ethernet52 85,86,87,88 hundredGigE1/14 -Ethernet56 89,90,91,92 hundredGigE1/15 -Ethernet60 93,94,95,96 hundredGigE1/16 -Ethernet64 97,98,99,100 hundredGigE1/17 -Ethernet68 101,102,103,104 hundredGigE1/18 -Ethernet72 105,106,107,108 hundredGigE1/19 -Ethernet76 109,110,111,112 hundredGigE1/20 -Ethernet80 1,2,3,4 hundredGigE1/21 -Ethernet84 5,6,7,8 hundredGigE1/22 -Ethernet88 9,10,11,12 hundredGigE1/23 -Ethernet92 13,14,15,16 hundredGigE1/24 -Ethernet96 17,18,19,20 hundredGigE1/25 -Ethernet100 21,22,23,24 hundredGigE1/26 -Ethernet104 25,26,27,28 hundredGigE1/27 -Ethernet108 29,30,31,32 hundredGigE1/28 -Ethernet112 113,114,115,116 hundredGigE1/29 -Ethernet116 117,118,119,120 hundredGigE1/30 -Ethernet120 121,122,123,124 hundredGigE1/31 -Ethernet124 125,126,127,128 hundredGigE1/32 +Ethernet0 65,66,67,68 Eth1 +Ethernet4 69,70,71,72 Eth2 +Ethernet8 73,74,75,76 Eth3 +Ethernet12 77,78,79,80 Eth4 +Ethernet16 33,34,35,36 Eth5 +Ethernet20 37,38,39,40 Eth6 +Ethernet24 41,42,43,44 Eth7 +Ethernet28 45,46,47,48 Eth8 +Ethernet32 49,50,51,52 Eth9 +Ethernet36 53,54,55,56 Eth10 +Ethernet40 57,58,59,60 Eth11 +Ethernet44 61,62,63,64 Eth12 +Ethernet48 81,82,83,84 Eth13 +Ethernet52 85,86,87,88 Eth14 +Ethernet56 89,90,91,92 Eth15 +Ethernet60 93,94,95,96 Eth16 +Ethernet64 97,98,99,100 Eth17 +Ethernet68 101,102,103,104 Eth18 +Ethernet72 105,106,107,108 Eth19 +Ethernet76 109,110,111,112 Eth20 +Ethernet80 1,2,3,4 Eth21 +Ethernet84 5,6,7,8 Eth22 +Ethernet88 9,10,11,12 Eth23 +Ethernet92 13,14,15,16 Eth24 +Ethernet96 17,18,19,20 Eth25 +Ethernet100 21,22,23,24 Eth26 +Ethernet104 25,26,27,28 Eth27 +Ethernet108 29,30,31,32 Eth28 +Ethernet112 113,114,115,116 Eth29 +Ethernet116 117,118,119,120 Eth30 +Ethernet120 121,122,123,124 Eth31 +Ethernet124 125,126,127,128 Eth32 diff --git a/device/celestica/x86_64-cel_seastone-r0/minigraph.xml b/device/celestica/x86_64-cel_seastone-r0/minigraph.xml index 921839b0d72..2590e4f50c2 100644 --- a/device/celestica/x86_64-cel_seastone-r0/minigraph.xml +++ b/device/celestica/x86_64-cel_seastone-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,170 +639,570 @@ - switch1 + sonic - hundredGigE1/1 + Eth1/1 10.0.0.0/31 - hundredGigE1/2 + Eth1/2 10.0.0.2/31 - hundredGigE1/3 + Eth1/3 10.0.0.4/31 - hundredGigE1/4 + Eth1/4 10.0.0.6/31 - hundredGigE1/5 + Eth2/1 10.0.0.8/31 - hundredGigE1/6 + Eth2/2 10.0.0.10/31 - hundredGigE1/7 + Eth2/3 10.0.0.12/31 - hundredGigE1/8 + Eth2/4 10.0.0.14/31 - hundredGigE1/9 + Eth3/1 10.0.0.16/31 - hundredGigE1/10 + Eth3/2 10.0.0.18/31 - hundredGigE1/11 + Eth3/3 10.0.0.20/31 - hundredGigE1/12 + Eth3/4 10.0.0.22/31 - hundredGigE1/13 + Eth4/1 10.0.0.24/31 - hundredGigE1/14 + Eth4/2 10.0.0.26/31 - hundredGigE1/15 + Eth4/3 10.0.0.28/31 - hundredGigE1/16 + Eth4/4 10.0.0.30/31 - hundredGigE1/17 + Eth5/1 10.0.0.32/31 - hundredGigE1/18 + Eth5/2 10.0.0.34/31 - hundredGigE1/19 + Eth5/3 10.0.0.36/31 - hundredGigE1/20 + Eth5/4 10.0.0.38/31 - hundredGigE1/21 + Eth6/1 10.0.0.40/31 - hundredGigE1/22 + Eth6/2 10.0.0.42/31 - hundredGigE1/23 + Eth6/3 10.0.0.44/31 - hundredGigE1/24 + Eth6/4 10.0.0.46/31 - hundredGigE1/25 + Eth7/1 10.0.0.48/31 - hundredGigE1/26 + Eth7/2 10.0.0.50/31 - hundredGigE1/27 + Eth7/3 10.0.0.52/31 - hundredGigE1/28 + Eth7/4 10.0.0.54/31 - hundredGigE1/29 + Eth8/1 10.0.0.56/31 - hundredGigE1/30 + Eth8/2 10.0.0.58/31 - hundredGigE1/31 + Eth8/3 10.0.0.60/31 - hundredGigE1/32 + Eth8/4 10.0.0.62/31 + + + Eth9/1 + 10.0.0.64/31 + + + + Eth9/2 + 10.0.0.66/31 + + + + Eth9/3 + 10.0.0.68/31 + + + + Eth9/4 + 10.0.0.70/31 + + + + Eth10/1 + 10.0.0.72/31 + + + + Eth10/2 + 10.0.0.74/31 + + + + Eth10/3 + 10.0.0.76/31 + + + + Eth10/4 + 10.0.0.78/31 + + + + Eth11/1 + 10.0.0.80/31 + + + + Eth11/2 + 10.0.0.82/31 + + + + Eth11/3 + 10.0.0.84/31 + + + + Eth11/4 + 10.0.0.86/31 + + + + Eth12/1 + 10.0.0.88/31 + + + + Eth12/2 + 10.0.0.90/31 + + + + Eth12/3 + 10.0.0.92/31 + + + + Eth12/4 + 10.0.0.94/31 + + + + Eth13/1 + 10.0.0.96/31 + + + + Eth13/2 + 10.0.0.98/31 + + + + Eth13/3 + 10.0.0.100/31 + + + + Eth13/4 + 10.0.0.102/31 + + + + Eth14/1 + 10.0.0.104/31 + + + + Eth14/2 + 10.0.0.106/31 + + + + Eth14/3 + 10.0.0.108/31 + + + + Eth14/4 + 10.0.0.110/31 + + + + Eth15/1 + 10.0.0.112/31 + + + + Eth15/2 + 10.0.0.114/31 + + + + Eth15/3 + 10.0.0.116/31 + + + + Eth15/4 + 10.0.0.118/31 + + + + Eth16/1 + 10.0.0.120/31 + + + + Eth16/2 + 10.0.0.122/31 + + + + Eth16/3 + 10.0.0.124/31 + + + + Eth16/4 + 10.0.0.126/31 + + + + Eth17/1 + 10.0.0.128/31 + + + + Eth17/2 + 10.0.0.130/31 + + + + Eth17/3 + 10.0.0.132/31 + + + + Eth17/4 + 10.0.0.134/31 + + + + Eth18/1 + 10.0.0.136/31 + + + + Eth18/2 + 10.0.0.138/31 + + + + Eth18/3 + 10.0.0.140/31 + + + + Eth18/4 + 10.0.0.142/31 + + + + Eth19/1 + 10.0.0.144/31 + + + + Eth19/2 + 10.0.0.146/31 + + + + Eth19/3 + 10.0.0.148/31 + + + + Eth19/4 + 10.0.0.150/31 + + + + Eth20/1 + 10.0.0.152/31 + + + + Eth20/2 + 10.0.0.154/31 + + + + Eth20/3 + 10.0.0.156/31 + + + + Eth20/4 + 10.0.0.158/31 + + + + Eth21/1 + 10.0.0.160/31 + + + + Eth21/2 + 10.0.0.162/31 + + + + Eth21/3 + 10.0.0.164/31 + + + + Eth21/4 + 10.0.0.166/31 + + + + Eth22/1 + 10.0.0.168/31 + + + + Eth22/2 + 10.0.0.170/31 + + + + Eth22/3 + 10.0.0.172/31 + + + + Eth22/4 + 10.0.0.174/31 + + + + Eth23/1 + 10.0.0.176/31 + + + + Eth23/2 + 10.0.0.178/31 + + + + Eth23/3 + 10.0.0.180/31 + + + + Eth23/4 + 10.0.0.182/31 + + + + Eth24/1 + 10.0.0.184/31 + + + + Eth24/2 + 10.0.0.186/31 + + + + Eth24/3 + 10.0.0.188/31 + + + + Eth24/4 + 10.0.0.190/31 + + + + Eth25/1 + 10.0.1.0/31 + + + + Eth25/2 + 10.0.1.2/31 + + + + Eth26/1 + 10.0.1.4/31 + + + + Eth26/2 + 10.0.1.6/31 + + + + Eth27/1 + 10.0.1.8/31 + + + + Eth27/2 + 10.0.1.10/31 + + + + Eth28/1 + 10.0.1.12/31 + + + + Eth28/2 + 10.0.1.14/31 + + + + Eth29/1 + 10.0.1.16/31 + + + + Eth29/2 + 10.0.1.18/31 + + + + Eth30/1 + 10.0.1.20/31 + + + + Eth30/2 + 10.0.1.22/31 + + + + Eth31/1 + 10.0.1.24/31 + + + + Eth31/2 + 10.0.1.26/31 + + + + Eth32/1 + 10.0.1.28/31 + + + + Eth32/2 + 10.0.1.30/31 + @@ -811,243 +1211,17 @@ - - - DeviceInterfaceLink - switch1 - hundredGigE1/1 - ARISTA01T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/2 - ARISTA02T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/3 - ARISTA03T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/4 - ARISTA04T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/5 - ARISTA05T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/6 - ARISTA06T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/7 - ARISTA07T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/8 - ARISTA08T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/9 - ARISTA09T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/10 - ARISTA10T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/11 - ARISTA11T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/12 - ARISTA12T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/13 - ARISTA13T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/14 - ARISTA14T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/15 - ARISTA15T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/16 - ARISTA16T2 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/17 - ARISTA01T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/18 - ARISTA02T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/19 - ARISTA03T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/20 - ARISTA04T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/21 - ARISTA05T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/22 - ARISTA06T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/23 - ARISTA07T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/24 - ARISTA08T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/25 - ARISTA09T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/26 - ARISTA10T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/27 - ARISTA11T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/28 - ARISTA12T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/29 - ARISTA13T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/30 - ARISTA14T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/31 - ARISTA15T0 - Ethernet1 - - - DeviceInterfaceLink - switch1 - hundredGigE1/32 - ARISTA16T0 - Ethernet1 - - - switch1 - Seastone-DX010 + sonic + Seastone-DX010-10-50 - switch1 + sonic DhcpResources @@ -1074,6 +1248,6 @@ - switch1 - Seastone-DX010 + sonic + Seastone-DX010-10-50 diff --git a/device/celestica/x86_64-cel_seastone-r0/plugins/sfputil.py b/device/celestica/x86_64-cel_seastone-r0/plugins/sfputil.py index 7ff632e152b..f1e6b1daa3e 100755 --- a/device/celestica/x86_64-cel_seastone-r0/plugins/sfputil.py +++ b/device/celestica/x86_64-cel_seastone-r0/plugins/sfputil.py @@ -45,10 +45,54 @@ def __init__(self): SfpUtilBase.__init__(self) def get_presence(self, port_num): - raise NotImplementedError + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/dx010_cpld/qsfp_modprs", "r") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # ModPrsL is active low + if reg_value & mask == 0: + return True + + return False def get_low_power_mode(self, port_num): - raise NotImplementedError + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/dx010_cpld/qsfp_lpmode", "r") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # LPMode is active high + if reg_value & mask == 0: + return False + + return True def set_low_power_mode(self, port_num, lpmode): raise NotImplementedError diff --git a/device/celestica/x86_64-cel_seastone-r0/sensors.conf b/device/celestica/x86_64-cel_seastone-r0/sensors.conf index 93a0fd6db76..e25717ac589 100644 --- a/device/celestica/x86_64-cel_seastone-r0/sensors.conf +++ b/device/celestica/x86_64-cel_seastone-r0/sensors.conf @@ -8,6 +8,16 @@ chip "dps460-i2c-*-5a" label temp3 "Power Supply 1 temp sensor 3" ignore fan2 ignore fan3 + ignore in2 + + set in1_max 240 + set in1_min 100 + set in1_crit 264 + set in1_lcrit 90 + set in3_max 12.6 + set in3_min 11.4 + set in3_crit 13.0 + set in3_lcrit 11.0 chip "dps460-i2c-*-5b" label temp1 "Power Supply 2 temp sensor 1" @@ -15,6 +25,16 @@ chip "dps460-i2c-*-5b" label temp3 "Power Supply 2 temp sensor 3" ignore fan2 ignore fan3 + ignore in2 + + set in1_max 240 + set in1_min 100 + set in1_crit 264 + set in1_lcrit 90 + set in3_max 12.6 + set in3_min 11.4 + set in3_crit 13.0 + set in3_lcrit 11.0 # These sensors located on Main Switch Board. chip "dx010_lm75b-i2c-*-48" @@ -41,4 +61,4 @@ chip "dx010_lm75b-i2c-*-48" chip "dx010_lm75b-i2c-*-4e" label temp1 "Rear-panel temp sensor 2" set temp1_max 43 - set temp1_max_hyst 28 \ No newline at end of file + set temp1_max_hyst 28 diff --git a/device/centec/x86_64-centec_e582_48x6q-r0/minigraph.xml b/device/centec/x86_64-centec_e582_48x6q-r0/minigraph.xml index fd35742353c..950c52a6413 100644 --- a/device/centec/x86_64-centec_e582_48x6q-r0/minigraph.xml +++ b/device/centec/x86_64-centec_e582_48x6q-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,11 +1039,11 @@ - switch1 + sonic E582-48x6q
- switch1 + sonic E582-48x6q diff --git a/device/centec/x86_64-ew_es6220_x48q2h4-r0/minigraph.xml b/device/centec/x86_64-ew_es6220_x48q2h4-r0/minigraph.xml index 03be9a51b7c..cb0e9d4e2b0 100644 --- a/device/centec/x86_64-ew_es6220_x48q2h4-r0/minigraph.xml +++ b/device/centec/x86_64-ew_es6220_x48q2h4-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,11 +1039,11 @@ - switch1 + sonic ES6428A-X48Q2H4
- switch1 + sonic ES6428A-X48Q2H4 diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 new file mode 100644 index 00000000000..551f73ca047 --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 @@ -0,0 +1,128 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "12766208", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "12766208", + "type": "egress", + "mode": "static" + }, + "egress_lossy_pool": { + "size": "8072396", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "xon":"18432", + "xoff":"40560", + "size":"41808", + "dynamic_th":"-4", + "xon_offset":"2496" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "static_th":"12766208" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/qos.json b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/qos.json index 2539513d8e1..926911ab59d 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/qos.json +++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/qos.json @@ -92,64 +92,51 @@ } }, "SCHEDULER": { - "scheduler.0": { + "scheduler.0" : { "type":"DWRR", "weight": "25" }, - "scheduler.1": { + "scheduler.1" : { "type":"DWRR", "weight": "30" }, - "scheduler.2": { + "scheduler.2" : { "type":"DWRR", "weight": "20" } }, "PORT_QOS_MAP": { "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP:AZURE]", - "tc_to_queue_map" : "[TC_TO_QUEUE_MAP:AZURE]", - "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP:AZURE]", - "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE:AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", "pfc_enable": "3,4" } }, "WRED_PROFILE": { - "AZURE_LOSSY": { + "AZURE_LOSSLESS" : { "wred_green_enable":"true", "wred_yellow_enable":"true", + "wred_red_enable":"true", "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "green_max_threshold": "184320", - "green_min_threshold": "184320" - }, - "AZURE_LOSSLESS": { - "wred_green_enable":"true", - "wred_yellow_enable":"true", - "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "green_max_threshold": "184320", - "green_min_threshold": "184320" + "red_max_threshold":"312000", + "red_min_threshold":"104000", + "yellow_max_threshold":"312000", + "yellow_min_threshold":"104000", + "green_max_threshold":"312000", + "green_min_threshold":"104000" } }, "QUEUE": { - "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124:0-1" : { - "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]" - }, - "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124:3-4" : { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|3-4" : { "scheduler" : "[SCHEDULER|scheduler.0]", "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]" }, - "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124:0" : { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0" : { "scheduler" : "[SCHEDULER|scheduler.1]" }, - "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124:1" : { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|1" : { "scheduler" : "[SCHEDULER|scheduler.2]" } } diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf b/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf index a8fef618591..107095cdad7 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf +++ b/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf @@ -5,8 +5,8 @@ if [ "$install_env" = "onie" ]; then echo "Replace ONIE reboot with Dell reset commands" # set I2C GPIO mux -echo 1 > /sys/class/gpio/export -echo 2 > /sys/class/gpio/export +[ -d /sys/class/gpio/gpio1 ] || echo 1 > /sys/class/gpio/export +[ -d /sys/class/gpio/gpio2 ] || echo 2 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio1/direction echo out > /sys/class/gpio/gpio2/direction echo 0 > /sys/class/gpio/gpio1/value diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/minigraph.xml b/device/dell/x86_64-dell_s6000_s1220-r0/minigraph.xml index 871a91c7fd0..d5b453c4308 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/minigraph.xml +++ b/device/dell/x86_64-dell_s6000_s1220-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic fortyGigE0/0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Force10-S6000 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Force10-S6000 diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/platform_reboot b/device/dell/x86_64-dell_s6000_s1220-r0/platform_reboot new file mode 100755 index 00000000000..875a5278775 --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/platform_reboot @@ -0,0 +1,3 @@ +#!/bin/sh + +echo 1 > /sys/devices/platform/dell-s6000-cpld.0/power_reset diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/plugins/psuutil.py b/device/dell/x86_64-dell_s6000_s1220-r0/plugins/psuutil.py new file mode 100644 index 00000000000..537605f3975 --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/plugins/psuutil.py @@ -0,0 +1,74 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + def get_cpld_register(self, reg_name): + cpld_dir = "/sys/devices/platform/dell-s6000-cpld.0" + retval = 'ERR' + reg_file = cpld_dir +'/' + reg_name + if (not os.path.isfile(reg_file)): + return retval + + try: + with open(reg_file, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", reg_file, "file !") + + retval = retval.rstrip('\r\n') + return retval + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + S6000_MAX_PSUS = 2 + return S6000_MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + status = 0 + psu_status = self.get_cpld_register('psu'+str(index - 1)+'_status') + if (psu_status != 'ERR'): + status = int(psu_status, 10) + + presence = self.get_psu_presence(index) + + return (status & presence) + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + psu_presence = self.get_cpld_register('psu'+str(index - 1)+'_prs') + if (psu_presence != 'ERR'): + status = int(psu_presence, 10) + + return status diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/sensors.conf b/device/dell/x86_64-dell_s6000_s1220-r0/sensors.conf index 2208bb6340d..c87af11afac 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/sensors.conf +++ b/device/dell/x86_64-dell_s6000_s1220-r0/sensors.conf @@ -27,27 +27,6 @@ chip "max6620-i2c-*-2a" ignore fan3 ignore fan4 -chip "w83627dhg-*" - label in0 "VCore 1" - label in1 "VCore 2" - set in0_min 0 - set in0_max 1.74 - set in1_min 0 - set in1_max 1.74 - ignore fan1 - ignore fan2 - ignore fan3 - ignore fan4 - ignore fan5 - ignore in4 - ignore in5 - ignore in6 - ignore temp1 - ignore temp2 - ignore temp3 - ignore cpu0_vid - ignore intrusion0 - chip "jc42-*" set temp1_max 50 set temp1_crit 85 diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 new file mode 100644 index 00000000000..1083a6210fc --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 @@ -0,0 +1,2 @@ +{%- set default_topo = 't0' %} +{%- include 'buffers_config.j2' %} diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers_defaults_t0.j2 b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers_defaults_t0.j2 new file mode 100644 index 00000000000..e337f676b65 --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers_defaults_t0.j2 @@ -0,0 +1,47 @@ + +{%- set default_cable = '5m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,64) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "11213696", + "type": "ingress", + "mode": "dynamic", + "xoff": "3855488" + }, + "egress_lossy_pool": { + "size": "9532224", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "15982720", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"1518", + "static_th":"3995680" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, +{%- endmacro %} diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers_defaults_t1.j2 b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers_defaults_t1.j2 new file mode 100644 index 00000000000..c7c98bfe429 --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers_defaults_t1.j2 @@ -0,0 +1,47 @@ + +{%- set default_cable = '40m' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,64) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "10443264", + "type": "ingress", + "mode": "dynamic", + "xoff": "4625920" + }, + "egress_lossy_pool": { + "size": "8877440", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "15982720", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"1518", + "static_th":"3995680" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, +{%- endmacro %} diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/pg_profile_lookup.ini b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/pg_profile_lookup.ini new file mode 100644 index 00000000000..7222f801492 --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold xon_offset + 10000 5m 1248 2288 35776 -4 2288 + 25000 5m 1248 2288 53248 -4 2288 + 40000 5m 1248 2288 66560 -4 2288 + 50000 5m 1248 2288 79872 -4 2288 + 100000 5m 1248 2288 165568 -4 2288 + 10000 40m 1248 2288 37024 -4 2288 + 25000 40m 1248 2288 56160 -4 2288 + 40000 40m 1248 2288 71552 -4 2288 + 50000 40m 1248 2288 85696 -4 2288 + 100000 40m 1248 2288 177632 -4 2288 + 10000 300m 1248 2288 46176 -4 2288 + 25000 300m 1248 2288 79040 -4 2288 + 40000 300m 1248 2288 108160 -4 2288 + 50000 300m 1248 2288 131456 -4 2288 + 100000 300m 1248 2288 268736 -4 2288 diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/port_config.ini b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/port_config.ini index 8b09a1e71f7..1922a3e04b5 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/port_config.ini +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/port_config.ini @@ -1,65 +1,65 @@ -# name lanes alias index -Ethernet0 101,102 fortyGigE1/1/1 0 -Ethernet1 103,104 fortyGigE1/1/2 1 -Ethernet2 97,98 fortyGigE1/1/3 2 -Ethernet3 99,100 fortyGigE1/1/4 3 -Ethernet4 69,70 fortyGigE1/1/5 4 -Ethernet5 71,72 fortyGigE1/1/6 5 -Ethernet6 65,66 fortyGigE1/1/7 6 -Ethernet7 67,68 fortyGigE1/1/8 7 -Ethernet8 53,54 fortyGigE1/1/9 8 -Ethernet9 55,56 fortyGigE1/1/10 9 -Ethernet10 49,50 fortyGigE1/1/11 10 -Ethernet11 51,52 fortyGigE1/1/12 11 -Ethernet12 21,22 fortyGigE1/1/13 12 -Ethernet13 23,24 fortyGigE1/1/14 13 -Ethernet14 17,18 fortyGigE1/1/15 14 -Ethernet15 19,20 fortyGigE1/1/16 15 -Ethernet16 25,26 fortyGigE1/2/1 16 -Ethernet17 27,28 fortyGigE1/2/2 17 -Ethernet18 29,30 fortyGigE1/2/3 18 -Ethernet19 31,32 fortyGigE1/2/4 19 -Ethernet20 57,58 fortyGigE1/2/5 20 -Ethernet21 59,60 fortyGigE1/2/6 21 -Ethernet22 61,62 fortyGigE1/2/7 22 -Ethernet23 63,64 fortyGigE1/2/8 23 -Ethernet24 73,74 fortyGigE1/2/9 24 -Ethernet25 75,76 fortyGigE1/2/10 25 -Ethernet26 77,78 fortyGigE1/2/11 26 -Ethernet27 79,80 fortyGigE1/2/12 27 -Ethernet28 105,106 fortyGigE1/2/13 28 -Ethernet29 107,108 fortyGigE1/2/14 29 -Ethernet30 109,110 fortyGigE1/2/15 30 -Ethernet31 111,112 fortyGigE1/2/16 31 -Ethernet32 13,14 fortyGigE1/3/1 32 -Ethernet33 15,16 fortyGigE1/3/2 33 -Ethernet34 9,10 fortyGigE1/3/3 34 -Ethernet35 11,12 fortyGigE1/3/4 35 -Ethernet36 125,126 fortyGigE1/3/5 36 -Ethernet37 127,128 fortyGigE1/3/6 37 -Ethernet38 121,122 fortyGigE1/3/7 38 -Ethernet39 123,124 fortyGigE1/3/8 39 -Ethernet40 93,94 fortyGigE1/3/9 40 -Ethernet41 95,96 fortyGigE1/3/10 41 -Ethernet42 89,90 fortyGigE1/3/11 42 -Ethernet43 91,92 fortyGigE1/3/12 43 -Ethernet44 45,46 fortyGigE1/3/13 44 -Ethernet45 47,48 fortyGigE1/3/14 45 -Ethernet46 41,42 fortyGigE1/3/15 46 -Ethernet47 43,44 fortyGigE1/3/16 47 -Ethernet48 113,114 fortyGigE1/4/1 48 -Ethernet49 115,116 fortyGigE1/4/2 49 -Ethernet50 117,118 fortyGigE1/4/3 50 -Ethernet51 119,120 fortyGigE1/4/4 51 -Ethernet52 1,2 fortyGigE1/4/5 52 -Ethernet53 3,4 fortyGigE1/4/6 53 -Ethernet54 5,6 fortyGigE1/4/7 54 -Ethernet55 7,8 fortyGigE1/4/8 55 -Ethernet56 33,34 fortyGigE1/4/9 56 -Ethernet57 35,36 fortyGigE1/4/10 57 -Ethernet58 37,38 fortyGigE1/4/11 58 -Ethernet59 39,40 fortyGigE1/4/12 59 -Ethernet60 81,82 fortyGigE1/4/13 60 -Ethernet61 83,84 fortyGigE1/4/14 61 -Ethernet62 85,86 fortyGigE1/4/15 62 -Ethernet63 87,88 fortyGigE1/4/16 63 +# name lanes alias index speed +Ethernet0 101,102 fortyGigE1/1/1 0 40000 +Ethernet1 103,104 fortyGigE1/1/2 1 40000 +Ethernet2 97,98 fortyGigE1/1/3 2 40000 +Ethernet3 99,100 fortyGigE1/1/4 3 40000 +Ethernet4 69,70 fortyGigE1/1/5 4 40000 +Ethernet5 71,72 fortyGigE1/1/6 5 40000 +Ethernet6 65,66 fortyGigE1/1/7 6 40000 +Ethernet7 67,68 fortyGigE1/1/8 7 40000 +Ethernet8 53,54 fortyGigE1/1/9 8 40000 +Ethernet9 55,56 fortyGigE1/1/10 9 40000 +Ethernet10 49,50 fortyGigE1/1/11 10 40000 +Ethernet11 51,52 fortyGigE1/1/12 11 40000 +Ethernet12 21,22 fortyGigE1/1/13 12 40000 +Ethernet13 23,24 fortyGigE1/1/14 13 40000 +Ethernet14 17,18 fortyGigE1/1/15 14 40000 +Ethernet15 19,20 fortyGigE1/1/16 15 40000 +Ethernet16 25,26 fortyGigE1/2/1 16 40000 +Ethernet17 27,28 fortyGigE1/2/2 17 40000 +Ethernet18 29,30 fortyGigE1/2/3 18 40000 +Ethernet19 31,32 fortyGigE1/2/4 19 40000 +Ethernet20 57,58 fortyGigE1/2/5 20 40000 +Ethernet21 59,60 fortyGigE1/2/6 21 40000 +Ethernet22 61,62 fortyGigE1/2/7 22 40000 +Ethernet23 63,64 fortyGigE1/2/8 23 40000 +Ethernet24 73,74 fortyGigE1/2/9 24 40000 +Ethernet25 75,76 fortyGigE1/2/10 25 40000 +Ethernet26 77,78 fortyGigE1/2/11 26 40000 +Ethernet27 79,80 fortyGigE1/2/12 27 40000 +Ethernet28 105,106 fortyGigE1/2/13 28 40000 +Ethernet29 107,108 fortyGigE1/2/14 29 40000 +Ethernet30 109,110 fortyGigE1/2/15 30 40000 +Ethernet31 111,112 fortyGigE1/2/16 31 40000 +Ethernet32 13,14 fortyGigE1/3/1 32 40000 +Ethernet33 15,16 fortyGigE1/3/2 33 40000 +Ethernet34 9,10 fortyGigE1/3/3 34 40000 +Ethernet35 11,12 fortyGigE1/3/4 35 40000 +Ethernet36 125,126 fortyGigE1/3/5 36 40000 +Ethernet37 127,128 fortyGigE1/3/6 37 40000 +Ethernet38 121,122 fortyGigE1/3/7 38 40000 +Ethernet39 123,124 fortyGigE1/3/8 39 40000 +Ethernet40 93,94 fortyGigE1/3/9 40 40000 +Ethernet41 95,96 fortyGigE1/3/10 41 40000 +Ethernet42 89,90 fortyGigE1/3/11 42 40000 +Ethernet43 91,92 fortyGigE1/3/12 43 40000 +Ethernet44 45,46 fortyGigE1/3/13 44 40000 +Ethernet45 47,48 fortyGigE1/3/14 45 40000 +Ethernet46 41,42 fortyGigE1/3/15 46 40000 +Ethernet47 43,44 fortyGigE1/3/16 47 40000 +Ethernet48 113,114 fortyGigE1/4/1 48 40000 +Ethernet49 115,116 fortyGigE1/4/2 49 40000 +Ethernet50 117,118 fortyGigE1/4/3 50 40000 +Ethernet51 119,120 fortyGigE1/4/4 51 40000 +Ethernet52 1,2 fortyGigE1/4/5 52 40000 +Ethernet53 3,4 fortyGigE1/4/6 53 40000 +Ethernet54 5,6 fortyGigE1/4/7 54 40000 +Ethernet55 7,8 fortyGigE1/4/8 55 40000 +Ethernet56 33,34 fortyGigE1/4/9 56 40000 +Ethernet57 35,36 fortyGigE1/4/10 57 40000 +Ethernet58 37,38 fortyGigE1/4/11 58 40000 +Ethernet59 39,40 fortyGigE1/4/12 59 40000 +Ethernet60 81,82 fortyGigE1/4/13 60 40000 +Ethernet61 83,84 fortyGigE1/4/14 61 40000 +Ethernet62 85,86 fortyGigE1/4/15 62 40000 +Ethernet63 87,88 fortyGigE1/4/16 63 40000 diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/qos.json b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/qos.json index 32f337770c0..99642cf8cf4 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/qos.json +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/qos.json @@ -3,24 +3,36 @@ "AZURE": { "0": "0", "1": "1", + "2": "2", "3": "3", - "4": "4" + "4": "4", + "5": "5", + "6": "6", + "7": "7" } }, "MAP_PFC_PRIORITY_TO_QUEUE": { "AZURE": { "0": "0", "1": "1", + "2": "2", "3": "3", - "4": "4" + "4": "4", + "5": "5", + "6": "6", + "7": "7" } }, "TC_TO_QUEUE_MAP": { "AZURE": { "0": "0", "1": "1", + "2": "2", "3": "3", - "4": "4" + "4": "4", + "5": "5", + "6": "6", + "7": "7" } }, "DSCP_TO_TC_MAP": { @@ -92,30 +104,30 @@ } }, "SCHEDULER": { - "scheduler.0": { + "scheduler.0" : { "type":"DWRR", "weight": "25" }, - "scheduler.1": { + "scheduler.1" : { "type":"DWRR", "weight": "30" }, - "scheduler.2": { + "scheduler.2" : { "type":"DWRR", "weight": "20" } }, "PORT_QOS_MAP": { "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP:AZURE]", - "tc_to_queue_map" : "[TC_TO_QUEUE_MAP:AZURE]", - "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP:AZURE]", - "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE:AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", "pfc_enable": "3,4" } }, "WRED_PROFILE": { - "AZURE_LOSSY": { + "AZURE_LOSSY" : { "wred_green_enable":"true", "wred_yellow_enable":"true", "ecn":"ecn_all", @@ -126,7 +138,7 @@ "green_max_threshold": "184320", "green_min_threshold": "184320" }, - "AZURE_LOSSLESS": { + "AZURE_LOSSLESS" : { "wred_green_enable":"true", "wred_yellow_enable":"true", "ecn":"ecn_all", @@ -139,18 +151,17 @@ } }, "QUEUE": { - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63:0-1" : { - "wred_profile" : "[WRED_PROFILE:AZURE]" + "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63|0-1" : { + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]" }, - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63:3-4" : { - "scheduler" : "[SCHEDULER:scheduler.0]", - "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]" + "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63|3-4" : { + "scheduler" : "[SCHEDULER|scheduler.0]" }, - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63:0" : { - "scheduler" : "[SCHEDULER:scheduler.1]" + "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63|0" : { + "scheduler" : "[SCHEDULER|scheduler.1]" }, - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63:1" : { - "scheduler" : "[SCHEDULER:scheduler.2]" + "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63|1" : { + "scheduler" : "[SCHEDULER|scheduler.2]" } } } diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/sai.profile b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/sai.profile deleted file mode 100644 index ee286905f90..00000000000 --- a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/sai.profile +++ /dev/null @@ -1 +0,0 @@ -SAI_INIT_CONFIG_FILE=/etc/bcm/th-s6100-64x40G.config.bcm diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/sai.profile.j2 b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/sai.profile.j2 new file mode 100644 index 00000000000..92cda77668f --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/sai.profile.j2 @@ -0,0 +1,13 @@ +{# Get sai.profile based on switch_role #} +{%- if DEVICE_METADATA is defined -%} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%} +{%- if switch_role.lower() == 'torrouter' %} +{% set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/etc/bcm/th-s6100-64x40G-t0.config.bcm' -%} +{%- else %} +{%- set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/etc/bcm/th-s6100-64x40G-t1.config.bcm' -%} +{%- endif %} +{%- else %} +{%- set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/etc/bcm/th-s6100-64x40G-t1.config.bcm' -%} +{%- endif %} +{# Write the contents of sai_ profile_filename to sai.profile file #} +{{ sai_profile_contents }} diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/led_proc_init.soc b/device/dell/x86_64-dell_s6100_c2538-r0/led_proc_init.soc new file mode 100644 index 00000000000..a4a44f15bcf --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/led_proc_init.soc @@ -0,0 +1,13 @@ +# LED microprocessor initialization for Dell S6100 + +led 0 stop +led 0 prog 02 00 60 FE 2E FE 67 2C 86 FE 67 5B 67 5B 67 5B 86 FE 2E FE 67 2C 86 FE 86 FE 06 FE D2 40 71 04 12 FF 85 05 D2 05 71 2A 52 00 3A A0 32 08 97 71 33 77 5B 32 00 32 01 B7 97 75 42 12 BC FE FE 02 0A 50 12 BC FE FE 95 75 4C 85 77 54 16 FF DA 02 71 5B 77 54 22 0E 87 22 0E 87 57 22 0F 87 22 0F 87 57 22 0F 87 22 0E 87 57 +led 0 auto on +led 0 start + +led 1 stop +led 1 prog 02 00 60 FE 2E FE 67 2C 86 FE 67 5B 67 5B 67 5B 86 FE 2E FE 67 2C 86 FE 86 FE 06 FE D2 40 71 04 12 FF 85 05 D2 05 71 2A 52 00 3A A0 32 08 97 71 33 77 5B 32 00 32 01 B7 97 75 42 12 BC FE FE 02 0A 50 12 BC FE FE 95 75 4C 85 77 54 16 FF DA 02 71 5B 77 54 22 0E 87 22 0E 87 57 22 0F 87 22 0F 87 57 22 0F 87 22 0E 87 57 +led 1 auto on +led 1 start + +led 2 stop diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/minigraph.xml b/device/dell/x86_64-dell_s6100_c2538-r0/minigraph.xml index 37fba6c291b..224cf4a9a6b 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/minigraph.xml +++ b/device/dell/x86_64-dell_s6100_c2538-r0/minigraph.xml @@ -5,7 +5,7 @@ ARISTA01T1 10.0.0.1 - switch1 + sonic 10.0.0.0 1 180 @@ -14,7 +14,7 @@ ARISTA02T1 10.0.0.5 - switch1 + sonic 10.0.0.4 1 180 @@ -23,7 +23,7 @@ ARISTA03T1 10.0.0.9 - switch1 + sonic 10.0.0.8 1 180 @@ -32,7 +32,7 @@ ARISTA04T1 10.0.0.13 - switch1 + sonic 10.0.0.12 1 180 @@ -41,7 +41,7 @@ ARISTA01T1 FC00::2 - switch1 + sonic FC00::1 1 180 @@ -50,7 +50,7 @@ ARISTA02T1 FC00::A - switch1 + sonic FC00::9 1 180 @@ -59,7 +59,7 @@ ARISTA03T1 FC00::12 - switch1 + sonic FC00::11 1 180 @@ -68,7 +68,7 @@ ARISTA04T1 FC00::1A - switch1 + sonic FC00::19 1 180 @@ -78,7 +78,7 @@ 64601 - switch1 + sonic BGPPeer @@ -187,7 +187,7 @@ - switch1 + sonic PortChannelInterface @@ -298,7 +298,7 @@ ARISTA01T1 Ethernet1 true - switch1 + sonic fortyGigE1/1/1 @@ -308,7 +308,7 @@ ARISTA01T1 Ethernet2 true - switch1 + sonic fortyGigE1/1/2 @@ -318,7 +318,7 @@ ARISTA02T1 Ethernet1 true - switch1 + sonic fortyGigE1/1/5 @@ -328,7 +328,7 @@ ARISTA02T1 Ethernet2 true - switch1 + sonic fortyGigE1/1/6 @@ -338,7 +338,7 @@ ARISTA03T1 Ethernet1 true - switch1 + sonic fortyGigE1/2/1 @@ -348,7 +348,7 @@ ARISTA03T1 Ethernet2 true - switch1 + sonic fortyGigE1/2/2 @@ -358,7 +358,7 @@ ARISTA04T1 Ethernet1 true - switch1 + sonic fortyGigE1/2/5 @@ -368,14 +368,14 @@ ARISTA04T1 Ethernet2 true - switch1 + sonic fortyGigE1/2/6 DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/7 true server-01 @@ -385,7 +385,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/8 true server-02 @@ -395,7 +395,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/9 true server-03 @@ -405,7 +405,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/10 true server-04 @@ -415,7 +415,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/11 true server-05 @@ -425,7 +425,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/12 true server-06 @@ -435,7 +435,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/13 true server-07 @@ -445,7 +445,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/14 true server-08 @@ -455,7 +455,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/15 true server-09 @@ -465,7 +465,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/16 true server-10 @@ -475,7 +475,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/1 true server-11 @@ -485,7 +485,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/5 true server-12 @@ -495,7 +495,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/6 true server-13 @@ -505,7 +505,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/7 true server-14 @@ -515,7 +515,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/8 true server-15 @@ -525,7 +525,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/9 true server-16 @@ -535,7 +535,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/10 true server-17 @@ -545,7 +545,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/11 true server-18 @@ -555,7 +555,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/7 true server-19 @@ -565,7 +565,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/8 true server-20 @@ -575,7 +575,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/9 true server-21 @@ -585,7 +585,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/10 true server-22 @@ -595,7 +595,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/11 true server-23 @@ -605,7 +605,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/12 true server-24 @@ -615,7 +615,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/13 true server-25 @@ -625,7 +625,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/14 true server-26 @@ -635,7 +635,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/15 true server-27 @@ -645,7 +645,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/16 true server-28 @@ -655,7 +655,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/1 true server-29 @@ -665,7 +665,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/5 true server-30 @@ -675,7 +675,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/6 true server-31 @@ -685,7 +685,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/7 true server-32 @@ -695,7 +695,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/8 true server-33 @@ -705,7 +705,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/9 true server-34 @@ -715,7 +715,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/10 true server-35 @@ -725,7 +725,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/11 true server-36 @@ -734,7 +734,7 @@ - switch1 + sonic Force10-S6100 @@ -742,7 +742,7 @@ - switch1 + sonic DhcpResources @@ -769,6 +769,6 @@ - switch1 + sonic Force10-S6100 diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py b/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py index 83452f69aaa..5f9661a51e3 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py +++ b/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py @@ -20,10 +20,11 @@ def __init__(self): # Get a mailbox register def get_pmc_register(self, reg_name): - mailbox_dir = "/sys/devices/platform/dell_s6100_lpc" + mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1" retval = 'ERR' mb_reg_file = mailbox_dir+'/' + reg_name if (not os.path.isfile(mb_reg_file)): + logging.error(mb_reg_file, "not found !") return retval try: @@ -52,7 +53,7 @@ def get_psu_status(self, index): faulty """ status = 0 - psu_status = self.get_pmc_register('psu_'+str(index)+'_status') + psu_status = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_status != 'ERR'): psu_status = int(psu_status, 16) # Check for PSU statuse @@ -69,7 +70,7 @@ def get_psu_presence(self, index): :return: Boolean, True if PSU is plugged, False if not """ status = 0 - psu_presence = self.get_pmc_register('psu_'+str(index)+'_status') + psu_presence = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_presence != 'ERR'): psu_presence = int(psu_presence, 16) # Check for PSU presence diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/minigraph.xml b/device/dell/x86_64-dell_z9100_c2538-r0/minigraph.xml index b45892801ed..e1d42d180fe 100644 --- a/device/dell/x86_64-dell_z9100_c2538-r0/minigraph.xml +++ b/device/dell/x86_64-dell_z9100_c2538-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic hundredGigE1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/2 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/3 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/4 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/5 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/6 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/7 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/8 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/9 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/10 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/11 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/12 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/13 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/14 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/15 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/16 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/17 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/18 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/19 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/20 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/21 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/22 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/23 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/24 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Force10-Z9100 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Force10-Z9100 diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py b/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py index 2ad6ae7d149..66253850e6f 100644 --- a/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py +++ b/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py @@ -20,10 +20,11 @@ def __init__(self): # Get a mailbox register def get_pmc_register(self, reg_name): - mailbox_dir = "/sys/devices/platform/dell_mailbox" + mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1" retval = 'ERR' mb_reg_file = mailbox_dir+'/' + reg_name if (not os.path.isfile(mb_reg_file)): + logging.error(mb_reg_file, "not found !") return retval try: @@ -52,7 +53,7 @@ def get_psu_status(self, index): faulty """ status = 0 - psu_status = self.get_pmc_register('psu_'+str(index)+'_status') + psu_status = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_status != 'ERR'): psu_status = int(psu_status, 16) # Check for PSU statuse @@ -69,7 +70,7 @@ def get_psu_presence(self, index): :return: Boolean, True if PSU is plugged, False if not """ status = 0 - psu_presence = self.get_pmc_register('psu_'+str(index)+'_status') + psu_presence = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_presence != 'ERR'): psu_presence = int(psu_presence, 16) # Check for PSU presence diff --git a/device/delta/x86_64-delta_ag5648-r0/Delta-ag5648/port_config.ini b/device/delta/x86_64-delta_ag5648-r0/Delta-ag5648/port_config.ini new file mode 100644 index 00000000000..ace4228d861 --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/Delta-ag5648/port_config.ini @@ -0,0 +1,55 @@ +# name lanes alias +Ethernet0 65 twentyfiveGigE1 +Ethernet4 66 twentyfiveGigE2 +Ethernet8 67 twentyfiveGigE3 +Ethernet12 68 twentyfiveGigE4 +Ethernet16 69 twentyfiveGigE5 +Ethernet20 70 twentyfiveGigE6 +Ethernet24 71 twentyfiveGigE7 +Ethernet28 72 twentyfiveGigE8 +Ethernet32 81 twentyfiveGigE9 +Ethernet36 82 twentyfiveGigE10 +Ethernet40 83 twentyfiveGigE11 +Ethernet44 84 twentyfiveGigE12 +Ethernet48 85 twentyfiveGigE13 +Ethernet52 86 twentyfiveGigE14 +Ethernet56 87 twentyfiveGigE15 +Ethernet60 88 twentyfiveGigE16 +Ethernet64 33 twentyfiveGigE17 +Ethernet68 34 twentyfiveGigE18 +Ethernet72 35 twentyfiveGigE19 +Ethernet76 36 twentyfiveGigE20 +Ethernet80 37 twentyfiveGigE21 +Ethernet84 38 twentyfiveGigE22 +Ethernet88 39 twentyfiveGigE23 +Ethernet92 40 twentyfiveGigE24 +Ethernet96 42 twentyfiveGigE25 +Ethernet100 41 twentyfiveGigE26 +Ethernet104 44 twentyfiveGigE27 +Ethernet108 43 twentyfiveGigE28 +Ethernet112 49 twentyfiveGigE29 +Ethernet116 50 twentyfiveGigE30 +Ethernet120 51 twentyfiveGigE31 +Ethernet124 52 twentyfiveGigE32 +Ethernet128 53 twentyfiveGigE33 +Ethernet132 54 twentyfiveGigE34 +Ethernet136 55 twentyfiveGigE35 +Ethernet140 56 twentyfiveGigE36 +Ethernet144 97 twentyfiveGigE37 +Ethernet148 98 twentyfiveGigE38 +Ethernet152 99 twentyfiveGigE39 +Ethernet156 100 twentyfiveGigE40 +Ethernet160 101 twentyfiveGigE41 +Ethernet164 102 twentyfiveGigE42 +Ethernet168 103 twentyfiveGigE43 +Ethernet172 104 twentyfiveGigE44 +Ethernet176 105 twentyfiveGigE45 +Ethernet180 106 twentyfiveGigE46 +Ethernet184 107 twentyfiveGigE47 +Ethernet188 108 twentyfiveGigE48 +Ethernet192 117,118,119,120 hundredGigE51 +Ethernet196 109,110,111,112 hundredGigE51 +Ethernet200 5,6,7,8 hundredGigE51 +Ethernet204 1,2,3,4 hundredGigE52 +Ethernet208 21,22,23,24 hundredGigE53 +Ethernet212 9,10,11,12 hundredGigE54 diff --git a/device/delta/x86_64-delta_ag5648-r0/Delta-ag5648/sai.profile b/device/delta/x86_64-delta_ag5648-r0/Delta-ag5648/sai.profile new file mode 100644 index 00000000000..142de3e860c --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/Delta-ag5648/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th-ag5648-48x25G+6x100G.config.bcm diff --git a/device/delta/x86_64-delta_ag5648-r0/fancontrol b/device/delta/x86_64-delta_ag5648-r0/fancontrol new file mode 100644 index 00000000000..2666ad97d9c --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/fancontrol @@ -0,0 +1,10 @@ +INTERVAL=10 +DEVPATH=hwmon1=/sys/bus/i2c/devices +DEVNAME=hwmon1=emc2305 +FCTEMPS=DEVPATH/2-004d/hwmon/hwmon*/temp1_input DEVPATH/3-0049/hwmon/hwmon*/temp1_input DEVPATH/3-004b/hwmon/hwmon*/temp1_input DEVPATH/3-004c/hwmon/hwmon*/temp1_input DEVPATH/3-004e/hwmon/hwmon*/temp1_input DEVPATH/3-004f/hwmon/hwmon*/temp1_input DEVPATH/6-0059/temp1_input DEVPATH/6-0058/temp1_input + +FCFANS=DEVPATH/3-004d/fan1_input DEVPATH/3-004d/fan2_input DEVPATH/3-004d/fan3_input DEVPATH/3-004d/fan4_input DEVPATH/5-004d/fan1_input DEVPATH/5-004d/fan2_input DEVPATH/5-004d/fan3_input DEVPATH/5-004d/fan4_input +MINTEMP=20 +MAXTEMP=60 +MINSTART=75 +MINSTOP=22 diff --git a/device/delta/x86_64-delta_ag5648-r0/fancontrol.service b/device/delta/x86_64-delta_ag5648-r0/fancontrol.service new file mode 100755 index 00000000000..ace4392f436 --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/fancontrol.service @@ -0,0 +1,262 @@ +#!/bin/bash +# +# Simple script implementing a temperature dependent fan speed control +# Supported Linux kernel versions: 2.6.5 and later +# +# Version 0.70 +# +# Usage: fancontrol.service [CONFIGFILE] +# +# Dependencies: +# bash, egrep, sed, cut, sleep, readlink, lm_sensors :) +# +# Please send any questions, comments or success stories to +# marius.reiner@hdev.de +# Thanks! +# +# For configuration instructions and warnings please see fancontrol.txt, which +# can be found in the doc/ directory or at the website mentioned above. +# +# +# Copyright 2003 Marius Reiner +# Copyright (C) 2007-2009 Jean Delvare +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA. +# +# + +PIDFILE="/var/run/fancontrol.pid" + +#DEBUG=1 +MAX=255 + +function LoadConfig +{ + local fcvcount fcv + + echo "Loading configuration from $1 ..." + if [ ! -r "$1" ] + then + echo "Error: Can't read configuration file" >&2 + exit 1 + fi + + # grep configuration from file + INTERVAL=`egrep '^INTERVAL=.*$' $1 | sed -e 's/INTERVAL=//g'` + DEVPATH=`egrep '^DEVPATH=.*$' $1 | sed -e 's/DEVPATH= *//g'` + DEVNAME=`egrep '^DEVNAME=.*$' $1 | sed -e 's/DEVNAME= *//g'` + FCTEMPS=`egrep '^FCTEMPS=.*$' $1 | sed -e 's/FCTEMPS=//g'` + MINTEMP=`egrep '^MINTEMP=.*$' $1 | sed -e 's/MINTEMP=//g'` + MAXTEMP=`egrep '^MAXTEMP=.*$' $1 | sed -e 's/MAXTEMP=//g'` + MINSTART=`egrep '^MINSTART=.*$' $1 | sed -e 's/MINSTART=//g'` + MINSTOP=`egrep '^MINSTOP=.*$' $1 | sed -e 's/MINSTOP=//g'` + HWMON=$( echo "$DEVPATH" | sed 's/=.*$//g') + FCDEVPATH=$( echo "$DEVPATH" | sed 's/^.*=//g') + FCMINTEMP=$MINTEMP + FCMAXTEMP=$MAXTEMP + FCMINSTART=$MINSTART + FCMINSTOP=$MINSTOP + + FCFANS=`egrep '^FCFANS=.*$' $1 | sed -e 's/FCFANS=//g'` + + # Check whether all mandatory settings are set + if [[ -z ${INTERVAL} || -z ${FCTEMPS} || -z ${MINTEMP} || -z ${MAXTEMP} || -z ${MINSTART} || -z ${MINSTOP} ]] + then + echo "Some mandatory settings missing, please check your config file!" >&2 + exit 1 + fi + if [ "$INTERVAL" -le 0 ] + then + echo "Error in configuration file:" >&2 + echo "INTERVAL must be at least 1" >&2 + exit 1 + fi + + # write settings to arrays for easier use and print them + echo "Common settings:" + + temp_string=$FCTEMPS + + let fcvcount=0 + for fcv in $FCTEMPS + do + fcvcount=$((fcvcount+1)) + AFCTEMP[$fcvcount]=$( echo "$temp_string" | cut -d" " -f $fcvcount ) + AFCTEMP[$fcvcount]=$( echo "${AFCTEMP[$fcvcount]}" | sed 's/DEVPATH/\/sys\/bus\/i2c\/devices/g' ) + AFCTEMP_PATH[$fcvcount]=$( echo "${AFCTEMP[$fcvcount]}" | sed 's/DEVPATH/\/sys\/bus\/i2c\/devices/g' ) + + #if [ $fcvcount -eq 5 ];then + #echo "0x00" > '/sys/bus/i2c/devices/6-0058/psu_select_member' + # AFCTEMP[$fcvcount]=$( cat ${AFCTEMP[$fcvcount]} ) + #elif [ $fcvcount -eq 6 ];then + #echo "0x20" > '/sys/bus/i2c/devices/6-0058/psu_select_member' + # AFCTEMP[$fcvcount]=$( cat ${AFCTEMP[$fcvcount]} ) + #else + # AFCTEMP[$fcvcount]=$( cat ${AFCTEMP[$fcvcount]} ) + #fi + AFCTEMP[$fcvcount]=$( cat ${AFCTEMP[$fcvcount]} ) + AFCTEMP[$fcvcount]=$(( AFCTEMP[$fcvcount]/1000 )) + echo "AFCTEMP[$fcvcount]=${AFCTEMP[$fcvcount]} (Celsius)" + done + + fan_string=$FCFANS + fcvcount=0 + zero=0 + for fcv in $FCFANS + do + fcvcount=$((fcvcount+1)) + AFCFAN[$fcvcount]=$( echo "$fan_string" | cut -d" " -f $fcvcount ) + AFCFAN_PATH[$fcvcount]=$( echo "${AFCFAN[$fcvcount]}" | sed 's/DEVPATH/\/sys\/bus\/i2c\/devices/g' ) + AFCFAN_TARGET[$fcvcount]=$( echo "${AFCFAN_PATH[$fcvcount]}" | sed 's/DEVPATH/\/sys\/bus\/i2c\/devices/g' ) + AFCFAN_TARGET[$fcvcount]=$( echo "${AFCFAN_TARGET[$fcvcount]}" | sed 's/$/_percentage/g') + AFCFAN[$fcvcount]=$( cat ${AFCFAN_PATH[$fcvcount]} ) + if [ "${AFCFAN[$fcvcount]}" == 960 ] + then + AFCFAN[$fcvcount]=$zero + fi + echo "AFCFAN[$fcvcount]=${AFCFAN[$fcvcount]} (rpm)" + done + echo "INTERVAL=$INTERVAL" + echo "DEVPATH=$FCDEVPATH" + echo "MINTEMP=$FCMINTEMP" + echo "MAXTEMP=$FCMAXTEMP" + echo "MINSTART=$FCMINSTART" + echo "MINSTOP=$FCMINSTOP" +} + +# Check that all referenced sysfs files exist +function CheckFiles +{ + local outdated=0 fcvcount tsen fan + if [ $outdated -eq 1 ] + then + echo >&2 + echo "At least one referenced file is missing. Either some required kernel" >&2 + echo "modules haven't been loaded, or your configuration file is outdated." >&2 + echo "In the latter case, you should run pwmconfig again." >&2 + fi + return $outdated +} + +LoadConfig $1 + +# Detect path to sensors +if [ ! -d $DIR ] +then + echo $0: 'No sensors found! (did you load the necessary modules?)' >&2 + exit 1 +fi +cd $DIR + +# Check for configuration change +if [ "$DIR" != "/" ] && [ -z "$DEVPATH" -o -z "$DEVNAME" ] +then + echo "Configuration is too old, please run pwmconfig again" >&2 + exit 1 +fi +if [ "$DIR" = "/" -a -n "$DEVPATH" ] +then + echo "Unneeded DEVPATH with absolute device paths" >&2 + exit 1 +fi +CheckFiles || exit 1 + +if [ -f "$PIDFILE" ] +then + echo "File $PIDFILE exists, is fancontrol already running?" >&2 + exit 1 +fi +echo $$ > "$PIDFILE" + + +# main function +function UpdateThermalSensors +{ + echo "" + TEMP_HIGHEST=0 + FAN_PERCENTAGE=0 + + for i in ${AFCTEMP_PATH[@]}; do + if (( $(cat $i) > $TEMP_HIGHEST )); then + TEMP_HIGHEST=$(cat $i); + fi; + done + TEMP_HIGHEST=$((TEMP_HIGHEST/1000)) + echo "The highest temperature of thermal sensors: $TEMP_HIGHEST C" + +} + +function UpdateFanSpeeds +{ + if [ $TEMP_HIGHEST -lt 51 ]; then #TEMP<=50 + FAN_PERCENTAGE=40 + elif [ $TEMP_HIGHEST -lt 56 -a $TEMP_HIGHEST -gt 50 ]; then #50 ${AFCFAN_TARGET[$fcvcount]} + AFCFAN[$fcvcount]=$( cat ${AFCFAN_PATH[$fcvcount]} ) + + if [ "${AFCFAN[$fcvcount]}" == 960 ] + then + AFCFAN[$fcvcount]=$zero + fi + echo "AFCFAN[$fcvcount]=${AFCFAN[$fcvcount]} (rpm)" + done + + if [ $TEMP_HIGHEST -lt 51 ]; then #TEMP<=50 + FAN_ON_PSU_PERCENTAGE=50 + elif [ $TEMP_HIGHEST -lt 100 -a $TEMP_HIGHEST -gt 50 ]; then #50 '/sys/bus/i2c/devices/4-0058/psu_select_member' + echo "$FAN_ON_PSU_PERCENTAGE" > '/sys/bus/i2c/devices/6-0059/fan1_set_percentage' + echo "PSU fan1 =$( cat '/sys/bus/i2c/devices/6-0059/fan1_input' ) (rpm)" + #Set speed to PSU_FAN2 + #echo "0x20" > '/sys/bus/i2c/devices/6-0058/psu_select_member' + echo "$FAN_ON_PSU_PERCENTAGE" > '/sys/bus/i2c/devices/6-0058/fan1_set_percentage' + echo "PSU fan2 =$( cat '/sys/bus/i2c/devices/6-0058/fan1_input' ) (rpm)" + + rm -f "$PIDFILE" +} +# main loop calling the main function at specified intervals +while true +do + UpdateThermalSensors + UpdateFanSpeeds + echo "Sleep $INTERVAL seconds ..." + # Sleep while still handling signals + sleep $INTERVAL & + wait $! +done diff --git a/device/delta/x86_64-delta_ag5648-r0/installer.conf b/device/delta/x86_64-delta_ag5648-r0/installer.conf new file mode 100644 index 00000000000..fa2af8b7a00 --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/installer.conf @@ -0,0 +1,2 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_SPEED=115200 diff --git a/device/delta/x86_64-delta_ag5648-r0/led_proc_init.soc b/device/delta/x86_64-delta_ag5648-r0/led_proc_init.soc new file mode 100755 index 00000000000..a329017fbde --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/led_proc_init.soc @@ -0,0 +1,67 @@ +#AG5648 LED + +led 0 stop +led 0 prog \ + 02 00 60 E0 02 A0 60 E2 86 ED 02 00 60 E1 67 EF \ + 71 1F 2E E0 32 08 97 02 00 0E 02 60 E3 77 2A 2E \ + E0 32 08 97 02 00 0E 03 60 E3 2E E0 32 00 32 01 \ + B7 97 02 00 0E 00 12 E7 FE E1 50 67 EF 71 49 86 \ + E0 86 E1 06 E1 D2 04 74 2A 02 00 60 E1 12 E7 FE \ + E1 05 60 EC 12 E3 FE E1 05 0A 03 71 61 67 EB 77 \ + 63 67 CB 67 EF 71 76 12 E3 FE E1 05 0A 02 71 74 \ + 67 EB 77 76 67 CB 12 E3 FE E1 05 0A 01 71 87 67 \ + EB 67 EF 71 97 77 8D 67 CB 67 EF 71 97 86 E1 06 \ + E1 D2 04 74 4D 77 A5 06 E0 28 32 08 97 71 A3 67 \ + EB 77 A5 67 D7 06 E2 67 EF 71 B1 F2 04 60 E2 77 \ + B7 F2 01 60 E2 86 E0 06 E0 D2 24 74 0A 67 EB 67 \ + EB 67 EB 67 EB 67 EB 67 EB 3A 72 67 EF 71 E7 06 \ + EC D2 00 70 E7 77 DD 06 EC D2 00 70 EB 16 ED 99 \ + 99 1A 00 71 E7 77 EB 32 0F 87 57 32 0E 87 57 16 \ + E0 DA 0C 57 00 00 00 00 00 00 00 00 00 00 00 00 +led 0 auto on +led 0 start + +led 1 stop +led 1 prog \ + 02 00 60 E0 02 A0 60 E2 86 E6 02 00 60 E1 2E E0 \ + 32 08 97 02 00 0E 03 60 E3 2E E0 32 00 32 01 B7 \ + 97 02 00 0E 00 12 E4 FE E1 50 12 E4 05 60 E5 12 \ + E3 05 0A 03 71 3A 67 83 77 3C 67 7F 12 E3 05 0A \ + 01 71 47 67 83 77 49 67 7F 06 E0 28 32 08 97 71 \ + 55 67 83 77 57 67 6F 06 E2 F2 01 60 E2 86 E0 06 \ + E0 D2 24 74 0A 67 83 67 83 67 83 67 83 3A 70 06 \ + E5 D2 00 70 83 16 E6 99 99 1A 00 71 7F 77 83 32 \ + 0F 87 57 32 0E 87 57 00 00 00 00 00 00 00 00 00 +led 1 auto on +led 1 start + +# LED0 port order remap +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=47 REMAP_PORT_1=47 REMAP_PORT_2=47 REMAP_PORT_3=47 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=47 REMAP_PORT_5=47 REMAP_PORT_6=47 REMAP_PORT_7=47 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=31 REMAP_PORT_9=30 REMAP_PORT_10=29 REMAP_PORT_11=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=47 REMAP_PORT_13=47 REMAP_PORT_14=47 REMAP_PORT_15=47 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=47 REMAP_PORT_17=47 REMAP_PORT_18=47 REMAP_PORT_19=47 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=35 REMAP_PORT_21=34 REMAP_PORT_22=33 REMAP_PORT_23=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=23 REMAP_PORT_25=22 REMAP_PORT_26=21 REMAP_PORT_27=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=27 REMAP_PORT_29=26 REMAP_PORT_30=25 REMAP_PORT_31=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=47 REMAP_PORT_33=47 REMAP_PORT_34=47 REMAP_PORT_35=47 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=15 REMAP_PORT_41=14 REMAP_PORT_42=13 REMAP_PORT_43=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=19 REMAP_PORT_49=18 REMAP_PORT_50=17 REMAP_PORT_51=16 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0 + +# LED1 port order remap +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=19 REMAP_PORT_1=18 REMAP_PORT_2=17 REMAP_PORT_3=16 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=23 REMAP_PORT_5=22 REMAP_PORT_6=21 REMAP_PORT_7=20 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=26 REMAP_PORT_9=27 REMAP_PORT_10=24 REMAP_PORT_11=25 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63 REMAP_PORT_13=63 REMAP_PORT_14=63 REMAP_PORT_15=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=31 REMAP_PORT_17=30 REMAP_PORT_18=29 REMAP_PORT_19=28 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=35 REMAP_PORT_21=34 REMAP_PORT_22=33 REMAP_PORT_23=32 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=63 REMAP_PORT_25=63 REMAP_PORT_26=63 REMAP_PORT_27=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=63 REMAP_PORT_29=63 REMAP_PORT_30=63 REMAP_PORT_31=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=3 REMAP_PORT_33=2 REMAP_PORT_34=1 REMAP_PORT_35=0 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=7 REMAP_PORT_37=6 REMAP_PORT_38=5 REMAP_PORT_39=4 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=11 REMAP_PORT_49=10 REMAP_PORT_50=9 REMAP_PORT_51=8 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=15 REMAP_PORT_53=14 REMAP_PORT_54=13 REMAP_PORT_55=12 + diff --git a/device/delta/x86_64-delta_ag5648-r0/minigraph.xml b/device/delta/x86_64-delta_ag5648-r0/minigraph.xml new file mode 100644 index 00000000000..37c952f49c3 --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/minigraph.xml @@ -0,0 +1,1184 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + sonic + 10.0.0.32 + 1 + 180 + 60 + + + sonic + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + sonic + 10.0.0.34 + 1 + 180 + 60 + + + sonic + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + sonic + 10.0.0.36 + 1 + 180 + 60 + + + sonic + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + sonic + 10.0.0.38 + 1 + 180 + 60 + + + sonic + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + sonic + 10.0.0.40 + 1 + 180 + 60 + + + sonic + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + sonic + 10.0.0.42 + 1 + 180 + 60 + + + sonic + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + sonic + 10.0.0.44 + 1 + 180 + 60 + + + sonic + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + sonic + 10.0.0.46 + 1 + 180 + 60 + + + sonic + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + sonic + 10.0.0.48 + 1 + 180 + 60 + + + sonic + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + sonic + 10.0.0.50 + 1 + 180 + 60 + + + sonic + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + sonic + 10.0.0.52 + 1 + 180 + 60 + + + sonic + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + sonic + 10.0.0.54 + 1 + 180 + 60 + + + sonic + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + sonic + 10.0.0.56 + 1 + 180 + 60 + + + sonic + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + sonic + 10.0.0.58 + 1 + 180 + 60 + + + sonic + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + sonic + 10.0.0.60 + 1 + 180 + 60 + + + sonic + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + sonic + 10.0.0.62 + 1 + 180 + 60 + + + sonic + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + sonic + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + sonic + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + Ethernet128 + 10.0.0.64/31 + + + + Ethernet132 + 10.0.0.66/31 + + + + Ethernet136 + 10.0.0.68/31 + + + + Ethernet140 + 10.0.0.70/31 + + + + Ethernet144 + 10.0.0.72/31 + + + + Ethernet148 + 10.0.0.74/31 + + + + Ethernet152 + 10.0.0.76/31 + + + + Ethernet156 + 10.0.0.78/31 + + + + Ethernet160 + 10.0.0.80/31 + + + + Ethernet164 + 10.0.0.82/31 + + + + Ethernet168 + 10.0.0.84/31 + + + + Ethernet172 + 10.0.0.86/31 + + + + Ethernet176 + 10.0.0.88/31 + + + + Ethernet180 + 10.0.0.90/31 + + + + Ethernet184 + 10.0.0.92/31 + + + + Ethernet188 + 10.0.0.94/31 + + + + Ethernet192 + 10.0.0.96/31 + + + + Ethernet196 + 10.0.0.98/31 + + + + Ethernet200 + 10.0.0.100/31 + + + + Ethernet204 + 10.0.0.102/31 + + + + Ethernet208 + 10.0.0.104/31 + + + + Ethernet212 + 10.0.0.106/31 + + + + + + + + + + + + DeviceInterfaceLink + sonic + Ethernet0 + ARISTA01T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet4 + ARISTA02T2 + Ethernet8 + + + DeviceInterfaceLink + sonic + Ethernet8 + ARISTA03T2 + Ethernet12 + + + DeviceInterfaceLink + sonic + Ethernet12 + ARISTA04T2 + Ethernet16 + + + DeviceInterfaceLink + sonic + Ethernet16 + ARISTA05T2 + Ethernet20 + + + DeviceInterfaceLink + sonic + Ethernet20 + ARISTA06T2 + Ethernet24 + + + DeviceInterfaceLink + sonic + Ethernet24 + ARISTA07T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet28 + ARISTA08T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet32 + ARISTA09T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet36 + ARISTA10T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet40 + ARISTA11T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet44 + ARISTA12T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet48 + ARISTA13T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet52 + ARISTA14T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet56 + ARISTA15T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet60 + ARISTA16T2 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet64 + ARISTA01T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet68 + ARISTA02T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet72 + ARISTA03T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet76 + ARISTA04T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet80 + ARISTA05T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet84 + ARISTA06T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet88 + ARISTA07T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet92 + ARISTA08T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet96 + ARISTA09T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet100 + ARISTA10T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet104 + ARISTA11T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet108 + ARISTA12T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet112 + ARISTA13T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet116 + ARISTA14T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet120 + ARISTA15T0 + Ethernet4 + + + DeviceInterfaceLink + sonic + Ethernet124 + ARISTA16T0 + Ethernet4 + + + + + sonic + Delta-ag5648 + + + + + + + sonic + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + sonic + Delta-ag5648 +
diff --git a/device/delta/x86_64-delta_ag5648-r0/plugins/eeprom.py b/device/delta/x86_64-delta_ag5648-r0/plugins/eeprom.py new file mode 100644 index 00000000000..786e1fdc85e --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/plugins/eeprom.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +############################################################################# +# Mellanox +# +# Platform and model specific eeprom subclass, inherits from the base class, +# and provides the followings: +# - the eeprom format definition +# - specific encoder/decoder if there is special need +############################################################################# + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + + _TLV_INFO_MAX_LEN = 256 + + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/devices/pci0000:00/0000:00:13.0/i2c-1/i2c-2/2-0053/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/delta/x86_64-delta_ag5648-r0/plugins/psuutil.py b/device/delta/x86_64-delta_ag5648-r0/plugins/psuutil.py new file mode 100644 index 00000000000..0d17ff05681 --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/plugins/psuutil.py @@ -0,0 +1,56 @@ +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/6-00{}/" + self.psu_oper_status = "in1_input" + self.psu_presence = "i2cget -y 6 0x{} 0x00" + + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + + :return: An integer, the number of PSUs available on the device + """ + return 2 + + def get_psu_status(self, index): + if index is None: + return False + Base_bus_number = 57 + status = 0 + try: + with open(self.psu_path.format(index + Base_bus_number) + self.psu_oper_status, 'r') as power_status: + if int(power_status.read()) == 0 : + return False + else: + status = 1 + except IOError: + return False + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + Base_bus_number = 49 + status = 0 + try: + p = os.popen(self.psu_presence.format(index + Base_bus_number)+ "> /dev/null 2>&1") + if p.readline() != None: + status = 1 + p.close() + except IOError: + return False + return status == 1 + + diff --git a/device/delta/x86_64-delta_ag5648-r0/plugins/sfputil.py b/device/delta/x86_64-delta_ag5648-r0/plugins/sfputil.py new file mode 100644 index 00000000000..70d658e4018 --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/plugins/sfputil.py @@ -0,0 +1,203 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_START_QSFP = 48 + PORT_END = 53 + PORTS_IN_BLOCK = 54 + + EEPROM_OFFSET = 10 + + _port_to_eeprom_mapping = {} + + @property + def port_start(self): + return self.PORT_START + @property + def port_start_qsfp(self): + return self.PORT_START_QSFP + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_ports(self): + return range(0, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom" + + for x in range(0, self.port_end + 1): + if x > self.port_start_qsfp -1 and x < self.port_end + 1: + self.get_response(x) + self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) + SfpUtilBase.__init__(self) + + def get_response(self, port_num): + # Check for invalid port_num + if port_num < self.port_start_qsfp or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/delta-ag5648-cpld.0/sfp_response", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # set the bit corresponding to our port + mask = (port_num + 1) % 8 - 1 + mask = 1 << mask + + # Convert our register value back to a hex string and write back + content = hex(mask) + reg_file.seek(0) + reg_file.write(content) + reg_file.close() + + return True + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/delta-ag5648-cpld.0/sfp_present") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # ModPrsL is active low + if reg_value & mask == 0: + return True + + return False + + def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/delta-ag5648-cpld.0/sfp_lpmode") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # LPMode is active high + if reg_value & mask == 0: + return False + + return True + + def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start_qsfp or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/delta-ag5648-cpld.0/sfp_lpmode", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # LPMode is active high; set or clear the bit accordingly + if lpmode is True: + reg_value = reg_value | mask + else: + reg_value = reg_value & ~mask + + # Convert our register value back to a hex string and write back + content = hex(reg_value) + + reg_file.seek(0) + reg_file.write(content) + reg_file.close() + + return True + + def reset(self, port_num): + QSFP_RESET_REGISTER_DEVICE_FILE = "/sys/devices/platform/delta-ag5648-cpld.0/sfp_reset" + + # Check for invalid port_num + if port_num < self.port_start_qsfp or port_num > self.port_end: + return False + + try: + reg_file = open(QSFP_RESET_REGISTER_DEVICE_FILE, "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # File content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # ResetL is active low + reg_value = reg_value & ~mask + + # Convert our register value back to a hex string and write back + reg_file.seek(0) + reg_file.write(hex(reg_value)) + reg_file.close() + + # Sleep 1 second to allow it to settle + time.sleep(1) + + # Flip the bit back high and write back to the register to take port out of reset + try: + reg_file = open(QSFP_RESET_REGISTER_DEVICE_FILE, "w") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_value | mask + reg_file.seek(0) + reg_file.write(hex(reg_value)) + reg_file.close() + + return True diff --git a/device/delta/x86_64-delta_ag5648-r0/sensors.conf b/device/delta/x86_64-delta_ag5648-r0/sensors.conf new file mode 100644 index 00000000000..ff71a21a747 --- /dev/null +++ b/device/delta/x86_64-delta_ag5648-r0/sensors.conf @@ -0,0 +1,91 @@ +# libsensors configuration file for AG5648 +# ------------------------------------------------ +# + +bus "i2c-2" "i2c-1-mux (chan_id 0)" +bus "i2c-3" "i2c-1-mux (chan_id 1)" +bus "i2c-4" "i2c-1-mux (chan_id 2)" +bus "i2c-5" "i2c-1-mux (chan_id 3)" +bus "i2c-6" "i2c-1-mux (chan_id 4)" +bus "i2c-7" "i2c-1-mux (chan_id 5)" + +# tmp75-i2c-2-4d board sensor near Left of front vents. +# tmp75-i2c-3-49 board sensor near MAC. +# tmp75-i2c-3-4b board sensor near Middle of front vents. +# tmp75-i2c-3-4c board sensor near Right of front vents. +# tmp75-i2c-3-4e board sensor near DC fan. +# tmp75-i2c-3-4f board sensor near CPU. + +chip "tmp75-i2c-2-4d" + label temp1 "board sensor near Left of front vents" + set temp1_max 60 + set temp1_max_hyst 55 + +chip "tmp75-i2c-3-49" + label temp1 "board sensor near MAC" + set temp1_max 85 + set temp1_max_hyst 80 + +chip "tmp75-i2c-3-4b" + label temp1 "board sensor near Middle of front vents" + set temp1_max 70 + set temp1_max_hyst 65 + +chip "tmp75-i2c-3-4c" + label temp1 "board sensor near Right of front vents" + set temp1_max 65 + set temp1_max_hyst 60 + +chip "tmp75-i2c-3-4e" + label temp1 "board sensor near DC fan" + set temp1_max 60 + set temp1_max_hyst 55 + +chip "tmp75-i2c-3-4f" + label temp1 "board sensor near CPU" + set temp1_max 80 + set temp1_max_hyst 75 + +chip "emc2305-i2c-3-4d" + label fan1 "FANTRAY 1 REAR" + label fan2 "FANTRAY 2 REAR" + label fan3 "FANTRAY 3 REAR" + label fan4 "FANTRAY 4 REAR" + +chip "emc2305-i2c-5-4d" + label fan1 "FANTRAY 1 FRONT" + label fan2 "FANTRAY 2 FRONT" + label fan3 "FANTRAY 3 FRONT" + label fan4 "FANTRAY 4 FRONT" + +chip "ltc4215-i2c-3-40" + label in1 "PSU Hot-Swap voltage 1" + label in2 "PSU Hot-Swap voltage 2" + label power1 "PSU Hot-Swap power" + label curr1 "PSU Hot-Swap current" + +chip "ltc4215-i2c-3-42" + label in1 "PSU Hot-Swap voltage 1" + label in2 "PSU Hot-Swap voltage 2" + label power1 "PSU Hot-Swap power" + label curr1 "PSU Hot-Swap current" + +chip "dni_ag5648_psu-i2c-6-59" + label in1 "PSU voltage 1" + label in2 "PSU voltage 2" + label fan1 "PSU fan" + label temp1 "PSU temperature" + label power1 "PSU power1" + label power2 "PSU power2" + label curr1 "PSU current1" + label curr2 "PSU current2" + +chip "dni_ag5648_psu-i2c-6-58" + label in1 "PSU voltage 1" + label in2 "PSU voltage 2" + label fan1 "PSU fan" + label temp1 "PSU temperature" + label power1 "PSU power1" + label power2 "PSU power2" + label curr1 "PSU current1" + label curr2 "PSU current2" \ No newline at end of file diff --git a/device/delta/x86_64-delta_ag9032v1-r0/Delta-ag9032v1/port_config.ini b/device/delta/x86_64-delta_ag9032v1-r0/Delta-ag9032v1/port_config.ini index e000f29bef3..4fb783847b0 100644 --- a/device/delta/x86_64-delta_ag9032v1-r0/Delta-ag9032v1/port_config.ini +++ b/device/delta/x86_64-delta_ag9032v1-r0/Delta-ag9032v1/port_config.ini @@ -1,16 +1,16 @@ # name lanes alias -Ethernet0 49,50,51,52 hundredGigE1/1 -Ethernet4 53,54,55,56 hundredGigE1/2 -Ethernet8 57,58,59,60 hundredGigE1/3 -Ethernet12 61,62,63,64 hundredGigE1/4 -Ethernet16 65,66,67,68 hundredGigE1/5 -Ethernet20 69,70,71,72 hundredGigE1/6 -Ethernet24 73,74,75,76 hundredGigE1/7 -Ethernet28 77,78,79,80 hundredGigE1/8 -Ethernet32 37,38,39,40 hundredGigE1/9 -Ethernet36 33,34,35,36 hundredGigE1/10 -Ethernet40 45,46,47,48 hundredGigE1/11 -Ethernet44 41,42,43,44 hundredGigE1/12 +Ethernet0 41,42,43,44 hundredGigE1/1 +Ethernet4 45,46,47,48 hundredGigE1/2 +Ethernet8 49,50,51,52 hundredGigE1/3 +Ethernet12 37,38,39,40 hundredGigE1/4 +Ethernet16 33,34,35,36 hundredGigE1/5 +Ethernet20 53,54,55,56 hundredGigE1/6 +Ethernet24 57,58,59,60 hundredGigE1/7 +Ethernet28 61,62,63,64 hundredGigE1/8 +Ethernet32 65,66,67,68 hundredGigE1/9 +Ethernet36 69,70,71,72 hundredGigE1/10 +Ethernet40 73,74,75,76 hundredGigE1/11 +Ethernet44 77,78,79,80 hundredGigE1/12 Ethernet48 81,82,83,84 hundredGigE1/13 Ethernet52 85,86,87,88 hundredGigE1/14 Ethernet56 89,90,91,92 hundredGigE1/15 @@ -19,15 +19,15 @@ Ethernet64 97,98,99,100 hundredGigE1/17 Ethernet68 101,102,103,104 hundredGigE1/18 Ethernet72 105,106,107,108 hundredGigE1/19 Ethernet76 109,110,111,112 hundredGigE1/20 -Ethernet80 21,22,23,24 hundredGigE1/21 -Ethernet84 17,18,19,20 hundredGigE1/22 -Ethernet88 29,30,31,32 hundredGigE1/23 -Ethernet92 25,26,27,28 hundredGigE1/24 -Ethernet96 117,118,119,120 hundredGigE1/25 -Ethernet100 113,114,115,116 hundredGigE1/26 -Ethernet104 125,126,127,128 hundredGigE1/27 -Ethernet108 121,122,123,124 hundredGigE1/28 -Ethernet112 5,6,7,8 hundredGigE1/29 -Ethernet116 1,2,3,4 hundredGigE1/30 -Ethernet120 13,14,15,16 hundredGigE1/31 -Ethernet124 9,10,11,12 hundredGigE1/32 +Ethernet80 121,122,123,124 hundredGigE1/21 +Ethernet84 113,114,115,116 hundredGigE1/22 +Ethernet88 1,2,3,4 hundredGigE1/23 +Ethernet92 117,118,119,120 hundredGigE1/24 +Ethernet96 5,6,7,8 hundredGigE1/25 +Ethernet100 125,126,127,128 hundredGigE1/26 +Ethernet104 29,30,31,32 hundredGigE1/27 +Ethernet108 9,10,11,12 hundredGigE1/28 +Ethernet112 13,14,15,16 hundredGigE1/29 +Ethernet116 25,26,27,28 hundredGigE1/30 +Ethernet120 17,18,19,20 hundredGigE1/31 +Ethernet124 21,22,23,24 hundredGigE1/32 diff --git a/device/delta/x86_64-delta_ag9032v1-r0/fancontrol.service b/device/delta/x86_64-delta_ag9032v1-r0/fancontrol.service index 17f647effb5..83f14245d1b 100755 --- a/device/delta/x86_64-delta_ag9032v1-r0/fancontrol.service +++ b/device/delta/x86_64-delta_ag9032v1-r0/fancontrol.service @@ -69,6 +69,17 @@ function LoadConfig FCMAXTEMP=$MAXTEMP FCMINSTART=$MINSTART FCMINSTOP=$MINSTOP + AFCTEMP_1_LOWER=(00 39 36 41 46 55) + AFCTEMP_1_UPPER=(39 39 44 49 54 150) + AFCTEMP_2_LOWER=(00 61 65 69 73 82) + AFCTEMP_2_UPPER=(63 67 71 75 79 150) + AFCTEMP_3_LOWER=(00 51 55 59 63 71) + AFCTEMP_3_UPPER=(53 57 61 65 69 150) + AFCTEMP_4_LOWER=(00 46 50 54 58 65) + AFCTEMP_4_UPPER=(45 52 56 60 64 150) + AFCTEMP_5_LOWER=(00 46 50 54 58 65) + AFCTEMP_5_UPPER=(45 52 56 60 64 150) + FCFANS=`egrep '^FCFANS=.*$' $1 | sed -e 's/FCFANS=//g'` @@ -98,7 +109,6 @@ function LoadConfig AFCTEMP[$fcvcount]=$( echo "$temp_string" | cut -d" " -f $fcvcount ) AFCTEMP[$fcvcount]=$( echo "${AFCTEMP[$fcvcount]}" | sed 's/hwmon1/\/sys\/bus\/i2c\/devices/g' ) AFCTEMP_PATH[$fcvcount]=$( echo "${AFCTEMP[$fcvcount]}" | sed 's/hwmon1/\/sys\/bus\/i2c\/devices/g' ) - AFCTEMP[$fcvcount]=$( cat ${AFCTEMP[$fcvcount]} ) AFCTEMP[$fcvcount]=$(( AFCTEMP[$fcvcount]/1000 )) done @@ -165,39 +175,79 @@ then fi echo $$ > "$PIDFILE" - # main function function UpdateThermalSensors { - echo "" - TEMP_HIGHEST=0 - FAN_PERCENTAGE=0 - - for i in ${AFCTEMP_PATH[@]}; do - if (( $(cat $i) > $TEMP_HIGHEST )); then - TEMP_HIGHEST=$(cat $i); - fi; + fcvcount=0 + for fcv in $FCTEMPS + do + fcvcount=$((fcvcount+1)) + AFCTEMP[$fcvcount]=$( cat ${AFCTEMP_PATH[$fcvcount]} ) + AFCTEMP[$fcvcount]=$(( AFCTEMP[$fcvcount]/1000 )) done - TEMP_HIGHEST=$((TEMP_HIGHEST/1000)) - echo "The highest temperature of thermal sensors: $TEMP_HIGHEST °C" +} + +function UpdateThermalLevel +{ + AFCTEMP_NUM=$((6-${AFCTEMP_LEVEL[$i]})) + AFCTEMP_UPPER_BUF=AFCTEMP_"$i"_UPPER["$AFCTEMP_NUM"] + AFCTEMP_LOWER_BUF=AFCTEMP_"$i"_LOWER["$AFCTEMP_NUM"] + + AFCTEMP_UPPER=${!AFCTEMP_UPPER_BUF} + AFCTEMP_LOWER=${!AFCTEMP_LOWER_BUF} + + + if (( ("${AFCTEMP[$i]}" <= "$AFCTEMP_UPPER") && ("${AFCTEMP[$i]}" >= "$AFCTEMP_LOWER") )) ; then + FLAG=2 + elif (( "${AFCTEMP[$i]}" > "$AFCTEMP_UPPER" )); then + AFCTEMP_LEVEL[$i]=$((${AFCTEMP_LEVEL[$i]} - 1)) + FLAG=1 + elif (( "${AFCTEMP[$i]}" < "$AFCTEMP_LOWER" )); then + AFCTEMP_LEVEL[$i]=$((${AFCTEMP_LEVEL[$i]} + 1)) + FLAG=1 + else + AFCTEMP_LEVEL[$i]=1 + FLAG=2 + fi } function UpdateFanSpeeds { - if [ $TEMP_HIGHEST -lt 51 ]; then #TEMP<=50 - FAN_PERCENTAGE=40 - elif [ $TEMP_HIGHEST -lt 56 -a $TEMP_HIGHEST -gt 50 ]; then #50 '/sys/bus/i2c/devices/4-0058/psu_select_member' echo "$FAN_ON_PSU_PERCENTAGE" > '/sys/bus/i2c/devices/40-0058/fan1_set_percentage' echo "PSU fan1 =$( cat '/sys/bus/i2c/devices/40-0058/fan1_input' ) (rpm)" #Set speed to PSU_FAN2 - #echo "0x20" > '/sys/bus/i2c/devices/4-0058/psu_select_member' echo "$FAN_ON_PSU_PERCENTAGE" > '/sys/bus/i2c/devices/41-0058/fan1_set_percentage' echo "PSU fan2 =$( cat '/sys/bus/i2c/devices/41-0058/fan1_input' ) (rpm)" rm -f "$PIDFILE" } + # main loop calling the main function at specified intervals +AFCTEMP_LEVEL=(9 4 4 4 4 4) #inttial level while true do UpdateThermalSensors UpdateFanSpeeds echo "Sleep $INTERVAL seconds ..." + echo # Sleep while still handling signals sleep $INTERVAL & wait $! diff --git a/device/delta/x86_64-delta_ag9032v1-r0/minigraph.xml b/device/delta/x86_64-delta_ag9032v1-r0/minigraph.xml index db8d6244053..129103ce6bf 100644 --- a/device/delta/x86_64-delta_ag9032v1-r0/minigraph.xml +++ b/device/delta/x86_64-delta_ag9032v1-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic hundredGigE1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/2 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/3 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/4 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/5 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/6 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/7 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/8 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/9 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/10 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/11 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/12 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/13 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/14 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/15 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/16 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/17 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/18 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/19 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/20 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/21 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/22 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/23 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/24 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Delta-ag9032v1 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Delta-ag9032v1 diff --git a/device/delta/x86_64-delta_ag9032v1-r0/plugins/psuutil.py b/device/delta/x86_64-delta_ag9032v1-r0/plugins/psuutil.py new file mode 100644 index 00000000000..4b370d9a744 --- /dev/null +++ b/device/delta/x86_64-delta_ag9032v1-r0/plugins/psuutil.py @@ -0,0 +1,57 @@ +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/{}-0058/" + self.psu_oper_status = "in1_input" + self.psu_presence = "i2cget -y {} 0x50 0x00" + + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + + :return: An integer, the number of PSUs available on the device + """ + return 2 + + def get_psu_status(self, index): + if index is None: + return False + Base_bus_number = 39 + status = 0 + #index from 1, psu attribute bus from 40 + try: + with open(self.psu_path.format(index + Base_bus_number) + self.psu_oper_status, 'r') as power_status: + if int(power_status.read()) == 0 : + return False + else: + status = 1 + except IOError: + return False + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + Base_bus_number = 39 + status = 0 + try: + p = os.popen(self.psu_presence.format(index + Base_bus_number)+ "> /dev/null 2>&1") + if p.readline() != None: + status = 1 + p.close() + except IOError: + return False + return status == 1 + + diff --git a/device/delta/x86_64-delta_ag9064-r0/Delta-ag9064/port_config.ini b/device/delta/x86_64-delta_ag9064-r0/Delta-ag9064/port_config.ini new file mode 100644 index 00000000000..2c4eb341369 --- /dev/null +++ b/device/delta/x86_64-delta_ag9064-r0/Delta-ag9064/port_config.ini @@ -0,0 +1,67 @@ +# name lanes alias index +Ethernet0 49,50,51,52 Ethernet1/1 1 +Ethernet4 53,54,55,56 Ethernet2/1 2 +Ethernet8 65,66,67,68 Ethernet3/1 3 +Ethernet12 69,70,71,72 Ethernet4/1 4 +Ethernet16 81,82,83,84 Ethernet5/1 5 +Ethernet20 85,86,87,88 Ethernet6/1 6 +Ethernet24 1,2,3,4 Ethernet7/1 7 +Ethernet28 101,102,103,104 Ethernet8/1 8 +Ethernet32 5,6,7,8 Ethernet9/1 9 +Ethernet36 17,18,19,20 Ethernet10/1 10 +Ethernet40 21,22,23,24 Ethernet11/1 11 +Ethernet44 33,34,35,36 Ethernet12/1 12 +Ethernet48 37,38,39,40 Ethernet13/1 13 +Ethernet52 97,98,99,100 Ethernet14/1 14 +Ethernet56 113,114,115,116 Ethernet15/1 15 +Ethernet60 117,118,119,120 Ethernet16/1 16 +Ethernet64 129,130,131,132 Ethernet17/1 17 +Ethernet68 133,134,135,136 Ethernet18/1 18 +Ethernet72 145,146,147,148 Ethernet19/1 19 +Ethernet76 209,210,211,212 Ethernet20/1 20 +Ethernet80 213,214,215,216 Ethernet21/1 21 +Ethernet84 225,226,227,228 Ethernet22/1 22 +Ethernet88 229,230,231,232 Ethernet23/1 23 +Ethernet92 241,242,243,244 Ethernet24/1 24 +Ethernet96 245,246,247,248 Ethernet25/1 25 +Ethernet100 157,158,159,160 Ethernet26/1 26 +Ethernet104 161,162,163,164 Ethernet27/1 27 +Ethernet108 165,166,167,168 Ethernet28/1 28 +Ethernet112 177,178,179,180 Ethernet29/1 29 +Ethernet116 181,182,183,184 Ethernet30/1 30 +Ethernet120 193,194,195,196 Ethernet31/1 31 +Ethernet124 197,198,199,200 Ethernet32/1 32 +Ethernet128 61,62,63,64 Ethernet33/1 33 +Ethernet132 57,58,59,60 Ethernet34/1 34 +Ethernet136 77,78,79,80 Ethernet35/1 35 +Ethernet140 73,74,75,76 Ethernet36/1 36 +Ethernet144 93,94,95,96 Ethernet37/1 37 +Ethernet148 89,90,91,92 Ethernet38/1 38 +Ethernet152 105,106,107,108 Ethernet39/1 39 +Ethernet156 9,10,11,12 Ethernet40/1 40 +Ethernet160 25,26,27,28 Ethernet41/1 41 +Ethernet164 13,14,15,16 Ethernet42/1 42 +Ethernet168 41,42,43,44 Ethernet43/1 43 +Ethernet172 29,30,31,32 Ethernet44/1 44 +Ethernet176 45,46,47,48 Ethernet45/1 45 +Ethernet180 109,110,111,112 Ethernet46/1 46 +Ethernet184 125,126,127,128 Ethernet47/1 47 +Ethernet188 121,122,123,124 Ethernet48/1 48 +Ethernet192 141,142,143,144 Ethernet49/1 49 +Ethernet196 137,138,139,140 Ethernet50/1 50 +Ethernet200 217,218,219,220 Ethernet51/1 51 +Ethernet204 149,150,151,152 Ethernet52/1 52 +Ethernet208 233,234,235,236 Ethernet53/1 53 +Ethernet212 221,222,223,224 Ethernet54/1 54 +Ethernet216 249,250,251,252 Ethernet55/1 55 +Ethernet220 237,238,239,240 Ethernet56/1 56 +Ethernet224 153,154,155,156 Ethernet57/1 57 +Ethernet228 253,254,255,256 Ethernet58/1 58 +Ethernet232 173,174,175,176 Ethernet59/1 59 +Ethernet236 169,170,171,172 Ethernet60/1 60 +Ethernet240 189,190,191,192 Ethernet61/1 61 +Ethernet244 185,186,187,188 Ethernet62/1 62 +Ethernet248 205,206,207,208 Ethernet63/1 63 +Ethernet252 201,202,203,204 Ethernet64/1 64 +Ethernet256 257 Ethernet65 65 +Ethernet260 259 Ethernet66 66 diff --git a/device/delta/x86_64-delta_ag9064-r0/Delta-ag9064/sai.profile b/device/delta/x86_64-delta_ag9064-r0/Delta-ag9064/sai.profile new file mode 100644 index 00000000000..b2ecd7a6da4 --- /dev/null +++ b/device/delta/x86_64-delta_ag9064-r0/Delta-ag9064/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th2-ag9064-64x100G.config.bcm diff --git a/device/delta/x86_64-delta_ag9064-r0/installer.conf b/device/delta/x86_64-delta_ag9064-r0/installer.conf new file mode 100644 index 00000000000..fa2af8b7a00 --- /dev/null +++ b/device/delta/x86_64-delta_ag9064-r0/installer.conf @@ -0,0 +1,2 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_SPEED=115200 diff --git a/device/delta/x86_64-delta_ag9064-r0/led_proc_init.soc b/device/delta/x86_64-delta_ag9064-r0/led_proc_init.soc new file mode 100644 index 00000000000..2e6f394b121 --- /dev/null +++ b/device/delta/x86_64-delta_ag9064-r0/led_proc_init.soc @@ -0,0 +1,63 @@ +led 0 stop +led 0 prog \ + 02 00 60 E0 02 A0 60 E2 86 ED 02 00 60 E1 2E E0 \ + 32 08 97 02 00 0E 05 60 E3 2E E0 32 00 32 01 B7 \ + 97 02 00 0E 00 12 E7 FE E1 50 86 E0 86 E1 06 E1 \ + D2 04 74 19 16 E7 61 EB 06 E3 12 05 67 92 06 E3 \ + 12 04 67 92 06 E3 12 03 67 92 16 E9 61 EB 06 E5 \ + 12 03 67 92 02 02 60 EC 02 00 60 E1 77 66 02 01 \ + 60 EC 02 00 60 E1 12 E7 FE E1 05 60 EB 12 E3 FE \ + E1 05 16 EC 67 92 86 E1 06 E1 D2 04 74 66 06 EC \ + D2 02 70 5E 06 E2 F2 04 60 E2 06 E0 D2 40 74 0A \ + 3A C0 09 75 A9 06 EB D2 00 70 A5 16 ED 99 99 1A \ + 00 71 A5 77 A9 32 0F 87 57 32 0E 87 57 00 00 00 +led 0 auto on +led 0 start + +led 1 stop +led 1 prog \ + 02 00 60 E0 02 A0 60 E2 86 ED 02 00 60 E1 2E E0 \ + 32 08 97 02 00 0E 05 60 E3 2E E0 32 00 32 01 B7 \ + 97 02 00 0E 00 12 E7 FE E1 50 86 E0 86 E1 06 E1 \ + D2 04 74 19 16 E7 61 EB 06 E3 12 05 67 92 06 E3 \ + 12 04 67 92 06 E3 12 03 67 92 16 E9 61 EB 06 E5 \ + 12 03 67 92 02 02 60 EC 02 00 60 E1 77 66 02 01 \ + 60 EC 02 00 60 E1 12 E7 FE E1 05 60 EB 12 E3 FE \ + E1 05 16 EC 67 92 86 E1 06 E1 D2 04 74 66 06 EC \ + D2 02 70 5E 06 E2 F2 04 60 E2 06 E0 D2 40 74 0A \ + 3A C0 09 75 A9 06 EB D2 00 70 A5 16 ED 99 99 1A \ + 00 71 A5 77 A9 32 0F 87 57 32 0E 87 57 00 00 00 +led 1 auto on +led 1 start + +led 2 stop +led 2 prog \ + 02 00 60 E0 02 A0 60 E2 86 ED 02 00 60 E1 2E E0 \ + 32 08 97 02 00 0E 05 60 E3 2E E0 32 00 32 01 B7 \ + 97 02 00 0E 00 12 E7 FE E1 50 86 E0 86 E1 06 E1 \ + D2 04 74 19 16 E7 61 EB 06 E3 12 05 67 92 06 E3 \ + 12 04 67 92 06 E3 12 03 67 92 16 E9 61 EB 06 E5 \ + 12 03 67 92 02 02 60 EC 02 00 60 E1 77 66 02 01 \ + 60 EC 02 00 60 E1 12 E7 FE E1 05 60 EB 12 E3 FE \ + E1 05 16 EC 67 92 86 E1 06 E1 D2 04 74 66 06 EC \ + D2 02 70 5E 06 E2 F2 04 60 E2 06 E0 D2 40 74 0A \ + 3A C0 09 75 A9 06 EB D2 00 70 A5 16 ED 99 99 1A \ + 00 71 A5 77 A9 32 0F 87 57 32 0E 87 57 00 00 00 +led 2 auto on +led 2 start + +led 3 stop +led 3 prog \ + 02 00 60 E0 02 A0 60 E2 86 ED 02 00 60 E1 2E E0 \ + 32 08 97 02 00 0E 05 60 E3 2E E0 32 00 32 01 B7 \ + 97 02 00 0E 00 12 E7 FE E1 50 86 E0 86 E1 06 E1 \ + D2 04 74 19 16 E7 61 EB 06 E3 12 05 67 92 06 E3 \ + 12 04 67 92 06 E3 12 03 67 92 16 E9 61 EB 06 E5 \ + 12 03 67 92 02 02 60 EC 02 00 60 E1 77 66 02 01 \ + 60 EC 02 00 60 E1 12 E7 FE E1 05 60 EB 12 E3 FE \ + E1 05 16 EC 67 92 86 E1 06 E1 D2 04 74 66 06 EC \ + D2 02 70 5E 06 E2 F2 04 60 E2 06 E0 D2 40 74 0A \ + 3A C0 09 75 A9 06 EB D2 00 70 A5 16 ED 99 99 1A \ + 00 71 A5 77 A9 32 0F 87 57 32 0E 87 57 00 00 00 +led 3 auto on +led 3 start diff --git a/device/delta/x86_64-delta_ag9064-r0/minigraph.xml b/device/delta/x86_64-delta_ag9064-r0/minigraph.xml new file mode 100644 index 00000000000..7a2ece42228 --- /dev/null +++ b/device/delta/x86_64-delta_ag9064-r0/minigraph.xml @@ -0,0 +1,848 @@ + + + + + + + + + + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + sonic + + + + + + Ethernet1/1 + 10.0.0.0/31 + + + + Ethernet2/1 + 10.0.0.2/31 + + + + Ethernet3/1 + 10.0.0.4/31 + + + + Ethernet4/1 + 10.0.0.6/31 + + + + Ethernet5/1 + 10.0.0.8/31 + + + + Ethernet6/1 + 10.0.0.10/31 + + + + Ethernet7/1 + 10.0.0.12/31 + + + + Ethernet8/1 + 10.0.0.14/31 + + + + Ethernet9/1 + 10.0.0.16/31 + + + + Ethernet10/1 + 10.0.0.18/31 + + + + Ethernet11/1 + 10.0.0.20/31 + + + + Ethernet12/1 + 10.0.0.22/31 + + + + Ethernet13/1 + 10.0.0.24/31 + + + + Ethernet14/1 + 10.0.0.26/31 + + + + Ethernet15/1 + 10.0.0.28/31 + + + + Ethernet16/1 + 10.0.0.30/31 + + + + Ethernet17/1 + 10.0.0.32/31 + + + + Ethernet18/1 + 10.0.0.34/31 + + + + Ethernet19/1 + 10.0.0.36/31 + + + + Ethernet20/1 + 10.0.0.38/31 + + + + Ethernet21/1 + 10.0.0.40/31 + + + + Ethernet22/1 + 10.0.0.42/31 + + + + Ethernet23/1 + 10.0.0.44/31 + + + + Ethernet24/1 + 10.0.0.46/31 + + + + Ethernet25/1 + 10.0.0.48/31 + + + + Ethernet26/1 + 10.0.0.50/31 + + + + Ethernet27/1 + 10.0.0.52/31 + + + + Ethernet28/1 + 10.0.0.54/31 + + + + Ethernet29/1 + 10.0.0.56/31 + + + + Ethernet30/1 + 10.0.0.58/31 + + + + Ethernet31/1 + 10.0.0.60/31 + + + + Ethernet32/1 + 10.0.0.62/31 + + + + Ethernet33/1 + 10.0.0.64/31 + + + + Ethernet34/1 + 10.0.0.66/31 + + + + Ethernet35/1 + 10.0.0.68/31 + + + + Ethernet36/1 + 10.0.0.70/31 + + + + Ethernet37/1 + 10.0.0.72/31 + + + + Ethernet38/1 + 10.0.0.74/31 + + + + Ethernet39/1 + 10.0.0.76/31 + + + + Ethernet40/1 + 10.0.0.78/31 + + + + Ethernet41/1 + 10.0.0.80/31 + + + + Ethernet42/1 + 10.0.0.82/31 + + + + Ethernet43/1 + 10.0.0.84/31 + + + + Ethernet44/1 + 10.0.0.86/31 + + + + Ethernet45/1 + 10.0.0.88/31 + + + + Ethernet46/1 + 10.0.0.90/31 + + + + Ethernet47/1 + 10.0.0.92/31 + + + + Ethernet48/1 + 10.0.0.94/31 + + + + Ethernet49/1 + 10.0.0.96/31 + + + + Ethernet50/1 + 10.0.0.98/31 + + + + Ethernet51/1 + 10.0.0.100/31 + + + + Ethernet52/1 + 10.0.0.102/31 + + + + Ethernet53/1 + 10.0.0.104/31 + + + + Ethernet54/1 + 10.0.0.106/31 + + + + Ethernet55/1 + 10.0.0.108/31 + + + + Ethernet56/1 + 10.0.0.110/31 + + + + Ethernet57/1 + 10.0.0.112/31 + + + + Ethernet58/1 + 10.0.0.114/31 + + + + Ethernet59/1 + 10.0.0.116/31 + + + + Ethernet60/1 + 10.0.0.118/31 + + + + Ethernet61/1 + 10.0.0.120/31 + + + + Ethernet62/1 + 10.0.0.122/31 + + + + Ethernet63/1 + 10.0.0.124/31 + + + + Ethernet64/1 + 10.0.0.126/31 + + + + + + + + + + + + DeviceInterfaceLink + sonic-target + Ethernet1/1 + sonic + Ethernet1/1 + + + DeviceInterfaceLink + sonic-target + Ethernet2/1 + sonic + Ethernet2/1 + + + DeviceInterfaceLink + sonic-target + Ethernet3/1 + sonic + Ethernet3/1 + + + DeviceInterfaceLink + sonic-target + Ethernet4/1 + sonic + Ethernet4/1 + + + DeviceInterfaceLink + sonic-target + Ethernet5/1 + sonic + Ethernet5/1 + + + DeviceInterfaceLink + sonic-target + Ethernet6/1 + sonic + Ethernet6/1 + + + DeviceInterfaceLink + sonic-target + Ethernet7/1 + sonic + Ethernet7/1 + + + DeviceInterfaceLink + sonic-target + Ethernet8/1 + sonic + Ethernet8/1 + + + DeviceInterfaceLink + sonic-target + Ethernet9/1 + sonic + Ethernet9/1 + + + DeviceInterfaceLink + sonic-target + Ethernet10/1 + sonic + Ethernet10/1 + + + DeviceInterfaceLink + sonic-target + Ethernet11/1 + sonic + Ethernet11/1 + + + DeviceInterfaceLink + sonic-target + Ethernet12/1 + sonic + Ethernet12/1 + + + DeviceInterfaceLink + sonic-target + Ethernet13/1 + sonic + Ethernet13/1 + + + DeviceInterfaceLink + sonic-target + Ethernet14/1 + sonic + Ethernet14/1 + + + DeviceInterfaceLink + sonic-target + Ethernet15/1 + sonic + Ethernet15/1 + + + DeviceInterfaceLink + sonic-target + Ethernet16/1 + sonic + Ethernet16/1 + + + DeviceInterfaceLink + sonic-target + Ethernet17/1 + sonic + Ethernet17/1 + + + DeviceInterfaceLink + sonic-target + Ethernet18/1 + sonic + Ethernet18/1 + + + DeviceInterfaceLink + sonic-target + Ethernet19/1 + sonic + Ethernet19/1 + + + DeviceInterfaceLink + sonic-target + Ethernet20/1 + sonic + Ethernet20/1 + + + DeviceInterfaceLink + sonic-target + Ethernet21/1 + sonic + Ethernet21/1 + + + DeviceInterfaceLink + sonic-target + Ethernet22/1 + sonic + Ethernet22/1 + + + DeviceInterfaceLink + sonic-target + Ethernet23/1 + sonic + Ethernet23/1 + + + DeviceInterfaceLink + sonic-target + Ethernet24/1 + sonic + Ethernet24/1 + + + DeviceInterfaceLink + sonic-target + Ethernet25/1 + sonic + Ethernet25/1 + + + DeviceInterfaceLink + sonic-target + Ethernet26/1 + sonic + Ethernet26/1 + + + DeviceInterfaceLink + sonic-target + Ethernet27/1 + sonic + Ethernet27/1 + + + DeviceInterfaceLink + sonic-target + Ethernet28/1 + sonic + Ethernet28/1 + + + DeviceInterfaceLink + sonic-target + Ethernet29/1 + sonic + Ethernet29/1 + + + DeviceInterfaceLink + sonic-target + Ethernet30/1 + sonic + Ethernet30/1 + + + DeviceInterfaceLink + sonic-target + Ethernet31/1 + sonic + Ethernet31/1 + + + DeviceInterfaceLink + sonic-target + Ethernet32/1 + sonic + Ethernet32/1 + + + DeviceInterfaceLink + sonic-target + Ethernet33/1 + sonic + Ethernet33/1 + + + DeviceInterfaceLink + sonic-target + Ethernet34/1 + sonic + Ethernet34/1 + + + DeviceInterfaceLink + sonic-target + Ethernet35/1 + sonic + Ethernet35/1 + + + DeviceInterfaceLink + sonic-target + Ethernet36/1 + sonic + Ethernet36/1 + + + DeviceInterfaceLink + sonic-target + Ethernet37/1 + sonic + Ethernet37/1 + + + DeviceInterfaceLink + sonic-target + Ethernet38/1 + sonic + Ethernet38/1 + + + DeviceInterfaceLink + sonic-target + Ethernet39/1 + sonic + Ethernet39/1 + + + DeviceInterfaceLink + sonic-target + Ethernet40/1 + sonic + Ethernet40/1 + + + DeviceInterfaceLink + sonic-target + Ethernet41/1 + sonic + Ethernet41/1 + + + DeviceInterfaceLink + sonic-target + Ethernet42/1 + sonic + Ethernet42/1 + + + DeviceInterfaceLink + sonic-target + Ethernet43/1 + sonic + Ethernet43/1 + + + DeviceInterfaceLink + sonic-target + Ethernet44/1 + sonic + Ethernet44/1 + + + DeviceInterfaceLink + sonic-target + Ethernet45/1 + sonic + Ethernet45/1 + + + DeviceInterfaceLink + sonic-target + Ethernet46/1 + sonic + Ethernet46/1 + + + DeviceInterfaceLink + sonic-target + Ethernet47/1 + sonic + Ethernet47/1 + + + DeviceInterfaceLink + sonic-target + Ethernet48/1 + sonic + Ethernet48/1 + + + DeviceInterfaceLink + sonic-target + Ethernet49/1 + sonic + Ethernet49/1 + + + DeviceInterfaceLink + sonic-target + Ethernet50/1 + sonic + Ethernet50/1 + + + DeviceInterfaceLink + sonic-target + Ethernet51/1 + sonic + Ethernet51/1 + + + DeviceInterfaceLink + sonic-target + Ethernet52/1 + sonic + Ethernet52/1 + + + DeviceInterfaceLink + sonic-target + Ethernet53/1 + sonic + Ethernet53/1 + + + DeviceInterfaceLink + sonic-target + Ethernet54/1 + sonic + Ethernet54/1 + + + DeviceInterfaceLink + sonic-target + Ethernet55/1 + sonic + Ethernet55/1 + + + DeviceInterfaceLink + sonic-target + Ethernet56/1 + sonic + Ethernet56/1 + + + DeviceInterfaceLink + sonic-target + Ethernet57/1 + sonic + Ethernet57/1 + + + DeviceInterfaceLink + sonic-target + Ethernet58/1 + sonic + Ethernet58/1 + + + DeviceInterfaceLink + sonic-target + Ethernet59/1 + sonic + Ethernet59/1 + + + DeviceInterfaceLink + sonic-target + Ethernet60/1 + sonic + Ethernet60/1 + + + DeviceInterfaceLink + sonic-target + Ethernet61/1 + sonic + Ethernet61/1 + + + DeviceInterfaceLink + sonic-target + Ethernet62/1 + sonic + Ethernet62/1 + + + DeviceInterfaceLink + sonic-target + Ethernet63/1 + sonic + Ethernet63/1 + + + DeviceInterfaceLink + sonic-target + Ethernet64/1 + sonic + Ethernet64/1 + + + + + sonic + Delta-ag9064 + + + + + + + sonic + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + ErspanDestinationIpv4 + + 2.2.2.2 + + + + + + + sonic + Delta-ag9064 + diff --git a/device/delta/x86_64-delta_ag9064-r0/plugins/eeprom.py b/device/delta/x86_64-delta_ag9064-r0/plugins/eeprom.py new file mode 100644 index 00000000000..e4048ed302d --- /dev/null +++ b/device/delta/x86_64-delta_ag9064-r0/plugins/eeprom.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +############################################################################# +# Mellanox +# +# Platform and model specific eeprom subclass, inherits from the base class, +# and provides the followings: +# - the eeprom format definition +# - specific encoder/decoder if there is special need +############################################################################# + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + + _TLV_INFO_MAX_LEN = 256 + + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-0056/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/delta/x86_64-delta_ag9064-r0/plugins/sfputil.py b/device/delta/x86_64-delta_ag9064-r0/plugins/sfputil.py new file mode 100644 index 00000000000..d7eadb58036 --- /dev/null +++ b/device/delta/x86_64-delta_ag9064-r0/plugins/sfputil.py @@ -0,0 +1,175 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 63 + PORTS_IN_BLOCK = 64 + + EEPROM_OFFSET = 20 + + _port_to_eeprom_mapping = {} + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_ports(self): + return range(0, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom" + + for x in range(0, self.port_end + 1): + self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) + + SfpUtilBase.__init__(self) + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/delta-ag9064-cpld.0/qsfp_present") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # ModPrsL is active low + if reg_value & mask == 0: + return True + + return False + + def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/delta-ag9064-cpld.0/qsfp_lpmode") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # LPMode is active high + if reg_value & mask == 0: + return False + + return True + + def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/delta-ag9064-cpld.0/qsfp_lpmode", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # LPMode is active high; set or clear the bit accordingly + if lpmode is True: + reg_value = reg_value | mask + else: + reg_value = reg_value & ~mask + + # Convert our register value back to a hex string and write back + content = hex(reg_value) + + reg_file.seek(0) + reg_file.write(content) + reg_file.close() + + return True + + def reset(self, port_num): + QSFP_RESET_REGISTER_DEVICE_FILE = "/sys/devices/platform/delta-ag9064-cpld.0/qsfp_reset" + + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open(QSFP_RESET_REGISTER_DEVICE_FILE, "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # File content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # ResetL is active low + reg_value = reg_value & ~mask + + # Convert our register value back to a hex string and write back + reg_file.seek(0) + reg_file.write(hex(reg_value)) + reg_file.close() + + # Sleep 1 second to allow it to settle + time.sleep(1) + + # Flip the bit back high and write back to the register to take port out of reset + try: + reg_file = open(QSFP_RESET_REGISTER_DEVICE_FILE, "w") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_value | mask + reg_file.seek(0) + reg_file.write(hex(reg_value)) + reg_file.close() + + return True diff --git a/device/delta/x86_64-delta_ag9064-r0/sensors.conf b/device/delta/x86_64-delta_ag9064-r0/sensors.conf new file mode 100644 index 00000000000..1d8489248a5 --- /dev/null +++ b/device/delta/x86_64-delta_ag9064-r0/sensors.conf @@ -0,0 +1,14 @@ +# libsensors configuration file for DCS-7060CX-32S +# ------------------------------------------------ +# + +bus "i2c-1" "i2c-1-mux (chan_id 1)" + + +# tmp75-i2c-1-4d CPU below side thermal sensor. + +chip "tmp75-i2c-1-4d" + label temp1 "CPU below side thermal sensor" + set temp1_max 60 + set temp1_max_hyst 55 + diff --git a/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/plugins/psuutil.py new file mode 100644 index 00000000000..7e69360b040 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-3/3-0051", + "/sys/bus/i2c/devices/i2c-4/4-0051"] + + def __init__(self): + PsuBase.__init__(self) + + + # Get sysfs attribute + def get_attr_value(self, attr_path): + + retval = 'ERR' + if (not os.path.isfile(attr_path)): + return retval + + try: + with open(attr_path, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", attr_path, " file !") + + retval = retval.rstrip('\r\n') + return retval + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + MAX_PSUS = 2 + return MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + status = 0 + attr_file = 'psu_pg' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU status + if (attr_value == 1): + status = 1 + + return status + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + psu_absent = 0 + attr_file ='psu_abs' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (attr_value == 0): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s8900_54xc-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s8900_54xc-r0/plugins/psuutil.py new file mode 100644 index 00000000000..4f226c69fff --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s8900_54xc-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + PSU_CPLD_DIR = "/sys/bus/i2c/devices/0-0033" + + def __init__(self): + PsuBase.__init__(self) + + + # Get sysfs attribute + def get_attr_value(self, attr_path): + + retval = 'ERR' + if (not os.path.isfile(attr_path)): + return retval + + try: + with open(attr_path, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", attr_path, " file !") + + retval = retval.rstrip('\r\n') + return retval + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + MAX_PSUS = 2 + return MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + status = 0 + mask = [ 0x08, 0x10 ] + attr_file = 'cpld_pw_good' + attr_path = self.PSU_CPLD_DIR +'/'+ attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU status + if (attr_value & mask[index-1]): + status = 1 + + return status + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + mask = [ 0x01, 0x02 ] + attr_file ='cpld_pw_abs' + attr_path = self.PSU_CPLD_DIR +'/'+ attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (~attr_value & mask[index-1]): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s8900_64xc-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s8900_64xc-r0/plugins/psuutil.py new file mode 100644 index 00000000000..3af5423daeb --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s8900_64xc-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + PSU_CPLD_DIR = "/sys/bus/i2c/devices/0-0033" + + def __init__(self): + PsuBase.__init__(self) + + + # Get sysfs attribute + def get_attr_value(self, attr_path): + + retval = 'ERR' + if (not os.path.isfile(attr_path)): + return retval + + try: + with open(attr_path, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", attr_path, " file !") + + retval = retval.rstrip('\r\n') + return retval + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + MAX_PSUS = 2 + return MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + status = 0 + mask = [ 0x04, 0x08 ] + attr_file = 'cpld_pw_good' + attr_path = self.PSU_CPLD_DIR +'/'+ attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU status + if (attr_value & mask[index-1]): + status = 1 + + return status + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + mask = [ 0x01, 0x02 ] + attr_file ='cpld_pw_abs' + attr_path = self.PSU_CPLD_DIR +'/'+ attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (~attr_value & mask[index-1]): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9100-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9100-r0/plugins/psuutil.py new file mode 100644 index 00000000000..4f226c69fff --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9100-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + PSU_CPLD_DIR = "/sys/bus/i2c/devices/0-0033" + + def __init__(self): + PsuBase.__init__(self) + + + # Get sysfs attribute + def get_attr_value(self, attr_path): + + retval = 'ERR' + if (not os.path.isfile(attr_path)): + return retval + + try: + with open(attr_path, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", attr_path, " file !") + + retval = retval.rstrip('\r\n') + return retval + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + MAX_PSUS = 2 + return MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + status = 0 + mask = [ 0x08, 0x10 ] + attr_file = 'cpld_pw_good' + attr_path = self.PSU_CPLD_DIR +'/'+ attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU status + if (attr_value & mask[index-1]): + status = 1 + + return status + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + mask = [ 0x01, 0x02 ] + attr_file ='cpld_pw_abs' + attr_path = self.PSU_CPLD_DIR +'/'+ attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (~attr_value & mask[index-1]): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9100-r0/sensors.conf b/device/ingrasys/x86_64-ingrasys_s9100-r0/sensors.conf index c55f5c764e6..5535db7e7eb 100644 --- a/device/ingrasys/x86_64-ingrasys_s9100-r0/sensors.conf +++ b/device/ingrasys/x86_64-ingrasys_s9100-r0/sensors.conf @@ -9,14 +9,24 @@ chip "jc42-*" chip "w83795adg-*" label in0 "1.0V" + set in0_min 1.00 * 0.97 + set in0_max 1.00 * 1.03 label in1 "1.0V_ROV" + set in1_min 1.00 * 0.98 + set in1_max 1.00 * 1.02 label in2 "1.25V" + set in2_min 1.25 * 0.97 + set in2_max 1.25 * 1.03 label in3 "1.8V" + set in3_min 1.80 * 0.97 + set in3_max 1.80 * 1.03 ignore in4 ignore in5 ignore in6 ignore in7 label in12 "+3.3V" + set in12_min 3.30 * 0.97 + set in12_max 3.30 * 1.03 ignore in14 ignore in15 ignore in16 diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps index e69de29bb2d..f9e5396d0cf 100644 --- a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps @@ -0,0 +1,318 @@ +init start stage unit=0 low-level +init set port-map unit=0 port=0 eth-macro=0 lane=0 max-speed=100g active=true +init set port-map unit=0 port=1 eth-macro=1 lane=0 max-speed=100g active=true +init set port-map unit=0 port=2 eth-macro=2 lane=0 max-speed=100g active=true +init set port-map unit=0 port=3 eth-macro=3 lane=0 max-speed=100g active=true +init set port-map unit=0 port=4 eth-macro=4 lane=0 max-speed=100g active=true +init set port-map unit=0 port=5 eth-macro=5 lane=0 max-speed=100g active=true +init set port-map unit=0 port=6 eth-macro=6 lane=0 max-speed=100g active=true +init set port-map unit=0 port=7 eth-macro=7 lane=0 max-speed=100g active=true +init set port-map unit=0 port=8 eth-macro=8 lane=0 max-speed=100g active=true +init set port-map unit=0 port=9 eth-macro=9 lane=0 max-speed=100g active=true +init set port-map unit=0 port=10 eth-macro=10 lane=0 max-speed=100g active=true +init set port-map unit=0 port=11 eth-macro=11 lane=0 max-speed=100g active=true +init set port-map unit=0 port=12 eth-macro=12 lane=0 max-speed=100g active=true +init set port-map unit=0 port=13 eth-macro=13 lane=0 max-speed=100g active=true +init set port-map unit=0 port=14 eth-macro=14 lane=0 max-speed=100g active=true +init set port-map unit=0 port=15 eth-macro=15 lane=0 max-speed=100g active=true +init set port-map unit=0 port=16 eth-macro=16 lane=0 max-speed=100g active=true +init set port-map unit=0 port=17 eth-macro=17 lane=0 max-speed=100g active=true +init set port-map unit=0 port=18 eth-macro=18 lane=0 max-speed=100g active=true +init set port-map unit=0 port=19 eth-macro=19 lane=0 max-speed=100g active=true +init set port-map unit=0 port=20 eth-macro=20 lane=0 max-speed=100g active=true +init set port-map unit=0 port=21 eth-macro=21 lane=0 max-speed=100g active=true +init set port-map unit=0 port=22 eth-macro=22 lane=0 max-speed=100g active=true +init set port-map unit=0 port=23 eth-macro=23 lane=0 max-speed=100g active=true +init set port-map unit=0 port=24 eth-macro=24 lane=0 max-speed=100g active=true +init set port-map unit=0 port=25 eth-macro=25 lane=0 max-speed=100g active=true +init set port-map unit=0 port=26 eth-macro=26 lane=0 max-speed=100g active=true +init set port-map unit=0 port=27 eth-macro=27 lane=0 max-speed=100g active=true +init set port-map unit=0 port=28 eth-macro=28 lane=0 max-speed=100g active=true +init set port-map unit=0 port=29 eth-macro=29 lane=0 max-speed=100g active=true +init set port-map unit=0 port=30 eth-macro=30 lane=0 max-speed=100g active=true +init set port-map unit=0 port=31 eth-macro=31 lane=0 max-speed=100g active=true +init set port-map unit=0 port=129 eth-macro=0 lane=1 max-speed=10g active=true guarantee=true cpi=true +init set port-map unit=0 port=130 eth-macro=0 lane=0 max-speed=10g active=true guarantee=true cpi=true init-done=true +init start stage unit=0 task-rsrc +init start stage unit=0 module +init start stage unit=0 task +phy set lane-swap unit=0 portlist=0 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=1 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=2 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=3 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=4 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=5 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=6 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=7 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=8 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=9 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=10 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=11 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=12 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=13 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=14 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=15 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=16 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=17 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=18 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=19 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=20 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=21 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=22 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=23 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=24 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=25 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=26 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=27 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=28 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=29 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=30 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=31 lane-cnt=4 property=tx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=129 lane-cnt=1 property=tx data=0x1 +phy set lane-swap unit=0 portlist=130 lane-cnt=1 property=tx data=0x0 +phy set lane-swap unit=0 portlist=0 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=1 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=2 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=3 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=4 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=5 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=6 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=7 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=8 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=9 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=10 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=11 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=12 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=13 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=14 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=15 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=16 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=17 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=18 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=19 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=20 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=21 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=22 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=23 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=24 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=25 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=26 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=27 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=28 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=29 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=30 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=31 lane-cnt=4 property=rx data=0x03.02.01.00 +phy set lane-swap unit=0 portlist=129 lane-cnt=1 property=rx data=0x1 +phy set lane-swap unit=0 portlist=130 lane-cnt=1 property=rx data=0x0 +phy set polarity-rev unit=0 portlist=0 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=1 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=2 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=3 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=4 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=5 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=6 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=7 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=8 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=9 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=10 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=11 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=12 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=13 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=14 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=15 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=16 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=17 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=18 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=19 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=20 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=21 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=22 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=23 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=24 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=25 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=26 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=27 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=28 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=29 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=30 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=31 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=129 lane-cnt=1 property=tx data=0x0 +phy set polarity-rev unit=0 portlist=130 lane-cnt=1 property=tx data=0x0 +phy set polarity-rev unit=0 portlist=0 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=1 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=2 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=3 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=4 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=5 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=6 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=7 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=8 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=9 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=10 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=11 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=12 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=13 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=14 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=15 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=16 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=17 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=18 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=19 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=20 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=21 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=22 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=23 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=24 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=25 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=26 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=27 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=28 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=29 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=30 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=31 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=129 lane-cnt=1 property=rx data=0x0 +phy set polarity-rev unit=0 portlist=130 lane-cnt=1 property=rx data=0x0 +phy set pre-emphasis unit=0 portlist=0 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=0 lane-cnt=4 property=cn1 data=0x01.01.01.01 +phy set pre-emphasis unit=0 portlist=0 lane-cnt=4 property=c0 data=0x1A.1A.1A.1A +phy set pre-emphasis unit=0 portlist=0 lane-cnt=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis unit=0 portlist=1 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=1 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=1 lane-cnt=4 property=c0 data=0x1A.1A.1A.1A +phy set pre-emphasis unit=0 portlist=1 lane-cnt=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis unit=0 portlist=2 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=2 lane-cnt=4 property=cn1 data=0x01.01.01.01 +phy set pre-emphasis unit=0 portlist=2 lane-cnt=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis unit=0 portlist=2 lane-cnt=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis unit=0 portlist=3 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=3 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=3 lane-cnt=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis unit=0 portlist=3 lane-cnt=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis unit=0 portlist=4 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=4 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=4 lane-cnt=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis unit=0 portlist=4 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=5 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=5 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=5 lane-cnt=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis unit=0 portlist=5 lane-cnt=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis unit=0 portlist=6 lane-cnt=4 property=c2 data=0x03.03.03.03 +phy set pre-emphasis unit=0 portlist=6 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=6 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=6 lane-cnt=4 property=c1 data=0x05.05.05.05 +phy set pre-emphasis unit=0 portlist=7 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=7 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=7 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=7 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=8 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=8 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=8 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=8 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=9 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=9 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=9 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=9 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=10 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=10 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=10 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=10 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=11 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=11 lane-cnt=4 property=cn1 data=0x01.01.01.01 +phy set pre-emphasis unit=0 portlist=11 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=11 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=12 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=12 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=12 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=12 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=13 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=13 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=13 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=13 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=14 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=14 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=14 lane-cnt=4 property=c0 data=0x1D.1D.1D.1D +phy set pre-emphasis unit=0 portlist=14 lane-cnt=4 property=c1 data=0x05.05.05.05 +phy set pre-emphasis unit=0 portlist=15 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=15 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=15 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=15 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=16 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=16 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=16 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=16 lane-cnt=4 property=c1 data=0x05.05.05.05 +phy set pre-emphasis unit=0 portlist=17 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=17 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=17 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=17 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=18 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=18 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=18 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=18 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=19 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=19 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=19 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=19 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=20 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=20 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=20 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=20 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=21 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=21 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=21 lane-cnt=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis unit=0 portlist=21 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=22 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=22 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=22 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=22 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=23 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=23 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=23 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=23 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=24 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=24 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=24 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=24 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=25 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=25 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=25 lane-cnt=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis unit=0 portlist=25 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=26 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=26 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=26 lane-cnt=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis unit=0 portlist=26 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=27 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=27 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=27 lane-cnt=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis unit=0 portlist=27 lane-cnt=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis unit=0 portlist=28 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=28 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=28 lane-cnt=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis unit=0 portlist=28 lane-cnt=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis unit=0 portlist=29 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=29 lane-cnt=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis unit=0 portlist=29 lane-cnt=4 property=c0 data=0x1A.1A.1A.1A +phy set pre-emphasis unit=0 portlist=29 lane-cnt=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis unit=0 portlist=30 lane-cnt=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis unit=0 portlist=30 lane-cnt=4 property=cn1 data=0x01.01.01.01 +phy set pre-emphasis unit=0 portlist=30 lane-cnt=4 property=c0 data=0x1A.1A.1A.1A +phy set pre-emphasis unit=0 portlist=30 lane-cnt=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis unit=0 portlist=31 lane-cnt=4 property=c2 data=0x01.01.01.01 +phy set pre-emphasis unit=0 portlist=31 lane-cnt=4 property=cn1 data=0x03.03.03.03 +phy set pre-emphasis unit=0 portlist=31 lane-cnt=4 property=c0 data=0x17.17.17.17 +phy set pre-emphasis unit=0 portlist=31 lane-cnt=4 property=c1 data=0x09.09.09.09 +phy set pre-emphasis unit=0 portlist=129 lane-cnt=1 property=c2 data=0x01 +phy set pre-emphasis unit=0 portlist=129 lane-cnt=1 property=cn1 data=0x01 +phy set pre-emphasis unit=0 portlist=129 lane-cnt=1 property=c0 data=0x02 +phy set pre-emphasis unit=0 portlist=129 lane-cnt=1 property=c1 data=0x03 +phy set pre-emphasis unit=0 portlist=130 lane-cnt=1 property=c2 data=0x01 +phy set pre-emphasis unit=0 portlist=130 lane-cnt=1 property=cn1 data=0x01 +phy set pre-emphasis unit=0 portlist=130 lane-cnt=1 property=c0 data=0x02 +phy set pre-emphasis unit=0 portlist=130 lane-cnt=1 property=c1 data=0x03 +port set property unit=0 portlist=0-31 speed=100g +port set property unit=0 portlist=129-130 speed=10g +port set property unit=0 portlist=0-31 medium-type=sr4 +port set property unit=0 portlist=129-130 medium-type=kr +port set property unit=0 portlist=0-31 fec=disable +port set adver unit=0 portlist=129-130 speed-10g-kr +port set property unit=0 portlist=129-130 an=enable +port set property unit=0 portlist=0-31,129-130 admin=enable diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps index b482a7a0b97..d1695e36b59 100644 --- a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps @@ -1,20 +1,9 @@ -#This configuration file is for customer init value feature. Please refer to mtk_cfg.h/mtk_cfg.c for detail. -#1. The lines beginning with # are comment lines. The lines beginning with number are the setting lines. -#2. There are five parameters which can be set. -# 1) the first is unit. -# 2) the second is NPS_CFG_TYPE_XXX. Refer to NPS_CFG_TYPE_T. -# 3) the 3-5 are {param0, param1, value} pairs. Refer to NPS_CFG_VALUE_T. Support HEX format. -# 4) the (unit, NPS_CFG_TYPE_XXX, param0, param1) group is the key to get the correspingding value. -# There should be no same (unit, NPS_CFG_TYPE_XXX, param0, param1) group. -#3. User must follow correct format to apply the setting. Please refer to below commentted example(#0 NPS_CFG_TYPE_L2_ADDR_MODE 0 0 1); -#4. Usage under the linux shell: -# 1) ./image-path/image-name -c cfg-path/NPS_Ari_EVB_24.cfg : mamually specify directory path if they are not in current work dirctory. -# 2) ./image-name -c NPS_Ari_EVB_24.cfg : the image and the NPS_Ari_EVB_24.cfg are in the current work directory. - -#unit NPS_CFG_TYPE_XXX param0 param1 value -#---- ---------------- ------ ------ ----- -0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 -0 NPS_CFG_TYPE_LED_CFG 0 0 1 -0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 0 -0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 0 -0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +#unit NPS_CFG_TYPE_XXX param0 param1 value +#---- ---------------- ------ ------ ----- +0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 +0 NPS_CFG_TYPE_LED_CFG 0 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 1 +0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +0 NPS_CFG_TYPE_HASH_L2_FDB_REGION_ENTRY_NUM 0 0 49152 +0 NPS_CFG_TYPE_HASH_L3_WITH_IPV6_PREFIX_64_REGION_ENTRY_NUM 0 0 32768 diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py index 0f47704ed2c..71ce941f1ab 100644 --- a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py @@ -18,5 +18,5 @@ class board(eeprom_tlvinfo.TlvInfoDecoder): def __init__(self, name, path, cpld_root, ro): - self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0055/eeprom" + self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0051/eeprom" super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..4a029c15b1a --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-10/10-0050", + "/sys/bus/i2c/devices/i2c-9/9-0050"] + + def __init__(self): + PsuBase.__init__(self) + + + # Get sysfs attribute + def get_attr_value(self, attr_path): + + retval = 'ERR' + if (not os.path.isfile(attr_path)): + return retval + + try: + with open(attr_path, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", attr_path, " file !") + + retval = retval.rstrip('\r\n') + return retval + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + MAX_PSUS = 2 + return MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + status = 0 + attr_file = 'psu_pg' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU status + if (attr_value == 1): + status = 1 + + return status + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + psu_absent = 0 + attr_file ='psu_abs' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (attr_value == 0): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/eeprom.py b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/eeprom.py index 3d01608ef7b..64ddb99554b 100644 --- a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/eeprom.py +++ b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/eeprom.py @@ -19,6 +19,6 @@ class board(eeprom_tlvinfo.TlvInfoDecoder): def __init__(self, name, path, cpld_root, ro): i2c_bus = "0" - i2c_addr = "0055" + i2c_addr = "0051" self.eeprom_path = "/sys/class/i2c-adapter/i2c-" + i2c_bus + "/" + i2c_bus + "-" + i2c_addr + "/eeprom" super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..cc996057e09 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-18/18-0050", + "/sys/bus/i2c/devices/i2c-17/17-0050"] + + def __init__(self): + PsuBase.__init__(self) + + + # Get sysfs attribute + def get_attr_value(self, attr_path): + + retval = 'ERR' + if (not os.path.isfile(attr_path)): + return retval + + try: + with open(attr_path, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", attr_path, " file !") + + retval = retval.rstrip('\r\n') + return retval + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + MAX_PSUS = 2 + return MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + status = 0 + attr_file = 'psu_pg' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU status + if (attr_value == 1): + status = 1 + + return status + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + psu_absent = 0 + attr_file ='psu_abs' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (attr_value == 0): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/sensors.conf b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/sensors.conf index ef694e96a05..361a8b73264 100644 --- a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/sensors.conf +++ b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/sensors.conf @@ -48,21 +48,33 @@ chip "w83795adg-*" ignore temp2 ignore temp3 ignore temp4 + ignore temp5 + ignore temp6 ignore intrusion0 + +chip "tmp75-i2c-*-4A" + label temp1 "BMC Board Temp" + set temp1_max 50 + set temp1_max_hyst 45 + +chip "tmp75-i2c-*-4F" + label temp1 "x86 CPU Board Temp" + set temp1_max 50 + set temp1_max_hyst 45 + bus "i2c-6" "i2c-0-mux (chan_id 5)" chip "lm75-i2c-6-4E" label temp1 "MAC Temp" set temp1_max 50 set temp1_max_hyst 45 -bus "i2c-6" "i2c-0-mux (chan_id 5)" chip "lm75-i2c-6-4D" - label temp1 "REAR Temp" + label temp1 "REAR MAC Temp" set temp1_max 50 set temp1_max_hyst 45 bus "i2c-7" "i2c-0-mux (chan_id 6)" chip "lm75-i2c-7-4D" - label temp1 "Front Temp" + label temp1 "Front MAC Temp" set temp1_max 50 set temp1_max_hyst 45 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.ini b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.ini index ddd76b51167..18b9d933a66 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.ini +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.ini @@ -1,65 +1,65 @@ # name lanes alias index -Ethernet0 7,6,5,4 Ethernet1/1 0 -Ethernet4 3,2,1,0 Ethernet2/1 1 -Ethernet8 15,14,13,12 Ethernet3/1 2 -Ethernet12 11,10,9,8 Ethernet4/1 3 -Ethernet16 23,22,21,20 Ethernet5/1 4 -Ethernet20 19,18,17,16 Ethernet6/1 5 -Ethernet24 31,30,29,28 Ethernet7/1 6 -Ethernet28 27,26,25,24 Ethernet8/1 7 -Ethernet32 39,38,37,36 Ethernet9/1 8 -Ethernet36 35,34,33,32 Ethernet10/1 9 -Ethernet40 47,46,45,44 Ethernet11/1 10 -Ethernet44 43,42,41,40 Ethernet12/1 11 -Ethernet48 55,54,53,52 Ethernet13/1 12 -Ethernet52 51,50,49,48 Ethernet14/1 13 -Ethernet56 63,62,61,60 Ethernet15/1 14 -Ethernet60 59,58,57,56 Ethernet16/1 15 -Ethernet64 71,70,69,68 Ethernet17/1 16 -Ethernet68 67,66,65,64 Ethernet18/1 17 -Ethernet72 79,78,77,76 Ethernet19/1 18 -Ethernet76 75,74,73,72 Ethernet20/1 19 -Ethernet80 87,86,85,84 Ethernet21/1 20 -Ethernet84 83,82,81,80 Ethernet22/1 21 -Ethernet88 95,94,93,92 Ethernet23/1 22 -Ethernet92 91,90,89,88 Ethernet24/1 23 -Ethernet96 97,98,99,100 Ethernet25/1 24 -Ethernet100 101,102,103,104 Ethernet26/1 25 -Ethernet104 105,106,107,108 Ethernet27/1 26 -Ethernet108 109,110,111,112 Ethernet28/1 27 -Ethernet112 119,118,117,116 Ethernet29/1 28 -Ethernet116 115,114,113,112 Ethernet30/1 29 -Ethernet120 127,126,125,124 Ethernet31/1 30 -Ethernet124 123,122,121,120 Ethernet32/1 31 -Ethernet128 135,134,133,132 Ethernet33/1 32 -Ethernet132 131,130,129,128 Ethernet34/1 33 -Ethernet136 143,142,141,140 Ethernet35/1 34 -Ethernet140 139,138,137,136 Ethernet36/1 35 -Ethernet144 151,150,149,148 Ethernet37/1 36 -Ethernet148 147,146,145,144 Ethernet38/1 37 -Ethernet152 159,158,157,156 Ethernet39/1 38 -Ethernet156 155,154,153,152 Ethernet40/1 39 -Ethernet160 167,166,165,164 Ethernet41/1 40 -Ethernet164 163,162,161,160 Ethernet42/1 41 -Ethernet168 175,174,173,172 Ethernet43/1 42 -Ethernet172 171,170,169,168 Ethernet44/1 43 -Ethernet176 183,182,181,180 Ethernet45/1 44 -Ethernet180 179,178,177,176 Ethernet46/1 45 -Ethernet184 191,190,189,188 Ethernet47/1 46 -Ethernet188 187,186,185,184 Ethernet48/1 47 -Ethernet192 199,198,197,196 Ethernet49/1 48 -Ethernet196 195,194,193,192 Ethernet50/1 49 -Ethernet200 207,206,205,204 Ethernet51/1 50 -Ethernet204 203,202,201,200 Ethernet52/1 51 -Ethernet208 215,214,213,212 Ethernet53/1 52 -Ethernet212 211,210,209,208 Ethernet54/1 53 -Ethernet216 223,222,221,220 Ethernet55/1 54 -Ethernet220 219,218,217,216 Ethernet56/1 55 -Ethernet224 231,230,229,228 Ethernet57/1 56 -Ethernet228 227,226,225,224 Ethernet58/1 57 -Ethernet232 239,238,237,236 Ethernet59/1 58 -Ethernet236 235,234,233,232 Ethernet60/1 59 -Ethernet240 247,246,245,244 Ethernet61/1 60 -Ethernet244 243,242,241,240 Ethernet62/1 61 -Ethernet248 255,254,253,252 Ethernet63/1 62 -Ethernet252 251,250,249,248 Ethernet64/1 63 +Ethernet0 4,5,6,7 Ethernet1/1 0 +Ethernet4 0,1,2,3 Ethernet2/1 1 +Ethernet8 20,21,22,23 Ethernet3/1 2 +Ethernet12 16,17,18,19 Ethernet4/1 3 +Ethernet16 36,37,38,39 Ethernet5/1 4 +Ethernet20 32,33,34,35 Ethernet6/1 5 +Ethernet24 52,53,54,55 Ethernet7/1 6 +Ethernet28 48,49,50,51 Ethernet8/1 7 +Ethernet32 68,69,70,71 Ethernet9/1 8 +Ethernet36 64,65,66,67 Ethernet10/1 9 +Ethernet40 84,85,86,87 Ethernet11/1 10 +Ethernet44 80,81,82,83 Ethernet12/1 11 +Ethernet48 100,101,102,103 Ethernet13/1 12 +Ethernet52 96,97,98,99 Ethernet14/1 13 +Ethernet56 116,117,118,119 Ethernet15/1 14 +Ethernet60 112,113,114,115 Ethernet16/1 15 +Ethernet64 132,133,134,135 Ethernet17/1 16 +Ethernet68 128,129,130,131 Ethernet18/1 17 +Ethernet72 148,149,150,151 Ethernet19/1 18 +Ethernet76 144,145,146,147 Ethernet20/1 19 +Ethernet80 164,165,166,167 Ethernet21/1 20 +Ethernet84 160,161,162,163 Ethernet22/1 21 +Ethernet88 180,181,182,183 Ethernet23/1 22 +Ethernet92 176,177,178,179 Ethernet24/1 23 +Ethernet96 196,197,198,199 Ethernet25/1 24 +Ethernet100 192,193,194,195 Ethernet26/1 25 +Ethernet104 212,213,214,215 Ethernet27/1 26 +Ethernet108 208,209,210,211 Ethernet28/1 27 +Ethernet112 228,229,230,231 Ethernet29/1 28 +Ethernet116 224,225,226,227 Ethernet30/1 29 +Ethernet120 244,245,246,247 Ethernet31/1 30 +Ethernet124 240,241,242,243 Ethernet32/1 31 +Ethernet128 12,13,14,15 Ethernet33/1 32 +Ethernet132 8,9,10,11 Ethernet34/1 33 +Ethernet136 28,29,30,31 Ethernet35/1 34 +Ethernet140 24,25,26,27 Ethernet36/1 35 +Ethernet144 44,45,46,47 Ethernet37/1 36 +Ethernet148 40,41,42,43 Ethernet38/1 37 +Ethernet152 60,61,62,63 Ethernet39/1 38 +Ethernet156 56,57,58,59 Ethernet40/1 39 +Ethernet160 76,77,78,79 Ethernet41/1 40 +Ethernet164 72,73,74,75 Ethernet42/1 41 +Ethernet168 92,93,94,95 Ethernet43/1 42 +Ethernet172 88,89,90,91 Ethernet44/1 43 +Ethernet176 108,109,110,111 Ethernet45/1 44 +Ethernet180 104,105,106,107 Ethernet46/1 45 +Ethernet184 124,125,126,127 Ethernet47/1 46 +Ethernet188 120,121,122,123 Ethernet48/1 47 +Ethernet192 140,141,142,143 Ethernet49/1 48 +Ethernet196 136,137,138,139 Ethernet50/1 49 +Ethernet200 156,157,158,159 Ethernet51/1 50 +Ethernet204 152,153,154,155 Ethernet52/1 51 +Ethernet208 172,173,174,175 Ethernet53/1 52 +Ethernet212 168,169,170,171 Ethernet54/1 53 +Ethernet216 188,189,190,191 Ethernet55/1 54 +Ethernet220 184,185,186,187 Ethernet56/1 55 +Ethernet224 204,205,206,207 Ethernet57/1 56 +Ethernet228 200,201,202,203 Ethernet58/1 57 +Ethernet232 220,221,222,223 Ethernet59/1 58 +Ethernet236 216,217,218,219 Ethernet60/1 59 +Ethernet240 236,237,238,239 Ethernet61/1 60 +Ethernet244 232,233,234,235 Ethernet62/1 61 +Ethernet248 252,253,254,255 Ethernet63/1 62 +Ethernet252 248,249,250,251 Ethernet64/1 63 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps index e69de29bb2d..4f86c1c4423 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps @@ -0,0 +1,864 @@ +init start stage unit=0 low-level +init set port-map unit=0 port=0 eth-macro=1 lane=0 max-speed=100g active=true +init set port-map unit=0 port=1 eth-macro=0 lane=0 max-speed=100g active=true +init set port-map unit=0 port=2 eth-macro=5 lane=0 max-speed=100g active=true +init set port-map unit=0 port=3 eth-macro=4 lane=0 max-speed=100g active=true +init set port-map unit=0 port=4 eth-macro=9 lane=0 max-speed=100g active=true +init set port-map unit=0 port=5 eth-macro=8 lane=0 max-speed=100g active=true +init set port-map unit=0 port=6 eth-macro=13 lane=0 max-speed=100g active=true +init set port-map unit=0 port=7 eth-macro=12 lane=0 max-speed=100g active=true +init set port-map unit=0 port=8 eth-macro=17 lane=0 max-speed=100g active=true +init set port-map unit=0 port=9 eth-macro=16 lane=0 max-speed=100g active=true +init set port-map unit=0 port=10 eth-macro=21 lane=0 max-speed=100g active=true +init set port-map unit=0 port=11 eth-macro=20 lane=0 max-speed=100g active=true +init set port-map unit=0 port=12 eth-macro=25 lane=0 max-speed=100g active=true +init set port-map unit=0 port=13 eth-macro=24 lane=0 max-speed=100g active=true +init set port-map unit=0 port=14 eth-macro=29 lane=0 max-speed=100g active=true +init set port-map unit=0 port=15 eth-macro=28 lane=0 max-speed=100g active=true +init set port-map unit=0 port=16 eth-macro=33 lane=0 max-speed=100g active=true +init set port-map unit=0 port=17 eth-macro=32 lane=0 max-speed=100g active=true +init set port-map unit=0 port=18 eth-macro=37 lane=0 max-speed=100g active=true +init set port-map unit=0 port=19 eth-macro=36 lane=0 max-speed=100g active=true +init set port-map unit=0 port=20 eth-macro=41 lane=0 max-speed=100g active=true +init set port-map unit=0 port=21 eth-macro=40 lane=0 max-speed=100g active=true +init set port-map unit=0 port=22 eth-macro=45 lane=0 max-speed=100g active=true +init set port-map unit=0 port=23 eth-macro=44 lane=0 max-speed=100g active=true +init set port-map unit=0 port=24 eth-macro=49 lane=0 max-speed=100g active=true +init set port-map unit=0 port=25 eth-macro=48 lane=0 max-speed=100g active=true +init set port-map unit=0 port=26 eth-macro=53 lane=0 max-speed=100g active=true +init set port-map unit=0 port=27 eth-macro=52 lane=0 max-speed=100g active=true +init set port-map unit=0 port=28 eth-macro=57 lane=0 max-speed=100g active=true +init set port-map unit=0 port=29 eth-macro=56 lane=0 max-speed=100g active=true +init set port-map unit=0 port=30 eth-macro=61 lane=0 max-speed=100g active=true +init set port-map unit=0 port=31 eth-macro=60 lane=0 max-speed=100g active=true +init set port-map unit=0 port=32 eth-macro=3 lane=0 max-speed=100g active=true +init set port-map unit=0 port=33 eth-macro=2 lane=0 max-speed=100g active=true +init set port-map unit=0 port=34 eth-macro=7 lane=0 max-speed=100g active=true +init set port-map unit=0 port=35 eth-macro=6 lane=0 max-speed=100g active=true +init set port-map unit=0 port=36 eth-macro=11 lane=0 max-speed=100g active=true +init set port-map unit=0 port=37 eth-macro=10 lane=0 max-speed=100g active=true +init set port-map unit=0 port=38 eth-macro=15 lane=0 max-speed=100g active=true +init set port-map unit=0 port=39 eth-macro=14 lane=0 max-speed=100g active=true +init set port-map unit=0 port=40 eth-macro=19 lane=0 max-speed=100g active=true +init set port-map unit=0 port=41 eth-macro=18 lane=0 max-speed=100g active=true +init set port-map unit=0 port=42 eth-macro=23 lane=0 max-speed=100g active=true +init set port-map unit=0 port=43 eth-macro=22 lane=0 max-speed=100g active=true +init set port-map unit=0 port=44 eth-macro=27 lane=0 max-speed=100g active=true +init set port-map unit=0 port=45 eth-macro=26 lane=0 max-speed=100g active=true +init set port-map unit=0 port=46 eth-macro=31 lane=0 max-speed=100g active=true +init set port-map unit=0 port=47 eth-macro=30 lane=0 max-speed=100g active=true +init set port-map unit=0 port=48 eth-macro=35 lane=0 max-speed=100g active=true +init set port-map unit=0 port=49 eth-macro=34 lane=0 max-speed=100g active=true +init set port-map unit=0 port=50 eth-macro=39 lane=0 max-speed=100g active=true +init set port-map unit=0 port=51 eth-macro=38 lane=0 max-speed=100g active=true +init set port-map unit=0 port=52 eth-macro=43 lane=0 max-speed=100g active=true +init set port-map unit=0 port=53 eth-macro=42 lane=0 max-speed=100g active=true +init set port-map unit=0 port=54 eth-macro=47 lane=0 max-speed=100g active=true +init set port-map unit=0 port=55 eth-macro=46 lane=0 max-speed=100g active=true +init set port-map unit=0 port=56 eth-macro=51 lane=0 max-speed=100g active=true +init set port-map unit=0 port=57 eth-macro=50 lane=0 max-speed=100g active=true +init set port-map unit=0 port=58 eth-macro=55 lane=0 max-speed=100g active=true +init set port-map unit=0 port=59 eth-macro=54 lane=0 max-speed=100g active=true +init set port-map unit=0 port=60 eth-macro=59 lane=0 max-speed=100g active=true +init set port-map unit=0 port=61 eth-macro=58 lane=0 max-speed=100g active=true +init set port-map unit=0 port=62 eth-macro=63 lane=0 max-speed=100g active=true +init set port-map unit=0 port=63 eth-macro=62 lane=0 max-speed=100g active=true +init set port-map unit=0 port=129 eth-macro=0 lane=1 max-speed=10g active=true guarantee=true cpi=true +init set port-map unit=0 port=130 eth-macro=0 lane=0 max-speed=10g active=true guarantee=true cpi=true init-done=true +init start stage unit=0 task-rsrc +init start stage unit=0 module +init start stage unit=0 task +phy set lane-swap unit=0 portlist=0 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=1 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=2 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=3 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=4 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=5 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=6 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=7 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=8 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=9 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=10 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=11 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=12 lane-cnt=4 property=tx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=13 lane-cnt=4 property=tx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=14 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=15 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=16 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=17 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=18 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=19 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=20 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=21 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=22 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=23 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=24 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=25 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=26 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=27 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=28 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=29 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=30 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=31 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=32 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=33 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=34 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=35 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=36 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=37 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=38 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=39 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=40 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=41 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=42 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=43 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=44 lane-cnt=4 property=tx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=45 lane-cnt=4 property=tx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=46 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=47 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=48 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=49 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=50 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=51 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=52 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=53 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=54 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=55 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=56 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=57 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=58 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=59 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=60 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=61 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=62 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=63 lane-cnt=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=129 lane-cnt=1 property=tx data=0x1 +phy set lane-swap unit=0 portlist=130 lane-cnt=1 property=tx data=0x0 +phy set lane-swap unit=0 portlist=0 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=1 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=2 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=3 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=4 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=5 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=6 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=7 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=8 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=9 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=10 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=11 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=12 lane-cnt=4 property=rx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=13 lane-cnt=4 property=rx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=14 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=15 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=16 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=17 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=18 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=19 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=20 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=21 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=22 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=23 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=24 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=25 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=26 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=27 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=28 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=29 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=30 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=31 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=32 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=33 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=34 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=35 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=36 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=37 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=38 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=39 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=40 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=41 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=42 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=43 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=44 lane-cnt=4 property=rx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=45 lane-cnt=4 property=rx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=46 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=47 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=48 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=49 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=50 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=51 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=52 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=53 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=54 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=55 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=56 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=57 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=58 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=59 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=60 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=61 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=62 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=63 lane-cnt=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=129 lane-cnt=1 property=rx data=0x1 +phy set lane-swap unit=0 portlist=130 lane-cnt=1 property=rx data=0x0 +phy set polarity-rev unit=0 portlist=0 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=1 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=2 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=3 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=4 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=5 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=6 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=7 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=8 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=9 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=10 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=11 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=12 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=13 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=14 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=15 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=16 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=17 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=18 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=19 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=20 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=21 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=22 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=23 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=24 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=25 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=26 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=27 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=28 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=29 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=30 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=31 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=32 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=33 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=34 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=35 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=36 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=37 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=38 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=39 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=40 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=41 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=42 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=43 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=44 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=45 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=46 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=47 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=48 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=49 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=50 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=51 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=52 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=53 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=54 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=55 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=56 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=57 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=58 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=59 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=60 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=61 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=62 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=63 lane-cnt=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=129 lane-cnt=1 property=tx data=0x0 +phy set polarity-rev unit=0 portlist=130 lane-cnt=1 property=tx data=0x0 +phy set polarity-rev unit=0 portlist=0 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=1 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=2 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=3 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=4 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=5 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=6 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=7 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=8 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=9 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=10 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=11 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=12 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=13 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=14 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=15 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=16 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=17 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=18 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=19 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=20 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=21 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=22 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=23 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=24 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=25 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=26 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=27 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=28 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=29 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=30 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=31 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=32 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=33 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=34 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=35 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=36 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=37 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=38 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=39 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=40 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=41 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=42 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=43 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=44 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=45 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=46 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=47 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=48 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=49 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=50 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=51 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=52 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=53 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=54 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=55 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=56 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=57 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=58 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=59 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=60 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=61 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=62 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=63 lane-cnt=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=129 lane-cnt=1 property=rx data=0x0 +phy set polarity-rev unit=0 portlist=130 lane-cnt=1 property=rx data=0x0 +phy set pre-emphasis unit=0 portlist=0 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=0 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=0 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=0 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=1 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=1 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=1 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=1 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=2 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=2 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=2 lane-cnt=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=2 lane-cnt=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=3 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=3 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=3 lane-cnt=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=3 lane-cnt=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=4 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=4 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=4 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=4 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=5 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=5 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=5 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=5 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=6 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=6 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=6 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=6 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=7 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=7 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=7 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=7 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=8 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=8 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=8 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=8 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=9 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=9 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=9 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=9 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=10 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=10 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=10 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=10 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=11 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=11 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=11 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=11 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=12 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=12 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=12 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=12 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=13 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=13 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=13 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=13 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=14 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=14 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=14 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=14 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=15 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=15 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=15 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=15 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=16 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=16 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=16 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=16 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=17 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=17 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=17 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=17 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=18 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=18 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=18 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=18 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=19 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=19 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=19 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=19 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=20 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=20 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=20 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=20 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=21 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=21 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=21 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=21 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=22 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=22 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=22 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=22 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=23 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=23 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=23 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=23 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=24 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=24 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=24 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=24 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=25 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=25 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=25 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=25 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=26 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=26 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=26 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=26 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=27 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=27 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=27 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=27 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=28 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=28 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=28 lane-cnt=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=28 lane-cnt=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=29 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=29 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=29 lane-cnt=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=29 lane-cnt=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=30 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=30 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=30 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=30 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=31 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=31 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=31 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=31 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=32 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=32 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=32 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=32 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=33 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=33 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=33 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=33 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=34 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=34 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=34 lane-cnt=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=34 lane-cnt=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=35 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=35 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=35 lane-cnt=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=35 lane-cnt=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=36 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=36 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=36 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=36 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=37 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=37 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=37 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=37 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=38 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=38 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=38 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=38 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=39 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=39 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=39 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=39 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=40 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=40 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=40 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=40 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=41 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=41 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=41 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=41 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=42 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=42 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=42 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=42 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=43 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=43 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=43 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=43 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=44 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=44 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=44 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=44 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=45 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=45 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=45 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=45 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=46 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=46 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=46 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=46 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=47 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=47 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=47 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=47 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=48 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=48 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=48 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=48 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=49 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=49 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=49 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=49 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=50 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=50 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=50 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=50 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=51 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=51 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=51 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=51 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=52 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=52 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=52 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=52 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=53 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=53 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=53 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=53 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=54 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=54 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=54 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=54 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=55 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=55 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=55 lane-cnt=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=55 lane-cnt=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=56 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=56 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=56 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=56 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=57 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=57 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=57 lane-cnt=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=57 lane-cnt=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=58 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=58 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=58 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=58 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=59 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=59 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=59 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=59 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=60 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=60 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=60 lane-cnt=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=60 lane-cnt=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=61 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=61 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=61 lane-cnt=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=61 lane-cnt=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=62 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=62 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=62 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=62 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=63 lane-cnt=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=63 lane-cnt=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=63 lane-cnt=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=63 lane-cnt=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=129 lane-cnt=1 property=c2 data=0x1 +phy set pre-emphasis unit=0 portlist=129 lane-cnt=1 property=cn1 data=0x1 +phy set pre-emphasis unit=0 portlist=129 lane-cnt=1 property=c0 data=0x2 +phy set pre-emphasis unit=0 portlist=129 lane-cnt=1 property=c1 data=0x3 +phy set pre-emphasis unit=0 portlist=130 lane-cnt=1 property=c2 data=0x1 +phy set pre-emphasis unit=0 portlist=130 lane-cnt=1 property=cn1 data=0x1 +phy set pre-emphasis unit=0 portlist=130 lane-cnt=1 property=c0 data=0x2 +phy set pre-emphasis unit=0 portlist=130 lane-cnt=1 property=c1 data=0x3 +port set property unit=0 portlist=0 speed=100g +port set property unit=0 portlist=1 speed=100g +port set property unit=0 portlist=2 speed=100g +port set property unit=0 portlist=3 speed=100g +port set property unit=0 portlist=4 speed=100g +port set property unit=0 portlist=5 speed=100g +port set property unit=0 portlist=6 speed=100g +port set property unit=0 portlist=7 speed=100g +port set property unit=0 portlist=8 speed=100g +port set property unit=0 portlist=9 speed=100g +port set property unit=0 portlist=10 speed=100g +port set property unit=0 portlist=11 speed=100g +port set property unit=0 portlist=12 speed=100g +port set property unit=0 portlist=13 speed=100g +port set property unit=0 portlist=14 speed=100g +port set property unit=0 portlist=15 speed=100g +port set property unit=0 portlist=16 speed=100g +port set property unit=0 portlist=17 speed=100g +port set property unit=0 portlist=18 speed=100g +port set property unit=0 portlist=19 speed=100g +port set property unit=0 portlist=20 speed=100g +port set property unit=0 portlist=21 speed=100g +port set property unit=0 portlist=22 speed=100g +port set property unit=0 portlist=23 speed=100g +port set property unit=0 portlist=24 speed=100g +port set property unit=0 portlist=25 speed=100g +port set property unit=0 portlist=26 speed=100g +port set property unit=0 portlist=27 speed=100g +port set property unit=0 portlist=28 speed=100g +port set property unit=0 portlist=29 speed=100g +port set property unit=0 portlist=30 speed=100g +port set property unit=0 portlist=31 speed=100g +port set property unit=0 portlist=32 speed=100g +port set property unit=0 portlist=33 speed=100g +port set property unit=0 portlist=34 speed=100g +port set property unit=0 portlist=35 speed=100g +port set property unit=0 portlist=36 speed=100g +port set property unit=0 portlist=37 speed=100g +port set property unit=0 portlist=38 speed=100g +port set property unit=0 portlist=39 speed=100g +port set property unit=0 portlist=40 speed=100g +port set property unit=0 portlist=41 speed=100g +port set property unit=0 portlist=42 speed=100g +port set property unit=0 portlist=43 speed=100g +port set property unit=0 portlist=44 speed=100g +port set property unit=0 portlist=45 speed=100g +port set property unit=0 portlist=46 speed=100g +port set property unit=0 portlist=47 speed=100g +port set property unit=0 portlist=48 speed=100g +port set property unit=0 portlist=49 speed=100g +port set property unit=0 portlist=50 speed=100g +port set property unit=0 portlist=51 speed=100g +port set property unit=0 portlist=52 speed=100g +port set property unit=0 portlist=53 speed=100g +port set property unit=0 portlist=54 speed=100g +port set property unit=0 portlist=55 speed=100g +port set property unit=0 portlist=56 speed=100g +port set property unit=0 portlist=57 speed=100g +port set property unit=0 portlist=58 speed=100g +port set property unit=0 portlist=59 speed=100g +port set property unit=0 portlist=60 speed=100g +port set property unit=0 portlist=61 speed=100g +port set property unit=0 portlist=62 speed=100g +port set property unit=0 portlist=63 speed=100g +port set property unit=0 portlist=129 speed=10g +port set property unit=0 portlist=130 speed=10g +port set property unit=0 portlist=0 medium-type=sr4 +port set property unit=0 portlist=1 medium-type=sr4 +port set property unit=0 portlist=2 medium-type=sr4 +port set property unit=0 portlist=3 medium-type=sr4 +port set property unit=0 portlist=4 medium-type=sr4 +port set property unit=0 portlist=5 medium-type=sr4 +port set property unit=0 portlist=6 medium-type=sr4 +port set property unit=0 portlist=7 medium-type=sr4 +port set property unit=0 portlist=8 medium-type=sr4 +port set property unit=0 portlist=9 medium-type=sr4 +port set property unit=0 portlist=10 medium-type=sr4 +port set property unit=0 portlist=11 medium-type=sr4 +port set property unit=0 portlist=12 medium-type=sr4 +port set property unit=0 portlist=13 medium-type=sr4 +port set property unit=0 portlist=14 medium-type=sr4 +port set property unit=0 portlist=15 medium-type=sr4 +port set property unit=0 portlist=16 medium-type=sr4 +port set property unit=0 portlist=17 medium-type=sr4 +port set property unit=0 portlist=18 medium-type=sr4 +port set property unit=0 portlist=19 medium-type=sr4 +port set property unit=0 portlist=20 medium-type=sr4 +port set property unit=0 portlist=21 medium-type=sr4 +port set property unit=0 portlist=22 medium-type=sr4 +port set property unit=0 portlist=23 medium-type=sr4 +port set property unit=0 portlist=24 medium-type=sr4 +port set property unit=0 portlist=25 medium-type=sr4 +port set property unit=0 portlist=26 medium-type=sr4 +port set property unit=0 portlist=27 medium-type=sr4 +port set property unit=0 portlist=28 medium-type=sr4 +port set property unit=0 portlist=29 medium-type=sr4 +port set property unit=0 portlist=30 medium-type=sr4 +port set property unit=0 portlist=31 medium-type=sr4 +port set property unit=0 portlist=32 medium-type=sr4 +port set property unit=0 portlist=33 medium-type=sr4 +port set property unit=0 portlist=34 medium-type=sr4 +port set property unit=0 portlist=35 medium-type=sr4 +port set property unit=0 portlist=36 medium-type=sr4 +port set property unit=0 portlist=37 medium-type=sr4 +port set property unit=0 portlist=38 medium-type=sr4 +port set property unit=0 portlist=39 medium-type=sr4 +port set property unit=0 portlist=40 medium-type=sr4 +port set property unit=0 portlist=41 medium-type=sr4 +port set property unit=0 portlist=42 medium-type=sr4 +port set property unit=0 portlist=43 medium-type=sr4 +port set property unit=0 portlist=44 medium-type=sr4 +port set property unit=0 portlist=45 medium-type=sr4 +port set property unit=0 portlist=46 medium-type=sr4 +port set property unit=0 portlist=47 medium-type=sr4 +port set property unit=0 portlist=48 medium-type=sr4 +port set property unit=0 portlist=49 medium-type=sr4 +port set property unit=0 portlist=50 medium-type=sr4 +port set property unit=0 portlist=51 medium-type=sr4 +port set property unit=0 portlist=52 medium-type=sr4 +port set property unit=0 portlist=53 medium-type=sr4 +port set property unit=0 portlist=54 medium-type=sr4 +port set property unit=0 portlist=55 medium-type=sr4 +port set property unit=0 portlist=56 medium-type=sr4 +port set property unit=0 portlist=57 medium-type=sr4 +port set property unit=0 portlist=58 medium-type=sr4 +port set property unit=0 portlist=59 medium-type=sr4 +port set property unit=0 portlist=60 medium-type=sr4 +port set property unit=0 portlist=61 medium-type=sr4 +port set property unit=0 portlist=62 medium-type=sr4 +port set property unit=0 portlist=63 medium-type=sr4 +port set property unit=0 portlist=129 medium-type=kr +port set property unit=0 portlist=130 medium-type=kr +port set property unit=0 portlist=0 fec=disable +port set property unit=0 portlist=1 fec=disable +port set property unit=0 portlist=2 fec=disable +port set property unit=0 portlist=3 fec=disable +port set property unit=0 portlist=4 fec=disable +port set property unit=0 portlist=5 fec=disable +port set property unit=0 portlist=6 fec=disable +port set property unit=0 portlist=7 fec=disable +port set property unit=0 portlist=8 fec=disable +port set property unit=0 portlist=9 fec=disable +port set property unit=0 portlist=10 fec=disable +port set property unit=0 portlist=11 fec=disable +port set property unit=0 portlist=12 fec=disable +port set property unit=0 portlist=13 fec=disable +port set property unit=0 portlist=14 fec=disable +port set property unit=0 portlist=15 fec=disable +port set property unit=0 portlist=16 fec=disable +port set property unit=0 portlist=17 fec=disable +port set property unit=0 portlist=18 fec=disable +port set property unit=0 portlist=19 fec=disable +port set property unit=0 portlist=20 fec=disable +port set property unit=0 portlist=21 fec=disable +port set property unit=0 portlist=22 fec=disable +port set property unit=0 portlist=23 fec=disable +port set property unit=0 portlist=24 fec=disable +port set property unit=0 portlist=25 fec=disable +port set property unit=0 portlist=26 fec=disable +port set property unit=0 portlist=27 fec=disable +port set property unit=0 portlist=28 fec=disable +port set property unit=0 portlist=29 fec=disable +port set property unit=0 portlist=30 fec=disable +port set property unit=0 portlist=31 fec=disable +port set property unit=0 portlist=32 fec=disable +port set property unit=0 portlist=33 fec=disable +port set property unit=0 portlist=34 fec=disable +port set property unit=0 portlist=35 fec=disable +port set property unit=0 portlist=36 fec=disable +port set property unit=0 portlist=37 fec=disable +port set property unit=0 portlist=38 fec=disable +port set property unit=0 portlist=39 fec=disable +port set property unit=0 portlist=40 fec=disable +port set property unit=0 portlist=41 fec=disable +port set property unit=0 portlist=42 fec=disable +port set property unit=0 portlist=43 fec=disable +port set property unit=0 portlist=44 fec=disable +port set property unit=0 portlist=45 fec=disable +port set property unit=0 portlist=46 fec=disable +port set property unit=0 portlist=47 fec=disable +port set property unit=0 portlist=48 fec=disable +port set property unit=0 portlist=49 fec=disable +port set property unit=0 portlist=50 fec=disable +port set property unit=0 portlist=51 fec=disable +port set property unit=0 portlist=52 fec=disable +port set property unit=0 portlist=53 fec=disable +port set property unit=0 portlist=54 fec=disable +port set property unit=0 portlist=55 fec=disable +port set property unit=0 portlist=56 fec=disable +port set property unit=0 portlist=57 fec=disable +port set property unit=0 portlist=58 fec=disable +port set property unit=0 portlist=59 fec=disable +port set property unit=0 portlist=60 fec=disable +port set property unit=0 portlist=61 fec=disable +port set property unit=0 portlist=62 fec=disable +port set property unit=0 portlist=63 fec=disable +port set adver unit=0 portlist=129 speed-10g-kr +port set adver unit=0 portlist=130 speed-10g-kr +port set property unit=0 portlist=129 an=enable +port set property unit=0 portlist=130 an=enable +port set property unit=0 portlist=0 admin=enable +port set property unit=0 portlist=1 admin=enable +port set property unit=0 portlist=2 admin=enable +port set property unit=0 portlist=3 admin=enable +port set property unit=0 portlist=4 admin=enable +port set property unit=0 portlist=5 admin=enable +port set property unit=0 portlist=6 admin=enable +port set property unit=0 portlist=7 admin=enable +port set property unit=0 portlist=8 admin=enable +port set property unit=0 portlist=9 admin=enable +port set property unit=0 portlist=10 admin=enable +port set property unit=0 portlist=11 admin=enable +port set property unit=0 portlist=12 admin=enable +port set property unit=0 portlist=13 admin=enable +port set property unit=0 portlist=14 admin=enable +port set property unit=0 portlist=15 admin=enable +port set property unit=0 portlist=16 admin=enable +port set property unit=0 portlist=17 admin=enable +port set property unit=0 portlist=18 admin=enable +port set property unit=0 portlist=19 admin=enable +port set property unit=0 portlist=20 admin=enable +port set property unit=0 portlist=21 admin=enable +port set property unit=0 portlist=22 admin=enable +port set property unit=0 portlist=23 admin=enable +port set property unit=0 portlist=24 admin=enable +port set property unit=0 portlist=25 admin=enable +port set property unit=0 portlist=26 admin=enable +port set property unit=0 portlist=27 admin=enable +port set property unit=0 portlist=28 admin=enable +port set property unit=0 portlist=29 admin=enable +port set property unit=0 portlist=30 admin=enable +port set property unit=0 portlist=31 admin=enable +port set property unit=0 portlist=32 admin=enable +port set property unit=0 portlist=33 admin=enable +port set property unit=0 portlist=34 admin=enable +port set property unit=0 portlist=35 admin=enable +port set property unit=0 portlist=36 admin=enable +port set property unit=0 portlist=37 admin=enable +port set property unit=0 portlist=38 admin=enable +port set property unit=0 portlist=39 admin=enable +port set property unit=0 portlist=40 admin=enable +port set property unit=0 portlist=41 admin=enable +port set property unit=0 portlist=42 admin=enable +port set property unit=0 portlist=43 admin=enable +port set property unit=0 portlist=44 admin=enable +port set property unit=0 portlist=45 admin=enable +port set property unit=0 portlist=46 admin=enable +port set property unit=0 portlist=47 admin=enable +port set property unit=0 portlist=48 admin=enable +port set property unit=0 portlist=49 admin=enable +port set property unit=0 portlist=50 admin=enable +port set property unit=0 portlist=51 admin=enable +port set property unit=0 portlist=52 admin=enable +port set property unit=0 portlist=53 admin=enable +port set property unit=0 portlist=54 admin=enable +port set property unit=0 portlist=55 admin=enable +port set property unit=0 portlist=56 admin=enable +port set property unit=0 portlist=57 admin=enable +port set property unit=0 portlist=58 admin=enable +port set property unit=0 portlist=59 admin=enable +port set property unit=0 portlist=60 admin=enable +port set property unit=0 portlist=61 admin=enable +port set property unit=0 portlist=62 admin=enable +port set property unit=0 portlist=63 admin=enable +port set property unit=0 portlist=129 admin=enable +port set property unit=0 portlist=130 admin=enable diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps index e6fe6721350..fc640e0d78f 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps @@ -1,20 +1,9 @@ -#This configuration file is for customer init value feature. Please refer to nps_cfg.h/nps_cfg.c for detail. -#1. The lines beginning with # are comment lines. The lines beginning with number are the setting lines. -#2. There are five parameters which can be set. -# 1) the first is unit. -# 2) the second is NPS_CFG_TYPE_XXX. Refer to NPS_CFG_TYPE_T. -# 3) the 3-5 are {param0, param1, value} pairs. Refer to NPS_CFG_VALUE_T. Support HEX format. -# 4) the (unit, NPS_CFG_TYPE_XXX, param0, param1) group is the key to get the correspingding value. -# There should be no same (unit, NPS_CFG_TYPE_XXX, param0, param1) group. -#3. User must follow correct format to apply the setting. Please refer to below commentted example(#0 NPS_CFG_TYPE_L2_ADDR_MODE 0 0 1); -#4. Usage under the linux shell: -# 1) ./image-path/image-name -c cfg-path/NPS_TAU_EVB_6T4_64.cfg : mamually specify directory path if they are not in current work dirctory. -# 2) ./image-name -c NPS_TAU_EVB_6T4_64.cfg : the image and the NPS_TAU_EVB_3T2_32.cfg are in the current work directory. - -#unit NPS_CFG_TYPE_XXX param0 param1 value -#---- ---------------- ------ ------ ----- -0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 -0 NPS_CFG_TYPE_LED_CFG 0 0 2 -0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 0 -0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 0 -0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +#unit NPS_CFG_TYPE_XXX param0 param1 value +#---- ---------------- ------ ------ ----- +0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 +0 NPS_CFG_TYPE_LED_CFG 0 0 2 +0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 1 +0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +0 NPS_CFG_TYPE_HASH_L2_FDB_REGION_ENTRY_NUM 0 0 49152 +0 NPS_CFG_TYPE_HASH_L3_WITH_IPV6_PREFIX_64_REGION_ENTRY_NUM 0 0 32768 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/eeprom.py b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/eeprom.py index ab398102c9b..770b0cf43ba 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/eeprom.py +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/eeprom.py @@ -18,5 +18,5 @@ class board(eeprom_tlvinfo.TlvInfoDecoder): def __init__(self, name, path, cpld_root, ro): - self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0055/eeprom" + self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0051/eeprom" super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py index 91d7de05dc8..cc996057e09 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py @@ -15,8 +15,8 @@ class PsuUtil(PsuBase): """Platform-specific PSUutil class""" - SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-17/17-0050", - "/sys/bus/i2c/devices/i2c-18/18-0050"] + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-18/18-0050", + "/sys/bus/i2c/devices/i2c-17/17-0050"] def __init__(self): PsuBase.__init__(self) diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf index b5daa9af42b..84abfe88062 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf @@ -36,16 +36,12 @@ chip "w83795adg-*" ignore in18 ignore in19 label fan1 "FANTRAY 1" - #label fan2 "FANTRAY 1-B" ignore fan2 label fan3 "FANTRAY 2" - #label fan4 "FANTRAY 2-B" ignore fan4 label fan5 "FANTRAY 3" - #label fan6 "FANTRAY 3-B" ignore fan6 label fan7 "FANTRAY 4" - #label fan8 "FANTRAY 4-B" ignore fan8 ignore temp1 ignore temp2 @@ -55,15 +51,14 @@ chip "w83795adg-*" ignore temp6 ignore intrusion0 -# TODO: need to confirm the critial temp value with HW after board ready chip "tmp75-i2c-*-4A" - label temp1 "BMC board Temp" + label temp1 "BMC Board Temp" set temp1_max 50 set temp1_max_hyst 45 bus "i2c-0" "SMBus I801 adapter at f000" chip "tmp75-i2c-*-4F" - label temp1 "x86 CPU board Temp" + label temp1 "x86 CPU Board Temp" set temp1_max 50 set temp1_max_hyst 45 @@ -86,5 +81,3 @@ chip "lm75-i2c-7-4E" label temp1 "Front MAC Temp" set temp1_max 50 set temp1_max_hyst 45 - - diff --git a/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/sai.profile b/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/sai.profile index 6f60cbd6118..7e019adbbb9 100644 --- a/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/sai.profile +++ b/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/sai.profile @@ -1,2 +1,2 @@ -SAI_INIT_CONFIG_FILE=/etc/bcm/th-d7054q28b-48x10g-6x100g.config.bcm +SAI_INIT_CONFIG_FILE=/etc/bcm/th-d7054q28b-48x25g-6x100g.config.bcm SAI_NUM_ECMP_MEMBERS=32 diff --git a/device/inventec/x86_64-inventec_d7054q28b-r0/led_proc_init.soc b/device/inventec/x86_64-inventec_d7054q28b-r0/led_proc_init.soc new file mode 100644 index 00000000000..ceaa9a8e6d5 --- /dev/null +++ b/device/inventec/x86_64-inventec_d7054q28b-r0/led_proc_init.soc @@ -0,0 +1,200 @@ +#LED processor initialization for Inventec d7054q28b platform + +led 0 stop +led 0 prog 02 00 60 F1 12 00 DA 0F 70 10 67 61 67 5C 77 06 02 A0 60 F0 02 00 60 F2 12 00 06 F0 4A 01 71 38 4A 02 27 67 5C 06 F2 28 32 08 67 5C 06 F2 28 32 00 32 01 B7 67 5C 77 44 67 64 67 5C 67 64 67 5C 67 61 67 5C DA 6C 70 4E 86 F0 86 F2 77 1A 12 00 DA 03 70 5A 67 64 67 5C 77 50 3E F1 87 86 F1 81 57 17 27 57 07 27 57 +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_1=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_2=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_5=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_6=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=14 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_9=15 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_10=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=13 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_13=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_14=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_17=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_18=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=10 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_21=11 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_22=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=9 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=6 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_25=7 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_26=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=5 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=2 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_29=3 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_30=0 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=1 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_33=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_34=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_37=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_38=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=31 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_41=30 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_42=29 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_45=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_46=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=63 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=35 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_49=34 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_50=33 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=23 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_53=22 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_54=21 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=27 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_57=26 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_58=25 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=19 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_61=18 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_62=17 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=16 +led 0 start + +led 1 stop +led 1 prog 02 00 60 F1 12 00 DA 0F 70 10 67 61 67 5C 77 06 02 A0 60 F0 02 00 60 F2 12 00 06 F0 4A 01 71 38 4A 02 27 67 5C 06 F2 28 32 08 67 5C 06 F2 28 32 00 32 01 B7 67 5C 77 44 67 64 67 5C 67 64 67 5C 67 61 67 5C DA 6C 70 4E 86 F0 86 F2 77 1A 12 00 DA 03 70 5A 67 64 67 5C 77 50 3E F1 87 86 F1 81 57 17 27 57 07 27 57 +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=2 +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_1=3 +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_2=0 +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=1 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=6 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_5=7 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_6=4 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=5 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=10 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_9=11 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_10=8 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=9 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_13=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_14=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=14 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_17=15 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_18=12 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=13 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=18 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_21=19 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_22=16 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=17 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_25=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_26=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_29=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_30=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=22 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_33=23 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_34=20 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=21 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=26 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_37=27 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_38=24 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=25 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_41=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_42=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_45=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_46=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=30 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_49=31 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_50=28 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=29 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=35 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_53=34 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_54=33 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=32 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_57=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_58=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_61=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_62=63 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=63 +led 1 start + +# Set per port speed config of LED Color register +# For Invnetec Cypress platform, +# If we want to set 10G speed per port, We need to set amber color light, so use cmd "setreg CMIC_LEDUP0_DATA_RAM(160) 0x04". +# If we want to set 25G ( or up ) speed per port, we need to set green color light, so use cmd "setreg CMIC_LEDUP0_DATA_RAM(160) 0x00". + +setreg CMIC_LEDUP0_DATA_RAM(160) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(161) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(162) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(163) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(164) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(165) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(166) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(167) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(168) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(169) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(170) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(171) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(172) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(173) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(174) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(175) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(176) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(177) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(178) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(179) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(180) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(181) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(182) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(183) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(184) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(185) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(186) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(187) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(188) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(189) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(190) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(191) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(192) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(193) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(194) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(195) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(196) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(197) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(198) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(199) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(200) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(201) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(202) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(203) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(204) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(205) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(206) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(207) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(208) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(209) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(210) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(211) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(212) 0x00 +setreg CMIC_LEDUP0_DATA_RAM(213) 0x00 + +age 150 + diff --git a/device/marvell/x86_64-marvell_slm5401_54x-r0/SLM5401-54x/port_config.ini b/device/marvell/x86_64-marvell_slm5401_54x-r0/SLM5401-54x/port_config.ini new file mode 100755 index 00000000000..74865956f61 --- /dev/null +++ b/device/marvell/x86_64-marvell_slm5401_54x-r0/SLM5401-54x/port_config.ini @@ -0,0 +1,55 @@ +# name lanes +Ethernet0 0 +Ethernet1 1 +Ethernet2 2 +Ethernet3 3 +Ethernet4 4 +Ethernet5 5 +Ethernet6 6 +Ethernet7 7 +Ethernet8 8 +Ethernet9 9 +Ethernet10 10 +Ethernet11 11 +Ethernet12 12 +Ethernet13 13 +Ethernet14 14 +Ethernet15 15 +Ethernet16 16 +Ethernet17 17 +Ethernet18 18 +Ethernet19 19 +Ethernet20 20 +Ethernet21 21 +Ethernet22 22 +Ethernet23 23 +Ethernet24 24 +Ethernet25 25 +Ethernet26 26 +Ethernet27 27 +Ethernet28 28 +Ethernet29 29 +Ethernet30 30 +Ethernet31 31 +Ethernet32 32 +Ethernet33 33 +Ethernet34 34 +Ethernet35 35 +Ethernet36 36 +Ethernet37 37 +Ethernet38 38 +Ethernet39 39 +Ethernet40 40 +Ethernet41 41 +Ethernet42 42 +Ethernet43 43 +Ethernet44 44 +Ethernet45 45 +Ethernet46 46 +Ethernet47 47 +Ethernet48 48 +Ethernet49 49 +Ethernet50 50 +Ethernet51 51 +Ethernet52 52 +Ethernet53 53 diff --git a/device/marvell/x86_64-marvell_slm5401_54x-r0/SLM5401-54x/sai.profile b/device/marvell/x86_64-marvell_slm5401_54x-r0/SLM5401-54x/sai.profile new file mode 100755 index 00000000000..edba72ba482 --- /dev/null +++ b/device/marvell/x86_64-marvell_slm5401_54x-r0/SLM5401-54x/sai.profile @@ -0,0 +1,2 @@ +mode=1 +hwId=slm5401-54x diff --git a/device/marvell/x86_64-marvell_slm5401_54x-r0/installer.conf b/device/marvell/x86_64-marvell_slm5401_54x-r0/installer.conf new file mode 100755 index 00000000000..14404194ef5 --- /dev/null +++ b/device/marvell/x86_64-marvell_slm5401_54x-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x2f8 +CONSOLE_DEV=1 +CONSOLE_SPEED=115200 diff --git a/device/marvell/x86_64-marvell_slm5401_54x-r0/minigraph.xml b/device/marvell/x86_64-marvell_slm5401_54x-r0/minigraph.xml new file mode 100755 index 00000000000..3fc83ef7fc6 --- /dev/null +++ b/device/marvell/x86_64-marvell_slm5401_54x-r0/minigraph.xml @@ -0,0 +1,1074 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + switch1 + 10.0.0.32 + 1 + 180 + 60 + + + switch1 + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + switch1 + 10.0.0.34 + 1 + 180 + 60 + + + switch1 + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + switch1 + 10.0.0.36 + 1 + 180 + 60 + + + switch1 + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + switch1 + 10.0.0.38 + 1 + 180 + 60 + + + switch1 + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + switch1 + 10.0.0.40 + 1 + 180 + 60 + + + switch1 + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + switch1 + 10.0.0.42 + 1 + 180 + 60 + + + switch1 + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + switch1 + 10.0.0.44 + 1 + 180 + 60 + + + switch1 + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + switch1 + 10.0.0.46 + 1 + 180 + 60 + + + switch1 + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + switch1 + 10.0.0.48 + 1 + 180 + 60 + + + switch1 + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + switch1 + 10.0.0.50 + 1 + 180 + 60 + + + switch1 + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + switch1 + 10.0.0.52 + 1 + 180 + 60 + + + switch1 + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + switch1 + 10.0.0.54 + 1 + 180 + 60 + + + switch1 + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + switch1 + 10.0.0.56 + 1 + 180 + 60 + + + switch1 + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + switch1 + 10.0.0.58 + 1 + 180 + 60 + + + switch1 + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + switch1 + 10.0.0.60 + 1 + 180 + 60 + + + switch1 + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + switch1 + 10.0.0.62 + 1 + 180 + 60 + + + switch1 + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + switch1 + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + switch1 + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + switch1 + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + switch1 + SLM5401-54x + + + + + + + switch1 + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + switch1 + SLM5401-54x +
diff --git a/device/marvell/x86_64-marvell_slm5401_54x-r0/plugins/eeprom.py b/device/marvell/x86_64-marvell_slm5401_54x-r0/plugins/eeprom.py new file mode 100755 index 00000000000..7681caafeef --- /dev/null +++ b/device/marvell/x86_64-marvell_slm5401_54x-r0/plugins/eeprom.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom" + #Two i2c buses might get flipped order, check them both. + if not os.path.exists(self.eeprom_path): + self.eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/marvell/x86_64-marvell_slm5401_54x-r0/plugins/sfputil.py b/device/marvell/x86_64-marvell_slm5401_54x-r0/plugins/sfputil.py new file mode 100755 index 00000000000..925c6cb0d73 --- /dev/null +++ b/device/marvell/x86_64-marvell_slm5401_54x-r0/plugins/sfputil.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + + +class sfputil(SfpUtilBase): + """Platform specific sfputil class""" + + port_start = 0 + port_end = 31 + ports_in_block = 32 + + port_to_eeprom_mapping = {} + port_to_i2c_mapping = { + 9 : 18, + 10 : 19, + 11 : 20, + 12 : 21, + 1 : 22, + 2 : 23, + 3 : 24, + 4 : 25, + 6 : 26, + 5 : 27, + 8 : 28, + 7 : 29, + 13 : 30, + 14 : 31, + 15 : 32, + 16 : 33, + 17 : 34, + 18 : 35, + 19 : 36, + 20 : 37, + 25 : 38, + 26 : 39, + 27 : 40, + 28 : 41, + 29 : 42, + 30 : 43, + 31 : 44, + 32 : 45, + 21 : 46, + 22 : 47, + 23 : 48, + 24 : 49, + } + + _qsfp_ports = range(0, ports_in_block + 1) + + def __init__(self): + # Override port_to_eeprom_mapping for class initialization + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_eeprom' + for x in range(self.port_start, self.port_end + 1): + port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x+1]) + self.port_to_eeprom_mapping[x] = port_eeprom_path + SfpUtilBase.__init__(self) + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_port_reset" + port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + + try: + reg_file = open(port_ps, 'w') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + #toggle reset + reg_file.seek(0) + reg_file.write('1') + time.sleep(1) + reg_file.seek(0) + reg_file.write('0') + reg_file.close() + return True + + def set_low_power_mode(self, port_nuM, lpmode): + raise NotImplementedErro + + def get_low_power_mode(self, port_num): + raise NotImplementedErro + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_is_present" + port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + + + try: + reg_file = open(port_ps) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_file.readline().rstrip() + if reg_value == '1': + return True + + return False + + @property + def port_start(self): + return self._port_start + + @property + def port_end(self): + return self._port_end + + @property + def qsfp_ports(self): + return range(0, self.ports_in_block + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/buffers.json.j2 b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "{{ ingress_lossless_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "ingress_lossy_pool": { + "size": "{{ ingress_lossy_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "{{ egress_lossless_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "{{ egress_lossy_pool_size }}", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 34816 18432 16384 0 + 25000 5m 34816 18432 16384 0 + 40000 5m 34816 18432 16384 0 + 50000 5m 34816 18432 16384 0 + 100000 5m 36864 18432 18432 0 + 10000 40m 36864 18432 18432 0 + 25000 40m 39936 18432 21504 0 + 40000 40m 41984 18432 23552 0 + 50000 40m 41984 18432 23552 0 + 100000 40m 54272 18432 35840 0 + 10000 300m 49152 18432 30720 0 + 25000 300m 71680 18432 53248 0 + 40000 300m 94208 18432 75776 0 + 50000 300m 94208 18432 75776 0 + 100000 300m 184320 18432 165888 0 diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/port_config.ini b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/port_config.ini new file mode 100644 index 00000000000..816bb0e94a7 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/port_config.ini @@ -0,0 +1,33 @@ +# name lanes +Ethernet0 0,1,2,3 +Ethernet4 4,5,6,7 +Ethernet8 8,9,10,11 +Ethernet12 12,13,14,15 +Ethernet16 16,17,18,19 +Ethernet20 20,21,22,23 +Ethernet24 24,25,26,27 +Ethernet28 28,29,30,31 +Ethernet32 32,33,34,35 +Ethernet36 36,37,38,39 +Ethernet40 40,41,42,43 +Ethernet44 44,45,46,47 +Ethernet48 48,49,50,51 +Ethernet52 52,53,54,55 +Ethernet56 56,57,58,59 +Ethernet60 60,61,62,63 +Ethernet64 64,65,66,67 +Ethernet68 68,69,70,71 +Ethernet72 72,73,74,75 +Ethernet76 76,77,78,79 +Ethernet80 80,81,82,83 +Ethernet84 84,85,86,87 +Ethernet88 88,89,90,91 +Ethernet92 92,93,94,95 +Ethernet96 96,97,98,99 +Ethernet100 100,101,102,103 +Ethernet104 104,105,106,107 +Ethernet108 108,109,110,111 +Ethernet112 112,113,114,115 +Ethernet116 116,117,118,119 +Ethernet120 120,121,122,123 +Ethernet124 124,125,126,127 diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/qos.json b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/qos.json new file mode 100644 index 00000000000..3e01af3f2c6 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/qos.json @@ -0,0 +1,166 @@ +{ + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0":"0", + "1":"0", + "2":"0", + "3":"3", + "4":"4", + "5":"0", + "6":"0", + "7":"0", + "8":"1", + "9":"0", + "10":"0", + "11":"0", + "12":"0", + "13":"0", + "14":"0", + "15":"0", + "16":"0", + "17":"0", + "18":"0", + "19":"0", + "20":"0", + "21":"0", + "22":"0", + "23":"0", + "24":"0", + "25":"0", + "26":"0", + "27":"0", + "28":"0", + "29":"0", + "30":"0", + "31":"0", + "32":"0", + "33":"0", + "34":"0", + "35":"0", + "36":"0", + "37":"0", + "38":"0", + "39":"0", + "40":"0", + "41":"0", + "42":"0", + "43":"0", + "44":"0", + "45":"0", + "46":"0", + "47":"0", + "48":"0", + "49":"0", + "50":"0", + "51":"0", + "52":"0", + "53":"0", + "54":"0", + "55":"0", + "56":"0", + "57":"0", + "58":"0", + "59":"0", + "60":"0", + "61":"0", + "62":"0", + "63":"0" + } + }, + "SCHEDULER": { + "scheduler.0": { + "type":"DWRR", + "weight": "25" + }, + "scheduler.1": { + "type":"DWRR", + "weight": "30" + }, + "scheduler.2": { + "type":"DWRR", + "weight": "20" + } + }, + "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + } + }, + "PORT_QOS_MAP": { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": { + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", + "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", + "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]", + "pfc_enable": "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSY": { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"516096", + "red_min_threshold":"516096", + "yellow_max_threshold":"516096", + "yellow_min_threshold":"516096", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + }, + "AZURE_LOSSLESS": { + "wred_green_enable":"true", + "wred_yellow_enable":"true", + "ecn":"ecn_all", + "red_max_threshold":"516096", + "red_min_threshold":"516096", + "yellow_max_threshold":"516096", + "yellow_min_threshold":"516096", + "green_max_threshold": "184320", + "green_min_threshold": "184320" + } + }, + "QUEUE": { + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0": { + "scheduler" : "[SCHEDULER|scheduler.1]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|1": { + "scheduler" : "[SCHEDULER|scheduler.2]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0-1": { + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]" + }, + "Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|3-4": { + "scheduler" : "[SCHEDULER|scheduler.0]", + "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]" + } + } +} + diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/sai.profile b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/sai.profile new file mode 100644 index 00000000000..9a9a38aeb06 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/LS-SN2700/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sai_2700.xml diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/hw-management b/device/mellanox/x86_64-mlnx_lssn2700-r0/hw-management new file mode 120000 index 00000000000..eb5e941daad --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/hw-management @@ -0,0 +1 @@ +/etc/mlnx/msn2700 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/installer.conf b/device/mellanox/x86_64-mlnx_lssn2700-r0/installer.conf new file mode 100644 index 00000000000..c9c9493a540 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/installer.conf @@ -0,0 +1 @@ +ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="acpi_enforce_resources=lax acpi=noirq" diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_lssn2700-r0/minigraph.xml new file mode 100644 index 00000000000..40eb5252610 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/minigraph.xml @@ -0,0 +1,1079 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + sonic + 10.0.0.32 + 1 + 180 + 60 + + + sonic + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + sonic + 10.0.0.34 + 1 + 180 + 60 + + + sonic + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + sonic + 10.0.0.36 + 1 + 180 + 60 + + + sonic + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + sonic + 10.0.0.38 + 1 + 180 + 60 + + + sonic + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + sonic + 10.0.0.40 + 1 + 180 + 60 + + + sonic + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + sonic + 10.0.0.42 + 1 + 180 + 60 + + + sonic + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + sonic + 10.0.0.44 + 1 + 180 + 60 + + + sonic + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + sonic + 10.0.0.46 + 1 + 180 + 60 + + + sonic + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + sonic + 10.0.0.48 + 1 + 180 + 60 + + + sonic + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + sonic + 10.0.0.50 + 1 + 180 + 60 + + + sonic + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + sonic + 10.0.0.52 + 1 + 180 + 60 + + + sonic + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + sonic + 10.0.0.54 + 1 + 180 + 60 + + + sonic + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + sonic + 10.0.0.56 + 1 + 180 + 60 + + + sonic + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + sonic + 10.0.0.58 + 1 + 180 + 60 + + + sonic + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + sonic + 10.0.0.60 + 1 + 180 + 60 + + + sonic + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + sonic + 10.0.0.62 + 1 + 180 + 60 + + + sonic + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + sonic + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + sonic + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + sonic + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + sonic + LS-SN2700 + + + + + + + sonic + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + ErspanDestinationIpv4 + + 2.2.2.2 + + + + + + + sonic + LS-SN2700 +
diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/eeprom.py b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/eeprom.py new file mode 100644 index 00000000000..3650d9c8b70 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/eeprom.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +############################################################################# +# Mellanox +# +# Platform and model specific eeprom subclass, inherits from the base class, +# and provides the followings: +# - the eeprom format definition +# - specific encoder/decoder if there is special need +############################################################################# + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + + _TLV_INFO_MAX_LEN = 256 + + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/bsp/eeprom/sys_eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/psuutil.py b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/psuutil.py new file mode 100644 index 00000000000..301569c13a9 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/psuutil.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python + +############################################################################# +# Mellanox +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +import os.path + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + def __init__(self): + PsuBase.__init__(self) + + self.psu_path = "/sys/bus/i2c/devices/2-0060/" + self.psu_presence = "psu{}_status" + self.psu_oper_status = "psu{}_pg_status" + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + + :return: An integer, the number of PSUs available on the device + """ + return 2 + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by 1-based index + + :param index: An integer, 1-based index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is faulty + """ + if index is None: + return False + + status = 0 + try: + with open(self.psu_path + self.psu_oper_status.format(index), 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by 1-based index + + :param index: An integer, 1-based index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + if index is None: + return False + + status = 0 + try: + with open(self.psu_path + self.psu_presence.format(index), 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfplpmget.py b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfplpmget.py new file mode 100644 index 00000000000..170766e9bce --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfplpmget.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number is missed." + print "Usage: sfplpmget.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get MCION +mcion = ku_mcion_reg() +mcion.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_mcion(mcion, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc + +# Get low power mode status +lpm_mask = 1 << 8 +lpm_status = (lpm_mask & mcion.module_status_bits) != 0 +print "LPM ON" if lpm_status else "LPM OFF" diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfplpmset.py b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfplpmset.py new file mode 100644 index 00000000000..3f31af9f294 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfplpmset.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python + +import sys, errno +import time +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +def get_log_ports(handle, sfp_module): + port_attributes_list = new_sx_port_attributes_t_arr(64) + port_cnt_p = new_uint32_t_p() + uint32_t_p_assign(port_cnt_p, 64) + + rc = sx_api_port_device_get(handle, 1 , 0, 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) + if port_attributes.port_mapping.module_port == sfp_module: + log_port_list.append(port_attributes.log_port) + + return log_port_list + +def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status): + # Get PMAOS + pmaos = ku_pmaos_reg() + pmaos.module = sfp_module + meta.access_cmd = SXD_ACCESS_CMD_GET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + + # Set admin status to PMAOS + pmaos.ase = 1 + pmaos.ee = 1 + pmaos.e = 2 + pmaos.rst = 0 + if admin_status == SX_PORT_ADMIN_STATUS_DOWN: + pmaos.admin_status = 2 + else: + pmaos.admin_status = 1 + + meta.access_cmd = SXD_ACCESS_CMD_SET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Check if SFP port number is provided +if len(sys.argv) < 3: + print "SFP module number or LPM is missed." + print "Usage: sfplpmset.py " + sys.exit(errno.EINVAL) + +lpm_enable = None +if sys.argv[2] == 'on': + lpm_enable = True +elif sys.argv[2] == 'off': + lpm_enable = False +else: + print "Unrecognized LPM parameter. Please use or values" + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES); + +# Get SFP module and log ports number and LPM status +sfp_module = int(sys.argv[1]) +log_port_list = get_log_ports(handle, sfp_module) +if not log_port_list: + print "Failed to get log ports" + sys.exit(errno.EACCES) + +# Get PMMP +pmmp = ku_pmmp_reg() +pmmp.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Disable admin status before LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN) + +# Set low power mode status +lpm_mask = 1 << 8 +if lpm_enable: + pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask +else: + pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask) + +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Enable admin status after LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP) diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfpreset.py b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfpreset.py new file mode 100644 index 00000000000..69fa2be614c --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfpreset.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number or LPM is missed." + print "Usage: sfpreset.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get PMAOS +pmaos = ku_pmaos_reg() +pmaos.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Reset SFP +pmaos.rst = 1 +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc +print "Reset flag is set" diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfputil.py new file mode 100644 index 00000000000..6aef1310d51 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/plugins/sfputil.py @@ -0,0 +1,151 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + import subprocess + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 31 + PORTS_IN_BLOCK = 32 + + EEPROM_OFFSET = 1 + + _port_to_eeprom_mapping = {} + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_ports(self): + return range(0, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = "/bsp/qsfp/qsfp{0}" + + for x in range(0, self.port_end + 1): + self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) + + SfpUtilBase.__init__(self) + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/bsp/qsfp/qsfp%d_status" % (port_num+1)) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string with the qsfp status + if content == "good": + return True + + return False + + def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num) + + try: + output = subprocess.check_output(lpm_cmd, shell=True) + if 'LPM ON' in output: + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + return False + + def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + curr_lpmode = self.get_low_power_mode(port_num) + if curr_lpmode == lpmode: + return True + + lpm = 'on' if lpmode else 'off' + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm) + sfp_port_names = self.physical_to_logical[port_num] + + # Get port admin status + try: + enabled_ports = subprocess.check_output("ip link show up", shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to get ports status, err msg: {}".format(e.output) + return False + + port_to_disable = [] + for port in sfp_port_names: + if port in enabled_ports: + port_to_disable.append(port) + + # Disable ports before LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} down".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + time.sleep(3) + + # Set LPM + try: + subprocess.check_output(lpm_cmd, shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + # Enable ports after LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} up".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + return True + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num) + + try: + subprocess.check_output(lpm_cmd, shell=True) + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + return False diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/sensors.conf b/device/mellanox/x86_64-mlnx_lssn2700-r0/sensors.conf new file mode 100644 index 00000000000..a3e30391863 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/sensors.conf @@ -0,0 +1,21 @@ +bus "i2c-7" "i2c-1-mux (chan_id 5)" +chip "lm75-i2c-7-4a" + label temp1 "Ambient Port Temp" + +bus "i2c-5" "i2c-1-mux (chan_id 3)" +chip "ucd9200-i2c-5-27" + label in1 "UCD1 vin" + label in2 "ASIC 3.3 vout" + label in3 "ASIC 1.2 vout" + label temp1 "UCD1 Temp" + label temp2 "UCD1 Temp2" + +chip "ucd9200-i2c-5-41" + label in1 "UCD2 vin" + label in2 "ASIC Vcore vout" + label temp1 "UCD2 Temp1" + label temp2 "UCD2 Temp2" + +bus "i2c-17" "i2c-1-mux (chan_id 7)" +chip "lm75-i2c-17-49" + label temp1 "Ambient Board Temp" diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml index 859c22a7dac..d902d6eac4d 100644 --- a/device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml @@ -3,7 +3,7 @@ - switch2 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -12,7 +12,7 @@ 60 - switch2 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -21,7 +21,7 @@ 60 - switch2 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -30,7 +30,7 @@ 60 - switch2 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -39,7 +39,7 @@ 60 - switch2 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -48,7 +48,7 @@ 60 - switch2 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -57,7 +57,7 @@ 60 - switch2 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -66,7 +66,7 @@ 60 - switch2 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -75,7 +75,7 @@ 60 - switch2 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -84,7 +84,7 @@ 60 - switch2 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -93,7 +93,7 @@ 60 - switch2 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -102,7 +102,7 @@ 60 - switch2 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -111,7 +111,7 @@ 60 - switch2 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -120,7 +120,7 @@ 60 - switch2 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -129,7 +129,7 @@ 60 - switch2 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -138,7 +138,7 @@ 60 - switch2 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -150,7 +150,7 @@ 65100 - switch2 + sonic
10.0.0.1
@@ -335,7 +335,7 @@ - switch2 + sonic @@ -430,112 +430,112 @@ DeviceInterfaceLink - switch2 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet60 ARISTA16T2 Ethernet1 @@ -543,7 +543,7 @@ - switch2 + sonic ACS-MSN2700 ` @@ -551,7 +551,7 @@ - switch2 + sonic DhcpResources @@ -573,6 +573,6 @@ - switch2 + sonic ACS-MSN2100 diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfplpmget.py b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfplpmget.py new file mode 100644 index 00000000000..170766e9bce --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfplpmget.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number is missed." + print "Usage: sfplpmget.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get MCION +mcion = ku_mcion_reg() +mcion.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_mcion(mcion, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc + +# Get low power mode status +lpm_mask = 1 << 8 +lpm_status = (lpm_mask & mcion.module_status_bits) != 0 +print "LPM ON" if lpm_status else "LPM OFF" diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfplpmset.py b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfplpmset.py new file mode 100644 index 00000000000..3f31af9f294 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfplpmset.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python + +import sys, errno +import time +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +def get_log_ports(handle, sfp_module): + port_attributes_list = new_sx_port_attributes_t_arr(64) + port_cnt_p = new_uint32_t_p() + uint32_t_p_assign(port_cnt_p, 64) + + rc = sx_api_port_device_get(handle, 1 , 0, 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) + if port_attributes.port_mapping.module_port == sfp_module: + log_port_list.append(port_attributes.log_port) + + return log_port_list + +def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status): + # Get PMAOS + pmaos = ku_pmaos_reg() + pmaos.module = sfp_module + meta.access_cmd = SXD_ACCESS_CMD_GET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + + # Set admin status to PMAOS + pmaos.ase = 1 + pmaos.ee = 1 + pmaos.e = 2 + pmaos.rst = 0 + if admin_status == SX_PORT_ADMIN_STATUS_DOWN: + pmaos.admin_status = 2 + else: + pmaos.admin_status = 1 + + meta.access_cmd = SXD_ACCESS_CMD_SET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Check if SFP port number is provided +if len(sys.argv) < 3: + print "SFP module number or LPM is missed." + print "Usage: sfplpmset.py " + sys.exit(errno.EINVAL) + +lpm_enable = None +if sys.argv[2] == 'on': + lpm_enable = True +elif sys.argv[2] == 'off': + lpm_enable = False +else: + print "Unrecognized LPM parameter. Please use or values" + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES); + +# Get SFP module and log ports number and LPM status +sfp_module = int(sys.argv[1]) +log_port_list = get_log_ports(handle, sfp_module) +if not log_port_list: + print "Failed to get log ports" + sys.exit(errno.EACCES) + +# Get PMMP +pmmp = ku_pmmp_reg() +pmmp.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Disable admin status before LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN) + +# Set low power mode status +lpm_mask = 1 << 8 +if lpm_enable: + pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask +else: + pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask) + +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Enable admin status after LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP) diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfpreset.py b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfpreset.py new file mode 100644 index 00000000000..69fa2be614c --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfpreset.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number or LPM is missed." + print "Usage: sfpreset.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get PMAOS +pmaos = ku_pmaos_reg() +pmaos.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Reset SFP +pmaos.rst = 1 +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc +print "Reset flag is set" diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py index ce0adde71a1..4a7b063ac60 100644 --- a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py @@ -5,6 +5,7 @@ try: import time + import subprocess from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError("%s - required module not found" % str(e)) @@ -46,17 +47,105 @@ def __init__(self): SfpUtilBase.__init__(self) def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False - raise NotImplementedError + try: + reg_file = open("/bsp/qsfp/qsfp%d_status" % (port_num+1)) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string with the qsfp status + if content == "good": + return True + + return False def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False - raise NotImplementedError + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num) - def set_low_power_mode(self, port_num, lpmode): + try: + output = subprocess.check_output(lpm_cmd, shell=True) + if 'LPM ON' in output: + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False - raise NotImplementedError + return False + + def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + curr_lpmode = self.get_low_power_mode(port_num) + if curr_lpmode == lpmode: + return True + + lpm = 'on' if lpmode else 'off' + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm) + sfp_port_names = self.physical_to_logical[port_num] + + # Get port admin status + try: + enabled_ports = subprocess.check_output("ip link show up", shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to get ports status, err msg: {}".format(e.output) + return False + + port_to_disable = [] + for port in sfp_port_names: + if port in enabled_ports: + port_to_disable.append(port) + + # Disable ports before LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} down".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + time.sleep(3) + + # Set LPM + try: + subprocess.check_output(lpm_cmd, shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + # Enable ports after LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} up".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + return True def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num) + + try: + subprocess.check_output(lpm_cmd, shell=True) + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False - raise NotImplementedError + return False diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_msn2410-r0/minigraph.xml index ea765fab814..8b417c35353 100644 --- a/device/mellanox/x86_64-mlnx_msn2410-r0/minigraph.xml +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch2 + sonic 10.0.0.32 1 180 60 - switch2 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch2 + sonic 10.0.0.34 1 180 60 - switch2 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch2 + sonic 10.0.0.36 1 180 60 - switch2 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch2 + sonic 10.0.0.38 1 180 60 - switch2 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch2 + sonic 10.0.0.40 1 180 60 - switch2 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch2 + sonic 10.0.0.42 1 180 60 - switch2 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch2 + sonic 10.0.0.44 1 180 60 - switch2 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch2 + sonic 10.0.0.46 1 180 60 - switch2 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch2 + sonic 10.0.0.48 1 180 60 - switch2 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch2 + sonic 10.0.0.50 1 180 60 - switch2 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch2 + sonic 10.0.0.52 1 180 60 - switch2 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch2 + sonic 10.0.0.54 1 180 60 - switch2 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch2 + sonic 10.0.0.56 1 180 60 - switch2 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch2 + sonic 10.0.0.58 1 180 60 - switch2 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch2 + sonic 10.0.0.60 1 180 60 - switch2 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch2 + sonic 10.0.0.62 1 180 60 - switch2 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch2 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch2 + sonic @@ -934,224 +934,224 @@ DeviceInterfaceLink - switch2 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1159,7 +1159,7 @@ - switch2 + sonic ACS-MSN2410 @@ -1167,7 +1167,7 @@ - switch2 + sonic DhcpResources @@ -1194,6 +1194,6 @@ - switch2 + sonic ACS-MSN2410 diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfplpmget.py b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfplpmget.py new file mode 100644 index 00000000000..170766e9bce --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfplpmget.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number is missed." + print "Usage: sfplpmget.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get MCION +mcion = ku_mcion_reg() +mcion.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_mcion(mcion, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc + +# Get low power mode status +lpm_mask = 1 << 8 +lpm_status = (lpm_mask & mcion.module_status_bits) != 0 +print "LPM ON" if lpm_status else "LPM OFF" diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfplpmset.py b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfplpmset.py new file mode 100644 index 00000000000..3f31af9f294 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfplpmset.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python + +import sys, errno +import time +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +def get_log_ports(handle, sfp_module): + port_attributes_list = new_sx_port_attributes_t_arr(64) + port_cnt_p = new_uint32_t_p() + uint32_t_p_assign(port_cnt_p, 64) + + rc = sx_api_port_device_get(handle, 1 , 0, 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) + if port_attributes.port_mapping.module_port == sfp_module: + log_port_list.append(port_attributes.log_port) + + return log_port_list + +def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status): + # Get PMAOS + pmaos = ku_pmaos_reg() + pmaos.module = sfp_module + meta.access_cmd = SXD_ACCESS_CMD_GET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + + # Set admin status to PMAOS + pmaos.ase = 1 + pmaos.ee = 1 + pmaos.e = 2 + pmaos.rst = 0 + if admin_status == SX_PORT_ADMIN_STATUS_DOWN: + pmaos.admin_status = 2 + else: + pmaos.admin_status = 1 + + meta.access_cmd = SXD_ACCESS_CMD_SET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Check if SFP port number is provided +if len(sys.argv) < 3: + print "SFP module number or LPM is missed." + print "Usage: sfplpmset.py " + sys.exit(errno.EINVAL) + +lpm_enable = None +if sys.argv[2] == 'on': + lpm_enable = True +elif sys.argv[2] == 'off': + lpm_enable = False +else: + print "Unrecognized LPM parameter. Please use or values" + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES); + +# Get SFP module and log ports number and LPM status +sfp_module = int(sys.argv[1]) +log_port_list = get_log_ports(handle, sfp_module) +if not log_port_list: + print "Failed to get log ports" + sys.exit(errno.EACCES) + +# Get PMMP +pmmp = ku_pmmp_reg() +pmmp.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Disable admin status before LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN) + +# Set low power mode status +lpm_mask = 1 << 8 +if lpm_enable: + pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask +else: + pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask) + +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Enable admin status after LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP) diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfpreset.py b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfpreset.py new file mode 100644 index 00000000000..69fa2be614c --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfpreset.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number or LPM is missed." + print "Usage: sfpreset.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get PMAOS +pmaos = ku_pmaos_reg() +pmaos.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Reset SFP +pmaos.rst = 1 +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc +print "Reset flag is set" diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py index 0d7870b785f..d9699aca45a 100644 --- a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py @@ -5,6 +5,7 @@ try: import time + import subprocess from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError("%s - required module not found" % str(e)) @@ -65,13 +66,86 @@ def get_presence(self, port_num): return False def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False - raise NotImplementedError + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num) + + try: + output = subprocess.check_output(lpm_cmd, shell=True) + if 'LPM ON' in output: + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + return False def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + curr_lpmode = self.get_low_power_mode(port_num) + if curr_lpmode == lpmode: + return True + + lpm = 'on' if lpmode else 'off' + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm) + sfp_port_names = self.physical_to_logical[port_num] + + # Get port admin status + try: + enabled_ports = subprocess.check_output("ip link show up", shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to get ports status, err msg: {}".format(e.output) + return False - raise NotImplementedError + port_to_disable = [] + for port in sfp_port_names: + if port in enabled_ports: + port_to_disable.append(port) + + # Disable ports before LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} down".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + time.sleep(3) + + # Set LPM + try: + subprocess.check_output(lpm_cmd, shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + # Enable ports after LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} up".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + return True def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num) + + try: + subprocess.check_output(lpm_cmd, shell=True) + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False - raise NotImplementedError + return False diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "{{ ingress_lossless_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "ingress_lossy_pool": { + "size": "{{ ingress_lossy_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "{{ egress_lossless_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "{{ egress_lossy_pool_size }}", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 34816 18432 16384 0 + 25000 5m 34816 18432 16384 0 + 40000 5m 34816 18432 16384 0 + 50000 5m 34816 18432 16384 0 + 100000 5m 36864 18432 18432 0 + 10000 40m 36864 18432 18432 0 + 25000 40m 39936 18432 21504 0 + 40000 40m 41984 18432 23552 0 + 50000 40m 41984 18432 23552 0 + 100000 40m 54272 18432 35840 0 + 10000 300m 49152 18432 30720 0 + 25000 300m 71680 18432 53248 0 + 40000 300m 94208 18432 75776 0 + 50000 300m 94208 18432 75776 0 + 100000 300m 184320 18432 165888 0 diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_msn2700-r0/minigraph.xml index 50f49f63878..19ea4a9670b 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/minigraph.xml +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch2 + sonic 10.0.0.32 1 180 60 - switch2 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch2 + sonic 10.0.0.34 1 180 60 - switch2 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch2 + sonic 10.0.0.36 1 180 60 - switch2 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch2 + sonic 10.0.0.38 1 180 60 - switch2 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch2 + sonic 10.0.0.40 1 180 60 - switch2 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch2 + sonic 10.0.0.42 1 180 60 - switch2 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch2 + sonic 10.0.0.44 1 180 60 - switch2 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch2 + sonic 10.0.0.46 1 180 60 - switch2 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch2 + sonic 10.0.0.48 1 180 60 - switch2 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch2 + sonic 10.0.0.50 1 180 60 - switch2 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch2 + sonic 10.0.0.52 1 180 60 - switch2 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch2 + sonic 10.0.0.54 1 180 60 - switch2 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch2 + sonic 10.0.0.56 1 180 60 - switch2 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch2 + sonic 10.0.0.58 1 180 60 - switch2 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch2 + sonic 10.0.0.60 1 180 60 - switch2 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch2 + sonic 10.0.0.62 1 180 60 - switch2 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch2 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch2 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch2 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch2 + sonic ACS-MSN2700 @@ -1047,7 +1047,7 @@ - switch2 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch2 + sonic ACS-MSN2700 diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfplpmget.py b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfplpmget.py new file mode 100644 index 00000000000..170766e9bce --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfplpmget.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number is missed." + print "Usage: sfplpmget.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get MCION +mcion = ku_mcion_reg() +mcion.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_mcion(mcion, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc + +# Get low power mode status +lpm_mask = 1 << 8 +lpm_status = (lpm_mask & mcion.module_status_bits) != 0 +print "LPM ON" if lpm_status else "LPM OFF" diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfplpmset.py b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfplpmset.py new file mode 100644 index 00000000000..3f31af9f294 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfplpmset.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python + +import sys, errno +import time +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +def get_log_ports(handle, sfp_module): + port_attributes_list = new_sx_port_attributes_t_arr(64) + port_cnt_p = new_uint32_t_p() + uint32_t_p_assign(port_cnt_p, 64) + + rc = sx_api_port_device_get(handle, 1 , 0, 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) + if port_attributes.port_mapping.module_port == sfp_module: + log_port_list.append(port_attributes.log_port) + + return log_port_list + +def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status): + # Get PMAOS + pmaos = ku_pmaos_reg() + pmaos.module = sfp_module + meta.access_cmd = SXD_ACCESS_CMD_GET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + + # Set admin status to PMAOS + pmaos.ase = 1 + pmaos.ee = 1 + pmaos.e = 2 + pmaos.rst = 0 + if admin_status == SX_PORT_ADMIN_STATUS_DOWN: + pmaos.admin_status = 2 + else: + pmaos.admin_status = 1 + + meta.access_cmd = SXD_ACCESS_CMD_SET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Check if SFP port number is provided +if len(sys.argv) < 3: + print "SFP module number or LPM is missed." + print "Usage: sfplpmset.py " + sys.exit(errno.EINVAL) + +lpm_enable = None +if sys.argv[2] == 'on': + lpm_enable = True +elif sys.argv[2] == 'off': + lpm_enable = False +else: + print "Unrecognized LPM parameter. Please use or values" + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES); + +# Get SFP module and log ports number and LPM status +sfp_module = int(sys.argv[1]) +log_port_list = get_log_ports(handle, sfp_module) +if not log_port_list: + print "Failed to get log ports" + sys.exit(errno.EACCES) + +# Get PMMP +pmmp = ku_pmmp_reg() +pmmp.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Disable admin status before LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN) + +# Set low power mode status +lpm_mask = 1 << 8 +if lpm_enable: + pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask +else: + pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask) + +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Enable admin status after LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP) diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfpreset.py b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfpreset.py new file mode 100644 index 00000000000..69fa2be614c --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfpreset.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number or LPM is missed." + print "Usage: sfpreset.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get PMAOS +pmaos = ku_pmaos_reg() +pmaos.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Reset SFP +pmaos.rst = 1 +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc +print "Reset flag is set" diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py index b768cc44022..6aef1310d51 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py @@ -5,6 +5,7 @@ try: import time + import subprocess from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError("%s - required module not found" % str(e)) @@ -65,13 +66,86 @@ def get_presence(self, port_num): return False def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False - raise NotImplementedError + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num) + + try: + output = subprocess.check_output(lpm_cmd, shell=True) + if 'LPM ON' in output: + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + return False def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + curr_lpmode = self.get_low_power_mode(port_num) + if curr_lpmode == lpmode: + return True + + lpm = 'on' if lpmode else 'off' + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm) + sfp_port_names = self.physical_to_logical[port_num] + + # Get port admin status + try: + enabled_ports = subprocess.check_output("ip link show up", shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to get ports status, err msg: {}".format(e.output) + return False - raise NotImplementedError + port_to_disable = [] + for port in sfp_port_names: + if port in enabled_ports: + port_to_disable.append(port) + + # Disable ports before LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} down".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + time.sleep(3) + + # Set LPM + try: + subprocess.check_output(lpm_cmd, shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + # Enable ports after LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} up".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + return True def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num) + + try: + subprocess.check_output(lpm_cmd, shell=True) + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False - raise NotImplementedError + return False diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "{{ ingress_lossless_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "ingress_lossy_pool": { + "size": "{{ ingress_lossy_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "{{ egress_lossless_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "{{ egress_lossy_pool_size }}", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", + "size":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 34816 18432 16384 0 + 25000 5m 34816 18432 16384 0 + 40000 5m 34816 18432 16384 0 + 50000 5m 34816 18432 16384 0 + 100000 5m 36864 18432 18432 0 + 10000 40m 36864 18432 18432 0 + 25000 40m 39936 18432 21504 0 + 40000 40m 41984 18432 23552 0 + 50000 40m 41984 18432 23552 0 + 100000 40m 54272 18432 35840 0 + 10000 300m 49152 18432 30720 0 + 25000 300m 71680 18432 53248 0 + 40000 300m 94208 18432 75776 0 + 50000 300m 94208 18432 75776 0 + 100000 300m 184320 18432 165888 0 diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_msn2740-r0/minigraph.xml index 81deffca3ae..f25aa94384e 100644 --- a/device/mellanox/x86_64-mlnx_msn2740-r0/minigraph.xml +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch2 + sonic 10.0.0.32 1 180 60 - switch2 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch2 + sonic 10.0.0.34 1 180 60 - switch2 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch2 + sonic 10.0.0.36 1 180 60 - switch2 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch2 + sonic 10.0.0.38 1 180 60 - switch2 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch2 + sonic 10.0.0.40 1 180 60 - switch2 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch2 + sonic 10.0.0.42 1 180 60 - switch2 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch2 + sonic 10.0.0.44 1 180 60 - switch2 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch2 + sonic 10.0.0.46 1 180 60 - switch2 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch2 + sonic 10.0.0.48 1 180 60 - switch2 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch2 + sonic 10.0.0.50 1 180 60 - switch2 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch2 + sonic 10.0.0.52 1 180 60 - switch2 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch2 + sonic 10.0.0.54 1 180 60 - switch2 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch2 + sonic 10.0.0.56 1 180 60 - switch2 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch2 + sonic 10.0.0.58 1 180 60 - switch2 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch2 + sonic 10.0.0.60 1 180 60 - switch2 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch2 + sonic 10.0.0.62 1 180 60 - switch2 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch2 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch2 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch2 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch2 + sonic ACS-MSN2740 ` @@ -1047,7 +1047,7 @@ - switch2 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch2 + sonic ACS-MSN2740 diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfplpmget.py b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfplpmget.py new file mode 100644 index 00000000000..170766e9bce --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfplpmget.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number is missed." + print "Usage: sfplpmget.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get MCION +mcion = ku_mcion_reg() +mcion.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_mcion(mcion, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc + +# Get low power mode status +lpm_mask = 1 << 8 +lpm_status = (lpm_mask & mcion.module_status_bits) != 0 +print "LPM ON" if lpm_status else "LPM OFF" diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfplpmset.py b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfplpmset.py new file mode 100644 index 00000000000..3f31af9f294 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfplpmset.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python + +import sys, errno +import time +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +def get_log_ports(handle, sfp_module): + port_attributes_list = new_sx_port_attributes_t_arr(64) + port_cnt_p = new_uint32_t_p() + uint32_t_p_assign(port_cnt_p, 64) + + rc = sx_api_port_device_get(handle, 1 , 0, 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) + if port_attributes.port_mapping.module_port == sfp_module: + log_port_list.append(port_attributes.log_port) + + return log_port_list + +def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status): + # Get PMAOS + pmaos = ku_pmaos_reg() + pmaos.module = sfp_module + meta.access_cmd = SXD_ACCESS_CMD_GET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + + # Set admin status to PMAOS + pmaos.ase = 1 + pmaos.ee = 1 + pmaos.e = 2 + pmaos.rst = 0 + if admin_status == SX_PORT_ADMIN_STATUS_DOWN: + pmaos.admin_status = 2 + else: + pmaos.admin_status = 1 + + meta.access_cmd = SXD_ACCESS_CMD_SET + rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) + assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Check if SFP port number is provided +if len(sys.argv) < 3: + print "SFP module number or LPM is missed." + print "Usage: sfplpmset.py " + sys.exit(errno.EINVAL) + +lpm_enable = None +if sys.argv[2] == 'on': + lpm_enable = True +elif sys.argv[2] == 'off': + lpm_enable = False +else: + print "Unrecognized LPM parameter. Please use or values" + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES); + +# Get SFP module and log ports number and LPM status +sfp_module = int(sys.argv[1]) +log_port_list = get_log_ports(handle, sfp_module) +if not log_port_list: + print "Failed to get log ports" + sys.exit(errno.EACCES) + +# Get PMMP +pmmp = ku_pmmp_reg() +pmmp.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Disable admin status before LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN) + +# Set low power mode status +lpm_mask = 1 << 8 +if lpm_enable: + pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask +else: + pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask) + +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc + +# Enable admin status after LPM settings +set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP) diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfpreset.py b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfpreset.py new file mode 100644 index 00000000000..69fa2be614c --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfpreset.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +import sys, errno +import os +from python_sdk_api.sxd_api import * +from python_sdk_api.sx_api import * + +# Check if SFP port number is provided +if len(sys.argv) < 2: + print "SFP module number or LPM is missed." + print "Usage: sfpreset.py " + sys.exit(errno.EINVAL) + +# Init SDK API +rc, handle = sx_api_open(None) +if (rc != SX_STATUS_SUCCESS): + print "Failed to open api handle.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +pid = os.getpid() +rc = sxd_access_reg_init(pid, None, 0) +if (rc != 0): + print "Failed to initializing register access.\nPlease check that SDK is running." + sys.exit(errno.EACCES) + +# Get SFP module number +sfp_module = int(sys.argv[1]) + +# Get PMAOS +pmaos = ku_pmaos_reg() +pmaos.module = sfp_module +meta = sxd_reg_meta_t() +meta.dev_id = 1 +meta.swid = 0 +meta.access_cmd = SXD_ACCESS_CMD_GET + +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc + +# Reset SFP +pmaos.rst = 1 +meta.access_cmd = SXD_ACCESS_CMD_SET +rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None) +assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc +print "Reset flag is set" diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py index b768cc44022..6aef1310d51 100644 --- a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py @@ -5,6 +5,7 @@ try: import time + import subprocess from sonic_sfp.sfputilbase import SfpUtilBase except ImportError as e: raise ImportError("%s - required module not found" % str(e)) @@ -65,13 +66,86 @@ def get_presence(self, port_num): return False def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False - raise NotImplementedError + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num) + + try: + output = subprocess.check_output(lpm_cmd, shell=True) + if 'LPM ON' in output: + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + return False def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + curr_lpmode = self.get_low_power_mode(port_num) + if curr_lpmode == lpmode: + return True + + lpm = 'on' if lpmode else 'off' + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm) + sfp_port_names = self.physical_to_logical[port_num] + + # Get port admin status + try: + enabled_ports = subprocess.check_output("ip link show up", shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to get ports status, err msg: {}".format(e.output) + return False - raise NotImplementedError + port_to_disable = [] + for port in sfp_port_names: + if port in enabled_ports: + port_to_disable.append(port) + + # Disable ports before LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} down".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + time.sleep(3) + + # Set LPM + try: + subprocess.check_output(lpm_cmd, shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False + + # Enable ports after LPM settings + for port in port_to_disable: + try: + subprocess.check_output("ifconfig {} up".format(port), shell=True) + except subprocess.CalledProcessError as e: + print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output) + return False + + return True def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num) + + try: + subprocess.check_output(lpm_cmd, shell=True) + return True + except subprocess.CalledProcessError as e: + print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output) + return False - raise NotImplementedError + return False diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/sensors.conf b/device/mellanox/x86_64-mlnx_msn2740-r0/sensors.conf new file mode 100644 index 00000000000..a3e30391863 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/sensors.conf @@ -0,0 +1,21 @@ +bus "i2c-7" "i2c-1-mux (chan_id 5)" +chip "lm75-i2c-7-4a" + label temp1 "Ambient Port Temp" + +bus "i2c-5" "i2c-1-mux (chan_id 3)" +chip "ucd9200-i2c-5-27" + label in1 "UCD1 vin" + label in2 "ASIC 3.3 vout" + label in3 "ASIC 1.2 vout" + label temp1 "UCD1 Temp" + label temp2 "UCD1 Temp2" + +chip "ucd9200-i2c-5-41" + label in1 "UCD2 vin" + label in2 "ASIC Vcore vout" + label temp1 "UCD2 Temp1" + label temp2 "UCD2 Temp2" + +bus "i2c-17" "i2c-1-mux (chan_id 7)" +chip "lm75-i2c-17-49" + label temp1 "Ambient Board Temp" diff --git a/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/MiTAC-LY1200-B32H0-C3/port_config.ini b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/MiTAC-LY1200-B32H0-C3/port_config.ini new file mode 100644 index 00000000000..1fa6d21d960 --- /dev/null +++ b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/MiTAC-LY1200-B32H0-C3/port_config.ini @@ -0,0 +1,33 @@ +# name lanes alias +Ethernet0 49,50,51,52 hundredGigE1 +Ethernet4 53,54,55,56 hundredGigE2 +Ethernet8 57,58,59,60 hundredGigE3 +Ethernet12 61,62,63,64 hundredGigE4 +Ethernet16 65,66,67,68 hundredGigE5 +Ethernet20 69,70,71,72 hundredGigE6 +Ethernet24 73,74,75,76 hundredGigE7 +Ethernet28 77,78,79,80 hundredGigE8 +Ethernet32 33,34,35,36 hundredGigE9 +Ethernet36 37,38,39,40 hundredGigE10 +Ethernet40 41,42,43,44 hundredGigE11 +Ethernet44 45,46,47,48 hundredGigE12 +Ethernet48 81,82,83,84 hundredGigE13 +Ethernet52 85,86,87,88 hundredGigE14 +Ethernet56 89,90,91,92 hundredGigE15 +Ethernet60 93,94,95,96 hundredGigE16 +Ethernet64 97,98,99,100 hundredGigE17 +Ethernet68 101,102,103,104 hundredGigE18 +Ethernet72 105,106,107,108 hundredGigE19 +Ethernet76 109,110,111,112 hundredGigE20 +Ethernet80 17,18,19,20 hundredGigE21 +Ethernet84 21,22,23,24 hundredGigE22 +Ethernet88 25,26,27,28 hundredGigE23 +Ethernet92 29,30,31,32 hundredGigE24 +Ethernet96 113,114,115,116 hundredGigE25 +Ethernet100 117,118,119,120 hundredGigE26 +Ethernet104 121,122,123,124 hundredGigE27 +Ethernet108 125,126,127,128 hundredGigE28 +Ethernet112 1,2,3,4 hundredGigE29 +Ethernet116 5,6,7,8 hundredGigE30 +Ethernet120 9,10,11,12 hundredGigE31 +Ethernet124 13,14,15,16 hundredGigE32 diff --git a/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/MiTAC-LY1200-B32H0-C3/sai.profile b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/MiTAC-LY1200-B32H0-C3/sai.profile new file mode 100644 index 00000000000..5bf97eb31a4 --- /dev/null +++ b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/MiTAC-LY1200-B32H0-C3/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th-ly1200-32x100G.config.bcm diff --git a/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/installer.conf b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/installer.conf new file mode 100644 index 00000000000..8d4683add46 --- /dev/null +++ b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/installer.conf @@ -0,0 +1,4 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 +CONSOLE_SPEED=115200 +ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="acpi_enforce_resources=lax pcie_aspm=off irqpoll" diff --git a/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/led_proc_init.soc b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/led_proc_init.soc new file mode 100644 index 00000000000..867cd1b6fe3 --- /dev/null +++ b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/led_proc_init.soc @@ -0,0 +1,43 @@ +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=31 REMAP_PORT_1=30 REMAP_PORT_2=29 REMAP_PORT_3=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=27 REMAP_PORT_5=26 REMAP_PORT_6=25 REMAP_PORT_7=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=23 REMAP_PORT_9=22 REMAP_PORT_10=21 REMAP_PORT_11=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=19 REMAP_PORT_13=18 REMAP_PORT_14=17 REMAP_PORT_15=16 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 REMAP_PORT_17=62 REMAP_PORT_18=61 REMAP_PORT_19=60 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=59 REMAP_PORT_21=58 REMAP_PORT_22=57 REMAP_PORT_23=56 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=55 REMAP_PORT_25=54 REMAP_PORT_26=53 REMAP_PORT_27=52 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=51 REMAP_PORT_29=50 REMAP_PORT_30=49 REMAP_PORT_31=48 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=47 REMAP_PORT_33=46 REMAP_PORT_34=45 REMAP_PORT_35=44 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=43 REMAP_PORT_37=42 REMAP_PORT_38=41 REMAP_PORT_39=40 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=39 REMAP_PORT_41=38 REMAP_PORT_42=37 REMAP_PORT_43=36 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=35 REMAP_PORT_45=34 REMAP_PORT_46=33 REMAP_PORT_47=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15 REMAP_PORT_49=14 REMAP_PORT_50=13 REMAP_PORT_51=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0 + +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=35 REMAP_PORT_1=34 REMAP_PORT_2=33 REMAP_PORT_3=32 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=39 REMAP_PORT_5=38 REMAP_PORT_6=37 REMAP_PORT_7=36 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=43 REMAP_PORT_9=42 REMAP_PORT_10=41 REMAP_PORT_11=40 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=47 REMAP_PORT_13=46 REMAP_PORT_14=45 REMAP_PORT_15=44 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=3 REMAP_PORT_17=2 REMAP_PORT_18=1 REMAP_PORT_19=0 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=7 REMAP_PORT_21=6 REMAP_PORT_22=5 REMAP_PORT_23=4 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=11 REMAP_PORT_25=10 REMAP_PORT_26=9 REMAP_PORT_27=8 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=15 REMAP_PORT_29=14 REMAP_PORT_30=13 REMAP_PORT_31=12 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=19 REMAP_PORT_33=18 REMAP_PORT_34=17 REMAP_PORT_35=16 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=23 REMAP_PORT_37=22 REMAP_PORT_38=21 REMAP_PORT_39=20 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=27 REMAP_PORT_41=26 REMAP_PORT_42=25 REMAP_PORT_43=24 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=31 REMAP_PORT_45=30 REMAP_PORT_46=29 REMAP_PORT_47=28 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=51 REMAP_PORT_49=50 REMAP_PORT_50=49 REMAP_PORT_51=48 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 REMAP_PORT_53=54 REMAP_PORT_54=53 REMAP_PORT_55=52 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=59 REMAP_PORT_57=58 REMAP_PORT_58=57 REMAP_PORT_59=56 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=62 REMAP_PORT_62=61 REMAP_PORT_63=60 + +led 0 prog 06 EE 80 D2 0A 71 08 E0 60 EE E9 D2 05 75 10 81 61 ED 02 00 12 A0 F8 15 67 22 F2 01 D2 40 74 14 3A 80 28 32 08 97 71 2A 77 65 1A 07 71 30 77 3C 1A 02 27 1A 03 27 C7 97 71 5E 77 4A 28 32 00 32 01 B7 26 ED C7 97 75 50 77 65 1A 02 71 50 77 57 32 0E 87 32 0F 87 57 32 0F 87 32 0E 87 57 32 0E 87 32 0E 87 57 32 0F 87 32 0F 87 57 + +led 0 start + +led 1 prog 06 EE 80 D2 0A 71 08 E0 60 EE E9 D2 05 75 10 81 61 ED 02 00 12 A0 F8 15 67 22 F2 01 D2 40 74 14 3A 80 28 32 08 97 71 2A 77 65 1A 07 71 30 77 3C 1A 02 27 1A 03 27 C7 97 71 5E 77 4A 28 32 00 32 01 B7 26 ED C7 97 75 50 77 65 1A 02 71 50 77 57 32 0E 87 32 0F 87 57 32 0F 87 32 0E 87 57 32 0E 87 32 0E 87 57 32 0F 87 32 0F 87 57 + +led 1 start + +led auto on diff --git a/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/minigraph.xml b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/minigraph.xml new file mode 100644 index 00000000000..210eac2fd62 --- /dev/null +++ b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/minigraph.xml @@ -0,0 +1,1074 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + sonic + 10.0.0.32 + 1 + 180 + 60 + + + sonic + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + sonic + 10.0.0.34 + 1 + 180 + 60 + + + sonic + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + sonic + 10.0.0.36 + 1 + 180 + 60 + + + sonic + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + sonic + 10.0.0.38 + 1 + 180 + 60 + + + sonic + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + sonic + 10.0.0.40 + 1 + 180 + 60 + + + sonic + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + sonic + 10.0.0.42 + 1 + 180 + 60 + + + sonic + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + sonic + 10.0.0.44 + 1 + 180 + 60 + + + sonic + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + sonic + 10.0.0.46 + 1 + 180 + 60 + + + sonic + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + sonic + 10.0.0.48 + 1 + 180 + 60 + + + sonic + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + sonic + 10.0.0.50 + 1 + 180 + 60 + + + sonic + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + sonic + 10.0.0.52 + 1 + 180 + 60 + + + sonic + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + sonic + 10.0.0.54 + 1 + 180 + 60 + + + sonic + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + sonic + 10.0.0.56 + 1 + 180 + 60 + + + sonic + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + sonic + 10.0.0.58 + 1 + 180 + 60 + + + sonic + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + sonic + 10.0.0.60 + 1 + 180 + 60 + + + sonic + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + sonic + 10.0.0.62 + 1 + 180 + 60 + + + sonic + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + sonic + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + sonic + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + sonic + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + sonic + MiTAC-LY1200-B32H0-C3 + + + + + + + sonic + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + sonic + MiTAC-LY1200-B32H0-C3 +
diff --git a/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/plugins/eeprom.py b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/plugins/eeprom.py new file mode 100644 index 00000000000..96dcc597532 --- /dev/null +++ b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/plugins/eeprom.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/2-0050/eeprom" + #Two i2c buses might get flipped order, check them both. + if not os.path.exists(self.eeprom_path): + self.eeprom_path = "/sys/bus/i2c/devices/2-0050/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/plugins/sfputil.py b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/plugins/sfputil.py new file mode 100644 index 00000000000..17d4d2f95b5 --- /dev/null +++ b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/plugins/sfputil.py @@ -0,0 +1,182 @@ +# sfputil.py +# +# Platform-specific SFP transceiver interface for SONiC +# + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError as e: + raise ImportError("%s - required module not found" % str(e)) + + +class SfpUtil(SfpUtilBase): + """Platform-specific SfpUtil class""" + + PORT_START = 0 + PORT_END = 31 + PORTS_IN_BLOCK = 32 + + EEPROM_OFFSET = 10 + + _port_to_eeprom_mapping = {} + + @property + def port_start(self): + return self.PORT_START + + @property + def port_end(self): + return self.PORT_END + + @property + def qsfp_ports(self): + return range(0, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom" + + for x in range(0, self.port_end + 1): + self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET) + + SfpUtilBase.__init__(self) + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + if port_num > 16: + cpld_addr=33 + else: + cpld_addr=32 + + file_path="/sys/bus/i2c/devices/1-00" + str(cpld_addr) + "/port" + str(port_num) + "/port" + str(port_num) + "_present" + + try: + reg_file = open("file_path") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + + # ModPrsL is active low + if reg_value == 0: + return True + + return False + + def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + if port_num > 16: + cpld_addr=33 + else: + cpld_addr=32 + + + file_path="/sys/bus/i2c/devices/1-00" + str(cpld_addr) + "/port" + str(port_num) + "/port" + str(port_num) + "_lpmode" + + try: + reg_file = open(file_path) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # LPMode is active high + if reg_value == 0: + return False + + return True + + def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + if port_num > 16: + cpld_addr=33 + else: + cpld_addr=32 + + file_path="/sys/bus/i2c/devices/1-00" + str(cpld_num) + "/port" + str(port_num) + "/port" + str(port_num) + "_lpmode" + + try: + reg_file = open(file_path, "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # LPMode is active high; set or clear the bit accordingly + if lpmode is True: + reg_value = 1 + else: + reg_value = 0 + + # Convert our register value back to a hex string and write back + content = hex(reg_value) + + reg_file.seek(0) + reg_file.write(content) + reg_file.close() + + return True + + def reset(self, port_num): + + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + if port_num > 16: + cpld_addr=33 + else: + cpld_addr=32 + + file_path="/sys/bus/i2c/devices/1-00" + str(cpld_num) + "/port" + str(port_num) + "/port" + str(port_num) + "_rst" + + try: + reg_file = open(file_path, "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # ResetL is active low + reg_value = 0 + + # Convert our register value back to a hex string and write back + reg_file.seek(0) + reg_file.write(hex(reg_value)) + reg_file.close() + + # Sleep 1 second to allow it to settle + time.sleep(1) + + # Flip the bit back high and write back to the register to take port out of reset + try: + reg_file = open(QSFP_RESET_REGISTER_DEVICE_FILE, "w") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = 1 + reg_file.seek(0) + reg_file.write(hex(reg_value)) + reg_file.close() + + return True diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/Quanta-IX1B-32X/port_config.ini b/device/quanta/x86_64-quanta_ix1b_32x-r0/Quanta-IX1B-32X/port_config.ini new file mode 100755 index 00000000000..4f4f63925d8 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/Quanta-IX1B-32X/port_config.ini @@ -0,0 +1,33 @@ +# name lanes alias +Ethernet0 65,66,67,68 hundredGigE1 +Ethernet4 69,70,71,72 hundredGigE2 +Ethernet8 73,74,75,76 hundredGigE3 +Ethernet12 77,78,79,80 hundredGigE4 +Ethernet16 45,46,47,48 hundredGigE5 +Ethernet20 41,42,43,44 hundredGigE6 +Ethernet24 53,54,55,56 hundredGigE7 +Ethernet28 49,50,51,52 hundredGigE8 +Ethernet32 61,62,63,64 hundredGigE9 +Ethernet36 57,58,59,60 hundredGigE10 +Ethernet40 37,38,39,40 hundredGigE11 +Ethernet44 33,34,35,36 hundredGigE12 +Ethernet48 81,82,83,84 hundredGigE13 +Ethernet52 85,86,87,88 hundredGigE14 +Ethernet56 89,90,91,92 hundredGigE15 +Ethernet60 93,94,95,96 hundredGigE16 +Ethernet64 97,98,99,100 hundredGigE17 +Ethernet68 101,102,103,104 hundredGigE18 +Ethernet72 105,106,107,108 hundredGigE19 +Ethernet76 109,110,111,112 hundredGigE20 +Ethernet80 29,30,31,32 hundredGigE21 +Ethernet84 25,26,27,28 hundredGigE22 +Ethernet88 5,6,7,8 hundredGigE23 +Ethernet92 1,2,3,4 hundredGigE24 +Ethernet96 13,14,15,16 hundredGigE25 +Ethernet100 9,10,11,12 hundredGigE26 +Ethernet104 21,22,23,24 hundredGigE27 +Ethernet108 17,18,19,20 hundredGigE28 +Ethernet112 113,114,115,116 hundredGigE29 +Ethernet116 117,118,119,120 hundredGigE30 +Ethernet120 121,122,123,124 hundredGigE31 +Ethernet124 125,126,127,128 hundredGigE32 diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/Quanta-IX1B-32X/sai.profile b/device/quanta/x86_64-quanta_ix1b_32x-r0/Quanta-IX1B-32X/sai.profile new file mode 100755 index 00000000000..fa4ce6c1de9 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/Quanta-IX1B-32X/sai.profile @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/th-ix1b-32x100G.config.bcm diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/installer.conf b/device/quanta/x86_64-quanta_ix1b_32x-r0/installer.conf new file mode 100755 index 00000000000..14404194ef5 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x2f8 +CONSOLE_DEV=1 +CONSOLE_SPEED=115200 diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/led_proc_init.soc b/device/quanta/x86_64-quanta_ix1b_32x-r0/led_proc_init.soc new file mode 100755 index 00000000000..831f74df755 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/led_proc_init.soc @@ -0,0 +1,10 @@ +led 0 stop +led 1 stop + +led 0 prog 02 00 60 E2 D2 40 71 12 12 F0 85 05 D2 0A 71 19 52 00 67 1B 06 E2 80 77 02 3A 80 67 20 67 2E 57 06 E2 12 00 F0 80 F8 15 1A 00 75 4E 77 52 06 E2 F0 12 00 F8 15 1A 00 75 3B 77 46 06 E2 F0 12 00 F8 15 1A 01 75 4E 16 F0 DA 05 75 4E 77 52 32 0F 87 57 32 0E 87 57 00 00 00 00 00 00 00 00 00 00 +led 1 prog 02 00 60 E2 D2 40 71 12 12 F0 85 05 D2 0A 71 19 52 00 67 1B 06 E2 80 77 02 3A 80 67 20 67 2E 57 06 E2 12 00 F0 80 F8 15 1A 00 75 4E 77 52 06 E2 F0 12 00 F8 15 1A 00 75 3B 77 46 06 E2 F0 12 00 F8 15 1A 01 75 4E 16 F0 DA 05 75 4E 77 52 32 0F 87 57 32 0E 87 57 00 00 00 00 00 00 00 00 00 00 + +led 0 auto on +led 1 auto on +led 0 start +led 1 start \ No newline at end of file diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/minigraph.xml b/device/quanta/x86_64-quanta_ix1b_32x-r0/minigraph.xml new file mode 100755 index 00000000000..9d348f0051b --- /dev/null +++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/minigraph.xml @@ -0,0 +1,1074 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + sonic + 10.0.0.32 + 1 + 180 + 60 + + + sonic + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + sonic + 10.0.0.34 + 1 + 180 + 60 + + + sonic + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + sonic + 10.0.0.36 + 1 + 180 + 60 + + + sonic + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + sonic + 10.0.0.38 + 1 + 180 + 60 + + + sonic + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + sonic + 10.0.0.40 + 1 + 180 + 60 + + + sonic + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + sonic + 10.0.0.42 + 1 + 180 + 60 + + + sonic + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + sonic + 10.0.0.44 + 1 + 180 + 60 + + + sonic + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + sonic + 10.0.0.46 + 1 + 180 + 60 + + + sonic + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + sonic + 10.0.0.48 + 1 + 180 + 60 + + + sonic + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + sonic + 10.0.0.50 + 1 + 180 + 60 + + + sonic + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + sonic + 10.0.0.52 + 1 + 180 + 60 + + + sonic + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + sonic + 10.0.0.54 + 1 + 180 + 60 + + + sonic + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + sonic + 10.0.0.56 + 1 + 180 + 60 + + + sonic + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + sonic + 10.0.0.58 + 1 + 180 + 60 + + + sonic + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + sonic + 10.0.0.60 + 1 + 180 + 60 + + + sonic + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + sonic + 10.0.0.62 + 1 + 180 + 60 + + + sonic + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + sonic + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + sonic + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + sonic + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + sonic + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + sonic + Quanta-IX1B-32X + + + + + + + sonic + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + sonic + Quanta-IX1B-32X +
diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/eeprom.py b/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/eeprom.py new file mode 100755 index 00000000000..989f7fe5079 --- /dev/null +++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/eeprom.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +try: + import exceptions + import binascii + import time + import optparse + import warnings + import os + import sys + from sonic_eeprom import eeprom_base + from sonic_eeprom import eeprom_tlvinfo + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/22-0054/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/psuutil.py b/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/psuutil.py new file mode 100755 index 00000000000..5b12ba41c9a --- /dev/null +++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/psuutil.py @@ -0,0 +1,171 @@ +# +# psuutil.py +# Platform-specific PSU status interface for SONiC +# + + +import os.path +import commands +import logging + +try: + from sonic_psu.psu_base import PsuBase +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + +DEBUG = False + +def show_log(txt): + if DEBUG == True: + print "[IX1B]"+txt + return + +def exec_cmd(cmd, show): + logging.info('Run :'+cmd) + status, output = commands.getstatusoutput(cmd) + show_log (cmd +"with result:" + str(status)) + show_log (" output:"+output) + if status: + logging.info('Failed :'+cmd) + if show: + print('Failed :'+cmd) + return status, output + +def my_log(txt): + if DEBUG == True: + print "[QUANTA DBG]: "+txt + return + +def log_os_system(cmd, show): + logging.info('Run :'+cmd) + status = 1 + output = "" + status, output = commands.getstatusoutput(cmd) + my_log (cmd +"with result:" + str(status)) + my_log ("cmd:" + cmd) + my_log (" output:"+output) + if status: + logging.info('Failed :'+cmd) + if show: + print('Failed :'+cmd) + return status, output + +def gpio16_exist(): + ret, ls = log_os_system("ls /sys/class/gpio/ | grep gpio16", 0) + logging.info('mods:'+ls) + if len(ls) ==0: + return False + +def gpio17_exist(): + ret, ls = log_os_system("ls /sys/class/gpio/ | grep gpio17", 0) + logging.info('mods:'+ls) + if len(ls) ==0: + return False + +def gpio19_exist(): + ret, ls = log_os_system("ls /sys/class/gpio/ | grep gpio19", 0) + logging.info('mods:'+ls) + if len(ls) ==0: + return False + +def gpio20_exist(): + ret, ls = log_os_system("ls /sys/class/gpio/ | grep gpio20", 0) + logging.info('mods:'+ls) + if len(ls) ==0: + return False + +class PsuUtil(PsuBase): + """Platform-specific PSUutil class""" + + SYSFS_PSU_PRESENT_DIR = ["/sys/class/gpio/gpio16", + "/sys/class/gpio/gpio19"] + + SYSFS_PSU_POWERGOOD_DIR = ["/sys/class/gpio/gpio17", + "/sys/class/gpio/gpio20"] + def __init__(self): + PsuBase.__init__(self) + + if gpio16_exist() == False: + status, output = exec_cmd("echo 16 > /sys/class/gpio/export ", 1) + status, output = exec_cmd("echo in > /sys/class/gpio/gpio16/direction ", 1) + + if gpio17_exist() == False: + status, output = exec_cmd("echo 17 > /sys/class/gpio/export ", 1) + status, output = exec_cmd("echo in > /sys/class/gpio/gpio17/direction ", 1) + + if gpio19_exist() == False: + status, output = exec_cmd("echo 19 > /sys/class/gpio/export ", 1) + status, output = exec_cmd("echo in > /sys/class/gpio/gpio19/direction ", 1) + + if gpio20_exist() == False: + status, output = exec_cmd("echo 20 > /sys/class/gpio/export ", 1) + status, output = exec_cmd("echo in > /sys/class/gpio/gpio20/direction ", 1) + + # Get sysfs attribute + def get_attr_value(self, attr_path): + + retval = 'ERR' + if (not os.path.isfile(attr_path)): + return retval + + try: + with open(attr_path, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", attr_path, " file !") + + retval = retval.rstrip('\r\n') + return retval + + def get_num_psus(self): + """ + Retrieves the number of PSUs available on the device + :return: An integer, the number of PSUs available on the device + """ + MAX_PSUS = 2 + return MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is operating properly, False if PSU is\ + faulty + """ + status = 0 + attr_file = 'value' + attr_path = self.SYSFS_PSU_POWERGOOD_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU status + if (attr_value == 1): + status = 1 + + return status + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by index + :param index: An integer, index of the PSU of which to query status + :return: Boolean, True if PSU is plugged, False if not + """ + status = 0 + psu_absent = 0 + attr_file ='value' + attr_path = self.SYSFS_PSU_PRESENT_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (attr_value == 0): + status = 1 + + return status + diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/sfputil.py b/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/sfputil.py new file mode 100755 index 00000000000..fb168a5d38c --- /dev/null +++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/plugins/sfputil.py @@ -0,0 +1,171 @@ +#!/usr/bin/env python + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + + +class SfpUtil(SfpUtilBase): + """Platform specific SfpUtill class""" + + _port_start = 0 + _port_end = 31 + ports_in_block = 32 + + _port_to_eeprom_mapping = {} + port_to_i2c_mapping = { + 1 : 32, + 2 : 33, + 3 : 34, + 4 : 35, + 5 : 36, + 6 : 37, + 7 : 38, + 8 : 39, + 9 : 40, + 10 : 41, + 11 : 42, + 12 : 43, + 13 : 44, + 14 : 45, + 15 : 46, + 16 : 47, + 17 : 48, + 18 : 49, + 19 : 50, + 20 : 51, + 21 : 52, + 22 : 53, + 23 : 54, + 24 : 55, + 25 : 56, + 26 : 57, + 27 : 58, + 28 : 59, + 29 : 60, + 30 : 61, + 31 : 62, + 32 : 63, + } + + _qsfp_ports = range(0, ports_in_block + 1) + + def __init__(self): + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/eeprom' + for x in range(0, self._port_end + 1): + port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x+1]) + self._port_to_eeprom_mapping[x] = port_eeprom_path + SfpUtilBase.__init__(self) + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/reset", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = 0 + reg_file.write(hex(reg_value)) + reg_file.close() + + # Sleep 2 second to allow it to settle + time.sleep(2) + + # Flip the value back write back to the register to take port out of reset + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/reset", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = 1 + reg_file.write(hex(reg_value)) + reg_file.close() + + return True + + def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/lpmode", "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = int(reg_file.readline().rstrip()) + + # LPMode is active high; set or clear the bit accordingly + if lpmode is True: + reg_value = 1 + else: + reg_value = 0 + + reg_file.write(hex(reg_value)) + reg_file.close() + + return True + + def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/lpmode") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = int(reg_file.readline().rstrip()) + + if reg_value == 0: + return False + + return True + + def get_presence(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + #path = "/sys/class/cpld-qsfp28/port-{0}/module_present" + #port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + + try: + reg_file = open("/sys/class/cpld-qsfp28/port-"+str(port_num+1)+"/module_present") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_file.readline().rstrip() + if reg_value == '1': + return True + + return False + + @property + def port_start(self): + return self._port_start + + @property + def port_end(self): + return self._port_end + + @property + def qsfp_ports(self): + return range(0, self.ports_in_block + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + diff --git a/dockers/docker-base/etc/supervisor/supervisord.conf b/dockers/docker-base/etc/supervisor/supervisord.conf index afead15524b..351cc06fc04 100644 --- a/dockers/docker-base/etc/supervisor/supervisord.conf +++ b/dockers/docker-base/etc/supervisor/supervisord.conf @@ -3,11 +3,14 @@ [unix_http_server] file=/var/run/supervisor.sock ; (the path to the socket file) chmod=0700 ; sockef file mode (default 0700) +username=dummy +password=dummy [supervisord] logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) +user=root ; the below section must remain in the config file for RPC ; (supervisorctl/web interface) to work, additional interfaces may be @@ -17,6 +20,8 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket +username=dummy +password=dummy ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or diff --git a/dockers/docker-config-engine/Dockerfile.j2 b/dockers/docker-config-engine/Dockerfile.j2 index b4d924bddfc..bc82e1ca288 100644 --- a/dockers/docker-config-engine/Dockerfile.j2 +++ b/dockers/docker-config-engine/Dockerfile.j2 @@ -5,8 +5,8 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -# Dependencies for sonic-cfggen -RUN apt-get install -y python-lxml python-yaml python-bitarray python-pip python-dev +# Dependencies for sonic-cfggen +RUN apt-get install -y python-lxml python-yaml python-bitarray python-pip python-dev python-natsort RUN pip install --upgrade pip diff --git a/dockers/docker-database/base_image_files/redis-cli b/dockers/docker-database/base_image_files/redis-cli index 103dd9e0253..6ce1951cd4b 100755 --- a/dockers/docker-database/base_image_files/redis-cli +++ b/dockers/docker-database/base_image_files/redis-cli @@ -1,3 +1,10 @@ #!/bin/bash -docker exec -it database redis-cli "$@" +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS database redis-cli "$@" diff --git a/dockers/docker-database/supervisord.conf b/dockers/docker-database/supervisord.conf index 9ad7ff32bcf..f095e78bc14 100644 --- a/dockers/docker-database/supervisord.conf +++ b/dockers/docker-database/supervisord.conf @@ -4,7 +4,7 @@ logfile_backups=2 nodaemon=true [program:rsyslogd] -command=/usr/sbin/rsyslogd -n +command=/bin/bash -c "rm -f /var/run/rsyslogd.pid && /usr/sbin/rsyslogd -n" priority=1 autostart=true autorestart=false @@ -24,5 +24,6 @@ command=/usr/bin/configdb-load.sh priority=3 autostart=true autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog diff --git a/dockers/docker-fpm-frr/base_image_files/vtysh b/dockers/docker-fpm-frr/base_image_files/vtysh index 18529b7522c..8f8cb2e6796 100755 --- a/dockers/docker-fpm-frr/base_image_files/vtysh +++ b/dockers/docker-fpm-frr/base_image_files/vtysh @@ -1,2 +1,10 @@ #!/bin/bash -docker exec -it bgp vtysh "$@" + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS bgp vtysh "$@" diff --git a/dockers/docker-fpm-quagga/base_image_files/vtysh b/dockers/docker-fpm-quagga/base_image_files/vtysh index 18529b7522c..8f8cb2e6796 100755 --- a/dockers/docker-fpm-quagga/base_image_files/vtysh +++ b/dockers/docker-fpm-quagga/base_image_files/vtysh @@ -1,2 +1,10 @@ #!/bin/bash -docker exec -it bgp vtysh "$@" + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS bgp vtysh "$@" diff --git a/dockers/docker-fpm-quagga/supervisord.conf b/dockers/docker-fpm-quagga/supervisord.conf index 92d806ff281..3e05215baba 100644 --- a/dockers/docker-fpm-quagga/supervisord.conf +++ b/dockers/docker-fpm-quagga/supervisord.conf @@ -8,6 +8,7 @@ command=/usr/bin/start.sh priority=1 autostart=true autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog @@ -16,6 +17,7 @@ command=/usr/bin/bgpcfgd priority=2 autostart=false autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog @@ -24,6 +26,7 @@ command=/usr/sbin/rsyslogd -n priority=3 autostart=false autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog @@ -32,6 +35,7 @@ command=/usr/lib/quagga/zebra -A 127.0.0.1 priority=4 autostart=false autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog @@ -40,6 +44,7 @@ command=/usr/lib/quagga/bgpd -A 127.0.0.1 -F priority=5 autostart=false autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog @@ -48,5 +53,6 @@ command=fpmsyncd priority=6 autostart=false autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog diff --git a/dockers/docker-lldp-sv2/Dockerfile.j2 b/dockers/docker-lldp-sv2/Dockerfile.j2 index bfb1f9ca678..f75e4ea3142 100644 --- a/dockers/docker-lldp-sv2/Dockerfile.j2 +++ b/dockers/docker-lldp-sv2/Dockerfile.j2 @@ -1,37 +1,49 @@ FROM docker-config-engine -COPY \ -{% for deb in docker_lldp_sv2_debs.split(' ') -%} -debs/{{ deb }}{{' '}} -{%- endfor -%} -debs/ +# Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive -COPY python-wheels /python-wheels +# Update apt's cache of available packages +RUN apt-get update -## Make apt-get non-interactive -ENV DEBIAN_FRONTEND=noninteractive +# Install dependencies +RUN apt-get install -y python-pip libbsd0 libevent-2.0-5 libjansson4 libwrap0 libxml2 libpci3 libperl5.20 libpython2.7 + +{% if docker_lldp_sv2_debs.strip() -%} +# Copy locally-built Debian package dependencies +{%- for deb in docker_lldp_sv2_debs.split(' ') %} +COPY debs/{{ deb }} /debs/ +{%- endfor %} -RUN apt-get update && apt-get install -y python-pip libbsd0 libevent-2.0-5 libjansson4 libwrap0 libxml2 libpci3 libperl5.20 +# Install locally-built Debian packages and implicitly install their dependencies +{%- for deb in docker_lldp_sv2_debs.split(' ') %} +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }} +{%- endfor %} +{%- endif %} -# Pre-install the fundamental packages -# Install Python SwSS SDK -# Install LLDP Sync Daemon +{% if docker_lldp_sv2_whls.strip() -%} +# Copy locally-built Python wheel dependencies +{%- for whl in docker_lldp_sv2_whls.split(' ') %} +COPY python-wheels/{{ whl }} /python-wheels/ +{%- endfor %} -RUN dpkg -i \ -{% for deb in docker_lldp_sv2_debs.split(' ') -%} -debs/{{ deb }}{{' '}} +# Install locally-built Python wheel dependencies +{%- for whl in docker_lldp_sv2_whls.split(' ') %} +RUN pip install /python-wheels/{{ whl }} {%- endfor %} +{% endif %} -RUN pip install /python-wheels/swsssdk-2.0.1-py2-none-any.whl && \ - pip install /python-wheels/sonic_d-2.0.0-py2-none-any.whl && \ - apt-get remove -y python-pip && \ - apt-get purge -y && apt-get autoclean -y && apt-get autoremove -y && \ - rm -rf /debs /python-wheels ~/.cache +# Clean up +RUN apt-get remove -y python-pip +RUN apt-get clean -y +RUN apt-get autoclean -y +RUN apt-get autoremove -y +RUN rm -rf /debs /python-wheels ~/.cache COPY ["start.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] -COPY ["reconfigure.sh", "/usr/bin/"] COPY ["lldpd.conf.j2", "/usr/share/sonic/templates/"] COPY ["lldpd", "/etc/default/"] +COPY ["lldpmgrd", "/usr/bin/"] ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/dockers/docker-lldp-sv2/base_image_files/lldpctl b/dockers/docker-lldp-sv2/base_image_files/lldpctl index 068a6e3b504..f5b6d8307ee 100755 --- a/dockers/docker-lldp-sv2/base_image_files/lldpctl +++ b/dockers/docker-lldp-sv2/base_image_files/lldpctl @@ -1,2 +1,10 @@ #!/bin/bash -docker exec -i lldp lldpctl "$@" + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS lldp lldpctl "$@" diff --git a/dockers/docker-lldp-sv2/lldpd.conf.j2 b/dockers/docker-lldp-sv2/lldpd.conf.j2 index 165ded79f39..ea8be54b097 100644 --- a/dockers/docker-lldp-sv2/lldpd.conf.j2 +++ b/dockers/docker-lldp-sv2/lldpd.conf.j2 @@ -1,4 +1,6 @@ +{% if MGMT_INTERFACE %} configure ports eth0 lldp portidsubtype local {{ MGMT_INTERFACE.keys()[0][0] }} +{% endif %} {% for local_port in DEVICE_NEIGHBOR %} configure ports {{ local_port }} lldp portidsubtype local {{ PORT[local_port]['alias'] }} description {{ DEVICE_NEIGHBOR[local_port]['name'] }}:{{ DEVICE_NEIGHBOR[local_port]['port'] }} {% endfor %} diff --git a/dockers/docker-lldp-sv2/lldpmgrd b/dockers/docker-lldp-sv2/lldpmgrd new file mode 100755 index 00000000000..89bba918bf3 --- /dev/null +++ b/dockers/docker-lldp-sv2/lldpmgrd @@ -0,0 +1,232 @@ +#!/usr/bin/env python + +""" + lldpmgrd + + LLDP manager daemon for SONiC + + Daemon which listens for changes in the PORT table of the State DB + and updates LLDP configuration accordingly for that port by calling + lldpcli. + + TODO: Also listen for changes in DEVICE_NEIGHBOR and PORT tables in + Config DB and update LLDP config upon changes. +""" + + +try: + import os + import signal + import subprocess + import sys + import syslog + from swsscommon import swsscommon +except ImportError as err: + raise ImportError("%s - required module not found" % str(err)) + +VERSION = "1.0" + +SYSLOG_IDENTIFIER = "lldpmgrd" + + +# ========================== Syslog wrappers ========================== + +def log_debug(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_DEBUG, msg) + syslog.closelog() + + +def log_info(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_INFO, msg) + syslog.closelog() + + +def log_warning(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_WARNING, msg) + syslog.closelog() + + +def log_error(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_ERR, msg) + syslog.closelog() + + +# ========================== Signal Handling ========================== + +def signal_handler(sig, frame): + if sig == signal.SIGHUP: + log_info("Caught SIGHUP - ignoring...") + return + elif sig == signal.SIGINT: + log_info("Caught SIGINT - exiting...") + sys.exit(128 + sig) + elif sig == signal.SIGTERM: + log_info("Caught SIGTERM - exiting...") + sys.exit(128 + sig) + else: + log_warning("Caught unhandled signal '" + sig + "'") + + +# ============================== Classes ============================== + +class LldpManager(object): + """ + Class which subscribes to notifications of changes in the PORT table of + the Redis State database and updates LLDP configuration accordingly for + that port by calling lldpcli. + Attributes: + state_db: Handle to Redis State database via swsscommon lib + config_db: Handle to Redis Config database via swsscommon lib + pending_cmds: Dictionary where key is port name, value is pending + LLDP configuration command to run + """ + REDIS_HOSTNAME = "localhost" + REDIS_PORT = 6379 + REDIS_TIMEOUT_MS = 0 + + def __init__(self): + # Open a handle to the State database + self.state_db = swsscommon.DBConnector(swsscommon.STATE_DB, + self.REDIS_HOSTNAME, + self.REDIS_PORT, + self.REDIS_TIMEOUT_MS) + + # Open a handle to the Config database + self.config_db = swsscommon.DBConnector(swsscommon.CONFIG_DB, + self.REDIS_HOSTNAME, + self.REDIS_PORT, + self.REDIS_TIMEOUT_MS) + + self.pending_cmds = {} + + def generate_pending_lldp_config_cmd_for_port(self, port_name): + """ + For port `port_name`, look up the neighboring device's hostname and + corresponding port alias in the Config database, then form the + appropriate lldpcli configuration command and run it. + """ + # Retrieve all entires for this port from the Port table + port_table = swsscommon.Table(self.config_db, swsscommon.CFG_PORT_TABLE_NAME) + (status, fvp) = port_table.get(port_name) + if status: + # Convert list of tuples to a dictionary + port_table_dict = dict(fvp) + + # Get the port alias. If None or empty string, use port name instead + port_alias = port_table_dict.get("alias") + if not port_alias: + log_info("Unable to retrieve port alias for port '{}'. Using port name instead.".format(port_name)) + port_alias = port_name + else: + log_error("Port '{}' not found in {} table in Config DB. Using port name instead of port alias.".format(port_name, swsscommon.CFG_PORT_TABLE_NAME)) + port_alias = port_name + + lldpcli_cmd = "lldpcli configure ports {0} lldp portidsubtype local {1}".format(port_name, port_alias) + + # Retrieve all entires for this port from the Device Neighbor table + device_neighbor_table = swsscommon.Table(self.config_db, swsscommon.CFG_DEVICE_NEIGHBOR_TABLE_NAME) + (status, fvp) = device_neighbor_table.get(port_name) + if status: + # Convert list of tuples to a dictionary + device_neighbor_table_dict = dict(fvp) + + # Get neighbor host name and port name + neighbor_hostname = device_neighbor_table_dict.get("name") + neighbor_portname = device_neighbor_table_dict.get("port") + + # If we sucessfully obtained the neighbor's host name and port name, append a port description to the command + if neighbor_hostname and neighbor_portname: + lldpcli_cmd += " description {0}:{1}".format(neighbor_hostname, neighbor_portname) + else: + if not neighbor_hostname: + log_info("Failed to retrieve neighbor host name for port '{}'. Not adding port description.".format(port_name)) + + if not neighbor_portname: + log_info("Failed to retrieve neighbor port name for port '{}'. Not adding port description.".format(port_name)) + else: + log_info("Unable to retrieve neighbor information for port '{}'. Not adding port description.".format(port_name)) + + # Add the command to our dictionary of pending commands, overwriting any + # previous pending command for this port + self.pending_cmds[port_name] = lldpcli_cmd + + def process_pending_cmds(self): + # List of port names (keys of elements) to delete from self.pending_cmds + to_delete = [] + + for (port_name, cmd) in self.pending_cmds.iteritems(): + log_debug("Running command: '{}'".format(cmd)) + + proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + (stdout, stderr) = proc.communicate() + + # If the command succeeds, add the port name to our to_delete list. + # We will delete this command from self.pending_cmds below. + # If the command fails, log a message, but don't delete the command + # from self.pending_cmds, so that the command will be retried the + # next time this method is called. + if proc.returncode == 0: + to_delete.append(port_name) + else: + log_warning("Command failed '{}': {}".format(cmd, stderr)) + + # Delete all successful commands from self.pending_cmds + for port_name in to_delete: + self.pending_cmds.pop(port_name, None) + + def run(self): + """ + Infinite loop. Subscribes to notifications of changes in the PORT table + of the Redis State database. When we are notified of the creation of an + interface, update LLDP configuration accordingly. + """ + # Set select timeout to 10 seconds + SELECT_TIMEOUT_MS = 1000 * 10 + + # Subscribe to PORT table notifications in the State DB + sel = swsscommon.Select() + sst = swsscommon.SubscriberStateTable(self.state_db, swsscommon.STATE_PORT_TABLE_NAME) + sel.addSelectable(sst) + + # Listen indefinitely for changes to the PORT table in the State DB + while True: + (state, c) = sel.select(SELECT_TIMEOUT_MS) + + if state == swsscommon.Select.OBJECT: + (key, op, fvp) = sst.pop() + + fvp_dict = dict(fvp) + + if op == "SET" and fvp_dict.get("state") == "ok": + self.generate_pending_lldp_config_cmd_for_port(key) + + # Process all pending commands + self.process_pending_cmds() + + +# ============================= Functions ============================= + +def main(): + log_info("Starting up...") + + if not os.geteuid() == 0: + log_error("Must be root to run this daemon") + print "Error: Must be root to run this daemon" + sys.exit(1) + + # Register our signal handlers + signal.signal(signal.SIGHUP, signal_handler) + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + # Instantiate a LldpManager object + lldpmgr = LldpManager() + lldpmgr.run() + +if __name__ == "__main__": + main() diff --git a/dockers/docker-lldp-sv2/reconfigure.sh b/dockers/docker-lldp-sv2/reconfigure.sh deleted file mode 100755 index 515e771aa6f..00000000000 --- a/dockers/docker-lldp-sv2/reconfigure.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -set -e - -# TODO: Listen to state database when it is ready -interfaces=$(sonic-cfggen -d -v "PORT.keys() | join(' ')") - -function wait_until_if_exists -{ - if=$1 - while [ ! -L /sys/class/net/"$if" ] ; - do - sleep 1 - done - echo interface "$if" is created -} - - -function wait_until_if_not_exists -{ - if=$1 - while [ -L /sys/class/net/"$if" ] ; - do - sleep 1 - done - echo interface "$if" is destroyed -} - - -while /bin/true ; -do - # wait until all interfaces are created - echo Wait until all interfaces are created - for i in $interfaces - do - wait_until_if_exists $i - done - - echo Wait 10 seconds while lldpd finds new interfaces - sleep 10 - - # apply lldpd configuration - echo Apply lldpd configuration - lldpcli -c /etc/lldpd.conf - - # wait until all interfaces are destroyed - echo Wait until all ifaces are destroyed - for i in $interfaces - do - wait_until_if_not_exists $i - done -done diff --git a/dockers/docker-lldp-sv2/start.sh b/dockers/docker-lldp-sv2/start.sh index 3a765c6f548..26337fb0667 100755 --- a/dockers/docker-lldp-sv2/start.sh +++ b/dockers/docker-lldp-sv2/start.sh @@ -9,5 +9,5 @@ rm -f /var/run/rsyslogd.pid supervisorctl start rsyslogd supervisorctl start lldpd -supervisorctl start lldpd-conf-reload supervisorctl start lldp-syncd +supervisorctl start lldpmgrd diff --git a/dockers/docker-lldp-sv2/supervisord.conf b/dockers/docker-lldp-sv2/supervisord.conf index ab62d9ed2e8..e8022a9a5fa 100644 --- a/dockers/docker-lldp-sv2/supervisord.conf +++ b/dockers/docker-lldp-sv2/supervisord.conf @@ -25,24 +25,24 @@ stderr_logfile=syslog # - `-dd` means to stay in foreground, log warnings to console # - `-ddd` means to stay in foreground, log warnings and info to console # - `-dddd` means to stay in foreground, log all to console -command=/usr/sbin/lldpd -d -I Ethernet*,eth* -priority=100 +command=/usr/sbin/lldpd -d -I Ethernet*,eth* -C eth0 +priority=3 autostart=false autorestart=false stdout_logfile=syslog stderr_logfile=syslog -[program:lldpd-conf-reload] -command=/usr/bin/reconfigure.sh -priority=150 +[program:lldp-syncd] +command=/usr/bin/env python2 -m lldp_syncd +priority=4 autostart=false autorestart=false stdout_logfile=syslog stderr_logfile=syslog -[program:lldp-syncd] -command=/usr/bin/env python2 -m lldp_syncd -priority=200 +[program:lldpmgrd] +command=/usr/bin/lldpmgrd +priority=5 autostart=false autorestart=false stdout_logfile=syslog diff --git a/dockers/docker-orchagent/base_image_files/swssloglevel b/dockers/docker-orchagent/base_image_files/swssloglevel index 9282470c264..d03685ed383 100755 --- a/dockers/docker-orchagent/base_image_files/swssloglevel +++ b/dockers/docker-orchagent/base_image_files/swssloglevel @@ -1,2 +1,10 @@ #!/bin/bash -docker exec -i swss swssloglevel "$@" + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS swss swssloglevel "$@" diff --git a/dockers/docker-orchagent/ipinip.json.j2 b/dockers/docker-orchagent/ipinip.json.j2 index 2554755c701..bee97f45b8a 100644 --- a/dockers/docker-orchagent/ipinip.json.j2 +++ b/dockers/docker-orchagent/ipinip.json.j2 @@ -11,7 +11,7 @@ "tunnel_type":"IPINIP", "src_ip":"{{ ipv4_loopback_addresses | first | ip }}", "dst_ip":"{% for prefix in ipv4_loopback_addresses %}{{ prefix | ip }}{% if not loop.last %},{% endif %}{% endfor %}", -{% if onie_switch_asic == "mlnx" %} +{% if "mlnx" in DEVICE_METADATA.localhost.platform %} "dscp_mode":"uniform", "ecn_mode":"standard", {% else %} diff --git a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 deleted file mode 100644 index 0a60f4584a1..00000000000 --- a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 +++ /dev/null @@ -1,287 +0,0 @@ -[ -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') %} - { - "BUFFER_POOL_TABLE:ingress_lossy_pool": { - "size": "6422528", - "type": "ingress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossless_pool": { - "size": "7291456", - "type": "egress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossy_pool": { - "size": "8254464", - "type": "egress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", - "size":"0", - "dynamic_th":"1" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", - "size":"4096", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:pg_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_INGRESS_PROFILE_LIST:{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_EGRESS_PROFILE_LIST:{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" - }, - "OP": "SET" - }, - -{# The following template part is for variable PG profile configuration #} -{% set non_pg_lossless_pool_size = 866726 %} -{% set pg_range = '3-4' %} -{# Lists of supported speed and cable length #} -{% set supported_speed = [10000, 25000, 40000, 50000, 100000] %} -{% set supported_cable = [5, 40, 300] %} - -{# The key in this lictionary consist of two parts: (port speed)_(cable length) #} -{%- set portconfig2profile = { - '10000_5' : 'pg_lossless_10G_5m_profile', - '25000_5' : 'pg_lossless_25G_5m_profile', - '40000_5' : 'pg_lossless_40G_5m_profile', - '50000_5' : 'pg_lossless_50G_5m_profile', - '100000_5' : 'pg_lossless_100G_5m_profile', - - '10000_40' : 'pg_lossless_10G_40m_profile', - '25000_40' : 'pg_lossless_25G_40m_profile', - '40000_40' : 'pg_lossless_40G_40m_profile', - '50000_40' : 'pg_lossless_50G_40m_profile', - '100000_40' : 'pg_lossless_100G_40m_profile', - - '10000_300' : 'pg_lossless_10G_300m_profile', - '25000_300' : 'pg_lossless_25G_300m_profile', - '40000_300' : 'pg_lossless_40G_300m_profile', - '50000_300' : 'pg_lossless_50G_300m_profile', - '100000_300': 'pg_lossless_100G_300m_profile' - } --%} - -{# PG profiles. All profiles reffered in portconfig2profile dictionary should be declared here #} -{# Only those which were actually used will be created in SAI #} -{%- set pg_profiles = { - 'pg_lossless_10G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, - 'pg_lossless_25G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, - 'pg_lossless_40G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, - 'pg_lossless_50G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, - 'pg_lossless_100G_5m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 1 }, - - 'pg_lossless_10G_40m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 1 }, - 'pg_lossless_25G_40m_profile': { 'xon': 18432, 'xoff': 21504, 'size': 39936, 'dynamic_th': 1 }, - 'pg_lossless_40G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 1 }, - 'pg_lossless_50G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 1 }, - 'pg_lossless_100G_40m_profile': { 'xon': 18432, 'xoff': 35840, 'size': 54272, 'dynamic_th': 1 }, - - 'pg_lossless_10G_300m_profile': { 'xon': 18432, 'xoff': 30720, 'size': 49152, 'dynamic_th': 1 }, - 'pg_lossless_25G_300m_profile': { 'xon': 18432, 'xoff': 53248, 'size': 71680, 'dynamic_th': 1 }, - 'pg_lossless_40G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 1 }, - 'pg_lossless_50G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 1 }, - 'pg_lossless_100G_300m_profile':{ 'xon': 18432, 'xoff': 165888,'size': 184320,'dynamic_th': 1 }, - } --%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'ToRRouter_Server' : '5', - 'LeafRouter_ToRRouter' : '40', - 'SpineRouter_LeafRouter' : '300' - } -%} - -{% set switch_role = DEVICE_METADATA['localhost']['type'] %} - -{%- macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {% endif %} - {% endif %} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ supported_cable | last }} - {%- endif -%} -{% endmacro %} - -{%- macro find_closest_greater_config(speed, cable) -%} -{%- set new_speed = [] -%} -{%- for std_speed in supported_speed -%} - {%- if std_speed | int >= speed | int -%} - {%- if new_speed.append(std_speed) -%}{%- endif -%} - {% endif -%} -{%- endfor -%} -{%- set new_cable = [] -%} -{%- for std_cable in supported_cable -%} - {% if std_cable | int >= cable | int -%} - {%- if new_cable.append(std_cable) -%}{%- endif -%} - {% endif %} -{%- endfor -%} -{{ new_speed.0 }}_{{ new_cable.0 }} -{%- endmacro -%} - -{% set ingress_lossless_pg_pool_size = [] %} -{% set used_pg_profiles = [] %} -{% for port in PORT %} - {%- if PORT[port].speed -%} - {%- set speed = PORT[port]['speed'] -%} - {% else %} - {%- set speed = supported_speed|last -%} - {%- endif -%} - {%- set cable = cable_length(port) -%} - {%- set port_config = speed|string + '_' + cable -%} - {%- if not port_config in portconfig2profile -%} - {% set port_config = find_closest_greater_config(speed, cable) -%} - {%- endif -%} - {% set profile = portconfig2profile[port_config] -%} - {% if ingress_lossless_pg_pool_size.append(pg_profiles[profile]['size']) %}{% endif %} - {# add to list profiles which were actually used #} - {%- if profile not in used_pg_profiles and used_pg_profiles.append(profile) %}{% endif -%} - { - "BUFFER_PG_TABLE:{{ port }}:{{ pg_range }}": { - "profile" : "[BUFFER_PROFILE_TABLE:{{ profile }}]" - }, - "OP": "SET" - }, -{% endfor -%} - -{# PG profiles declaration #} - -{% for profile_name in used_pg_profiles %} - {%- set profile_config = pg_profiles[profile_name] %} - { - "BUFFER_PROFILE_TABLE:{{ profile_name }}": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", - "xon":"{{ profile_config['xon'] }}", - "xoff":"{{ profile_config['xoff'] }}", - "size":"{{ profile_config['size'] }}", - "dynamic_th":"{{ profile_config['dynamic_th'] }}" - }, - "OP": "SET" - }, -{% endfor -%} - - {# Lossless pool declaration #} - { - "BUFFER_POOL_TABLE:ingress_lossless_pool": { - "size": "{{ ingress_lossless_pg_pool_size | sum + non_pg_lossless_pool_size }}", - "type": "ingress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:{{ port_names }}:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" - }, - "OP": "SET" - }, - { - "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { - "0": "0", - "1": "1", - "3": "3", - "4": "4" - }, - "OP": "SET" - }, - { - "PORT_QOS_MAP_TABLE:{{ port_names }}": { - "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" - }, - "OP": "SET" - } -] diff --git a/dockers/docker-orchagent/ports.json.j2 b/dockers/docker-orchagent/ports.json.j2 index e0438998114..b10d4d58a43 100644 --- a/dockers/docker-orchagent/ports.json.j2 +++ b/dockers/docker-orchagent/ports.json.j2 @@ -1,7 +1,12 @@ [ +{% set ports_with_speed_set=[] %} {% if PORT %} {% for port in PORT %} {% if PORT[port].has_key('speed') %} + {%- if ports_with_speed_set.append(port) -%}{%- endif -%} +{%- endif -%} +{% endfor %} +{% for port in ports_with_speed_set %} { "PORT_TABLE:{{ port }}": { "speed": "{{ PORT[port]['speed'] }}", @@ -10,7 +15,6 @@ "OP": "SET" }{% if not loop.last %},{% endif %} -{% endif %} {% endfor %} {% endif %} ] diff --git a/dockers/docker-orchagent/start.sh b/dockers/docker-orchagent/start.sh index dfdb5b897bb..e26be9286aa 100755 --- a/dockers/docker-orchagent/start.sh +++ b/dockers/docker-orchagent/start.sh @@ -6,7 +6,7 @@ sonic-cfggen -d -t /usr/share/sonic/templates/switch.json.j2 > /etc/swss/config. sonic-cfggen -d -t /usr/share/sonic/templates/ipinip.json.j2 > /etc/swss/config.d/ipinip.json sonic-cfggen -d -t /usr/share/sonic/templates/ports.json.j2 > /etc/swss/config.d/ports.json -export platform=`sonic-cfggen -v platform` +export platform=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform` rm -f /var/run/rsyslogd.pid @@ -26,6 +26,8 @@ supervisorctl start vlanmgrd supervisorctl start intfmgrd +supervisorctl start buffermgrd + # Start arp_update when VLAN exists VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'` if [ "$VLAN" != "" ]; then diff --git a/dockers/docker-orchagent/supervisord.conf b/dockers/docker-orchagent/supervisord.conf index 95e92be622b..84beaed440a 100644 --- a/dockers/docker-orchagent/supervisord.conf +++ b/dockers/docker-orchagent/supervisord.conf @@ -83,3 +83,11 @@ autostart=false autorestart=false stdout_logfile=syslog stderr_logfile=syslog + +[program:buffermgrd] +command=/usr/bin/buffermgrd -l /usr/share/sonic/hwsku/pg_profile_lookup.ini +priority=10 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index c8ee8759333..850a4afd1ef 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -16,12 +16,26 @@ function fast_reboot { swssconfig /arp.json rm -f /arp.json fi + + if [[ -f /default_routes.json ]]; + then + swssconfig /default_routes.json + rm -f /default_routes.json + fi + ;; *) ;; esac } +# Wait until swss.sh in the host system create file swss:/ready +until [[ -e /ready ]]; do + sleep 0.1; +done + +rm -f /ready + # Restore FDB and ARP table ASAP fast_reboot @@ -29,19 +43,6 @@ HWSKU=`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['hwsku']"` SWSSCONFIG_ARGS="00-copp.config.json ipinip.json ports.json switch.json " -if [ "$HWSKU" == "Force10-S6000" ]; then - SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json " -elif [ "$HWSKU" == "Force10-S6000-Q32" ]; then - SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json " -elif [ "$HWSKU" == "Force10-S6100" ]; then - SWSSCONFIG_ARGS+="th.64ports.buffers.json th.64ports.qos.json " -elif [ "$HWSKU" == "Arista-7050-QX32" ]; then - SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json " -elif [[ "$HWSKU" == "ACS-MSN27"* ]]; then - sonic-cfggen -d -t /usr/share/sonic/templates/msn27xx.32ports.buffers.json.j2 > /etc/swss/config.d/msn27xx.32ports.buffers.json - SWSSCONFIG_ARGS+="msn27xx.32ports.buffers.json " -fi - for file in $SWSSCONFIG_ARGS; do swssconfig /etc/swss/config.d/$file sleep 1 diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index b6406b3e3a6..95e9d150ea2 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -3,50 +3,35 @@ FROM docker-config-engine # Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -# Update apt's package index files +# Update apt's cache of available packages RUN apt-get update # Install required packages -RUN apt-get install -y python-pip sensord fancontrol - -{% if docker_platform_monitor_debs.strip() %} -# Copy built Debian packages -COPY \ -{% for deb in docker_platform_monitor_debs.split(' ') -%} -debs/{{ deb }}{{' '}} -{%- endfor -%} -debs/ -{%- endif %} +RUN apt-get install -y python-pip libpython2.7 sensord fancontrol -{% if docker_platform_monitor_debs.strip() %} -# Install built Debian packages -RUN dpkg -i \ -{% for deb in docker_platform_monitor_debs.split(' ') -%} -debs/{{ deb }}{{' '}} +{% if docker_platform_monitor_debs.strip() -%} +# Copy locally-built Debian package dependencies +{%- for deb in docker_platform_monitor_debs.split(' ') %} +COPY debs/{{ deb }} /debs/ {%- endfor %} -{%- endif %} - -{% if docker_platform_monitor_whls.strip() %} -# Copy built Python wheels -COPY \ -{% for whl in docker_platform_monitor_whls.split(' ') -%} -python-wheels/{{ whl }}{{' '}} -{%- endfor -%} -python-wheels/ -{%- endif %} -{% if docker_platform_monitor_whls.strip() %} -# Install built Python wheels -RUN pip install \ -{% for whl in docker_platform_monitor_whls.split(' ') -%} -python-wheels/{{ whl }}{{' '}} +# Install locally-built Debian packages and implicitly install their dependencies +{%- for deb in docker_platform_monitor_debs.split(' ') %} +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }} {%- endfor %} {%- endif %} -COPY python-wheels /python-wheels +{% if docker_platform_monitor_whls.strip() -%} +# Copy locally-built Python wheel dependencies +{%- for whl in docker_platform_monitor_whls.split(' ') %} +COPY python-wheels/{{ whl }} /python-wheels/ +{%- endfor %} -# Install Python SwSS SDK (dependency of sonic-ledd) -RUN pip install /python-wheels/swsssdk-2.0.1-py2-none-any.whl +# Install locally-built Python wheel dependencies +{%- for whl in docker_platform_monitor_whls.split(' ') %} +RUN pip install /python-wheels/{{ whl }} +{%- endfor %} +{% endif %} # Clean up RUN apt-get remove -y python-pip diff --git a/dockers/docker-platform-monitor/base_image_files/sensors b/dockers/docker-platform-monitor/base_image_files/sensors index af1e5794186..23a12034f07 100755 --- a/dockers/docker-platform-monitor/base_image_files/sensors +++ b/dockers/docker-platform-monitor/base_image_files/sensors @@ -1,2 +1,10 @@ #!/bin/bash -docker exec -i pmon sensors "$@" + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS pmon sensors "$@" diff --git a/dockers/docker-router-advertiser/docker-router-advertiser.supervisord.conf b/dockers/docker-router-advertiser/docker-router-advertiser.supervisord.conf index 08a3e0a9487..f0bb4d5b3bb 100644 --- a/dockers/docker-router-advertiser/docker-router-advertiser.supervisord.conf +++ b/dockers/docker-router-advertiser/docker-router-advertiser.supervisord.conf @@ -8,6 +8,7 @@ command=/usr/bin/start.sh priority=1 autostart=true autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog diff --git a/dockers/docker-router-advertiser/start.sh b/dockers/docker-router-advertiser/start.sh index cbd5ec383bd..159006a176b 100755 --- a/dockers/docker-router-advertiser/start.sh +++ b/dockers/docker-router-advertiser/start.sh @@ -1,11 +1,25 @@ #!/usr/bin/env bash -# Generate /etc/radvd.conf config file -sonic-cfggen -d -t /usr/share/sonic/templates/radvd.conf.j2 > /etc/radvd.conf - rm -f /var/run/rsyslogd.pid supervisorctl start rsyslogd +# Router advertiser should only run on ToR (T0) devices +DEVICE_ROLE=$(sonic-cfggen -d -v "DEVICE_METADATA.localhost.type") +if [ "$DEVICE_ROLE" != "ToRRouter" ]; then + echo "Device role is not ToRRouter. Not starting router advertiser process." + exit 0 +fi + +# Generate /etc/radvd.conf config file +sonic-cfggen -d -t /usr/share/sonic/templates/radvd.conf.j2 > /etc/radvd.conf + +# Enusre at least one interface is specified in radvd.conf +NUM_IFACES=$(grep -c "^interface " /etc/radvd.conf) +if [ $NUM_IFACES -eq 0 ]; then + echo "No interfaces specified in radvd.conf. Not starting router advertiser process." + exit 0 +fi + # Start the router advertiser supervisorctl start radvd diff --git a/dockers/docker-snmp-sv2/Dockerfile.j2 b/dockers/docker-snmp-sv2/Dockerfile.j2 index 3c547395111..da46cb9b1cf 100644 --- a/dockers/docker-snmp-sv2/Dockerfile.j2 +++ b/dockers/docker-snmp-sv2/Dockerfile.j2 @@ -7,7 +7,7 @@ COPY [ \ "/debs/"] # Install Python SwSSSDK (SNMP subagent dependency) -COPY python-wheels/sonic_utilities-*-py3-*.whl /python-wheels/ +COPY python-wheels/sonic_platform_common-*-py3-*.whl /python-wheels/ COPY python-wheels/swsssdk-*-py3-*.whl /python-wheels/ COPY python-wheels/asyncsnmp-*-py3-*.whl /python-wheels/ @@ -43,6 +43,8 @@ RUN apt-get update && apt-get install -y libperl5.20 libpci3 libwrap0 \ COPY ["start.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["*.j2", "/usr/share/sonic/templates/"] +COPY ["snmpd-config-updater", "/usr/bin/snmpd-config-updater"] +RUN chmod +x /usr/bin/snmpd-config-updater ## Although exposing ports is not needed for host net mode, keep it for possible bridge mode EXPOSE 161/udp 162/udp diff --git a/dockers/docker-snmp-sv2/snmpd-config-updater b/dockers/docker-snmp-sv2/snmpd-config-updater new file mode 100755 index 00000000000..19702451495 --- /dev/null +++ b/dockers/docker-snmp-sv2/snmpd-config-updater @@ -0,0 +1,263 @@ +#!/usr/bin/env python + +# Daemon that listens to updates from ConfigDB about the source IP prefixes from which +# SNMP connections are allowed. In case of change, it will update the SNMP configuration +# file accordingly. After a change, it will notify snmpd to re-read its config file +# via SIGHUP. +# +# This daemon is meant to be run on Arista platforms only. Service ACLs on all other +# platforms will be managed by caclmgrd. +# + +import os +import re +import signal +import subprocess +import sys +import syslog +import time +from swsssdk import ConfigDBConnector + +VERSION = "1.0" + +SYSLOG_IDENTIFIER = "snmpd-config-updater" + + +# ============================== Classes ============================== + +class Process(object): + def __init__(self, pid): + self.pid = pid + self.path = '/proc/%d/status' % pid + self.status = None + + def read_proc_status(self): + data = {} + with open(self.path) as f: + for line in f.readlines(): + key, value = line.split(':', 1) + data[ key ] = value.strip() + self.status = data + + def get_proc_signals(self): + assert self.status + sigBlk = int(self.status[ 'SigBlk' ], 16) + sigIgn = int(self.status[ 'SigIgn' ], 16) + sigCgt = int(self.status[ 'SigCgt' ], 16) + return (sigBlk, sigIgn, sigCgt) + + def handle_signal(self, sig): + sigBlk, sigIgn, sigCgt = self.get_proc_signals() + mask = 1 << ( sig - 1 ) + if mask & sigBlk: + return True + if mask & sigIgn: + return True + if mask & sigCgt: + return True + return False + + def send_signal(self, sig): + log_info('Sending signal %s to %d' % (sig, self.pid)) + os.kill(self.pid, sig) + + def safe_send_signal(self, sig): + self.read_proc_status() + if not self.handle_signal(sig): + return False + self.send_signal(sig) + return True + + def wait_send_signal(self, sig, interval=0.1): + while not self.safe_send_signal(sig): + log_info('Process %s has not yet registered %s' % (self.pid, sig)) + time.sleep(interval) + + @staticmethod + def by_name(name): + try: + pid = subprocess.check_output([ 'pidof', '-s', name ]) + except subprocess.CalledProcessError: + return None + return Process(int(pid.rstrip())) + +class ConfigUpdater(object): + SERVICE = "snmpd" + CONFIG_FILE_PATH = "/etc/snmp" + + ACL_TABLE = "ACL_TABLE" + ACL_RULE = "ACL_RULE" + + ACL_TABLE_TYPE_CTRLPLANE = "CTRLPLANE" + + ACL_SERVICE_SNMP = "SNMP" + + def get_src_ip_allow_list(self): + src_ip_allow_list = [] + + # Get current ACL tables and rules from Config DB + tables_db_info = self.config_db.get_table(self.ACL_TABLE) + rules_db_info = self.config_db.get_table(self.ACL_RULE) + + # Walk the ACL tables + for (table_name, table_data) in tables_db_info.iteritems(): + # Ignore non-control-plane ACL tables + if table_data["type"] != self.ACL_TABLE_TYPE_CTRLPLANE: + continue + + # Ignore non-SNMP service ACLs + if self.ACL_SERVICE_SNMP not in table_data["services"]: + continue + + acl_rules = {} + + for ((rule_table_name, rule_id), rule_props) in rules_db_info.iteritems(): + if rule_table_name == table_name: + acl_rules[rule_props["PRIORITY"]] = rule_props + + # For each ACL rule in this table (in descending order of priority) + for priority in sorted(acl_rules.iterkeys(), reverse=True): + rule_props = acl_rules[priority] + + if "PACKET_ACTION" not in rule_props: + log_error("ACL rule does not contain PACKET_ACTION property") + continue + + # We're only interested in ACCEPT rules + if rule_props["PACKET_ACTION"] != "ACCEPT": + continue + + if "SRC_IP" in rule_props and rule_props["SRC_IP"]: + src_ip_allow_list.append(rule_props["SRC_IP"]) + + return src_ip_allow_list + + # To update the configuration file + # + # Example config file for reference: + # root@sonic:/# cat /etc/snmp/snmpd.conf + # <...some snmp config, like udp port to use etc...> + # rocommunity public 172.20.61.0/24 + # rocommunity public 172.20.60.0/24 + # rocommunity public 127.00.00.0/8 + # <...some more snmp config...> + # root@sonic:/# + # + # snmpd.conf supports include file, like so: + # includeFile /etc/snmp/community.conf + # includeDir /etc/snmp/config.d + # which could make file massaging simpler, but even then we still deal with lines + # that have shared "masters", since some other entity controls the community strings + # part of that line. + # If other database attributes need to be written to the snmp config file, then + # it should be done by this daemon as well (sure, we could inotify on the file + # and correct it back, but that's glitchy). + # + # src_ip_allow_list may contain individual IP addresses or blocks of + # IP addresses using CIDR notation. + def write_configuration_file(self, src_ip_allow_list): + filename = "%s/%s.conf" % (self.CONFIG_FILE_PATH, self.SERVICE) + filename_tmp = filename + ".tmp" + + f = open(filename, "r") + snmpd_config = f.read() + f.close() + + f = open(filename_tmp, "w") + this_community = "not_a_community" + for line in snmpd_config.split('\n'): + m = re.match("^(..)community (\S+)", line) + if not m: + f.write(line) + f.write("\n") + else: + if not line.startswith(this_community): # already handled community (each community is duplicated per allow entry) + this_community = "%scommunity %s" % (m.group(1), m.group(2)) + if len(src_ip_allow_list): + for value in src_ip_allow_list: + f.write("%s %s\n" % (this_community, value)) + else: + f.write("%s\n" % this_community) + f.close() + + os.rename(filename_tmp, filename) + + # Force snmpd process to reload its configuration if it is running + proc = Process.by_name(self.SERVICE) + if proc: + proc.wait_send_signal(signal.SIGHUP) + + def notification_handler(self, key, data): + log_info("ACL configuration changed. Updating {} config accordingly...".format(self.SERVICE)) + self.write_configuration_file(self.get_src_ip_allow_list()) + + def run(self): + # Open a handle to the Config database + self.config_db = ConfigDBConnector() + self.config_db.connect() + + # Write initial configuration + self.write_configuration_file(self.get_src_ip_allow_list()) + + # Subscribe to notifications when ACL tables or rules change + self.config_db.subscribe(self.ACL_TABLE, + lambda table, key, data: self.notification_handler(key, data)) + self.config_db.subscribe(self.ACL_RULE, + lambda table, key, data: self.notification_handler(key, data)) + + # Indefinitely listen for Config DB notifications + self.config_db.listen() + + +# ========================== Syslog wrappers ========================== + +def log_info(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_INFO, msg) + syslog.closelog() + + +def log_warning(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_WARNING, msg) + syslog.closelog() + + +def log_error(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_ERR, msg) + syslog.closelog() + + +# Determine whether we are running on an Arista platform +def is_platform_arista(): + proc = subprocess.Popen(["sonic-cfggen", "-H", "-v", "DEVICE_METADATA.localhost.platform"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + (stdout, stderr) = proc.communicate() + + if proc.returncode != 0: + log_error("Failed to retrieve platform string") + return False + + return "arista" in stdout + + +def main(): + log_info("Starting up...") + + if not os.geteuid() == 0: + log_error("Must be root to run this daemon") + print "Error: Must be root to run this daemon" + sys.exit(1) + + if not is_platform_arista(): + log_info("Platform is not an Arista platform. Exiting...") + sys.exit(0) + + # Instantiate a ConfigUpdater object + config_updater = ConfigUpdater() + config_updater.run() + +if __name__ == "__main__": + main() diff --git a/dockers/docker-snmp-sv2/snmpd.conf.j2 b/dockers/docker-snmp-sv2/snmpd.conf.j2 index b46871dfd6f..6353246acb0 100644 --- a/dockers/docker-snmp-sv2/snmpd.conf.j2 +++ b/dockers/docker-snmp-sv2/snmpd.conf.j2 @@ -13,24 +13,9 @@ # AGENT BEHAVIOUR # -{% if MGMT_INTERFACE %} -# Listen for connections on localhost, loopback ip and mgmt (eth0) ip -agentAddress udp:127.0.0.1:161 -{% for (name, prefix) in MGMT_INTERFACE %} -{% if prefix | ipv4 %} -agentAddress udp:{{ prefix | ip }}:161 -{% endif %} -{% endfor %} -# TODO: only support ipv4 lo addresses, add ipv6 support later -{% for (name, prefix) in LOOPBACK_INTERFACE %} -{% if prefix | ipv4 %} -agentAddress udp:{{ prefix | ip }}:161 -{% endif %} -{% endfor %} -{% else %} -# Listen on all addresses as mgmt ip not specified +# Listen for connections on all ip addresses, including eth0, ipv4 lo agentAddress udp:161 -{% endif %} +# TODO: only support ipv4 lo addresses, add ipv6 support later ############################################################################### # @@ -42,8 +27,13 @@ view systemonly included .1.3.6.1.2.1.1 view systemonly included .1.3.6.1.2.1.25.1 # Default access to basic system info +{% if snmp_rocommunities %} +{% for community in snmp_rocommunities %} +rocommunity {{ community }} +{% endfor %} +{% else %} rocommunity {{ snmp_rocommunity }} - +{% endif %} ############################################################################### # diff --git a/dockers/docker-snmp-sv2/start.sh b/dockers/docker-snmp-sv2/start.sh index 201239b1e7d..1b83624068a 100755 --- a/dockers/docker-snmp-sv2/start.sh +++ b/dockers/docker-snmp-sv2/start.sh @@ -13,5 +13,6 @@ echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status rm -f /var/run/rsyslogd.pid supervisorctl start rsyslogd +supervisorctl start snmpd-config-updater supervisorctl start snmpd supervisorctl start snmp-subagent diff --git a/dockers/docker-snmp-sv2/supervisord.conf b/dockers/docker-snmp-sv2/supervisord.conf index d8057950610..b3db3be95a2 100644 --- a/dockers/docker-snmp-sv2/supervisord.conf +++ b/dockers/docker-snmp-sv2/supervisord.conf @@ -19,9 +19,18 @@ autorestart=false stdout_logfile=syslog stderr_logfile=syslog +[program:snmpd-config-updater] +command=/usr/bin/snmpd-config-updater +priority=3 +autostart=false +autorestart=unexpected +startsecs=0 +stdout_logfile=syslog +stderr_logfile=syslog + [program:snmpd] command=/usr/sbin/snmpd -f -LS4d -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf,ifTable,ifXTable,inetCidrRouteTable,ipCidrRouteTable,ip,disk_hw -p /run/snmpd.pid -priority=3 +priority=4 autostart=false autorestart=false stdout_logfile=syslog @@ -29,7 +38,7 @@ stderr_logfile=syslog [program:snmp-subagent] command=/usr/bin/env python3.6 -m sonic_ax_impl -priority=4 +priority=5 autostart=false autorestart=false stdout_logfile=syslog diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 6cfe2860389..c2f600c3c96 100644 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -18,7 +18,9 @@ RUN apt-get install -y \ sshpass \ libxml2 \ libxslt1-dev \ - python-setuptools + python-setuptools \ + build-essential \ + curl # For JNLP launcher RUN apt-get install -y default-jre @@ -44,6 +46,8 @@ RUN pip install ipaddr \ paramiko==2.1.2 \ adal +# Install Azure Storage package +RUN pip install azure-storage ## Copy and install sonic-mgmt docker dependencies COPY \ @@ -87,4 +91,14 @@ RUN echo "$user ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers USER $user -RUN cd /var/$user && git clone https://github.com/Azure/sonic-mgmt +# Install Azure CLI +WORKDIR /var/$user +RUN curl -L https://aka.ms/InstallAzureCliBundled -o azure-cli_bundle.tar.gz +RUN tar -xvzf azure-cli_bundle.tar.gz +RUN azure-cli_bundle_*/installer + +# Known bug: azure keyvault cannot work behind a proxy +# Temporary fix: upgrade the azure-keyvault package within az cli +RUN ~/lib/azure-cli/bin/python -m pip install azure-keyvault -U + +RUN git clone https://github.com/Azure/sonic-mgmt diff --git a/dockers/docker-sonic-telemetry/Dockerfile.j2 b/dockers/docker-sonic-telemetry/Dockerfile.j2 new file mode 100644 index 00000000000..bbb15db69aa --- /dev/null +++ b/dockers/docker-sonic-telemetry/Dockerfile.j2 @@ -0,0 +1,31 @@ +FROM docker-config-engine + +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update + +RUN apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4 + +## Install redis-tools dependencies +## TODO: implicitly install dependencies +RUN apt-get -y install libjemalloc1 + +COPY \ +{% for deb in docker_sonic_telemetry_debs.split(' ') -%} +debs/{{ deb }}{{' '}} +{%- endfor -%} +debs/ + +RUN dpkg -i \ +{% for deb in docker_sonic_telemetry_debs.split(' ') -%} +debs/{{ deb }}{{' '}} +{%- endfor %} + +COPY ["start.sh", "telemetry.sh", "dialout.sh", "/usr/bin/"] +COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] + +RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y +RUN rm -rf /debs + +ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/dockers/docker-sonic-telemetry/dialout.sh b/dockers/docker-sonic-telemetry/dialout.sh new file mode 100755 index 00000000000..8683e8edae8 --- /dev/null +++ b/dockers/docker-sonic-telemetry/dialout.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# Start with default config + +exec /usr/sbin/dialout_client_cli -insecure -logtostderr -v 2 + diff --git a/dockers/docker-sonic-telemetry/start.sh b/dockers/docker-sonic-telemetry/start.sh new file mode 100755 index 00000000000..b307e387d55 --- /dev/null +++ b/dockers/docker-sonic-telemetry/start.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +mkdir -p /var/sonic +echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status + +rm -f /var/run/rsyslogd.pid + +supervisorctl start rsyslogd + +supervisorctl start telemetry +supervisorctl start dialout diff --git a/dockers/docker-sonic-telemetry/supervisord.conf b/dockers/docker-sonic-telemetry/supervisord.conf new file mode 100644 index 00000000000..dcd8a9eb1e8 --- /dev/null +++ b/dockers/docker-sonic-telemetry/supervisord.conf @@ -0,0 +1,36 @@ +[supervisord] +logfile_maxbytes=1MB +logfile_backups=2 +nodaemon=true + +[program:start.sh] +command=/usr/bin/start.sh +priority=1 +autostart=true +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog + +[program:rsyslogd] +command=/usr/sbin/rsyslogd -n +priority=2 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog + +[program:telemetry] +command=/usr/bin/telemetry.sh +priority=3 +autostart=false +autorestart=true +stdout_logfile=syslog +stderr_logfile=syslog + +[program:dialout] +command=/usr/bin/dialout.sh +priority=4 +autostart=false +autorestart=true +stdout_logfile=syslog +stderr_logfile=syslog diff --git a/dockers/docker-sonic-telemetry/telemetry.sh b/dockers/docker-sonic-telemetry/telemetry.sh new file mode 100755 index 00000000000..053b1dae6ea --- /dev/null +++ b/dockers/docker-sonic-telemetry/telemetry.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Try to read telemetry and x509 config from ConfigDB. +# Use default value if no valid config exists +X509=`sonic-cfggen -d -v "DEVICE_METADATA['x509']"` +TELEMETRY=`sonic-cfggen -d -v 'TELEMETRY.keys() | join(" ") if TELEMETRY'` + +TELEMETRY_ARGS=" -logtostderr" + +if [ ! -z $X509 ]; then + SERVER_CRT=`sonic-cfggen -d -v "DEVICE_METADATA['x509']['server_crt']"` + SERVER_KEY=`sonic-cfggen -d -v "DEVICE_METADATA['x509']['server_key']"` + if [ -z $SERVER_CRT ] || [ -z $SERVER_KEY ]; then + TELEMETRY_ARGS+=" --insecure" + else + TELEMETRY_ARGS+=" --server_crt $SERVER_CRT --server_key $SERVER_KEY " + fi +else + TELEMETRY_ARGS+=" --insecure" +fi + +if [ ! -z $X509 ]; then + CA_CRT=`sonic-cfggen -d -v "DEVICE_METADATA['x509']['ca_crt']"` + if [ ! -z $CA_CRT ]; then + TELEMETRY_ARGS+=" --ca_crt $CA_CRT" + fi +fi + +# If no configuration entry exists for TELEMETRY, create one default port +if [ -z $TELEMETRY ]; then + redis-cli -n 4 hset "TELEMETRY|gnmi" port 8080 +fi + +PORT=`sonic-cfggen -d -v "TELEMETRY['gnmi']['port']"` +TELEMETRY_ARGS+=" --port $PORT" + +CLIENT_AUTH=`sonic-cfggen -d -v "TELEMETRY['gnmi']['client_auth']"` +if [ -z $CLIENT_AUTH ] || [ $CLIENT_AUTH == "false" ]; then + TELEMETRY_ARGS+=" --allow_no_client_auth" +fi + +LOG_LEVEL=`sonic-cfggen -d -v "TELEMETRY['gnmi']['log_level']"` +if [ ! -z $LOG_LEVEL ]; then + TELEMETRY_ARGS+=" -v=$LOG_LEVEL" +else + TELEMETRY_ARGS+=" -v=2" +fi + +exec /usr/sbin/telemetry ${TELEMETRY_ARGS} + + diff --git a/dockers/docker-teamd/base_image_files/teamdctl b/dockers/docker-teamd/base_image_files/teamdctl index 9dd188d18cb..615bc3d953f 100755 --- a/dockers/docker-teamd/base_image_files/teamdctl +++ b/dockers/docker-teamd/base_image_files/teamdctl @@ -1,3 +1,10 @@ #!/bin/bash -docker exec -i teamd teamdctl "$@" +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS teamd teamdctl "$@" diff --git a/files/Aboot/boot0.j2 b/files/Aboot/boot0.j2 index a2c683b20c9..ee77746676e 100644 --- a/files/Aboot/boot0.j2 +++ b/files/Aboot/boot0.j2 @@ -14,23 +14,55 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Aboot stage 0 boot +# Aboot stage 0 boot script +# +# This boot0 script can be used in different scenario +# - Installation and boot from Aboot (manual or reboot on a new image) +# - EOS to SONiC fast-reboot (installation and kexec in EOS) +# - SONiC to SONiC fast-reboot (installation and kexec in SONiC) +# +# Use it this way: +# - swipath=path/to/swi install=true boot0 +# - swipath=path/to/swi install=true force=true boot0 +# - swipath=path/to/swi kexec=true boot0 +# +# The logic defaults to the first scenario but providing extra environment variable +# will affect the behavior of the script. +# The list of variables is maintained here +# - KERNEL : relative path to the kernel to execute +# - INITRD : relative path to the initrd to load +# - CMDLINE : place to find the default kernel cmdline to use for the platform +# +# By default the boot0 script will behave for an Aboot based behavior. +# Options can be provided to only run some features of this script. +# +# Extra kernel parameters can be provided at runtime by the user by adding them +# into a kernel-params file. set -x -kernel=boot/vmlinuz-3.16.0-4-amd64 -initrd=boot/initrd.img-3.16.0-4-amd64 -kernel_params=kernel-params +image_name="image-%%IMAGE_VERSION%%" + +do_not_clean="do-not-clean" +kernel_params="kernel-params" aboot_machine="arista_unknown" -[ -z "$target_path" ] && target_path=/mnt/flash -image_path="$target_path/image-%%IMAGE_VERSION%%" -# expect the swi to be a non empty file -[ -s "$swipath" ] || exit 1 +# extract mount point from the swi path, e.g., /mnt/flash/sonic.swi --> /mnt/flash +if [ -z "$target_path" ]; then + if [ -z "$swipath" ]; then + echo "target_path= is required when swipath= is not provided" + exit 1 + fi + target_path=$(df "$swipath" | tail -1 | tr -s " " | cut -d ' ' -f6) +fi +image_path="$target_path/$image_name" -bootconfigvars="SWI SWI_COPY POST_LEVEL CONSOLESPEED PASSWORD NETDEV NETAUTO NETIP NETMASK NETGW NETDOMAIN NETDNS NETHW memtest" +cmdline_base="$target_path/kernel-params-base" +cmdline_image="$image_path/kernel-cmdline" + +bootconfigvars="KERNEL INITRD CONSOLESPEED PASSWORD NETDEV NETAUTO NETIP NETMASK NETGW NETDOMAIN NETDNS NETHW memtest" parse_environment_config() { for n in ${bootconfigvars}; do @@ -46,6 +78,8 @@ clean_flash() { for f in $(ls -A $target_path); do if [ $f != "${swipath##*/}" ] && [ $f != "boot-config" ] && + [ $f != "$kernel_params" ] && + [ $f != "$cmdline_base" ] && [ $f != "minigraph.xml" ] then rm -rf "$target_path/$f" @@ -54,7 +88,6 @@ clean_flash() { } extract_image() { - mkdir -p "$image_path" ## Unzip the image except boot0 and dockerfs archive @@ -80,7 +113,7 @@ extract_image() { fi ## use new reduced-size boot swi - echo "SWI=flash:image-%%IMAGE_VERSION%%/{{ ABOOT_BOOT_IMAGE }}" > "$target_path/boot-config" + echo "SWI=flash:$image_name/{{ ABOOT_BOOT_IMAGE }}" > "$target_path/boot-config" ## Remove installer swi as it has lots of redundunt contents rm -f "$swipath" @@ -91,8 +124,12 @@ extract_image() { write_machine_config() { ## Detect SKU and create a hardware description file - aboot_version=$(grep ^Aboot /etc/cmdline | sed 's/^.*norcal.-//') - aboot_build_date=$(stat -c %y /bin/sysinit | sed 's/ /T/') + aboot_version=$(grep ^Aboot "$cmdline_base" | sed 's/^.*norcal.-//' | tail -n 1) + if [ -x /bin/sysinit ]; then + aboot_build_date=$(stat -c %y /bin/sysinit | sed 's/ /T/') + else + aboot_build_date="unknown" + fi cat < ${target_path}/machine.conf aboot_version=$aboot_version aboot_vendor=arista @@ -101,16 +138,17 @@ aboot_machine=$aboot_machine aboot_arch=x86_64 aboot_build_date=$aboot_build_date EOF + chmod a+r "${target_path}/machine.conf" } platform_specific() { - local platform="$(grep -Eo 'platform=[^ ]+' /etc/cmdline | cut -f2 -d=)" - local sid="$(grep -Eo 'sid=[^ ]+' /etc/cmdline | cut -f2 -d=)" + local platform="$(grep -Eo 'platform=[^ ]+' "$cmdline_base" | cut -f2 -d=)" + local sid="$(grep -Eo 'sid=[^ ]+' "$cmdline_base" | cut -f2 -d=)" # set varlog size to 100MB local varlog_size=100 - local flash_size=$(($(df | grep flash | tr -s ' ' | cut -f2 -d' ') / 1000)) + local flash_size=$(($(df | grep -E '/mnt/flash|/host' | tr -s ' ' | cut -f2 -d' ') / 1000)) if [ "$platform" = "raven" ]; then aboot_machine=arista_7050_qx32 @@ -132,7 +170,12 @@ platform_specific() { flash_size=28000 fi if [ "$platform" = "rook" ]; then - readprefdl -f /tmp/.system-prefdl -d > /mnt/flash/.system-prefdl + if [ -x /bin/readprefdl ]; then + readprefdl -f /tmp/.system-prefdl -d > /mnt/flash/.system-prefdl + elif [ -f /etc/prefdl ]; then + cp /etc/prefdl /mnt/flash/.system-prefdl + chmod a+r /mnt/flash/.system-prefdl + fi fi if [ $flash_size -ge 28000 ]; then @@ -144,45 +187,127 @@ platform_specific() { echo "varlog_size=$varlog_size" >>/tmp/append } -# check the hash file in the image, and determine to install or just skip -GIT_REVISION=$(unzip -p "$swipath" .imagehash) -LOCAL_IMAGEHASH=$(cat $image_path/.imagehash 2>/dev/null || true) -if [ "$GIT_REVISION" != "$LOCAL_IMAGEHASH" ]; then - [ -z "$sonic_upgrade" ] && clean_flash - extract_image -fi +get_uuid_for() { + local dev="$1" + + if type lsblk 2>&1 > /dev/null; then + lsblk "$dev" -n --output UUID + elif type blkid 2>&1 > /dev/null; then + blkid | grep "^$dev" | sed -n "s/^.* UUID=\"//p" | grep -Eo '[^"]+' + fi +} + +write_boot_configs() { + if $in_aboot; then + # generate the default kernel parameters for the platform + echo "$append" > $cmdline_base + cat /etc/cmdline | sed "/^\(${bootconfigvars// /\|}\|crashkernel\|loglevel\|ignore_loglevel\)\(\$\|=\)/d;/^\$/d" >> $cmdline_base + parse_environment_config >> $cmdline_base + elif [ ! -f "$cmdline_base" ]; then + # some systems were started with other versions of this script and therefore + # do not have the $cmdline_base file. we assume that we are on Sonic or EOS. + cat /proc/cmdline | sed -E 's/^(.*) rw .*$/\1/' | tr ' ' '\n' > $cmdline_base + fi + + cp $cmdline_base /tmp/append -[ -z "$sonic_upgrade" ] || exit 0 + platform_specific + echo "rw loop=$image_name/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor quiet" >> /tmp/append -# build the new cmdline -echo "$append" >/tmp/append -parse_environment_config >>/tmp/append -cat /etc/cmdline | sed "/^\(${bootconfigvars// /\|}\|crashkernel\|loglevel\|ignore_loglevel\)\(\$\|=\)/d;/^\$/d" >>/tmp/append + # Pass the MAC address to the new kernel as a command line parameter. This makes it + # possible to restore the MAC address in the new kernel without requiring driver modifications. + if [ -f /sys/class/net/ma1/address ]; then + echo "hwaddr_ma1=$(cat /sys/class/net/ma1/address)" >> /tmp/append + elif [ -f /sys/class/net/eth0/address ]; then + echo "hwaddr_ma1=$(cat /sys/class/net/eth0/address)" >> /tmp/append + else + echo "ERROR: Management port is not found." + fi + + # use extra parameters from kernel-params hook if the file exists + if [ -f "$target_path/$kernel_params" ]; then + cat "$target_path/$kernel_params" >> /tmp/append + fi + + # setting root partition if not overridden by kernel-params + if ! grep -q "root=" /tmp/append; then + rootdev="$(mount | grep -E '/mnt/flash|/host' | cut -f1 -d' ')" + rootfstype="$(mount | grep -E '/mnt/flash|/host' | cut -f5 -d' ')" + rootuuid="$(get_uuid_for $rootdev)" + if [ -z "$rootuuid" ] || [ "$rootfstype" = "vfat" ] ; then + echo "root=$rootdev" >> /tmp/append + else + echo "root=UUID=$rootuuid" >> /tmp/append + fi + fi + + mv /tmp/append $cmdline_image + [ -e ${target_path}/machine.conf ] || write_machine_config +} + +run_kexec() { + local cmdline="$(cat $cmdline_image | tr '\n' ' ')" + local kernel="${KERNEL:-$(find $image_path/boot -name 'vmlinuz-*' -type f | head -n 1)}" + local initrd="${INITRD:-$(find $image_path/boot -name 'initrd.img-*' -type f | head -n 1)}" -echo "rw loop=image-%%IMAGE_VERSION%%/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor quiet" >>/tmp/append + kexec --load --initrd="$initrd" --append="$cmdline" "$kernel" -# process platform specific operations -platform_specific + [ -z "$testonly" ] || exit 0 + echo "kexecing..." + kexec --exec +} + +# In Aboot no option will be provided therefore these are the default values to use +in_aboot=true +do_clean=true +do_install=true +do_kexec=true -[ -e ${taget_path}/machine.conf ] || write_machine_config +# prevent the flash from being cleaned if the do-not-clean file exists +if [ -f "$target_path/$do_not_clean" ]; then + do_clean=false +fi -# use extra parameters from kernel-params hook if the file exists -if [ -f "$image_path/$kernel_params" ]; then - cat "$image_path/$kernel_params" >>/tmp/append +# Parse the cmdline options (used from EOS or from SONiC) +if [ ! -z "$install" ] || [ ! -z "$sonic_upgrade" ]; then + # install from SONiC or EOS + in_aboot=false + do_clean=false + do_kexec=false +elif [ ! -z "$kexec" ]; then + # kexec from SONiC or EOS + in_aboot=false + do_install=false + do_clean=false +elif [ $# -ne 0 ]; then + echo "usage: $0 (see code)" + exit 1 fi -# setting root partition if not overridden by kernel-params -if ! grep -q "root=" /tmp/append; then - rootdev=$(mount | grep '/mnt/flash' | cut -f1 -d' ') - rootfstype=$(mount | grep '/mnt/flash' | cut -f5 -d' ') - echo "root=$rootdev" >>/tmp/append +# install the image if newer +if $do_install; then + # we expect the swi to install to be a non empty file + if [ ! -s "$swipath" ]; then + echo "The swipath= environment variable does not point to a valid SWI" + exit 1 + fi + + # check the hash file in the image, and determine to install or just skip + GIT_REVISION=$(unzip -p "$swipath" .imagehash) + LOCAL_IMAGEHASH=$(cat $image_path/.imagehash 2>/dev/null || true) + + if [ "$GIT_REVISION" != "$LOCAL_IMAGEHASH" ] || [ ! -z "$force" ]; then + if $do_clean; then + clean_flash + fi + + extract_image + write_boot_configs + fi fi # chainloading using kexec -initrd_path="$image_path/$initrd" -kernel_path="$image_path/$kernel" -cmdline="$(tr '\n' ' ' > $FILESYSTEM_ROOT/etc/sonic/updategraph {% else %} sudo bash -c "echo enabled=false > $FILESYSTEM_ROOT/etc/sonic/updategraph.conf" {% endif %} -{% if shutdown_bgp_on_start == "y" %} -sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_bgp_status\": \"down\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json" -{% endif %} +sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_bgp_status\": {% if shutdown_bgp_on_start == "y" %}\"down\"{% else %}\"up\"{% endif %}, \"default_pfcwd_status\": {% if enable_pfcwd_on_start == "y" %}\"enable\"{% else %}\"disable\"{% endif %} } }, +{%- print ' \\"CRM\\": { \\"Config\\": { \\"polling_interval\\": \\"300\\", ' %} +{%- for crm_res in ["ipv4_route", "ipv6_route", "ipv4_nexthop", "ipv6_nexthop", "ipv4_neighbor", "ipv6_neighbor", "nexthop_group_member", "nexthop_group", "acl_table", "acl_group", "acl_entry", "acl_counter", "fdb_entry"] -%} +\"{{crm_res}}_threshold_type\": \"percentage\", \"{{crm_res}}_low_threshold\": \"70\", \"{{crm_res}}_high_threshold\": \"85\"{% if not loop.last %}, {% endif %} +{%- endfor %} } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json" + # Copy SNMP configuration files sudo cp $IMAGE_CONFIGS/snmp/snmp.yml $FILESYSTEM_ROOT/etc/sonic/ @@ -162,6 +180,12 @@ sudo cp $IMAGE_CONFIGS/asn/deployment_id_asn_map.yml $FILESYSTEM_ROOT/etc/sonic/ # Copy sudoers configuration file sudo cp $IMAGE_CONFIGS/sudoers/sudoers $FILESYSTEM_ROOT/etc/ +# Copy control plane ACL management daemon files +sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd.service $FILESYSTEM_ROOT/etc/systemd/system/ +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable caclmgrd.service +sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd-start.sh $FILESYSTEM_ROOT/usr/bin/ +sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd $FILESYSTEM_ROOT/usr/bin/ + ## Install package without starting service ## ref: https://wiki.debian.org/chroot sudo tee -a $FILESYSTEM_ROOT/usr/sbin/policy-rc.d > /dev/null </dev/null && TMOUT=300 diff --git a/files/image_config/caclmgrd/caclmgrd b/files/image_config/caclmgrd/caclmgrd new file mode 100755 index 00000000000..dee85d2e26e --- /dev/null +++ b/files/image_config/caclmgrd/caclmgrd @@ -0,0 +1,247 @@ +#!/usr/bin/env python +# +# caclmgrd +# +# Control plane ACL manager daemon for SONiC +# +# Upon starting, this daemon reads control plane ACL tables and rules from +# Config DB, converts the rules into iptables rules and installs the iptables +# rules. The daemon then indefintely listens for notifications from Config DB +# and updates iptables rules if control plane ACL configuration has changed. +# + +try: + import os + import subprocess + import sys + import syslog + from swsssdk import ConfigDBConnector +except ImportError as err: + raise ImportError("%s - required module not found" % str(err)) + +VERSION = "1.0" + +SYSLOG_IDENTIFIER = "caclmgrd" + + +# ========================== Syslog wrappers ========================== + +def log_info(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_INFO, msg) + syslog.closelog() + + +def log_warning(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_WARNING, msg) + syslog.closelog() + + +def log_error(msg): + syslog.openlog(SYSLOG_IDENTIFIER) + syslog.syslog(syslog.LOG_ERR, msg) + syslog.closelog() + + +# ============================== Classes ============================== + +class ControlPlaneAclManager(object): + """ + Class which reads control plane ACL tables and rules from Config DB, + translates them into equivalent iptables commands and runs those + commands in order to apply the control plane ACLs. + + Attributes: + config_db: Handle to Config Redis database via SwSS SDK + """ + ACL_TABLE = "ACL_TABLE" + ACL_RULE = "ACL_RULE" + + ACL_TABLE_TYPE_CTRLPLANE = "CTRLPLANE" + + # To specify a port range, use iptables format: separate start and end + # ports with a colon, e.g., "1000:2000" + ACL_SERVICES = { + "NTP": {"ip_protocols": ["udp"], "dst_ports": ["123"]}, + "SNMP": {"ip_protocols": ["tcp", "udp"], "dst_ports": ["161"]}, + "SSH": {"ip_protocols": ["tcp"], "dst_ports": ["22"]} + } + + def __init__(self): + # Open a handle to the Config database + self.config_db = ConfigDBConnector() + self.config_db.connect() + + def run_commands(self, commands): + """ + Given a list of shell commands, run them in order + + Args: + commands: List of strings, each string is a shell command + """ + for cmd in commands: + proc = subprocess.Popen(cmd, shell=True) + + (stdout, stderr) = proc.communicate() + + if proc.returncode != 0: + log_error("Error running command '{}'".format(cmd)) + + def get_acl_rules_and_translate_to_iptables_commands(self): + """ + Retrieves current ACL tables and rules from Config DB, translates + control plane ACLs into a list of iptables commands that can be run + in order to install ACL rules. + + Returns: + A list of strings, each string is an iptables shell command + + """ + iptables_cmds = [] + + # First, add iptables commands to set default policies to accept all + # traffic. In case we are connected remotely, the connection will not + # drop when we flush the current rules + iptables_cmds.append("iptables -P INPUT ACCEPT") + iptables_cmds.append("iptables -P FORWARD ACCEPT") + iptables_cmds.append("iptables -P OUTPUT ACCEPT") + + # Add iptables command to flush the current rules + iptables_cmds.append("iptables -F") + + # Add iptables command to delete all non-default chains + iptables_cmds.append("iptables -X") + + # Get current ACL tables and rules from Config DB + self._tables_db_info = self.config_db.get_table(self.ACL_TABLE) + self._rules_db_info = self.config_db.get_table(self.ACL_RULE) + + # Walk the ACL tables + for (table_name, table_data) in self._tables_db_info.iteritems(): + # Ignore non-control-plane ACL tables + if table_data["type"] != self.ACL_TABLE_TYPE_CTRLPLANE: + continue + + acl_services = table_data["services"] + + for acl_service in acl_services: + if acl_service not in self.ACL_SERVICES: + log_warning("Ignoring control plane ACL '{}' with unrecognized service '{}'" + .format(table_name, acl_service)) + continue + + log_info("Translating ACL rules for control plane ACL '{}' (service: '{}')" + .format(table_name, acl_service)) + + # Obtain default IP protocol(s) and destination port(s) for this service + ip_protocols = self.ACL_SERVICES[acl_service]["ip_protocols"] + dst_ports = self.ACL_SERVICES[acl_service]["dst_ports"] + + acl_rules = {} + + for ((rule_table_name, rule_id), rule_props) in self._rules_db_info.iteritems(): + if rule_table_name == table_name: + acl_rules[rule_props["PRIORITY"]] = rule_props + + # For each ACL rule in this table (in descending order of priority) + for priority in sorted(acl_rules.iterkeys(), reverse=True): + rule_props = acl_rules[priority] + + if "PACKET_ACTION" not in rule_props: + log_error("ACL rule does not contain PACKET_ACTION property") + continue + + # Apply the rule to the default protocol(s) for this ACL service + for ip_protocol in ip_protocols: + for dst_port in dst_ports: + rule_cmd = "iptables -A INPUT -p {}".format(ip_protocol) + + if "SRC_IP" in rule_props and rule_props["SRC_IP"]: + rule_cmd += " -s {}".format(rule_props["SRC_IP"]) + + rule_cmd += " --dport {}".format(dst_port) + + # If there are TCP flags present, append them + if "TCP_FLAGS" in rule_props and rule_props["TCP_FLAGS"]: + tcp_flags = int(rule_props["TCP_FLAGS"], 16) + + if tcp_flags > 0: + rule_cmd += " --tcp-flags " + + if tcp_flags & 0x01: + rule_cmd += "FIN," + if tcp_flags & 0x02: + rule_cmd += "SYN," + if tcp_flags & 0x04: + rule_cmd += "RST," + if tcp_flags & 0x08: + rule_cmd += "PSH," + if tcp_flags & 0x10: + rule_cmd += "ACK," + if tcp_flags & 0x20: + rule_cmd += "URG," + if tcp_flags & 0x40: + rule_cmd += "ECE," + if tcp_flags & 0x80: + rule_cmd += "CWR," + + # Delete the trailing comma + rule_cmd = rule_cmd[:-1] + + # Append the packet action as the jump target + rule_cmd += " -j {}".format(rule_props["PACKET_ACTION"]) + + iptables_cmds.append(rule_cmd) + + return iptables_cmds + + def update_control_plane_acls(self): + """ + Convenience wrapper which retrieves current ACL tables and rules from + Config DB, translates control plane ACLs into a list of iptables + commands and runs them. + """ + iptables_cmds = self.get_acl_rules_and_translate_to_iptables_commands() + + log_info("Issuing the following iptables commands:") + for cmd in iptables_cmds: + log_info(" " + cmd) + + self.run_commands(iptables_cmds) + + def notification_handler(self, key, data): + log_info("ACL configuration changed. Updating iptables rules for control plane ACLs...") + self.update_control_plane_acls() + + def run(self): + # Unconditionally update control plane ACLs once at start + self.update_control_plane_acls() + + # Subscribe to notifications when ACL tables or rules change + self.config_db.subscribe(self.ACL_TABLE, + lambda table, key, data: self.notification_handler(key, data)) + self.config_db.subscribe(self.ACL_RULE, + lambda table, key, data: self.notification_handler(key, data)) + + # Indefinitely listen for Config DB notifications + self.config_db.listen() + + +# ============================= Functions ============================= + +def main(): + log_info("Starting up...") + + if not os.geteuid() == 0: + log_error("Must be root to run this daemon") + print "Error: Must be root to run this daemon" + sys.exit(1) + + # Instantiate a ControlPlaneAclManager object + caclmgr = ControlPlaneAclManager() + caclmgr.run() + + +if __name__ == "__main__": + main() diff --git a/files/image_config/caclmgrd/caclmgrd-start.sh b/files/image_config/caclmgrd/caclmgrd-start.sh new file mode 100755 index 00000000000..6bca9a81267 --- /dev/null +++ b/files/image_config/caclmgrd/caclmgrd-start.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Only start control plance ACL manager daemon if not an Arista platform. +# Arista devices will use their own service ACL manager daemon(s) instead. +if [ "$(sonic-cfggen -H -v "DEVICE_METADATA.localhost.platform" | grep -c "arista")" -gt 0 ]; then + echo "Not starting caclmgrd - unsupported platform" + exit 0 +fi + +exec /usr/bin/caclmgrd diff --git a/files/image_config/caclmgrd/caclmgrd.service b/files/image_config/caclmgrd/caclmgrd.service new file mode 100644 index 00000000000..c63f1f7c5c7 --- /dev/null +++ b/files/image_config/caclmgrd/caclmgrd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Control Plane ACL configuration daemon +Requires=updategraph.service +After=updategraph.service + +[Service] +Type=simple +ExecStart=/usr/bin/caclmgrd-start.sh + +[Install] +WantedBy=multi-user.target diff --git a/files/image_config/hostcfgd/hostcfgd b/files/image_config/hostcfgd/hostcfgd index 837c5351e0e..8c03f2234a9 100755 --- a/files/image_config/hostcfgd/hostcfgd +++ b/files/image_config/hostcfgd/hostcfgd @@ -5,6 +5,7 @@ import os import sys import subprocess import syslog +import copy import jinja2 from swsssdk import ConfigDBConnector @@ -32,6 +33,13 @@ def sub(l, start, end): return l[start:end] +def obfuscate(data): + if data: + return data[0] + '*****' + else: + return data + + class AaaCfg(object): def __init__(self): self.auth_default = { @@ -144,16 +152,21 @@ class HostConfigDaemon: self.aaacfg.load(aaa, tacacs_global, tacacs_server) def aaa_handler(self, key, data): - syslog.syslog(syslog.LOG_DEBUG, 'value for {} changed to {}'.format(key, data)) self.aaacfg.aaa_update(key, data) def tacacs_server_handler(self, key, data): - syslog.syslog(syslog.LOG_DEBUG, 'value for {} changed to {}'.format(key, data)) self.aaacfg.tacacs_server_update(key, data) + log_data = copy.deepcopy(data) + if log_data.has_key('passkey'): + log_data['passkey'] = obfuscate(log_data['passkey']) + syslog.syslog(syslog.LOG_DEBUG, 'value of {} changed to {}'.format(key, log_data)) def tacacs_global_handler(self, key, data): - syslog.syslog(syslog.LOG_DEBUG, 'value for {} changed to {}'.format(key, data)) self.aaacfg.tacacs_global_update(key, data) + log_data = copy.deepcopy(data) + if log_data.has_key('passkey'): + log_data['passkey'] = obfuscate(log_data['passkey']) + syslog.syslog(syslog.LOG_DEBUG, 'value of {} changed to {}'.format(key, log_data)) def start(self): self.config_db.subscribe('AAA', lambda table, key, data: self.aaa_handler(key, data)) diff --git a/files/image_config/hostcfgd/hostcfgd.service b/files/image_config/hostcfgd/hostcfgd.service index 4f6151a471f..762786ad830 100644 --- a/files/image_config/hostcfgd/hostcfgd.service +++ b/files/image_config/hostcfgd/hostcfgd.service @@ -1,7 +1,7 @@ [Unit] Description=Host config enforcer daemon -Requires=database.service -After=database.service +Requires=updategraph.service +After=updategraph.service [Service] Type=simple diff --git a/files/image_config/hostname/hostname-config.service b/files/image_config/hostname/hostname-config.service index e6e8f489883..c23ae10227a 100644 --- a/files/image_config/hostname/hostname-config.service +++ b/files/image_config/hostname/hostname-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update hostname based on configdb -Requires=database.service -After=database.service +Requires=updategraph.service +After=updategraph.service [Service] Type=oneshot diff --git a/files/image_config/interfaces/interfaces-config.service b/files/image_config/interfaces/interfaces-config.service index 86706da2251..71178affdee 100644 --- a/files/image_config/interfaces/interfaces-config.service +++ b/files/image_config/interfaces/interfaces-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update interfaces configuration -Requires=database.service -After=database.service +Requires=updategraph.service +After=updategraph.service [Service] Type=oneshot diff --git a/files/image_config/interfaces/interfaces-config.sh b/files/image_config/interfaces/interfaces-config.sh index 06174790f04..75660e713e7 100755 --- a/files/image_config/interfaces/interfaces-config.sh +++ b/files/image_config/interfaces/interfaces-config.sh @@ -1,5 +1,7 @@ #!/bin/bash +ifdown eth0 + sonic-cfggen -d -t /usr/share/sonic/templates/interfaces.j2 > /etc/network/interfaces [ -f /var/run/dhclient.eth0.pid ] && kill `cat /var/run/dhclient.eth0.pid` && rm -f /var/run/dhclient.eth0.pid diff --git a/files/image_config/logrotate/logrotate.d/rsyslog b/files/image_config/logrotate/logrotate.d/rsyslog index ba550dcd242..ed54c62082f 100644 --- a/files/image_config/logrotate/logrotate.d/rsyslog +++ b/files/image_config/logrotate/logrotate.d/rsyslog @@ -31,6 +31,7 @@ /var/log/cron.log /var/log/syslog /var/log/teamd.log +/var/log/telemetry.log /var/log/quagga/bgpd.log /var/log/quagga/zebra.log /var/log/swss/sairedis.rec diff --git a/files/image_config/ntp/ntp-config.service b/files/image_config/ntp/ntp-config.service index d41f1ba2ddc..c86710e3d20 100644 --- a/files/image_config/ntp/ntp-config.service +++ b/files/image_config/ntp/ntp-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update NTP configuration -Requires=database.service -After=database.service +Requires=updategraph.service +After=updategraph.service [Service] Type=oneshot diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 436a7de9071..a931efb5b46 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -x # # rc.local # @@ -11,16 +11,92 @@ # # By default this script does nothing. +# In case the unit is migrating from another NOS, save the logs +log_migration() { + echo $1 >> /host/migration/migration.log +} + +# Import files from another NOS's partition onto SONiC +nos_migration_import() { + [ -f $1 ] && cp $1 $2 || log_migration "ERROR: $1 not found!" +} + +# While migrating form another NOS, we need to preserve the MAC addresses +# of eth0 (and eventually switchports). +# Update the eth0 mac and also the EEPROM using ethtool so that subsequent +# reboots use the NOS's mac. +# Input : mgmt_interface.cfg file imported from the previous NOS. +update_mgmt_interface_macaddr() { + mgmt_config=$1 + if [ ! -f "$mgmt_config" ]; then + log_migration "ERROR : unable update eth0 MAC : $mgmt_config not found!" + return + fi + + # Save the previous NOS's mac + old_mac=`ip link show eth0 | grep ether | awk '{print $2}'` + [ -z "$old_mac" ] && log_migration "Unable to retrieve old mac address !" && return + + # Extract, validate and set the eth0's mac address for the current session + new_mac=$(grep "macaddr" $mgmt_config | awk -F'=' '{print $2}') + log_migration "Setting eth0 mac as $new_mac." + if [ `echo $new_mac | egrep "^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$"` ]; then + ip link set eth0 down + ip link set eth0 address $new_mac + ip link set eth0 up + else + log_migration "ERROR: mac imported from NOS is invalid : $new_mac !" + return + fi + + # Get the ethtool magic and offset for changing the mac address in the EEPROM + ethtool_magic=$(grep "ethtool_magic" $mgmt_config | awk -F'=' '{print $2}') + ethtool_offset=$(grep "ethtool_offset" $mgmt_config | awk -F'=' '{print $2}') + if [ -z "$ethtool_magic" ] || [ -z "$ethtool_offset" ]; then + log_migration "Unable to retrieve ethtool params ($ethtool_magic,$ethtool_offset)" + return + fi + + log_migration "eth0 mac in EEPROM before update:" + ethtool -e eth0 offset $ethtool_offset length 6 >> /host/migration/migration.log + + # Update the mac address in the EEPROM for subsequent reboots + # Write only changed octets + for i in 1 2 3 4 5 6; do + offset=$(($ethtool_offset+$i-1)) + old_mac_octet="$(echo $old_mac | cut -d":" -f$i)" + new_mac_octet="$(echo $new_mac | cut -d":" -f$i)" + + if [ "$old_mac_octet" != "$new_mac_octet" ]; then + ethtool -E eth0 magic $ethtool_magic offset $offset value 0x$new_mac_octet + if [ $? != 0 ]; then + log_migration "ERROR: unable to update eth0 EEPROM!" + log_migration "index $i, magic $ethtool_magic offset $offset, value $new_mac_octet" + return + fi + fi + done + + log_migration "eth0 mac in EEPROM after update:" + ethtool -e eth0 offset $ethtool_offset length 6 >> /host/migration/migration.log + + # Update the 70-persistent-net.rules with the new mac for eth0 + log_migration "/etc/udev/rules.d/70-persistent-net.rules : replacing $old_mac with $new_mac for eth0" + sed -i "/eth0/ s/ATTR{address}==\"$old_mac\"/ATTR{address}==\"$new_mac\"/g" /etc/udev/rules.d/70-persistent-net.rules +} + # If the machine.conf is absent, it indicates that the unit booted # into SONiC from another NOS. Extract the machine.conf from ONIE. if [ ! -e /host/machine.conf ]; then + mkdir -p /host/migration + onie_dev=$(blkid | grep ONIE-BOOT | head -n 1 | awk '{print $1}' | sed -e 's/:.*$//') mkdir -p /mnt/onie-boot mount $onie_dev /mnt/onie-boot onie_grub_cfg=/mnt/onie-boot/onie/grub/grub-machine.cfg if [ ! -e $onie_grub_cfg ]; then - echo "$onie_grub_cfg not found" >> /etc/migration.log + log_migration "$onie_grub_cfg not found" else . ./$onie_grub_cfg grep = $onie_grub_cfg | sed -e 's/onie_//' -e 's/=.*$//' | while read var ; do @@ -29,6 +105,44 @@ if [ ! -e /host/machine.conf ]; then done fi + # Extract the previous NOS's partition that contains the migration artifacts + set -- $(cat /proc/cmdline) + for x in "$@"; do + case "$x" in + nos-config-part=*) + nos_val="${x#nos-config-part=}" + ;; + esac + done + + if [ -n "$nos_val" ]; then + nos_dev=$(findfs $nos_val) + if [ $? != 0 ]; then + log_migration "ERROR: nos_dev not found. Check grub parameters" + fi + else + log_migration "ERROR: nos_val not found. Check grub parameters" + fi + + if [ -n "$nos_dev" ]; then + # Mount the previous NOS's partition + mkdir -p /mnt/nos_migration + mount $nos_dev /mnt/nos_migration + mkdir -p /host/fast-reboot + + # Copy relevant files + nos_migration_import /mnt/nos_migration/mgmt_interface.cfg /host/migration + nos_migration_import /mnt/nos_migration/minigraph.xml /host/migration + nos_migration_import /mnt/nos_migration/arp.json /host/fast-reboot + nos_migration_import /mnt/nos_migration/fdb.json /host/fast-reboot + nos_migration_import /mnt/nos_migration/default_routes.json /host/fast-reboot + + umount /mnt/nos_migration + rmdir /mnt/nos_migration + fi + + update_mgmt_interface_macaddr /host/migration/mgmt_interface.cfg + migration="TRUE" umount /mnt/onie-boot fi @@ -43,15 +157,6 @@ firsttime_exit() exit 0 } -test_config() -{ - if [ -d /host/old_config ] && ( [ -f /host/old_config/minigraph.xml ] || [ -f /host/old_config/config_db.json ] ); then - return 0 - fi - - return 1 -} - # Given a string of tuples of the form field=value, extract the value for a field # In : $string, $field # Out: $value @@ -66,7 +171,7 @@ for x in "$@"; do done } -sonic_version=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ") +eval sonic_version=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ") if [ -f /host/image-$sonic_version/platform/firsttime ]; then @@ -79,46 +184,22 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then firsttime_exit fi - # setup initial switch mac - SONIC_ASIC_TYPE=$(sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type) - SYSTEM_MAC_ADDRESS=$(ip link show eth0 | grep ether | awk '{print $2}') - - # Align last byte of MAC if necessary - if [ "$SONIC_ASIC_TYPE" = "mellanox" ] || [ "$SONIC_ASIC_TYPE" = "centec" ]; then - last_byte=$(python -c "print '$SYSTEM_MAC_ADDRESS'[-2:]") - aligned_last_byte=$(python -c "print format(int(int('$last_byte', 16) & 0b11000000), '02x')") # put mask and take away the 0x prefix - SYSTEM_MAC_ADDRESS=$(python -c "print '$SYSTEM_MAC_ADDRESS'[:-2] + '$aligned_last_byte'") # put aligned byte into the end of MAC - fi - - if [ -f /etc/sonic/init_cfg.json ]; then - sonic-cfggen -j /etc/sonic/init_cfg.json -a '{"DEVICE_METADATA":{"localhost": {"mac": "'$SYSTEM_MAC_ADDRESS'"}}}' --print-data > /tmp/init_cfg.json - mv /tmp/init_cfg.json /etc/sonic/init_cfg.json - else - sonic-cfggen -a '{"DEVICE_METADATA":{"localhost": {"mac": "'$SYSTEM_MAC_ADDRESS'"}}}' --print-data > /etc/sonic/init_cfg.json - fi - # Try to take old configuration saved during installation - if test_config; then - rm -f /host/old_config/sonic_version.yml - mv -f /host/old_config/* /etc/sonic/ - if [ ! -f /etc/sonic/config_db.json ]; then - sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json - fi + # and create a flag in /tmp/ to let updategraph service know + if [ -d /host/old_config ]; then + mv -f /host/old_config /etc/sonic/ + touch /tmp/pending_config_migration elif [ -f /host/minigraph.xml ]; then - mv /host/minigraph.xml /etc/sonic/ - # Combine information in minigraph and init_cfg.json to form initiate config DB dump file. - # TODO: After moving all information from minigraph to DB, sample config DB dump should be provide - sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json + mkdir -p /etc/sonic/old_config + mv /host/minigraph.xml /etc/sonic/old_config/ + touch /tmp/pending_config_migration + elif [ -n "$migration" ] && [ -f /host/migration/minigraph.xml ]; then + mkdir -p /etc/sonic/old_config + mv /host/migration/minigraph.xml /etc/sonic/old_config/ + touch /tmp/pending_config_migration + [ -f /etc/sonic/updategraph.conf ] && sed -i -e "s/enabled=false/enabled=true/g" /etc/sonic/updategraph.conf else - # Use default minigraph.xml - cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/ - HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']"` - if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then - # merge qos configuration into init config file - sonic-cfggen -j /etc/sonic/init_cfg.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/init_cfg.json - mv /tmp/init_cfg.json /etc/sonic/init_cfg.json - fi - sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json + touch /tmp/pending_config_initialization fi if [ -d /host/image-$sonic_version/platform/$platform ]; then @@ -131,26 +212,26 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then grub_bin=$(ls /host/image-$sonic_version/platform/x86_64-grub/grub-pc-bin*.deb 2> /dev/null) if [ -z "$grub_bin" ]; then - echo "Unable to locate grub package !" >> /etc/migration.log + log_migration "Unable to locate grub package !" firsttime_exit fi dpkg -i $grub_bin > /dev/null 2>&1 if [ $? != 0 ]; then - echo "Unable to install grub package !" >> /etc/migration.log + log_migration "Unable to install grub package !" firsttime_exit fi # Determine the block device to install grub sonic_dev=$(blkid | grep SONiC-OS | head -n 1 | awk '{print $1}' | sed -e 's/[0-9]:.*$//') if [ -z "$sonic_dev" ]; then - echo "Unable to determine sonic partition !" >> /etc/migration.log + log_migration "Unable to determine sonic partition !" firsttime_exit fi grub-install --boot-directory=/host --recheck $sonic_dev 2>/dev/null if [ $? != 0 ]; then - echo "grub install failed !" >> /etc/migration.log + log_migration "grub install failed !" firsttime_exit fi @@ -167,7 +248,7 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then if [ ! -z "$console_port" ] && [ "$console_port" != "$CONSOLE_PORT" ]; then sed -i -e "s/\-\-port=$console_port/\-\-port=$CONSOLE_PORT/g" /host/grub.cfg fi - echo "grub.cfg console port=$console_port & installer.conf CONSOLE_PORT=$CONSOLE_PORT" >> /etc/migration.log + log_migration "grub.cfg console port=$console_port & installer.conf CONSOLE_PORT=$CONSOLE_PORT" fi if [ ! -z "$CONSOLE_DEV" ]; then @@ -179,7 +260,7 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then if [ "$console_dev" != "$CONSOLE_DEV" ]; then sed -i -e "s/console=ttyS$console_dev/console=ttyS$CONSOLE_DEV/g" /host/grub.cfg fi - echo "grub.cfg console dev=$console_dev & installer.conf CONSOLE_DEV=$CONSOLE_DEV" >> /etc/migration.log + log_migration "grub.cfg console dev=$console_dev & installer.conf CONSOLE_DEV=$CONSOLE_DEV" fi if [ ! -z "$VAR_LOG_SIZE" ]; then @@ -190,7 +271,7 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then if [ ! -z "$var_log_size" ] && [ "$var_log_size" != "$VAR_LOG_SIZE" ]; then sed -i -e "s/var_log_size=$var_log_size/var_log_size=$VAR_LOG_SIZE/g" /host/grub.cfg fi - echo "grub.cfg var_log_size=$var_log_size & installer.conf VAR_LOG_SIZE=$VAR_LOG_SIZE" >> /etc/migration.log + log_migration "grub.cfg var_log_size=$var_log_size & installer.conf VAR_LOG_SIZE=$VAR_LOG_SIZE" fi # Set the root based on the label diff --git a/files/image_config/rsyslog/rsyslog-config.service b/files/image_config/rsyslog/rsyslog-config.service index e013b992030..ee62a36ccf2 100644 --- a/files/image_config/rsyslog/rsyslog-config.service +++ b/files/image_config/rsyslog/rsyslog-config.service @@ -1,7 +1,7 @@ [Unit] Description=Update rsyslog configuration -Requires=database.service -After=database.service +Requires=updategraph.service +After=updategraph.service [Service] Type=oneshot diff --git a/files/image_config/rsyslog/rsyslog.d/00-sonic.conf b/files/image_config/rsyslog/rsyslog.d/00-sonic.conf index bc0bbbaf1e6..6e4be4bb602 100644 --- a/files/image_config/rsyslog/rsyslog.d/00-sonic.conf +++ b/files/image_config/rsyslog/rsyslog.d/00-sonic.conf @@ -19,3 +19,9 @@ if $programname contains "teamd_" then { /var/log/teamd.log stop } + +## telemetry rules +if $msg startswith " telemetry" or ($msg startswith " dialout" )then { + /var/log/telemetry.log + stop +} \ No newline at end of file diff --git a/files/image_config/rsyslog/rsyslog.d/99-default.conf b/files/image_config/rsyslog/rsyslog.d/99-default.conf index 06a40ca6485..77609410c57 100644 --- a/files/image_config/rsyslog/rsyslog.d/99-default.conf +++ b/files/image_config/rsyslog/rsyslog.d/99-default.conf @@ -21,7 +21,7 @@ cron.* /var/log/cron.log # NOTE: adjust the list below, or you'll go crazy if you have a reasonably # busy site.. # -daemon.*;mail.*;\ - news.err;\ - *.=debug;*.=info;\ - *.=notice;*.=warn |/dev/xconsole +#daemon.*;mail.*;\ +# news.err;\ +# *.=debug;*.=info;\ +# *.=notice;*.=warn |/dev/xconsole diff --git a/files/image_config/ssh/sshd-clear-denied-sessions b/files/image_config/ssh/sshd-clear-denied-sessions new file mode 100755 index 00000000000..d0ca6550239 --- /dev/null +++ b/files/image_config/ssh/sshd-clear-denied-sessions @@ -0,0 +1,81 @@ +#!/usr/bin/env python + +""" +This utility will find the ip addresses of all hosts that have connected to +this device via ssh, then validate they are still in the list of allowed prefixes, +and if not kill the ssh session with a SIGHUP. +""" + +import os +import re +import subprocess + +# Run utmpdump, capture and return its output +def run_utmpdump(_utmpFilename): + devnull = file("/dev/null", "w" ) + p = subprocess.Popen(args=["utmpdump", _utmpFilename], stdout=subprocess.PIPE, stderr=devnull) + (stdout, stderr) = p.communicate() + rc = p.returncode + assert rc is not None # because p.communicate() should wait. + out = (stdout or '') + (stderr or '') + if rc: + e = SystemCommandError("%r: error code %d" % (" ".join(argv), rc)) + e.error = rc + e.output = out + raise e + return stdout + +# Run utmpdump and parse its output into a list of dicts and return that +def get_utmp_data(utmpFileName=None): + """Reads the specified utmp file. + Returns a list of dictionaries, one for each utmp entry. + All dictionary keys and values are strings + Values are right padded with spaces and may contain all + spaces if that utmp field is empty. + Dictionary keys: + "type": See UTMP_TYPE_* above + "pid": Process ID as a string + "tty": TTY (line) name - device name of tty w/o "/dev/" + "tty4": 4 char abbreivated TTY (line) name + "user": User ID + "host": Hostname for remote login, + kernel release for Run Level and Boot Time + "ipAddr": IP Address + "time": Time and date entry was made + See linux docs on utmp and utmpdemp for more info. + Example output from utmpdump: + pid tty4 user tty host ipAddr time + [7] [22953] [/238] [myname ] [pts/238 ] [example.com] [253.122.98.159 ] [Mon Dec 18 21:08:09 2017 PST] + """ + if not utmpFileName: + utmpFileName = os.environ.get( "DEFAULT_UTMP_FILE", "/var/run/utmp" ) + if not os.path.exists(utmpFileName): + return [] + output = run_utmpdump(utmpFileName) + lines = re.split("\n", output) + regExp = re.compile( + r"\[(?P" r"[^\]]*?)\s*\] \[(?P" r"[^\]]*?)\s*\] " \ + r"\[(?P" r"[^\]]*?)\s*\] \[(?P" r"[^\]]*?)\s*\] " \ + r"\[(?P" r"[^\]]*?)\s*\] \[(?P" r"[^\]]*?)\s*\] " \ + r"\[(?P" r"[^\]]*?)\s*\] \[(?P
- Vlan1000 + ab1 fortyGigE0/8 192.0.0.1;192.0.0.2 1000 @@ -159,17 +159,21 @@ - Vlan1000 + ab1 192.168.0.1/27
- - PortChannel01 - + PortChannel01 DataAcl + DataPlane + + + SNMP + SNMP_ACL + SNMP @@ -177,7 +181,19 @@ - + + + DeviceInterfaceLink + true + 1000 + ARISTA01T1 + et1 + true + switch-t0 + fortyGigE0/8 + true + + switch-t0 @@ -218,6 +234,19 @@ 0 10000 + + DeviceInterface + + true + true + 1 + fortyGigE0/1 + + false + 0 + 0 + 10000 + DeviceInterface @@ -256,7 +285,7 @@ false 0 0 - 1000000 + 100000 Interface description diff --git a/src/sonic-config-engine/tests/t0-sample-acl.json b/src/sonic-config-engine/tests/t0-sample-acl.json index 4157a1701b6..1caf2ff0295 100644 --- a/src/sonic-config-engine/tests/t0-sample-acl.json +++ b/src/sonic-config-engine/tests/t0-sample-acl.json @@ -112,6 +112,63 @@ "config": { "name": "everflow" } + }, + "SNMP-ACL": { + "acl-entries": { + "acl-entry": { + "1": { + "actions": { + "config": { + "forwarding-action": "ACCEPT" + } + }, + "config": { + "sequence-id": 1 + }, + "ip": { + "config": { + "protocol": "IP_UDP", + "source-ip-address": "10.0.0.0/8" + } + } + }, + "2": { + "actions": { + "config": { + "forwarding-action": "ACCEPT" + } + }, + "config": { + "sequence-id": 2 + }, + "ip": { + "config": { + "protocol": "IP_UDP", + "source-ip-address": "100.64.0.0/10" + } + } + }, + "3": { + "actions": { + "config": { + "forwarding-action": "ACCEPT" + } + }, + "config": { + "sequence-id": 3 + }, + "ip": { + "config": { + "protocol": "IP_UDP", + "source-ip-address": "25.0.0.0/8" + } + } + } + } + }, + "config": { + "name": "SNMP-ACL" + } } } } diff --git a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml index 18a8baccdae..f2690985d9f 100644 --- a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml +++ b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml @@ -259,10 +259,14 @@ - - PortChannel01;PortChannel02;PortChannel03;PortChannel04 - + PortChannel01;PortChannel02;PortChannel03;PortChannel04 DataAcl + DataPlane + + + SNMP + SNMP_ACL + SNMP diff --git a/src/sonic-config-engine/tests/t0-sample-graph.xml b/src/sonic-config-engine/tests/t0-sample-graph.xml index fe0b1a1e250..bda5517771e 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph.xml @@ -262,10 +262,38 @@ - - PortChannel01;PortChannel02;PortChannel03;PortChannel04 - + PortChannel01;PortChannel02;PortChannel03;PortChannel04 DataAcl + DataPlane + + + SNMP + SNMP_ACL + SNMP + + + NTP + NTP_ACL + NTP + + + SSH + SSH_ACL + SSH + + + SSH + ROUTER-PROTECT + SSH + + + SNMP + ROUTER-PROTECT + SNMP + + + NTP + NTP_ACL diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 2eee6fe331c..901b882f704 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -10,14 +10,19 @@ def setUp(self): self.sample_graph = os.path.join(self.test_dir, 'sample_graph.xml') self.sample_graph_t0 = os.path.join(self.test_dir, 't0-sample-graph.xml') self.sample_graph_simple = os.path.join(self.test_dir, 'simple-sample-graph.xml') + self.sample_graph_metadata = os.path.join(self.test_dir, 'simple-sample-graph-metadata.xml') self.sample_graph_pc_test = os.path.join(self.test_dir, 'pc-test-graph.xml') self.sample_graph_bgp_speaker = os.path.join(self.test_dir, 't0-sample-bgp-speaker.xml') self.sample_device_desc = os.path.join(self.test_dir, 'device.xml') self.port_config = os.path.join(self.test_dir, 't0-sample-port-config.ini') - def run_script(self, argument): + def run_script(self, argument, check_stderr=False): print '\n Running sonic-cfggen ' + argument - output = subprocess.check_output(self.script_file + ' ' + argument, shell=True) + if check_stderr: + output = subprocess.check_output(self.script_file + ' ' + argument, stderr=subprocess.STDOUT, shell=True) + else: + output = subprocess.check_output(self.script_file + ' ' + argument, shell=True) + linecount = output.strip().count('\n') if linecount <= 0: print ' Output: ' + output.strip() @@ -72,8 +77,13 @@ def test_render_template(self): def test_minigraph_acl(self): argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v ACL_TABLE' - output = self.run_script(argument) - self.assertEqual(output.strip(), "{'DATAACL': {'type': 'L3', 'policy_desc': 'DATAACL', 'ports': ['Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124']}}") + output = self.run_script(argument, True) + self.assertEqual(output.strip(), "Warning: Ignoring Control Plane ACL NTP_ACL without type\n" + "{'SSH_ACL': {'services': ['SSH'], 'type': 'CTRLPLANE', 'policy_desc': 'SSH_ACL'}," + " 'SNMP_ACL': {'services': ['SNMP'], 'type': 'CTRLPLANE', 'policy_desc': 'SNMP_ACL'}," + " 'DATAACL': {'type': 'L3', 'policy_desc': 'DATAACL', 'ports': ['Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124']}," + " 'NTP_ACL': {'services': ['NTP'], 'type': 'CTRLPLANE', 'policy_desc': 'NTP_ACL'}," + " 'ROUTER_PROTECT': {'services': ['SSH', 'SNMP'], 'type': 'CTRLPLANE', 'policy_desc': 'ROUTER_PROTECT'}}") def test_minigraph_everflow(self): argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v MIRROR_SESSION' @@ -88,7 +98,7 @@ def test_minigraph_interfaces(self): def test_minigraph_vlans(self): argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v VLAN' output = self.run_script(argument) - self.assertEqual(output.strip(), "{'Vlan1000': {'dhcp_servers': ['192.0.0.1', '192.0.0.2'], 'vlanid': '1000'}}") + self.assertEqual(output.strip(), "{'Vlan1000': {'alias': 'ab1', 'dhcp_servers': ['192.0.0.1', '192.0.0.2'], 'vlanid': '1000'}}") def test_minigraph_vlan_members(self): argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v VLAN_MEMBER' @@ -138,4 +148,60 @@ def test_minigraph_deployment_id(self): def test_minigraph_ethernet_interfaces(self): argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "PORT[\'Ethernet8\']"' output = self.run_script(argument) - self.assertEqual(output.strip(), "{'alias': 'fortyGigE0/8', 'lanes': '37,38,39,40', 'description': 'Interface description', 'speed': '40000'}") + self.assertEqual(output.strip(), "{'alias': 'fortyGigE0/8', 'lanes': '37,38,39,40', 'description': 'Interface description', 'speed': '1000'}") + argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "PORT[\'Ethernet12\']"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'alias': 'fortyGigE0/12', 'lanes': '33,34,35,36', 'fec': 'rs', 'speed': '100000', 'description': 'Interface description'}") + + def test_minigraph_extra_ethernet_interfaces(self): + argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "PORT"' + output = self.run_script(argument) + self.assertEqual(output.strip(), \ + "{'Ethernet8': {'alias': 'fortyGigE0/8', 'lanes': '37,38,39,40', 'description': 'Interface description', 'speed': '1000'}, " + "'Ethernet0': {'alias': 'fortyGigE0/0', 'lanes': '29,30,31,32', 'speed': '10000'}, " + "'Ethernet4': {'alias': 'fortyGigE0/4', 'lanes': '25,26,27,28', 'speed': '25000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'lanes': '81,82,83,84'}, " + "'Ethernet100': {'alias': 'fortyGigE0/100', 'lanes': '125,126,127,128'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'lanes': '85,86,87,88'}, " + "'Ethernet68': {'alias': 'fortyGigE0/68', 'lanes': '69,70,71,72'}, " + "'Ethernet96': {'alias': 'fortyGigE0/96', 'lanes': '121,122,123,124'}, " + "'Ethernet124': {'alias': 'fortyGigE0/124', 'lanes': '101,102,103,104'}, " + "'Ethernet92': {'alias': 'fortyGigE0/92', 'lanes': '113,114,115,116'}, " + "'Ethernet120': {'alias': 'fortyGigE0/120', 'lanes': '97,98,99,100'}, " + "'Ethernet52': {'alias': 'fortyGigE0/52', 'lanes': '53,54,55,56'}, " + "'Ethernet56': {'alias': 'fortyGigE0/56', 'lanes': '61,62,63,64'}, " + "'Ethernet76': {'alias': 'fortyGigE0/76', 'lanes': '73,74,75,76'}, " + "'Ethernet72': {'alias': 'fortyGigE0/72', 'lanes': '77,78,79,80'}, " + "'Ethernet64': {'alias': 'fortyGigE0/64', 'lanes': '65,66,67,68'}, " + "'Ethernet32': {'alias': 'fortyGigE0/32', 'lanes': '9,10,11,12'}, " + "'Ethernet16': {'alias': 'fortyGigE0/16', 'lanes': '41,42,43,44'}, " + "'Ethernet36': {'alias': 'fortyGigE0/36', 'lanes': '13,14,15,16'}, " + "'Ethernet12': {'alias': 'fortyGigE0/12', 'lanes': '33,34,35,36', 'fec': 'rs', 'speed': '100000', 'description': 'Interface description'}, " + "'Ethernet88': {'alias': 'fortyGigE0/88', 'lanes': '117,118,119,120'}, " + "'Ethernet116': {'alias': 'fortyGigE0/116', 'lanes': '93,94,95,96'}, " + "'Ethernet80': {'alias': 'fortyGigE0/80', 'lanes': '105,106,107,108'}, " + "'Ethernet112': {'alias': 'fortyGigE0/112', 'lanes': '89,90,91,92'}, " + "'Ethernet84': {'alias': 'fortyGigE0/84', 'lanes': '109,110,111,112'}, " + "'Ethernet48': {'alias': 'fortyGigE0/48', 'lanes': '49,50,51,52'}, " + "'Ethernet44': {'alias': 'fortyGigE0/44', 'lanes': '17,18,19,20'}, " + "'Ethernet40': {'alias': 'fortyGigE0/40', 'lanes': '21,22,23,24'}, " + "'Ethernet28': {'alias': 'fortyGigE0/28', 'lanes': '1,2,3,4'}, " + "'Ethernet60': {'alias': 'fortyGigE0/60', 'lanes': '57,58,59,60'}, " + "'Ethernet20': {'alias': 'fortyGigE0/20', 'lanes': '45,46,47,48'}, " + "'Ethernet24': {'alias': 'fortyGigE0/24', 'lanes': '5,6,7,8'}}") + + def test_metadata_everflow(self): + argument = '-m "' + self.sample_graph_metadata + '" -p "' + self.port_config + '" -v "MIRROR_SESSION"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'everflow0': {'src_ip': '10.1.0.32', 'dst_ip': '10.0.100.1'}}") + + def test_metadata_tacacs(self): + argument = '-m "' + self.sample_graph_metadata + '" -p "' + self.port_config + '" -v "TACPLUS_SERVER"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'10.0.10.7': {'priority': '1', 'tcp_port': '49'}, '10.0.10.8': {'priority': '1', 'tcp_port': '49'}}") + + 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(output.strip(), "{'10.0.10.1': {}, '10.0.10.2': {}}") + diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index ce96ab425c8..8ff974c1eb1 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -40,6 +40,19 @@ def test_ports_json(self): self.run_script(argument) self.assertTrue(filecmp.cmp(os.path.join(self.test_dir, 'sample_output', 'ports.json'), self.output_file)) + def test_dhcp_relay(self): + # Test generation of wait_for_intf.sh + template_path = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-dhcp-relay', 'wait_for_intf.sh.j2') + argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -t ' + template_path + ' > ' + self.output_file + self.run_script(argument) + self.assertTrue(filecmp.cmp(os.path.join(self.test_dir, 'sample_output', 'wait_for_intf.sh'), self.output_file)) + + # Test generation of docker-dhcp-relay.supervisord.conf + template_path = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-dhcp-relay', 'docker-dhcp-relay.supervisord.conf.j2') + argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -t ' + template_path + ' > ' + self.output_file + self.run_script(argument) + self.assertTrue(filecmp.cmp(os.path.join(self.test_dir, 'sample_output', 'docker-dhcp-relay.supervisord.conf'), self.output_file)) + def test_lldp(self): lldpd_conf_template = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-lldp-sv2', 'lldpd.conf.j2') argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -t ' + lldpd_conf_template + ' > ' + self.output_file @@ -85,7 +98,7 @@ def test_ipinip(self): assert filecmp.cmp(sample_output_file, self.output_file) def test_msn27xx_32ports_buffers(self): - buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-orchagent', 'msn27xx.32ports.buffers.json.j2') + buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'device', 'mellanox', 'x86_64-mlnx_msn2700-r0', 'ACS-MSN2700', 'buffers.json.j2') argument = '-m ' + self.t1_mlnx_minigraph + ' -p ' + self.mlnx_port_config + ' -t ' + buffer_file + ' > ' + self.output_file self.run_script(argument) @@ -93,6 +106,13 @@ def test_msn27xx_32ports_buffers(self): self.assertTrue(filecmp.cmp(sample_output_file, self.output_file)) + def test_sku_render_template(self): + argument = '-k Mellanox-SN2700 -t ' + os.path.join(self.test_dir, '../data/l2switch.j2') + ' -p ' + self.t0_port_config + ' > ' + self.output_file + self.run_script(argument) + + sample_output_file = os.path.join(self.test_dir, 'sample_output', 'l2switch.json') + + self.assertTrue(filecmp.cmp(sample_output_file, self.output_file)) def tearDown(self): try: diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py new file mode 100644 index 00000000000..754bdae799f --- /dev/null +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -0,0 +1,111 @@ +from unittest import TestCase +import subprocess +import os + +class TestCfgGenCaseInsensitive(TestCase): + + def setUp(self): + self.test_dir = os.path.dirname(os.path.realpath(__file__)) + self.script_file = os.path.join(self.test_dir, '..', 'sonic-cfggen') + self.sample_graph = os.path.join(self.test_dir, 'simple-sample-graph-case.xml') + self.port_config = os.path.join(self.test_dir, 't0-sample-port-config.ini') + + def run_script(self, argument, check_stderr=False): + print '\n Running sonic-cfggen ' + argument + if check_stderr: + output = subprocess.check_output(self.script_file + ' ' + argument, stderr=subprocess.STDOUT, shell=True) + else: + output = subprocess.check_output(self.script_file + ' ' + argument, shell=True) + + linecount = output.strip().count('\n') + if linecount <= 0: + print ' Output: ' + output.strip() + else: + print ' Output: ({0} lines, {1} bytes)'.format(linecount + 1, len(output)) + return output + + def test_dummy_run(self): + argument = '' + output = self.run_script(argument) + self.assertEqual(output, '') + + def test_minigraph_sku(self): + argument = '-v "DEVICE_METADATA[\'localhost\'][\'hwsku\']" -m "' + self.sample_graph + '"' + output = self.run_script(argument) + self.assertEqual(output.strip(), 'Force10-S6000') + + def test_print_data(self): + argument = '-m "' + self.sample_graph + '" --print-data' + output = self.run_script(argument) + self.assertTrue(len(output.strip()) > 0) + + def test_jinja_expression(self): + argument = '-m "' + self.sample_graph + '" -v "DEVICE_METADATA[\'localhost\'][\'type\']"' + output = self.run_script(argument) + self.assertEqual(output.strip(), 'ToRRouter') + + def test_additional_json_data(self): + argument = '-a \'{"key1":"value1"}\' -v key1' + output = self.run_script(argument) + self.assertEqual(output.strip(), 'value1') + + def test_read_yaml(self): + argument = '-v yml_item -y ' + os.path.join(self.test_dir, 'test.yml') + output = self.run_script(argument) + self.assertEqual(output.strip(), '[\'value1\', \'value2\']') + + def test_render_template(self): + argument = '-y ' + os.path.join(self.test_dir, 'test.yml') + ' -t ' + os.path.join(self.test_dir, 'test.j2') + output = self.run_script(argument) + self.assertEqual(output.strip(), 'value1\nvalue2') + + def test_minigraph_everflow(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v MIRROR_SESSION' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'everflow0': {'src_ip': '10.1.0.32', 'dst_ip': '10.0.100.1'}}") + + def test_minigraph_interfaces(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v \'INTERFACE.keys()\'' + output = self.run_script(argument) + self.assertEqual(output.strip(), "[('Ethernet0', '10.0.0.58/31'), ('Ethernet0', 'FC00::75/126')]") + + def test_minigraph_vlans(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v VLAN' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'Vlan1000': {'alias': 'ab1', 'dhcp_servers': ['192.0.0.1', '192.0.0.2'], 'vlanid': '1000'}}") + + def test_minigraph_vlan_members(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v VLAN_MEMBER' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'Vlan1000|Ethernet8': {'tagging_mode': 'untagged'}}") + + def test_minigraph_vlan_interfaces(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "VLAN_INTERFACE.keys()"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "[('Vlan1000', '192.168.0.1/27')]") + + def test_minigraph_portchannels(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v PORTCHANNEL' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'PortChannel01': {'members': ['Ethernet4']}}") + + def test_minigraph_deployment_id(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "DEVICE_METADATA[\'localhost\'][\'deployment_id\']"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "1") + + def test_metadata_everflow(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "MIRROR_SESSION"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'everflow0': {'src_ip': '10.1.0.32', 'dst_ip': '10.0.100.1'}}") + + def test_metadata_tacacs(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "TACPLUS_SERVER"' + output = self.run_script(argument) + self.assertEqual(output.strip(), "{'10.0.10.7': {'priority': '1', 'tcp_port': '49'}, '10.0.10.8': {'priority': '1', 'tcp_port': '49'}}") + + 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': {}}") + diff --git a/src/sonic-dbsyncd b/src/sonic-dbsyncd index 812f2cd50f8..1d0b2165e09 160000 --- a/src/sonic-dbsyncd +++ b/src/sonic-dbsyncd @@ -1 +1 @@ -Subproject commit 812f2cd50f83c1b83fbfc2688752e969cd5cd6f9 +Subproject commit 1d0b2165e097ee668c8e982cf3cf413e4f2555d2 diff --git a/src/sonic-device-data/src/Makefile b/src/sonic-device-data/src/Makefile new file mode 100644 index 00000000000..9c0037fd50c --- /dev/null +++ b/src/sonic-device-data/src/Makefile @@ -0,0 +1,11 @@ +.ONESHELL: +SHELL = /bin/bash +.SHELLFLAGS += -e + +test: + # Execute Broadcom config file test + pushd ../tests/ + for f in $$(find ../../../device -name "*.config.bcm"); do + ./config_checker $$f + done + popd diff --git a/src/sonic-device-data/tests/LICENSE b/src/sonic-device-data/tests/LICENSE new file mode 100644 index 00000000000..fd8968a9bd4 --- /dev/null +++ b/src/sonic-device-data/tests/LICENSE @@ -0,0 +1,42 @@ +Copyright: Copyright 2017 Broadcom Corporation. + +This program is the proprietary software of Broadcom Corporation +and/or its licensors, and may only be used, duplicated, modified +or distributed pursuant to the terms and conditions of a separate, +written license agreement executed between you and Broadcom +(an "Authorized License"). Except as set forth in an Authorized +License, Broadcom grants no license (express or implied), right +to use, or waiver of any kind with respect to the Software, and +Broadcom expressly reserves all rights in and to the Software +and all intellectual property rights therein. IF YOU HAVE +NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE +IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE +ALL USE OF THE SOFTWARE. + + Except as expressly set forth in the Authorized License, + + 1. This program, including its structure, sequence and organization, +constitutes the valuable trade secrets of Broadcom, and you shall use +all reasonable efforts to protect the confidentiality thereof, +and to use this information only in connection with your use of +Broadcom integrated circuit products. + + 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS +PROVIDED "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, +REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, +OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY +DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, +NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, +ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR +CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING +OUT OF USE OR PERFORMANCE OF THE SOFTWARE. + + 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL +BROADCOM OR ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, +INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER +ARISING OUT OF OR IN ANY WAY RELATING TO YOUR USE OF OR INABILITY +TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF +THE AMOUNT ACTUALLY PAID FOR THE SOFTWARE ITSELF OR USD 1.00, +WHICHEVER IS GREATER. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING +ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. diff --git a/src/sonic-device-data/tests/config_checker b/src/sonic-device-data/tests/config_checker new file mode 100755 index 00000000000..51c32c19c3e --- /dev/null +++ b/src/sonic-device-data/tests/config_checker @@ -0,0 +1,92 @@ +#!/usr/bin/env python +import re +import sys +import glob + +permitted_properties = [] + +def usage(): + print "Usage: " + sys.argv[0] + " " + sys.exit(1) + +def check_property(p): + if p in permitted_properties: + return True + # Try to remove trailing . + if re.sub(r".\d+$", "", p) in permitted_properties: + return True + # Try to remove trailing _. + if re.sub(r"_\d+.\d+$", "", p) in permitted_properties: + return True + # Try to remove trailing _hg. + if re.sub(r"_hg.0$", "", p) in permitted_properties: + return True + # Try to remove trailing _[cx]e + if re.sub(r"_[cx]e\d*$", "", p) in permitted_properties: + return True + # Try to remove trailing _lane_ + if re.sub(r"_lane\d_\d+$", "", p) in permitted_properties: + return True + # Try to remove trailing _lane_. + if re.sub(r"_lane\d_\d+.\d+$", "", p) in permitted_properties: + return True + # Try to remove trailing _lane_[cx]e + if re.sub(r"_lane\d_[cx]e\d+$", "", p) in permitted_properties: + return True + return False + +def check_file(file_name): + try: + file_ok = True + failed_properties = [] + lineno = 0 + with open(file_name) as f: + for line in f.readlines(): + lineno = lineno + 1 + # Check both commented and uncommented lines + line = line.strip().lstrip('#').strip().lower() + if line.find("=") == -1: + continue + p = line.split("=", 1)[0] + # Remove trailing "{.}" + p = re.sub('{[0-9]+\.[0-9]+}', '', p) + # Check if = in the line + if not check_property(p): + file_ok = False + print("[line %d] Error: %s is not permitted" % (lineno, p)) + if file_ok: + print "Result: " + file_name + " PASSED the config check!" + else: + print "Result: " + file_name + " FAILED the config check!" + return file_ok + except IOError: + print "Error: Cannot open file " + file_name + return False + + +def main(argv): + global permitted_properties + + if len(argv) > 0 and argv[0] == "-h": + usage() + + # Load permitted properties + with open("permitted_list") as f: + permitted_properties = [p.strip().lower() for p in f.readlines()] + + # Load target file + if len(argv) == 0: + files = glob.glob('*.config.bcm') + else: + files = argv + + all_good = True + for f in files: + good = check_file(f) + all_good = all_good and good + + if not all_good: + sys.exit(-1) + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/src/sonic-device-data/tests/permitted_list b/src/sonic-device-data/tests/permitted_list new file mode 100644 index 00000000000..150a16292c9 --- /dev/null +++ b/src/sonic-device-data/tests/permitted_list @@ -0,0 +1,134 @@ +arl_clean_timeout_usec +asf_mem_profile +bcm_linkscan_interval +bcm_num_cos +bcm_stat_flags +bcm_stat_interval +bcm_stat_jumbo +bcm_tunnel_term_compatible_mode +bcm_xlate_port_enable +cdma_timeout_usec +core_clock_frequency +ctr_evict_enable +dma_desc_timeout_usec +dport_map_direct +dport_map_enable +dport_map_indexed +dport_map_port +dpp_clock_ratio +force_core_pll +fpem_mem_entries +higig2_hdr_mode +ipmc_do_vlan +ipv6_lpm_128b_enable +knet_filter_persist +l2_mem_entries +l2delete_chunks +l2mod_dma_intr_enable +l2xmsg_hostbuf_size +l2xmsg_mode +l3_alpm_enable +l3_intf_vlan_split_egress +l3_max_ecmp_mode +l3_mem_entries +lls_num_l2uc +load_firmware +logical_ports +lpm_ipv6_128b_reserved +lpm_scaling_enable +max_vp_lags +mdio_output_delay +mem_cache_enable +mem_check_nocache_override +mem_clear_hw_a +mem_nocache +mem_scan_enable +memcmd_intr_enable +miim_intr_enable +miim_timeout_usec +mmu_init_config +mmu_lossless +module_64ports +multicast_l2_r +multicast_l2_range +multicast_l3_range +no_leds_proc +num_ipv6_lpm_128b_entries +os +oversubscribe_mode +parity_correction +parity_enable +pbmp_oversubscribe +pbmp_xport_xe +pci2eb_overrid +pfc_deadlock_seq_control +phy_84328 +phy_84752 +phy_an_allow_pll_change +phy_an_allow_pll_change_hg +phy_an_c37 +phy_an_c73 +phy_an_fec +phy_aux_voltage_enable +phy_chain_rx_lane_map_physical +phy_chain_rx_polarity_flip_physical +phy_chain_tx_lane_map_physical +phy_chain_tx_polarity_flip_physical +phy_ext_rom_boot +phy_gearbox_enable +phy_line_tx_mode +phy_pcs_rx_polarity_flip +phy_pcs_tx_polarity_flip +phy_port_primary_and_offset +phy_rx_polarity_flip +phy_system_tx_mode +phy_tx_polarity_flip +phy_xaui_rx_polarity_flip +phy_xaui_tx_polarity_flip +physical_ports +port_init_autoneg +port_init_cl72 +port_init_cl72_hg +port_init_speed_xe +port_phy_addr +port_phy_clause +port_phy_id0 +port_phy_id1 +portmap +prbs_polynomial +ptp_bs_fref +ptp_ts_pll_fref +rate_ext_mdio_divisor +robust_hash_disable_egress_vlan +robust_hash_disable_mpls +robust_hash_disable_vlan +scache_filename +schan_intr_enable +schan_timeout_usec +serdes_automed +serdes_automedium +serdes_driver_current +serdes_fiber_pref +serdes_firmware_mode +serdes_if_type +serdes_pre_driver_current +serdes_preemphasis +serdes_rx_los_xe +serdes_sgmii_m +skip_L2_USER_ENTRY +sram_scan_enable +stable_size +start_vlan +stat_if_parity_enable +switch_bypass_mode +table_dma_enable +tdma_intr_enable +tdma_timeout_usec +tslam_dma_enable +tslam_intr_enable +tslam_timeout_usec +uplink_ports +xgxs_lcpll_xtal_refclk +xgxs_pdetect_1 +xgxs_rx_lane_map +xgxs_tx_lane_map diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index ff5a3b588cc..ed04b369038 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit ff5a3b588cc7dbd763fb13c1125710134c8cdd12 +Subproject commit ed04b36903885ec065274174aa775e47695db2cb diff --git a/src/sonic-platform-common b/src/sonic-platform-common new file mode 160000 index 00000000000..b553dba4ca8 --- /dev/null +++ b/src/sonic-platform-common @@ -0,0 +1 @@ +Subproject commit b553dba4ca82997dcc60a3b3a68111d7af8d62fc diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index d1df4717627..c940a7d18ec 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit d1df4717627acf9421861545b71e411acf3c5f32 +Subproject commit c940a7d18ecd4dc22bbaf2aee6908045cbe24508 diff --git a/src/sonic-py-swsssdk b/src/sonic-py-swsssdk index a0418a15a46..ca540c9c51e 160000 --- a/src/sonic-py-swsssdk +++ b/src/sonic-py-swsssdk @@ -1 +1 @@ -Subproject commit a0418a15a46e20c3d8fcd7c8cf2bb6ab0a4aafaf +Subproject commit ca540c9c51e2bb704802a89ecd2b485578bd8211 diff --git a/src/sonic-quagga b/src/sonic-quagga index 59f7c8ed56f..e1217a52699 160000 --- a/src/sonic-quagga +++ b/src/sonic-quagga @@ -1 +1 @@ -Subproject commit 59f7c8ed56fa1c9df2070596b25f5f019bdba8ca +Subproject commit e1217a5269990926dff30624063975673b1da065 diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 3b817bbe14f..177f768c6ff 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 3b817bbe14f1e5177e6200c7a80ab74db4768eaa +Subproject commit 177f768c6ffe0806ee500f739bd06203ab913b72 diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index bedc2ec1d01..12bc0e0c984 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit bedc2ec1d018333fefe67390fba5b5f65c62ba6f +Subproject commit 12bc0e0c98432eb21add3b547e13bcf10e77ab51 diff --git a/src/sonic-swss b/src/sonic-swss index fab3cea5b07..84ce5ed82ae 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit fab3cea5b075ccdd26eb6d56cc68d6325bfb8b16 +Subproject commit 84ce5ed82ae564f74b3813db6abebd0e486f695d diff --git a/src/sonic-swss-common b/src/sonic-swss-common index 283162b62d1..1ef337a96df 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 283162b62d1dda594a5962e9ad8b4f9b65bf65c3 +Subproject commit 1ef337a96df371162686b825964ed76bc68325c9 diff --git a/src/sonic-utilities b/src/sonic-utilities index 8677d5f457c..da9476e90a7 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 8677d5f457c9a20f0fac2a4fdde569a8338c77e3 +Subproject commit da9476e90a7d5c9f784f5f22e0bcda13f4450c2b diff --git a/src/supervisor/Makefile b/src/supervisor/Makefile index 778903194ff..3f989c3d017 100644 --- a/src/supervisor/Makefile +++ b/src/supervisor/Makefile @@ -2,7 +2,7 @@ SHELL = /bin/bash .SHELLFLAGS += -e -MAIN_TARGET = python-supervisor_3.3.2-1_all.deb +MAIN_TARGET = python-supervisor_$(SUPERVISOR_VERSION)-1_all.deb $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Remove any stale files @@ -11,7 +11,15 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Clone supervisor repo git clone https://github.com/Supervisor/supervisor.git pushd ./supervisor - git checkout -f 3.3.2 + + # Reset HEAD to the commit of the proper tag + # NOTE: Using "git checkout " here detaches our HEAD, + # which stg doesn't like, so we use this method instead + git reset --hard $(SUPERVISOR_VERSION) + + # Apply patches + stg init + stg import -s ../patch/series # Build Python and Debian package python setup.py --command-packages=stdeb.command bdist_deb diff --git a/src/supervisor/patch/0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch b/src/supervisor/patch/0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch new file mode 100644 index 00000000000..c0263e9baf1 --- /dev/null +++ b/src/supervisor/patch/0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch @@ -0,0 +1,83 @@ +From bac496af4c2051b3c15038e06533f9094b1c3604 Mon Sep 17 00:00:00 2001 +From: Joe LeVeque +Date: Tue, 16 Jan 2018 20:42:13 +0000 +Subject: [PATCH 1/2] Prevent excessive hanging/delays in process state + transitions if the system time rolls backward + +--- + supervisor/process.py | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/supervisor/process.py b/supervisor/process.py +index f9ddcd9..216372f 100644 +--- a/supervisor/process.py ++++ b/supervisor/process.py +@@ -357,6 +357,12 @@ class Subprocess: + """ Log a 'waiting for x to stop' message with throttling. """ + if self.state == ProcessStates.STOPPING: + now = time.time() ++ ++ # If the system clock has moved backward, reset ++ # self.laststopreport to current system time ++ if now < self.laststopreport: ++ self.laststopreport = now; ++ + if now > (self.laststopreport + 2): # every 2 seconds + self.config.options.logger.info( + 'waiting for %s to stop' % self.config.name) +@@ -604,12 +610,27 @@ class Subprocess: + # STOPPED -> STARTING + self.spawn() + elif state == ProcessStates.BACKOFF: ++ if self.delay > 0 and now < self.delay - self.backoff: ++ # The system clock appears to have moved backward ++ # Reset self.delay accordingly ++ self.delay = now + self.backoff ++ + if self.backoff <= self.config.startretries: + if now > self.delay: + # BACKOFF -> STARTING + self.spawn() + + if state == ProcessStates.STARTING: ++ if now < self.laststart: ++ # The system clock appears to have moved backward ++ # Reset self.laststart to current system time ++ self.laststart = now; ++ ++ if self.delay > 0 and now < self.delay - self.config.startsecs: ++ # The system clock appears to have moved backward ++ # Reset self.delay accordingly ++ self.delay = now + self.config.startsecs ++ + if now - self.laststart > self.config.startsecs: + # STARTING -> RUNNING if the proc has started + # successfully and it has stayed up for at least +@@ -633,6 +654,11 @@ class Subprocess: + logger.info('gave up: %s %s' % (self.config.name, msg)) + + elif state == ProcessStates.STOPPING: ++ if self.delay > 0 and now < self.delay - self.config.stopwaitsecs: ++ # The system clock appears to have moved backward ++ # Reset self.delay accordingly ++ self.delay = now + self.config.stopwaitsecs ++ + time_left = self.delay - now + if time_left <= 0: + # kill processes which are taking too long to stop with a final +@@ -805,6 +831,12 @@ class EventListenerPool(ProcessGroupBase): + if dispatch_capable: + if self.dispatch_throttle: + now = time.time() ++ ++ # If the system clock has moved backward, reset ++ # self.last_dispatch to current system time ++ if now < self.last_dispatch: ++ self.last_dispatch = now; ++ + if now - self.last_dispatch < self.dispatch_throttle: + return + self.dispatch() +-- +2.1.4 + diff --git a/src/supervisor/patch/0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch b/src/supervisor/patch/0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch new file mode 100644 index 00000000000..cb01665ba80 --- /dev/null +++ b/src/supervisor/patch/0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch @@ -0,0 +1,184 @@ +From 43b6f3ee93593f666af2c6a7af897bf3b5ee762d Mon Sep 17 00:00:00 2001 +From: Joe LeVeque +Date: Wed, 17 Jan 2018 22:27:56 +0000 +Subject: [PATCH 2/2] Add unit test cases to ensure state transitions work if + system time has rolled backward + +--- + supervisor/tests/test_process.py | 146 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 146 insertions(+) + +diff --git a/supervisor/tests/test_process.py b/supervisor/tests/test_process.py +index 7f9bab2..ea16315 100644 +--- a/supervisor/tests/test_process.py ++++ b/supervisor/tests/test_process.py +@@ -736,6 +736,40 @@ class SubprocessTests(unittest.TestCase): + instance.stop_report() + self.assertEqual(len(options.logger.data), 1) # throttled + ++ def test_stop_report_laststopreport_in_future(self): ++ future_time = time.time() + 3600 # 1 hour into the future ++ options = DummyOptions() ++ config = DummyPConfig(options, 'test', '/test') ++ instance = self._makeOne(config) ++ instance.pid = 11 ++ dispatcher = DummyDispatcher(writable=True) ++ instance.dispatchers = {'foo':dispatcher} ++ from supervisor.states import ProcessStates ++ instance.state = ProcessStates.STOPPING ++ instance.laststopreport = future_time ++ ++ # This iteration of stop_report() should reset instance.laststopreport ++ # to the current time ++ instance.stop_report() ++ ++ # No logging should have taken place ++ self.assertEqual(len(options.logger.data), 0) ++ ++ # Ensure instance.laststopreport has rolled backward ++ self.assertTrue(instance.laststopreport < future_time) ++ ++ # Sleep for 2 seconds ++ time.sleep(2) ++ ++ # This iteration of stop_report() should actaully trigger the report ++ instance.stop_report() ++ ++ self.assertEqual(len(options.logger.data), 1) ++ self.assertEqual(options.logger.data[0], 'waiting for test to stop') ++ self.assertNotEqual(instance.laststopreport, 0) ++ instance.stop_report() ++ self.assertEqual(len(options.logger.data), 1) # throttled ++ + def test_give_up(self): + options = DummyOptions() + config = DummyPConfig(options, 'test', '/test') +@@ -1402,6 +1436,92 @@ class SubprocessTests(unittest.TestCase): + event = L[0] + self.assertEqual(event.__class__, events.ProcessStateRunningEvent) + ++ def test_transition_starting_to_running_laststart_in_future(self): ++ from supervisor import events ++ L = [] ++ events.subscribe(events.ProcessStateEvent, lambda x: L.append(x)) ++ from supervisor.states import ProcessStates ++ ++ future_time = time.time() + 3600 # 1 hour into the future ++ options = DummyOptions() ++ test_startsecs = 2 ++ ++ # this should go from STARTING to RUNNING via transition() ++ pconfig = DummyPConfig(options, 'process', 'process','/bin/process', ++ startsecs=test_startsecs) ++ process = self._makeOne(pconfig) ++ process.backoff = 1 ++ process.delay = 1 ++ process.system_stop = False ++ process.laststart = future_time ++ process.pid = 1 ++ process.stdout_buffer = 'abc' ++ process.stderr_buffer = 'def' ++ process.state = ProcessStates.STARTING ++ ++ # This iteration of transition() should reset process.laststart ++ # to the current time ++ process.transition() ++ ++ # Process state should still be STARTING ++ self.assertEqual(process.state, ProcessStates.STARTING) ++ ++ # Ensure process.laststart has rolled backward ++ self.assertTrue(process.laststart < future_time) ++ ++ # Sleep for (startsecs + 1) ++ time.sleep(test_startsecs + 1) ++ ++ # This iteration of transition() should actaully trigger the state ++ # transition to RUNNING ++ process.transition() ++ ++ # this implies RUNNING ++ self.assertEqual(process.backoff, 0) ++ self.assertEqual(process.delay, 0) ++ self.assertFalse(process.system_stop) ++ self.assertEqual(process.state, ProcessStates.RUNNING) ++ self.assertEqual(options.logger.data[0], ++ 'success: process entered RUNNING state, process has ' ++ 'stayed up for > than {} seconds (startsecs)'.format(test_startsecs)) ++ self.assertEqual(len(L), 1) ++ event = L[0] ++ self.assertEqual(event.__class__, events.ProcessStateRunningEvent) ++ ++ def test_transition_backoff_to_starting_delay_in_future(self): ++ from supervisor import events ++ L = [] ++ events.subscribe(events.ProcessStateEvent, lambda x: L.append(x)) ++ from supervisor.states import ProcessStates, SupervisorStates ++ ++ future_time = time.time() + 3600 # 1 hour into the future ++ options = DummyOptions() ++ ++ pconfig = DummyPConfig(options, 'process', 'process','/bin/process') ++ process = self._makeOne(pconfig) ++ process.laststart = 1 ++ process.delay = future_time ++ process.backoff = 0 ++ process.state = ProcessStates.BACKOFF ++ ++ # This iteration of transition() should reset process.delay ++ # to the current time ++ process.transition() ++ ++ # Process state should still be BACKOFF ++ self.assertEqual(process.state, ProcessStates.BACKOFF) ++ ++ # Ensure process.delay has rolled backward ++ self.assertTrue(process.delay < future_time) ++ ++ # This iteration of transition() should actaully trigger the state ++ # transition to STARTING ++ process.transition() ++ ++ self.assertEqual(process.state, ProcessStates.STARTING) ++ self.assertEqual(len(L), 1) ++ self.assertEqual(L[0].__class__, events.ProcessStateStartingEvent) ++ + def test_transition_backoff_to_fatal(self): + from supervisor import events + L = [] +@@ -2033,6 +2153,32 @@ class EventListenerPoolTests(ProcessGroupBaseTests): + self.assertEqual(process1.listener_state, EventListenerStates.BUSY) + self.assertEqual(process1.event, event) + ++ def test_transition_event_proc_running_with_dispatch_throttle_last_dispatch_in_future(self): ++ future_time = time.time() + 3600 # 1 hour into the future ++ options = DummyOptions() ++ from supervisor.states import ProcessStates ++ pconfig1 = DummyPConfig(options, 'process1', 'process1','/bin/process1') ++ process1 = DummyProcess(pconfig1, state=ProcessStates.RUNNING) ++ gconfig = DummyPGroupConfig(options, pconfigs=[pconfig1]) ++ pool = self._makeOne(gconfig) ++ pool.dispatch_throttle = 5 ++ pool.last_dispatch = future_time ++ pool.processes = {'process1': process1} ++ event = DummyEvent() ++ from supervisor.states import EventListenerStates ++ process1.listener_state = EventListenerStates.READY ++ class DummyGroup: ++ config = gconfig ++ process1.group = DummyGroup ++ pool._acceptEvent(event) ++ pool.transition() ++ ++ self.assertEqual(process1.transitioned, True) ++ self.assertEqual(pool.event_buffer, [event]) # not popped ++ ++ # Ensure pool.last_dispatch has been rolled backward ++ self.assertTrue(pool.last_dispatch < future_time) ++ + def test__dispatchEvent_notready(self): + options = DummyOptions() + from supervisor.states import ProcessStates +-- +2.1.4 + diff --git a/src/supervisor/patch/series b/src/supervisor/patch/series new file mode 100644 index 00000000000..d141fddf330 --- /dev/null +++ b/src/supervisor/patch/series @@ -0,0 +1,2 @@ +0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch +0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch diff --git a/src/tacacs/nss/0001-Modify-user-map-profile.patch b/src/tacacs/nss/0001-Modify-user-map-profile.patch index 75d037977de..971f1f682f7 100644 --- a/src/tacacs/nss/0001-Modify-user-map-profile.patch +++ b/src/tacacs/nss/0001-Modify-user-map-profile.patch @@ -564,9 +564,9 @@ index 79e62b9..ecfa0b0 100644 + useradd_info_t *user; + + user = &useradd_grp_list[MIN_TACACS_USER_PRIV]; -+ user->gid = 999; ++ user->gid = 100; + user->info = strdup("remote_user"); -+ user->secondary_grp = strdup("docker"); ++ user->secondary_grp = strdup("users"); + user->shell = strdup("/bin/bash"); + + user = &useradd_grp_list[MAX_TACACS_USER_PRIV]; @@ -619,9 +619,9 @@ index 79e62b9..ecfa0b0 100644 + useradd_info_t *user; + + for(n = 0; n < tac_srv_no; n++) { -+ syslog(LOG_DEBUG, "%s: server[%d] { addr=%s, key=%s, timeout=%d }", ++ syslog(LOG_DEBUG, "%s: server[%d] { addr=%s, key=%c*****, timeout=%d }", + nssname, n, tac_ntop(tac_srv[n].addr->ai_addr), -+ tac_srv[n].key, tac_srv[n].timeout); ++ tac_srv[n].key[0], tac_srv[n].timeout); + } + syslog(LOG_DEBUG, "%s: many_to_one %s", nssname, 1 == many_to_one + ? "enable" : "disable"); diff --git a/src/tacacs/pam/0003-Obfuscate-key-before-printing-to-syslog.patch b/src/tacacs/pam/0003-Obfuscate-key-before-printing-to-syslog.patch new file mode 100644 index 00000000000..1d1f5d3efe8 --- /dev/null +++ b/src/tacacs/pam/0003-Obfuscate-key-before-printing-to-syslog.patch @@ -0,0 +1,25 @@ +From 254e6cb86b667f6324bcbfd89fe982e865d05189 Mon Sep 17 00:00:00 2001 +From: Taoyu Li +Date: Sat, 3 Mar 2018 02:22:49 +0000 +Subject: [PATCH] obfuscate key before printing to syslog + +--- + support.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/support.c b/support.c +index 44efee3..f9ab8aa 100644 +--- a/support.c ++++ b/support.c +@@ -282,7 +282,7 @@ int _pam_parse (int argc, const char **argv) { + _pam_log(LOG_DEBUG, "%d servers defined", tac_srv_no); + + for(n = 0; n < tac_srv_no; n++) { +- _pam_log(LOG_DEBUG, "server[%d] { addr=%s, key='%s' }", n, tac_ntop(tac_srv[n].addr->ai_addr), tac_srv[n].key); ++ _pam_log(LOG_DEBUG, "server[%d] { addr=%s, key='%c*****' }", n, tac_ntop(tac_srv[n].addr->ai_addr), tac_srv[n].key[0]); + } + + _pam_log(LOG_DEBUG, "tac_service='%s'", tac_service); +-- +2.9.3 + diff --git a/src/tacacs/pam/Makefile b/src/tacacs/pam/Makefile index 70766879140..21d8eeace73 100644 --- a/src/tacacs/pam/Makefile +++ b/src/tacacs/pam/Makefile @@ -16,6 +16,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Apply patch git apply ../0001-Don-t-init-declarations-in-a-for-loop.patch git apply ../0002-Fix-libtac2-bin-install-directory-error.patch + git apply ../0003-Obfuscate-key-before-printing-to-syslog.patch dpkg-buildpackage -rfakeroot -b -us -uc popd diff --git a/src/telemetry/Makefile b/src/telemetry/Makefile new file mode 100644 index 00000000000..91a822d4f93 --- /dev/null +++ b/src/telemetry/Makefile @@ -0,0 +1,20 @@ +export GOPATH=/tmp/go + +INSTALL := /usr/bin/install + +all: sonic-telemetry + +sonic-telemetry: + /usr/local/go/bin/go get -v github.com/Azure/sonic-telemetry/telemetry + /usr/local/go/bin/go get -v github.com/Azure/sonic-telemetry/dialout/dialout_client_cli + +install: + $(INSTALL) -D ${GOPATH}/bin/telemetry $(DESTDIR)/usr/sbin/telemetry + $(INSTALL) -D ${GOPATH}/bin/dialout_client_cli $(DESTDIR)/usr/sbin/dialout_client_cli + +deinstall: + rm $(DESTDIR)/usr/sbin/telemetry + rm $(DESTDIR)/usr/sbin/dialout_client_cli + +clean: + rm -fr ${GOPATH} diff --git a/src/telemetry/debian/changelog b/src/telemetry/debian/changelog new file mode 100644 index 00000000000..77dab629040 --- /dev/null +++ b/src/telemetry/debian/changelog @@ -0,0 +1,5 @@ +sonic-telemetry (0.1) UNRELEASED; urgency=medium + + * Initial release. + + -- Jipan Yang Sat, 24 Mar 2018 12:48:22 -0700 diff --git a/src/telemetry/debian/compat b/src/telemetry/debian/compat new file mode 100644 index 00000000000..ec635144f60 --- /dev/null +++ b/src/telemetry/debian/compat @@ -0,0 +1 @@ +9 diff --git a/src/telemetry/debian/control b/src/telemetry/debian/control new file mode 100644 index 00000000000..f1b6a7c0728 --- /dev/null +++ b/src/telemetry/debian/control @@ -0,0 +1,17 @@ +Source: sonic-telemetry +Section: devel +Priority: optional +Maintainer: Jipan Yang +Build-Depends: debhelper (>= 8.0.0), + dh-systemd +Standards-Version: 3.9.3 +Homepage: https://github.com/Azure/sonic-telemetry +XS-Go-Import-Path: github.com/Azure/sonic-telemetry + +Package: sonic-telemetry +Architecture: any +Built-Using: ${misc:Built-Using} +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: SONiC telemetry + sonic-telemetry \ No newline at end of file diff --git a/src/telemetry/debian/rules b/src/telemetry/debian/rules new file mode 100644 index 00000000000..3995a26d7fc --- /dev/null +++ b/src/telemetry/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ --with systemd diff --git a/src/telemetry/debian/telemetry.init.d b/src/telemetry/debian/telemetry.init.d new file mode 100644 index 00000000000..2fea32e17c4 --- /dev/null +++ b/src/telemetry/debian/telemetry.init.d @@ -0,0 +1,14 @@ +#!/bin/bash +# +### BEGIN INIT INFO +# Provides: sonic-telemetry +# Required-Start: $local_fs $network $remote_fs $syslog +# Required-Stop: $local_fs $network $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start and stop the telemetry +# Description: sonic-telemetry is an implementation of sonic telemetry daemon in Go +### END INIT INFO +# + +exit 0