Lines Matching defs:log_entry

1003 _tcp_log_entry_refcnt_add(struct tcp_log_mem *log_entry, const char *func,
1008 refcnt = atomic_fetchadd_int(&log_entry->tlm_refcnt, 1);
1010 panic("%s:%d: log_entry(%p)->tlm_refcnt is %d (expected 0)",
1011 func, line, log_entry, refcnt);
1017 _tcp_log_entry_refcnt_rem(struct tcp_log_mem *log_entry, const char *func,
1022 refcnt = atomic_fetchadd_int(&log_entry->tlm_refcnt, -1);
1024 panic("%s:%d: log_entry(%p)->tlm_refcnt is %d (expected 1)",
1025 func, line, log_entry, refcnt);
1042 tcp_log_free_log_common(struct tcp_log_mem *log_entry, int *count __unused)
1045 uma_zfree(tcp_log_zone, log_entry);
1056 struct tcp_log_mem *log_entry;
1059 while ((log_entry = STAILQ_FIRST(head)) != NULL) {
1061 tcp_log_entry_refcnt_rem(log_entry);
1062 tcp_log_free_log_common(log_entry, count);
1068 tcp_log_remove_log_cleanup(struct tcpcb *tp, struct tcp_log_mem *log_entry)
1070 uma_zfree(tcp_log_zone, log_entry);
1078 tcp_log_remove_log_head(struct tcpcb *tp, struct tcp_log_mem *log_entry)
1081 KASSERT(log_entry == STAILQ_FIRST(&tp->t_logs),
1084 tcp_log_entry_refcnt_rem(log_entry);
1085 tcp_log_remove_log_cleanup(tp, log_entry);
1322 struct tcp_log_mem *log_entry;
1480 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL)
1481 tcp_log_remove_log_head(tp, log_entry);
1497 struct tcp_log_mem *log_entry;
1505 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL)
1506 tcp_log_remove_log_head(tp, log_entry);
1525 struct tcp_log_mem *log_entry;
1568 if ((log_entry = uma_zalloc(tcp_log_zone, M_NOWAIT)) != NULL)
1571 log_entry = NULL;
1574 if (log_entry == NULL) {
1632 if ((log_entry = STAILQ_FIRST(&tp->t_logs)) == NULL)
1635 tcp_log_entry_refcnt_rem(log_entry);
1638 KASSERT(log_entry != NULL,
1639 ("%s: log_entry unexpectedly NULL", __func__));
1642 log_buf = &log_entry->tlm_buf;
1643 log_verbose = &log_entry->tlm_v;
1736 STAILQ_INSERT_TAIL(&tp->t_logs, log_entry, tlm_queue);
1737 tcp_log_entry_refcnt_add(log_entry);
1748 struct tcp_log_mem *log_entry;
1753 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL)
1754 tcp_log_remove_log_head(tp, log_entry);
1785 struct tcp_log_mem *log_entry, *next;
1800 STAILQ_FOREACH(log_entry, &tp->t_logs, tlm_queue)
1803 KASSERT(log_entry != NULL,
1805 if (log_entry == NULL)
1807 while ((next = STAILQ_NEXT(log_entry, tlm_queue)) != NULL) {
1808 STAILQ_REMOVE_AFTER(&tp->t_logs, log_entry, tlm_queue);
1822 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL &&
1824 tcp_log_remove_log_head(tp, log_entry);
1831 KASSERT(log_entry != NULL,
1852 struct tcp_log_mem *log_entry;
1862 STAILQ_FOREACH(log_entry, log_tailqp, tlm_queue) {
1878 if (log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_HDR)
1882 error = tcp_log_copyout(sopt, &log_entry->tlm_buf, out_entry,
1886 if (!(log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_HDR)) {
1896 if (log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_VERBOSE) {
1897 error = tcp_log_copyout(sopt, &log_entry->tlm_v,
1930 struct tcp_log_mem *log_entry, *log_next;
1948 log_entry = STAILQ_LAST(&tp->t_logs, tcp_log_mem, tlm_queue);
1955 log_entry = NULL;
1965 log_entry = log_next;
2005 if (log_entry != NULL && log_next == NULL) {
2013 } else if (log_entry != NULL) {
2019 STAILQ_FIRST(&tp->t_logs) = STAILQ_NEXT(log_entry, tlm_queue);
2020 KASSERT(STAILQ_NEXT(log_entry, tlm_queue) != NULL,
2024 STAILQ_NEXT(log_entry, tlm_queue) = NULL;
2025 log_tailq.stqh_last = &STAILQ_NEXT(log_entry, tlm_queue);
2057 STAILQ_FOREACH_SAFE(log_entry, &log_tailq, tlm_queue, log_next) {
2058 tcp_log_entry_refcnt_rem(log_entry);
2059 uma_zfree(tcp_log_zone, log_entry);
2170 struct tcp_log_mem *log_entry;
2178 while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL)
2179 tcp_log_remove_log_head(tp, log_entry);