Skip to content

Commit

Permalink
Enhancing vs support to mock based on platform (#8685)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsudharsan authored Sep 9, 2021
1 parent 8514a48 commit 8171bfe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/sonic-device-data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/sonic-device-data/src/sai_mlnx.vs_profile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8171bfe

Please sign in to comment.