diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 2183d5b848f..757eba3165f 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1609,6 +1609,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) {