diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index bb15557b5b6c..b84898fc268e 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1607,6 +1607,12 @@ mbufq_last(const struct mbufq *mq) return (STAILQ_LAST(&mq->mq_head, mbuf, m_stailqpkt)); } +static inline bool +mbufq_empty(const struct mbufq *mq) +{ + return (mq->mq_len == 0); +} + static inline int mbufq_full(const struct mbufq *mq) {