Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
 * Change NPU-2P to DPU-2P
 * Enable copp configuration for DPU as well
 * Set VS switch type to SAI_VS_SWITCH_TYPE_DPU_SIMU_2P

Signed-off-by: Prabhat Aravind <[email protected]>
  • Loading branch information
prabhataravind committed Jul 6, 2023
1 parent f6bca60 commit 8ec2f5a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_NPU
SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_DPU_SIMU_2P
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
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ COPY ["zero_profiles.json", "/etc/sonic"]
COPY ["buffermgrd.sh", "/usr/bin/"]

COPY ["platform.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/"]
COPY ["platform-npu-2p.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/"]
COPY ["platform-dpu-2p.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/"]
COPY ["hwsku.json", "/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Mellanox-SN2700/"]
Expand Down
12 changes: 5 additions & 7 deletions platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ln -sf /usr/share/sonic/device/$PLATFORM/$HWSKU /usr/share/sonic/hwsku

SWITCH_TYPE=switch
PLATFORM_CONF=platform.json
if [[ $HWSKU == "NPU-2P" ]]; then
if [[ $HWSKU == "DPU-2P" ]]; then
SWITCH_TYPE=dpu
PLATFORM_CONF=platform-npu-2p.json
PLATFORM_CONF=platform-dpu-2p.json
fi

pushd /usr/share/sonic/hwsku
Expand Down Expand Up @@ -67,14 +67,12 @@ else
sonic-cfggen -j /etc/sonic/init_cfg.json $buffers_cmd $qos_cmd -j /tmp/ports.json --print-data > /etc/sonic/config_db.json
fi

if [ "$HWSKU" != "NPU-2P" ]; then
sonic-cfggen -t /usr/share/sonic/templates/copp_cfg.j2 > /etc/sonic/copp_cfg.json
fi
sonic-cfggen -t /usr/share/sonic/templates/copp_cfg.j2 > /etc/sonic/copp_cfg.json

if [ "$HWSKU" == "Mellanox-SN2700" ]; then
cp /usr/share/sonic/hwsku/sai_mlnx.profile /usr/share/sonic/hwsku/sai.profile
elif [ "$HWSKU" == "NPU-2P" ]; then
cp /usr/share/sonic/hwsku/sai_npu.profile /usr/share/sonic/hwsku/sai.profile
elif [ "$HWSKU" == "DPU-2P" ]; then
cp /usr/share/sonic/hwsku/sai_dpu_2p.profile /usr/share/sonic/hwsku/sai.profile
fi

mkdir -p /etc/swss/config.d/
Expand Down

0 comments on commit 8ec2f5a

Please sign in to comment.