Lines Matching refs:ifq
496 #define IF_QFULL(ifq) ((ifq)->ifq_len >= (ifq)->ifq_maxlen)
497 #define IF_DROP(ifq) ((ifq)->ifq_drops++)
498 #define IF_ENQUEUE(ifq, m) { \
500 if ((ifq)->ifq_tail == 0) \
501 (ifq)->ifq_head = m; \
503 ((struct mbuf*)(ifq)->ifq_tail)->m_nextpkt = m; \
504 (ifq)->ifq_tail = m; \
505 (ifq)->ifq_len++; \
507 #define IF_PREPEND(ifq, m) { \
508 (m)->m_nextpkt = (ifq)->ifq_head; \
509 if ((ifq)->ifq_tail == 0) \
510 (ifq)->ifq_tail = (m); \
511 (ifq)->ifq_head = (m); \
512 (ifq)->ifq_len++; \
514 #define IF_DEQUEUE(ifq, m) { \
515 (m) = (ifq)->ifq_head; \
517 if (((ifq)->ifq_head = (m)->m_nextpkt) == 0) \
518 (ifq)->ifq_tail = 0; \
520 (ifq)->ifq_len--; \
524 #define IF_ENQ_DROP(ifq, m) if_enq_drop(ifq, m)
528 if_queue_drop(struct ifqueue *ifq, __unused struct mbuf *m)
530 IF_DROP(ifq);
535 if_enq_drop(struct ifqueue *ifq, struct mbuf *m)
537 if (IF_QFULL(ifq) &&
538 !if_queue_drop(ifq, m))
540 IF_ENQUEUE(ifq, m);