Skip to content

Commit

Permalink
mbuf: Add mbufq_empty
Browse files Browse the repository at this point in the history
Complement to the existing mbufq_full

Reviewed by:	bz
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D43337
  • Loading branch information
bsdjhb committed Mar 14, 2024
2 parents cb3b355 + 76f405e commit 6ab9c63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sys/sys/mbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,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)
{
Expand Down

0 comments on commit 6ab9c63

Please sign in to comment.