Skip to content

Get the maximum port number from the PORT_TABLE in APPDB instead of calculating it from netdevs. - #142

Merged
chenkelly merged 1 commit into
edge-core:202311.Xfrom
EmmaLin11:get-max-port-number-from-appdb
Aug 15, 2025
Merged

Get the maximum port number from the PORT_TABLE in APPDB instead of calculating it from netdevs.#142
chenkelly merged 1 commit into
edge-core:202311.Xfrom
EmmaLin11:get-max-port-number-from-appdb

Conversation

@EmmaLin11

@EmmaLin11 EmmaLin11 commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

What I did
Get the maximum port number from the PORT_TABLE in APPDB instead of calculating it from netdevs.

Why I did it
During a fast reboot: when stpmgrd informs stpd that ports are ready, some network devices (netdevs) may not be fully created yet. As a result, stpd calculates a lower-than-actual maximum port number, leading to insufficient memory allocation.

How I verified it
Execute 'fast-reboot' to make sure the maximum port number is correct.

Details if related

Aug 15 13:42:35.421788 as9736-64d-4 INFO stp#stp#stpd: stp_intf_event_mgr_init:619:intf db done. max port 1032
Aug 15 06:12:08.821033 as9736-64d-4 INFO stp#stp#stpd: stp_intf_event_mgr_init:613:intf db done. max port 1032
Aug 15 06:23:44.033068 as9736-64d-4 INFO stp#stp#stpd: stp_intf_event_mgr_init:619:intf db done. max port 1032
Aug 15 06:26:57.789474 as9736-64d-4 INFO stp#stp#stpd: stp_intf_event_mgr_init:619:intf db done. max port 1032
Aug 15 06:31:11.628875 as9736-64d-4 INFO stp#stp#stpd: stp_intf_event_mgr_init:619:intf db done. max port 1032
Aug 15 06:37:44.771785 as9736-64d-4 INFO stp#stp#stpd: stp_intf_event_mgr_init:619:intf db done. max port 1032

Notes
Related to edge-core/sonic-stp#6.

@chenkelly
chenkelly merged commit 6325338 into edge-core:202311.X Aug 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants