frr icon indicating copy to clipboard operation
frr copied to clipboard

zebra: fix an issue: dplane failed to limit the maximum length of the…

Open zice312963205 opened this issue 1 year ago • 3 comments

There is an issue where the "dplane" cannot effectively restrict the number of temporary caches for the contexts (ctx) under certain conditions. This issue occurs because when a ctx workqueue is processed and completed, the ctx is moved to another queue (rib_dplane_q), during which its memory is not immediately released. The memory for the ctx is only released after the rib_process_dplane_results function has completed processing. However, before this happens, the count in zdplane_info.dg_routes_queued is decreased, which leads the meta_queue_process function to mistakenly believe that enough space has been cleared, thus allowing more new ctxs to be created and enqueued. This results in the number of ctxs in the system not being limited as expected by the value set by dplane_get_in_queue_limit.

The fix attempts to adjust the timing of when zdplane_info.dg_routes_queued is decremented. The modification is made so that zdplane_info.dg_routes_queued is decreased only once rib_process_dplane_results has completely processed a ctx and the actual memory release process for it has begun. This way, it ensures that there is sufficient space for new ctxs to be enqueued.

zice312963205 avatar May 22 '24 07:05 zice312963205

related issue:https://github.com/FRRouting/frr/issues/15016

zice312963205 avatar May 22 '24 07:05 zice312963205

This fundamentally breaks route installation on startup. This is a no-go from my perspective at this moment.

donaldsharp avatar May 22 '24 12:05 donaldsharp

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Oct 15 '24 13:10 github-actions[bot]

This PR is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this PR closed.

github-actions[bot] avatar Apr 16 '25 02:04 github-actions[bot]