| 346 | } |
| 347 | |
| 348 | static __inline void |
| 349 | tcp_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. |
no test coverage detected