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

bgpd: Move evpn_overlay to a pointer #16549

Conversation

ton31337
Copy link
Member

@ton31337 ton31337 commented Aug 9, 2024

No description provided.

@frrbot frrbot bot added the bgp label Aug 9, 2024
@ton31337 ton31337 force-pushed the fix/some_memory_optimizations_for_struct_attr branch 3 times, most recently from d21e1ac to d3bee89 Compare August 11, 2024 09:38
Before this convertion:

```
	/* --- cacheline 3 boundary (192 bytes) --- */
	struct bgp_attr_encap_subtlv * encap_subtlvs;    /*   192     8 */
	struct bgp_attr_encap_subtlv * vnc_subtlvs;      /*   200     8 */
	struct bgp_route_evpn      evpn_overlay;         /*   208    36 */
```

After this convertion:

```
	/* --- cacheline 3 boundary (192 bytes) --- */
	struct bgp_attr_encap_subtlv * encap_subtlvs;    /*   192     8 */
	struct bgp_attr_encap_subtlv * vnc_subtlvs;      /*   200     8 */
	struct bgp_route_evpn *    evpn_overlay;         /*   208     8 */
```

Saving 28 bytes when EVPN is not used.

Signed-off-by: Donatas Abraitis <[email protected]>
@ton31337 ton31337 force-pushed the fix/some_memory_optimizations_for_struct_attr branch from d3bee89 to 4ace11d Compare August 11, 2024 10:59
@ton31337 ton31337 marked this pull request as ready for review August 11, 2024 13:26
@donaldsharp donaldsharp merged commit 89a3879 into FRRouting:master Aug 15, 2024
11 checks passed
@ton31337 ton31337 deleted the fix/some_memory_optimizations_for_struct_attr branch August 20, 2024 19:43
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.

2 participants