Skip to content
Merged
23 changes: 23 additions & 0 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,27 @@ save_saidump() {
fi
}

###############################################################################
# SAI DUMP from syncd by Redis Save command
# Globals:
# NUM_ASICS
# Arguments:
# None
# Returns:
# None
###############################################################################
save_saidump_by_redis_save_cmd() {
trap 'handle_error $? $LINENO' ERR
if [[ ( "$NUM_ASICS" == 1 ) ]] ; then
save_cmd "saidump.sh" "saidump"
else
for (( i=0; i<$NUM_ASICS; i++ ))
do
save_cmd "saidump.sh $i" "saidump$i"
done
fi
}

###############################################################################
# Save platform related info
# Globals:
Expand Down Expand Up @@ -1791,6 +1812,8 @@ main() {

if [[ "$device_type" != "SpineRouter" ]]; then
save_saidump
else
save_saidump_by_redis_save_cmd
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do not feel we should check device_type, and doing different saidump based on the device type. Can you check the asic db size and if it is larger than xxx entries, then we do the new way?

Copy link
Copy Markdown
Contributor Author

@JunhongMao JunhongMao Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lguohan, please help to review my updates. The variable ROUTE_TAB_LIMIT_DIRECT_ITERATION with default value 24000.

fi

if [ "$asic" = "barefoot" ]; then
Expand Down