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

[broadcom] Skip to execute the l3 nat command in "generate_dump" script if the chip does not support NAT feature #30

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -1474,8 +1474,12 @@ collect_broadcom() {
save_bcmcmd_all_ns "\"fabric connectivity\"" "fabric.connect.summary"
save_bcmcmd_all_ns "\"port status\"" "port.status.summary"
else
save_bcmcmd_all_ns "\"l3 nat_ingress show\"" "broadcom.nat.ingress"
save_bcmcmd_all_ns "\"l3 nat_egress show\"" "broadcom.nat.egress"
local driver_id=$(bcmcmd "soc" | grep Driver= | awk -F '=' '{print substr($4, 1, 8)}')
# BCM56980, BCM56370 and BCM56275 do not support NAT feature
if [[ ! "$driver_id" =~ ^(BCM56980|BCM56370|BCM56275)$ ]]; then
save_cmd "bcmcmd \"l3 nat_ingress show\"" "broadcom.nat.ingress"
save_cmd "bcmcmd \"l3 nat_egress show\"" "broadcom.nat.egress"
fi
save_bcmcmd_all_ns "\"ipmc table show\"" "broadcom.ipmc"
save_bcmcmd_all_ns "\"multicast show\"" "broadcom.multicast"
save_bcmcmd_all_ns "\"conf show\"" "conf.summary"
Expand Down
Loading