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()
1908 STAILQ_INSERT_TAIL(&tp->t_logs, log_entry, tlm_queue); in tcp_log_event()
1909 tcp_log_entry_refcnt_add(log_entry); in tcp_log_event()
1920 struct tcp_log_mem *log_entry; in tcp_log_state_change() local
1927 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL) in tcp_log_state_change()
1928 tcp_log_remove_log_head(tp, log_entry); in tcp_log_state_change()
1972 struct tcp_log_mem *log_entry, *next; in tcp_log_drain() local
2000 STAILQ_FOREACH(log_entry, &tp->t_logs, tlm_queue) in tcp_log_drain()
2003 KASSERT(log_entry != NULL, in tcp_log_drain()
2005 if (log_entry == NULL) in tcp_log_drain()
2007 while ((next = STAILQ_NEXT(log_entry, tlm_queue)) != NULL) { in tcp_log_drain()
2008 STAILQ_REMOVE_AFTER(&tp->t_logs, log_entry, tlm_queue); in tcp_log_drain()
2031 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL && in tcp_log_drain()
2033 tcp_log_remove_log_head(tp, log_entry); in tcp_log_drain()
2040 KASSERT(log_entry != NULL, in tcp_log_drain()
2061 struct tcp_log_mem *log_entry; in tcp_log_logs_to_buf() local
2071 STAILQ_FOREACH(log_entry, log_tailqp, tlm_queue) { in tcp_log_logs_to_buf()
2087 if (log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_HDR) in tcp_log_logs_to_buf()
2091 error = tcp_log_copyout(sopt, &log_entry->tlm_buf, out_entry, in tcp_log_logs_to_buf()
2095 if (!(log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_HDR)) { in tcp_log_logs_to_buf()
2105 if (log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_VERBOSE) { in tcp_log_logs_to_buf()
2106 error = tcp_log_copyout(sopt, &log_entry->tlm_v, in tcp_log_logs_to_buf()
2139 struct tcp_log_mem *log_entry, *log_next; in tcp_log_getlogbuf() local
2156 log_entry = STAILQ_LAST(&tp->t_logs, tcp_log_mem, tlm_queue); in tcp_log_getlogbuf()
2163 log_entry = NULL; in tcp_log_getlogbuf()
2173 log_entry = log_next; in tcp_log_getlogbuf()
2213 if (log_entry != NULL && log_next == NULL) { in tcp_log_getlogbuf()
2221 } else if (log_entry != NULL) { in tcp_log_getlogbuf()
2227 STAILQ_FIRST(&tp->t_logs) = STAILQ_NEXT(log_entry, tlm_queue); in tcp_log_getlogbuf()
2228 KASSERT(STAILQ_NEXT(log_entry, tlm_queue) != NULL, in tcp_log_getlogbuf()
2232 STAILQ_NEXT(log_entry, tlm_queue) = NULL; in tcp_log_getlogbuf()
2233 log_tailq.stqh_last = &STAILQ_NEXT(log_entry, tlm_queue); in tcp_log_getlogbuf()
2265 STAILQ_FOREACH_SAFE(log_entry, &log_tailq, tlm_queue, log_next) { in tcp_log_getlogbuf()
2266 tcp_log_entry_refcnt_rem(log_entry); in tcp_log_getlogbuf()
2267 uma_zfree(tcp_log_zone, log_entry); in tcp_log_getlogbuf()
2377 struct tcp_log_mem *log_entry; in tcp_log_dump_tp_logbuf() local
2385 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL) in tcp_log_dump_tp_logbuf()
2386 tcp_log_remove_log_head(tp, log_entry); in tcp_log_dump_tp_logbuf()