static void rtentry_zfini(void *mem, int size) { struct rtentry *rt = mem; RT_LOCK_DESTROY(rt); counter_u64_free(rt->rt_pksent); }
void mp_ring_free(struct mp_ring *r) { if (r == NULL) return; if (r->enqueues != NULL) counter_u64_free(r->enqueues); if (r->drops != NULL) counter_u64_free(r->drops); if (r->starts != NULL) counter_u64_free(r->starts); if (r->stalls != NULL) counter_u64_free(r->stalls); if (r->restarts != NULL) counter_u64_free(r->restarts); if (r->abdications != NULL) counter_u64_free(r->abdications); free(r, r->mt); }