689f7d2c43
Why I did it Enable Test sai api on bfn container with a lightweight container(saiserver). How I did it enable saiserver container on barefoot platform. add docker-saiserver-bfn.mk for building saiserver container in platform/barefoot/docker-saiserver-bfn, add necessary files that needs in saiserver container How to verify it Tested on Intel platform ec9516 Signed-off-by: richardyu-ms <richard.yu@microsoft.com> Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
33 lines
870 B
Bash
33 lines
870 B
Bash
#!/usr/bin/env bash
|
|
# Copy from src/sonic-sairedis/syncd/scripts/syncd_start.sh
|
|
# Re-use the structure for syncd setup
|
|
# Use it to start saiserver
|
|
# Script to start syncd using supervisord
|
|
#
|
|
|
|
# Source the file that holds common code for systemd and supervisord
|
|
. /usr/bin/syncd_init_common.sh
|
|
|
|
get_saiserver_param()
|
|
{
|
|
IFS=' ' read -r -a array <<< "$CMD_ARGS"
|
|
for index in "${!array[@]}"
|
|
do
|
|
#echo "$index ${array[index]}"
|
|
if [[ "${array[index]}" == *"-p"* ]]; then
|
|
SAI_PROFILE="${array[index+1]}"
|
|
fi
|
|
if [[ "${array[index]}" == *"-m"* ]]; then
|
|
PORT_CONFIG="${array[index+1]}"
|
|
fi
|
|
done
|
|
}
|
|
|
|
ENABLE_SAITHRIFT=1
|
|
config_syncd
|
|
get_saiserver_param
|
|
|
|
echo exec /usr/sbin/saiserver -p ${SAI_PROFILE} -f ${PORT_CONFIG}
|
|
exec /usr/sbin/saiserver -p ${SAI_PROFILE} -f ${PORT_CONFIG}
|
|
#exec ${CMD} ${CMD_ARGS}
|