From nobody Thu Jan 18 22:39:48 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 4TGHkF3Z1Yz57B9X; Thu, 18 Jan 2024 22:39:49 +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 4TGHkD4vq9z4FkL; Thu, 18 Jan 2024 22:39:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705617588; 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=YX7QZhVSSdW8OqC5VBOkJox+y7AhTq/Dnl74trJh84Y=; b=IeVAkPRGA9Gyq89phL5pbNx2Q5fBrhmoms6iLQsgru2BB/ku6dVUOvXvIYWRRaIhNwC1Ds XN7ElPo7cKJmoRHO349gMC9Hkk432U98ZI8umcrIgrAuLe3EAGmhdCbOraou5IeAd0ahzB 4fLaqIQsGxUpdqXOboYuTeLggP3pq88A/rLS8bDzJMhmSkV7hKokUCQGi3cI0sNuhWbJBo bP20L8Vyx4x0ww9OEpA2B8Ly4+4fWIglNioFcBMSjKZXmGpjTLOFVG/bnFTJZR8brZ7n+z zulkqzok0lHvA2qcNgtbB3SExiHHPssnTILkALxr7d5J5U9MSpxyXqi+b++pUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705617588; 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=YX7QZhVSSdW8OqC5VBOkJox+y7AhTq/Dnl74trJh84Y=; b=FHAr3sOHP3UKnp81YLr4/XxjHIhK0ytq3+JyKr5qx7FFrXopjeRyL0YcQrwBLS/WSO5uJg LAHpLd6QorU56hClwqEeamSP4DPmTbo9Fd2zD/Gl92Wo2MIrRVTj5//DwRY+Rz2hD6/myt boCUYvXxu+PwIu1s8Z36GBFEoJvqN2W9djekCZ2RtSzMVlhWwQkEK2osKV3GYqZgaEoNIn gry32VxPTfxqm8nteRKnkTeafT+Rlfqv2dfIEZ7gi1S80G2UHCPdj31nm3uoP+uXLk1vAb YSFdc9Ec7r2dCzNlmIAY1Ihc85xKCd57fZlUQ+LYfNTyFdgDmwFh7yS7tNgaRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705617588; a=rsa-sha256; cv=none; b=f2Byjoli3zZoXI3ru2Jd4AuVauMovdhB0DKgEVe9frFAaUsAfqNP3vn9AIo8I7+T/Hqiuz PLlTDN+/EE7gv5+PNygrpSKNSlBWz/vtE1Kpt81MMHKJyIX3BgM2HffSv7EI/uCh2FS0i+ d4N3IQ1SiHjzLTm0LeLwRMQjGXithtQReMjY2WItpLgmDID9Gv6wvE/p0keclrx2OZFzgw Gq3PNsK8yb3cOjCuqUokoGhbcumrtZCEt1nB392zJA9jy782JTNo77X6v/fuFLHLe9YZhk dOkilMwE1LJpyR50TCyKDMeQCYvi1Z8yVQpjK854cfDpr8DnBr7wJFUyXLblKw== 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 4TGHkD408TzQdN; Thu, 18 Jan 2024 22:39:48 +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 40IMdmu4009333; Thu, 18 Jan 2024 22:39:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IMdmq6009330; Thu, 18 Jan 2024 22:39:48 GMT (envelope-from git) Date: Thu, 18 Jan 2024 22:39:48 GMT Message-Id: <202401182239.40IMdmq6009330@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: 18df65561983 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 18df65561983f3092268f841b3b6df9146e36845 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=18df65561983f3092268f841b3b6df9146e36845 commit 18df65561983f3092268f841b3b6df9146e36845 Author: John Baldwin AuthorDate: 2024-01-09 18:59:48 +0000 Commit: John Baldwin CommitDate: 2024-01-18 22:37:09 +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 626f6386865c..e4d1ae223353 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;