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

zebra: reduce memory usage by streams when redistributing routes #18030

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fdumontet6WIND
Copy link
Contributor

required stream size is evaluated as a fix part and variable one. the variable one depend on the number of nexthops.

@frrbot frrbot bot added the zebra label Feb 5, 2025
@fdumontet6WIND fdumontet6WIND force-pushed the mem_alloc_stream branch 2 times, most recently from 7abd16d to eaf1718 Compare February 6, 2025 12:13
Copy link
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

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

I'm going to repeat some of the things I said in the previous version of this.

  1. encoding zapi is really something that happens... in the zclient library, and it's not really correct to force a bunch of detailed assumptions into zebra (or any other daemon) code.
  2. consider a single, authoritative "compute_size" function, that accounts for the fixed parts of the zapi_route struct, and the embedded nexthops.

zebra/zapi_msg.c Outdated
@@ -1526,6 +1544,7 @@ static void zread_interface_add(ZAPI_HANDLER_ARGS)
struct interface *ifp;

vrf_id_t vrf_id = zvrf_id(zvrf);

Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@mjstapp
Copy link
Contributor

mjstapp commented Feb 6, 2025

please fix the style errors - you can run that tool yourself, in your own sandbox, and save the CI re-runs...

required stream size is evaluated as a fix part and variable one.
the variable one depend on the number of nexthops.

Signed-off-by: Francois Dumontet <[email protected]>
@fdumontet6WIND
Copy link
Contributor Author

Dear Mark,
i don't remember any comment from you in previous version of that Pull Request
regards

@donaldsharp
Copy link
Member

Look, opening multiple versions of the same PR is really not encouraged. We would prefer you use the original PR because that one has comments on it that now we cannot reference. Now we are in a state where there are comments on both of the PR's that we need to make sure it is addressed and frankly it's not very cool to do that.

@fdumontet6WIND
Copy link
Contributor Author

this is due to a bad synchronization with my github repos. commit was erazed, and new pulled request was triggered.

sorry, this was not my intention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants