git: 68fd49e8f56a - stable/14 - mbuf: Add mbufq_empty
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 Jan 2024 22:39:43 UTC
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=68fd49e8f56a1a5c52590626b72e8faa1d395ffb commit 68fd49e8f56a1a5c52590626b72e8faa1d395ffb Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-01-09 19:00:19 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-01-18 22:37:18 +0000 mbuf: Add mbufq_empty Complement to the existing mbufq_full Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43337 (cherry picked from commit 76f405ed63540aa2d989c231f70277062e76ccfb) --- sys/sys/mbuf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 2183d5b848f9..757eba3165f9 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) {