From nobody Thu Jan 18 22:39:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TGHk73MHNz57B7H; Thu, 18 Jan 2024 22:39:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TGHk7245xz4FgD; Thu, 18 Jan 2024 22:39:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705617583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ccNrt9wgNupCXhJBjuMx9bp+fJJ9c48uNMbOsqPb4bA=; b=XM0hes4td2aNNEG2PgyPw73rGOIYbQX7NyjoAjn3OsOskfdfXcwqLCeDqgpcqcJfZG9B3V 77B8Og5XFXdmV/CgwTbk307YFOlMrdvOaW13R0WwN2nQEKQJfuDFbrWB0WS+d22hmW2mG8 FvmRGYN6035xresxynvqjMRja9DUYrgXwLnJER0aKxcEI0kPve3eGzrsQpuTkehJXbzL/N JX9MJaFSpFte/lMTE7IvJUw9lIlkHXE2KnC0G63YkSuDwDNnJSgzEcjvUCol1D5Duf9CER 0d25GVkWO0xGkSvIyG/53GslTF5t10Hbd1qFQCdEr4WOtt+8arTp6gGLr+WTnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705617583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ccNrt9wgNupCXhJBjuMx9bp+fJJ9c48uNMbOsqPb4bA=; b=FJJ3tESC4SSmRaGih9YqPAJ4J+Vh3QGXDxHd9fQlVNjRkRMRAk1m4xP+7CxV/C1orFyLOy okrg6Eg8nMvjxFqZ2vyOzhc4vRkUGLs05N7V8z2acQfGVRUmuT8RWBpbl/taCrc/nNuD6g SS0JWY8SrW+Qo9JA6cYsrRBHieifUMjzF00q2lzJs1d3l+KY2q7+h8sIpeZIY68cK/BTJ9 yQ4dYiSD/Uvkq81tUqPZkJQ3z0ojPuepnB0mivKql1xQC9abLAHerG3QDNV5lt54rHO/Jg XMwW1h+Wh6/uneuGrcYrjAZWU7XjBeT6/K3U/oBuz2p/lx3Xm2VCOuV7XNkfEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705617583; a=rsa-sha256; cv=none; b=lcN8n52ytEikbBdxf5d3V4kUSnPzqCRwDNXIS9UfrXlVnKazgYZ9Umkz4uhIF0q2rl/SUe PJnhbd8KZDtU52vQJx3eBrqTXJbi4R96XvPWcH9EEFLqFHbZAM2NmEOvkEdvLCIa3jWgY1 yjEFS8C8yyiFsYeVFudQrpQkSCBL5XG7nPux5wqRWfArUgzhCiATNFilgwP1aV1Cnw8U/x NT49RFUFILsMc+ByOHYNxHZ8bF2f5IOhhhXJC+pNjM348uBeVb2JQqOcxBPDjm8v/OjJ81 Q3QfIZlSz9Zk+z5DoaKn5Bc/Y7ziCuN/Fzq7WFtS/5RDcezYXHR9KnrZ6g857A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TGHk719sCzQqD; Thu, 18 Jan 2024 22:39:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40IMdhKT009005; Thu, 18 Jan 2024 22:39:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IMdhi3009002; Thu, 18 Jan 2024 22:39:43 GMT (envelope-from git) Date: Thu, 18 Jan 2024 22:39:43 GMT Message-Id: <202401182239.40IMdhi3009002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 68fd49e8f56a - stable/14 - mbuf: Add mbufq_empty List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 68fd49e8f56a1a5c52590626b72e8faa1d395ffb Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=68fd49e8f56a1a5c52590626b72e8faa1d395ffb commit 68fd49e8f56a1a5c52590626b72e8faa1d395ffb Author: John Baldwin AuthorDate: 2024-01-09 19:00:19 +0000 Commit: John Baldwin 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) {