log_entry
struct log_entry *log_entries;
(struct log_entry *) NULL,
static struct log_entry def_log_entry;
log_control.log_entries = (struct log_entry *)
malloc(log_control.log_nentries * sizeof(struct log_entry));
log_control.log_entries = (struct log_entry *) NULL;
_tcp_log_entry_refcnt_add(struct tcp_log_mem *log_entry, const char *func,
refcnt = atomic_fetchadd_int(&log_entry->tlm_refcnt, 1);
func, line, log_entry, refcnt);
_tcp_log_entry_refcnt_rem(struct tcp_log_mem *log_entry, const char *func,
refcnt = atomic_fetchadd_int(&log_entry->tlm_refcnt, -1);
func, line, log_entry, refcnt);
tcp_log_free_log_common(struct tcp_log_mem *log_entry, int *count __unused)
uma_zfree(tcp_log_zone, log_entry);
struct tcp_log_mem *log_entry;
while ((log_entry = STAILQ_FIRST(head)) != NULL) {
tcp_log_entry_refcnt_rem(log_entry);
tcp_log_free_log_common(log_entry, count);
tcp_log_remove_log_cleanup(struct tcpcb *tp, struct tcp_log_mem *log_entry)
uma_zfree(tcp_log_zone, log_entry);
tcp_log_remove_log_head(struct tcpcb *tp, struct tcp_log_mem *log_entry)
KASSERT(log_entry == STAILQ_FIRST(&tp->t_logs),
tcp_log_entry_refcnt_rem(log_entry);
tcp_log_remove_log_cleanup(tp, log_entry);
struct tcp_log_mem *log_entry;
while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL)
tcp_log_remove_log_head(tp, log_entry);
struct tcp_log_mem *log_entry;
while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL)
tcp_log_remove_log_head(tp, log_entry);
struct tcp_log_mem *log_entry;
if ((log_entry = uma_zalloc(tcp_log_zone, M_NOWAIT)) != NULL)
log_entry = NULL;
if (log_entry == NULL) {
if ((log_entry = STAILQ_FIRST(&tp->t_logs)) == NULL)
tcp_log_entry_refcnt_rem(log_entry);
KASSERT(log_entry != NULL,
log_buf = &log_entry->tlm_buf;
log_verbose = &log_entry->tlm_v;
STAILQ_INSERT_TAIL(&tp->t_logs, log_entry, tlm_queue);
tcp_log_entry_refcnt_add(log_entry);
struct tcp_log_mem *log_entry;
while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL)
tcp_log_remove_log_head(tp, log_entry);
struct tcp_log_mem *log_entry, *next;
STAILQ_FOREACH(log_entry, &tp->t_logs, tlm_queue)
KASSERT(log_entry != NULL,
if (log_entry == NULL)
while ((next = STAILQ_NEXT(log_entry, tlm_queue)) != NULL) {
STAILQ_REMOVE_AFTER(&tp->t_logs, log_entry, tlm_queue);
while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL &&
tcp_log_remove_log_head(tp, log_entry);
KASSERT(log_entry != NULL,
struct tcp_log_mem *log_entry;
STAILQ_FOREACH(log_entry, log_tailqp, tlm_queue) {
if (log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_HDR)
error = tcp_log_copyout(sopt, &log_entry->tlm_buf, out_entry,
if (!(log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_HDR)) {
if (log_entry->tlm_buf.tlb_eventflags & TLB_FLAG_VERBOSE) {
error = tcp_log_copyout(sopt, &log_entry->tlm_v,
struct tcp_log_mem *log_entry, *log_next;
log_entry = STAILQ_LAST(&tp->t_logs, tcp_log_mem, tlm_queue);
log_entry = NULL;
log_entry = log_next;
if (log_entry != NULL && log_next == NULL) {
} else if (log_entry != NULL) {
STAILQ_FIRST(&tp->t_logs) = STAILQ_NEXT(log_entry, tlm_queue);
KASSERT(STAILQ_NEXT(log_entry, tlm_queue) != NULL,
STAILQ_NEXT(log_entry, tlm_queue) = NULL;
log_tailq.stqh_last = &STAILQ_NEXT(log_entry, tlm_queue);
STAILQ_FOREACH_SAFE(log_entry, &log_tailq, tlm_queue, log_next) {
tcp_log_entry_refcnt_rem(log_entry);
uma_zfree(tcp_log_zone, log_entry);
struct tcp_log_mem *log_entry;
while ((log_entry = STAILQ_FIRST(&tp->t_logs)) != NULL)
tcp_log_remove_log_head(tp, log_entry);
struct tcp_log_mem *log_entry;
STAILQ_FOREACH(log_entry, log_entries, tlm_queue) {
tlm_buf = &log_entry->tlm_buf;
struct log_entry *le;
struct log_entry *lp;
struct log_entry oplog[LOGSIZE]; /* the log */