Lines Matching refs:log_entry
1109 _tcp_log_entry_refcnt_add(struct tcp_log_mem *log_entry, const char *func, in _tcp_log_entry_refcnt_add() argument
1114 refcnt = atomic_fetchadd_int(&log_entry->tlm_refcnt, 1); in _tcp_log_entry_refcnt_add()
1117 func, line, log_entry, refcnt); in _tcp_log_entry_refcnt_add()
1123 _tcp_log_entry_refcnt_rem(struct tcp_log_mem *log_entry, const char *func, in _tcp_log_entry_refcnt_rem() argument
1128 refcnt = atomic_fetchadd_int(&log_entry->tlm_refcnt, -1); in _tcp_log_entry_refcnt_rem()
1131 func, line, log_entry, refcnt); in _tcp_log_entry_refcnt_rem()
1148 tcp_log_free_log_common(struct tcp_log_mem *log_entry, int *count __unused) in tcp_log_free_log_common() argument
1151 uma_zfree(tcp_log_zone, log_entry); in tcp_log_free_log_common()
1162 struct tcp_log_mem *log_entry; in tcp_log_free_entries() local
1165 while ((log_entry = STAILQ_FIRST(head)) != NULL) { in tcp_log_free_entries()
1167 tcp_log_entry_refcnt_rem(log_entry); in tcp_log_free_entries()
1168 tcp_log_free_log_common(log_entry, count); in tcp_log_free_entries()
1174 tcp_log_remove_log_cleanup(struct tcpcb *tp, struct tcp_log_mem *log_entry) in tcp_log_remove_log_cleanup() argument
1176 uma_zfree(tcp_log_zone, log_entry); in tcp_log_remove_log_cleanup()
1184 tcp_log_remove_log_head(struct tcpcb *tp, struct tcp_log_mem *log_entry) in tcp_log_remove_log_head() argument
1187 KASSERT(log_entry == STAILQ_FIRST(&tp->t_logs), in tcp_log_remove_log_head()
1190 tcp_log_entry_refcnt_rem(log_entry); in tcp_log_remove_log_head()
1191 tcp_log_remove_log_cleanup(tp, log_entry); in tcp_log_remove_log_head()
1429 struct tcp_log_mem *log_entry; in tcp_log_tcpcbfini() local
1636 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL) in tcp_log_tcpcbfini()
1637 tcp_log_remove_log_head(tp, log_entry); in tcp_log_tcpcbfini()
1653 struct tcp_log_mem *log_entry; in tcp_log_purge_tp_logbuf() local
1659 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL) in tcp_log_purge_tp_logbuf()
1660 tcp_log_remove_log_head(tp, log_entry); in tcp_log_purge_tp_logbuf()
1679 struct tcp_log_mem *log_entry; in tcp_log_event() local
1723 if ((log_entry = uma_zalloc(tcp_log_zone, M_NOWAIT)) != NULL) in tcp_log_event()
1726 log_entry = NULL; in tcp_log_event()
1729 if (log_entry == NULL) { in tcp_log_event()
1798 if ((log_entry = STAILQ_FIRST(&tp->t_logs)) == NULL) in tcp_log_event()
1801 tcp_log_entry_refcnt_rem(log_entry); in tcp_log_event()
1804 KASSERT(log_entry != NULL, in tcp_log_event()
1808 log_buf = &log_entry->tlm_buf; in tcp_log_event()
1809 log_verbose = &log_entry->tlm_v; in tcp_log_event()
1909 STAILQ_INSERT_TAIL(&tp->t_logs, log_entry, tlm_queue); in tcp_log_event()
1910 tcp_log_entry_refcnt_add(log_entry); in tcp_log_event()
1921 struct tcp_log_mem *log_entry; in tcp_log_state_change() local
1928 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL) in tcp_log_state_change()
1929 tcp_log_remove_log_head(tp, log_entry); in tcp_log_state_change()
1973 struct tcp_log_mem *log_entry, *next; in tcp_log_drain() local
2001 STAILQ_FOREACH(log_entry, &tp->t_logs, tlm_queue) in tcp_log_drain()
2004 KASSERT(log_entry != NULL, in tcp_log_drain()
2006 if (log_entry == NULL) in tcp_log_drain()
2008 while ((next = STAILQ_NEXT(log_entry, tlm_queue)) != NULL) { in tcp_log_drain()
2009 STAILQ_REMOVE_AFTER(&tp->t_logs, log_entry, tlm_queue); in tcp_log_drain()
2032 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL && in tcp_log_drain()
2034 tcp_log_remove_log_head(tp, log_entry); in tcp_log_drain()
2041 KASSERT(log_entry != NULL, in tcp_log_drain()
2062 struct tcp_log_mem *log_entry; in tcp_log_logs_to_buf() local
2072 STAILQ_FOREACH(log_entry, log_tailqp, tlm_queue) { in tcp_log_logs_to_buf()
2088 if (log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_HDR) in tcp_log_logs_to_buf()
2092 error = tcp_log_copyout(sopt, &log_entry->tlm_buf, out_entry, in tcp_log_logs_to_buf()
2096 if (!(log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_HDR)) { in tcp_log_logs_to_buf()
2106 if (log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_VERBOSE) { in tcp_log_logs_to_buf()
2107 error = tcp_log_copyout(sopt, &log_entry->tlm_v, in tcp_log_logs_to_buf()
2140 struct tcp_log_mem *log_entry, *log_next; in tcp_log_getlogbuf() local
2157 log_entry = STAILQ_LAST(&tp->t_logs, tcp_log_mem, tlm_queue); in tcp_log_getlogbuf()
2164 log_entry = NULL; in tcp_log_getlogbuf()
2174 log_entry = log_next; in tcp_log_getlogbuf()
2214 if (log_entry != NULL && log_next == NULL) { in tcp_log_getlogbuf()
2222 } else if (log_entry != NULL) { in tcp_log_getlogbuf()
2228 STAILQ_FIRST(&tp->t_logs) = STAILQ_NEXT(log_entry, tlm_queue); in tcp_log_getlogbuf()
2229 KASSERT(STAILQ_NEXT(log_entry, tlm_queue) != NULL, in tcp_log_getlogbuf()
2233 STAILQ_NEXT(log_entry, tlm_queue) = NULL; in tcp_log_getlogbuf()
2234 log_tailq.stqh_last = &STAILQ_NEXT(log_entry, tlm_queue); in tcp_log_getlogbuf()
2266 STAILQ_FOREACH_SAFE(log_entry, &log_tailq, tlm_queue, log_next) { in tcp_log_getlogbuf()
2267 tcp_log_entry_refcnt_rem(log_entry); in tcp_log_getlogbuf()
2268 uma_zfree(tcp_log_zone, log_entry); in tcp_log_getlogbuf()
2378 struct tcp_log_mem *log_entry; in tcp_log_dump_tp_logbuf() local
2386 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL) in tcp_log_dump_tp_logbuf()
2387 tcp_log_remove_log_head(tp, log_entry); in tcp_log_dump_tp_logbuf()