-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SAI-PTF][mlnx]Enable saiserver test container on mlnx platforms (#13311
) * Why I did it Enable Test sai api on bfn container with a lightweight container(saiserver). [SAI-PTF][mlnx]Enable saiserver test container on mlnx container How I did it enable saiserver container on mlnx platform. add docker-saiserver-mlnx.mk for building saiserver container in platform/barefoot/docker-saiserver-mlnx, add necessary files that needs in saiserver container How to verify it Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
- Loading branch information
1 parent
e170a4b
commit cf5ca9d
Showing
9 changed files
with
143 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
start_mlnx() | ||
{ | ||
[ -e /dev/sxdevs/sxcdev ] || ( mkdir -p /dev/sxdevs && mknod /dev/sxdevs/sxcdev c 231 193 ) | ||
} | ||
|
||
|
||
rm -f /var/run/rsyslogd.pid | ||
|
||
supervisorctl start rsyslogd | ||
|
||
start_mlnx | ||
|
||
supervisorctl start saiserver |
32 changes: 32 additions & 0 deletions
32
platform/mellanox/docker-saiserver-mlnx/saiserver_start.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters