Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VOQ][saidump] Modify generate_dump: replace save_saidump with save_saidump_by_route_size #2972

Merged
merged 12 commits into from
Nov 15, 2023
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
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
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