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

Function tcp_log_remove_bucket

freebsd/netinet/tcp_log_buf.c:348–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348static __inline void
349tcp_log_remove_bucket(struct tcp_log_id_bucket *tlb)
350{
351
352 TCPID_TREE_WLOCK_ASSERT();
353 KASSERT(SLIST_EMPTY(&tlb->tlb_head),
354 ("%s: Attempt to remove non-empty bucket", __func__));
355 if (RB_REMOVE(tcp_log_id_tree, &tcp_log_id_head, tlb) == NULL) {
356#ifdef INVARIANTS
357 kassert_panic("%s:%d: error removing element from tree",
358 __func__, __LINE__);
359#endif
360 }
361 TCPID_BUCKET_LOCK_DESTROY(tlb);
362 counter_u64_add(tcp_log_pcb_ids_cur, (int64_t)-1);
363 uma_zfree(tcp_log_bucket_zone, tlb);
364}
365
366/*
367 * Call with a referenced and locked bucket.

Callers 1

tcp_log_unref_bucketFunction · 0.85

Calls 3

kassert_panicFunction · 0.85
counter_u64_addFunction · 0.50
uma_zfreeFunction · 0.50

Tested by

no test coverage detected