MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ifmp_ring_free

Function ifmp_ring_free

freebsd/net/mp_ring.c:291–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291void
292ifmp_ring_free(struct ifmp_ring *r)
293{
294
295 if (r == NULL)
296 return;
297
298 if (r->enqueues != NULL)
299 counter_u64_free(r->enqueues);
300 if (r->drops != NULL)
301 counter_u64_free(r->drops);
302 if (r->starts != NULL)
303 counter_u64_free(r->starts);
304 if (r->stalls != NULL)
305 counter_u64_free(r->stalls);
306 if (r->restarts != NULL)
307 counter_u64_free(r->restarts);
308 if (r->abdications != NULL)
309 counter_u64_free(r->abdications);
310
311 free(r, r->mt);
312}
313
314/*
315 * Enqueue n items and maybe drain the ring for some time.

Callers 2

iflib_txq_destroyFunction · 0.85
ifmp_ring_allocFunction · 0.85

Calls 2

counter_u64_freeFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected