AltraMayor / AltraMayor/gatekeeper

Free mbuf memory pools

Aperta
#697 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
C
Stelle
1.6k
Fork
252
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.