Add platform files for Innovium platform (#12653)

Why I did it
Add platform files for critical processes and default qos config for Innovium platforms

How I did it
Added default files for critical processes and qos config

How to verify it
Tested with autorestart/test_container_autorestart.py::test_containers_autorestart

Signed-off-by: rck-innovium rck@innovium.com
This commit is contained in:
Ravi [Marvell] 2023-03-31 00:03:20 +05:30 committed by GitHub
parent 2843923549
commit 78ca0dae2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1 @@
program:syncd

View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
TOPO_CONF=/usr/share/sonic/platform/topo.conf
if [ -f ${TOPO_CONF} ]; then
topo=`cat ${TOPO_CONF}`
else
topo="none"
fi
if [ ${topo} != "none" ]; then
BUFFER_CONFIG=/usr/share/sonic/hwsku/buffers_defaults_${topo}.j2
QOS_CONFIG=/usr/share/sonic/hwsku/qos_defaults_${topo}.j2
if [ "$(/usr/local/bin/sonic-cfggen -d -v TC_TO_PRIORITY_GROUP_MAP)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v MAP_PFC_PRIORITY_TO_QUEUE)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v TC_TO_QUEUE_MAP)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v DSCP_TO_TC_MAP)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v SCHEDULER)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v PFC_PRIORITY_TO_PRIORITY_GROUP_MAP)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v PORT_QOS_MAP)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v WRED_PROFILE)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v QUEUE)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v CABLE_LENGTH)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v BUFFER_POOL)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v BUFFER_PROFILE)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v BUFFER_PG)" ] || \
[ "$(/usr/local/bin/sonic-cfggen -d -v BUFFER_QUEUE)" ]; then
echo "Database has QoS settings, skip loading defaults"
elif [ -f "$BUFFER_CONFIG" ] && [ -f "$QOS_CONFIG" ]; then
/usr/local/bin/sonic-cfggen -d -t $BUFFER_CONFIG >/tmp/buffers.json
/usr/local/bin/sonic-cfggen -d -t $QOS_CONFIG -y /etc/sonic/sonic_version.yml >/tmp/qos.json
/usr/local/bin/sonic-cfggen -j /tmp/buffers.json --write-to-db
/usr/local/bin/sonic-cfggen -j /tmp/qos.json --write-to-db
else
echo "File not found (${BUFFER_CONFIG} and/or ${QOS_CONFIG})"
fi
else
echo "Skip QoS config"
fi

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
if [ -f /usr/bin/ivm_start.sh ];
then
/usr/bin/ivm_start.sh
fi