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

Free mbuf memory pools #697

Open
AltraMayor opened this issue Jul 25, 2024 · 0 comments
Open

Free mbuf memory pools #697

AltraMayor opened this issue Jul 25, 2024 · 0 comments

Comments

@AltraMayor
Copy link
Owner

Flesh out include/gatekeeper_net.h:destroy_mempool() using rte_mempool_free(). This change will require reviewing the functions that release resources at termination because the current code does not account for the proper release of mbuf memory pools. A simple test of this change produces a segmentation fault while Gatekeeper is shutting down with the following (simplified) backtrace: ... -> bond_mode_8023ad_periodic_cb() -> ... -> rte_is_zero_ether_addr(). The probable cause of this segmentation fault is that memory pools are being released before the underlying interfaces are cleared.

The code review should also consider the possibility of assigning NULL to variables after the release of the associated resources to increase the chances of quickly identifying bugs in the future.

It is worth pointing out that this issue is not a problem since associated memory is automatically released once Gatekeeper terminates, so there is no immediate demand for it. However, it is a nice feature since it tightens the code.

@AltraMayor AltraMayor added this to the Version 1.3 milestone Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant