mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
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 76f405ed63)
This commit is contained in:
parent
2bc7fdc3a8
commit
68fd49e8f5
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue