From nobody Thu Jan 18 22:39:41 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 4TGHk62NgGz579vR; Thu, 18 Jan 2024 22:39:42 +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 4TGHk61Hqfz4Fct; Thu, 18 Jan 2024 22:39:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705617582; 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=rlF1UWr0OjAbV6Uja24m6+FqKbH8D+IMFl7iw0NGZ88=; b=Lv/EhUu5czIG4nwq/0ZFbZ7E+vxB+tBen03tky6AscA3ipvOSRwymkXBI0bE5Z25oJh2Qk /o2RQ2Pp1AzxeDvUXh2wJKSX48V26TtUej7IYcyfFViYeETzGdajro15ostSdagt8SwDI6 ZYmn2laEorm9MAf++P43evwaLtFoF1xhmzWE1BUW9JvpdpEr75b+xfKWXLqeF9D1ibK3Dv ZnWB5pIXCdPkZJYDcXUdOFrX5BW1YaI4qlkApxEcpKijFT7e2vGGxHULMs8fhf6M+lhZnG +AipiNHNiLFI0nZU9am8APum0qeNyfD45AAJM+pxQ92AvKhbnbPoYdMtC/vl3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705617582; 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=rlF1UWr0OjAbV6Uja24m6+FqKbH8D+IMFl7iw0NGZ88=; b=CUQqIxCTgNaEFnITE/sLMqF5SU5IdgLEOZv2TLtg6gsQmfMcrWEou5gmYHLqhXczez5BpC czN9sbUBpFY/3BVnyCTiSyoEo8qpq6Mqwzu65Yoj/soX7xxEY8X/fbjQruDrpoZU+F13vr 0EtWEen5HQQBvZlfd8Hd02NxzRkJoYhHjvNoNj0Mz5DWwpIW8Ncr7yxPeAPlVT0iKrCJZK xtkpMcS9x05q0HhGfBnpE8vYuxWQY3YxVLYh1WdVjnPLLuoVJtJXte+UX2M+FhKN2s/OeW kTsBunH6Uo2AZw49VUPUD+uCJTFaDmLwhzRAU74iXZuuK+49fgtWPCEtED15YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705617582; a=rsa-sha256; cv=none; b=M42iVuwE9o/cvEGWXUcBdenAhj6AHgPyiyFO27ufr1rRCpJw9+grObxrDOGu2ph5hKN3yO +8dVSDd/m7h2vFQd1M0XZX3P3XkW9bya3MeKu9uZ6iuoXdXx7HVYNkwkKt0ot6yC+cSHJq 44DJv5QEEZ/sffF5PmuASLWi5x43ESDDsT4op3cxiT592/9LoAfmkMe+3UqobDZb7yWoFk saPHdo/nVcrP9jvzruMPhazy4iSbHTB/09uXS5u0/emfgHqh9Ump0iZElBFfNHX3abjLT9 Rj8Pt64NBbc9hJwQvVir+Hu/gL9eT4Spma176ZbMEsW9SH7xrQ8sk+EmEPZXGg== 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 4TGHk60CWvzQnX; Thu, 18 Jan 2024 22:39:42 +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 40IMdfoh008967; Thu, 18 Jan 2024 22:39:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IMdf6S008964; Thu, 18 Jan 2024 22:39:41 GMT (envelope-from git) Date: Thu, 18 Jan 2024 22:39:41 GMT Message-Id: <202401182239.40IMdf6S008964@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: 2bc7fdc3a8d0 - stable/14 - net80211 amdpu: Simplify a few loops that drain an mbufq 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: 2bc7fdc3a8d0d9b86c219714d93145eececfa622 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2bc7fdc3a8d0d9b86c219714d93145eececfa622 commit 2bc7fdc3a8d0d9b86c219714d93145eececfa622 Author: John Baldwin AuthorDate: 2024-01-09 18:59:48 +0000 Commit: John Baldwin CommitDate: 2024-01-18 22:37:03 +0000 net80211 amdpu: Simplify a few loops that drain an mbufq These loops already handled a NULL return from mbufq_dequeue when the queue was empty, so remove a redundant check of mbufq_len before dequeueing. Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43336 (cherry picked from commit 6977311633c73f594ff3dae150d6d1fe06105a8f) --- sys/net80211/ieee80211_ht.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 61c57b87c5d7..a322c21b4673 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -521,7 +521,7 @@ ampdu_rx_purge_slot(struct ieee80211_rx_ampdu *rap, int i) struct mbuf *m; /* Walk the queue, removing frames as appropriate */ - while (mbufq_len(&rap->rxa_mq[i]) != 0) { + for (;;) { m = mbufq_dequeue(&rap->rxa_mq[i]); if (m == NULL) break; @@ -816,7 +816,7 @@ ampdu_dispatch_slot(struct ieee80211_rx_ampdu *rap, struct ieee80211_node *ni, struct mbuf *m; int n = 0; - while (mbufq_len(&rap->rxa_mq[i]) != 0) { + for (;;) { m = mbufq_dequeue(&rap->rxa_mq[i]); if (m == NULL) break;