From nobody Tue Jan 9 19:02:51 2024 X-Original-To: dev-commits-src-main@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 4T8gL36xv9z56Gvx; Tue, 9 Jan 2024 19:02:51 +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 4T8gL36P3yz4cP1; Tue, 9 Jan 2024 19:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826971; 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=ZXkxKF84jE31J3t/1bjdfwLM3UY3eF+ScoVOz+JAKDU=; b=lG2yJMBT7laSrXUqT9y7Nwzuq9nNB40hiYOyUAkBO3PmHP3A7/mcDqm11XveCq8sMtm1Bn hc+ukxP1pMr6iu8pjbiL+AY4a/SQWu2RPr3cxYZVbHp96OkbE9UqxpL6Jkb+6MO70KSECs /hn/AUW4XbjIQmSXb+ftrXyn6ji+3/RKlQl+Vg/ioPfv6j2qw7TQhEesRWcRfZp+6Ah9dm amS7Fvyhm+a4ugf0aOggDQ0JJNIQG84uJw5jOU1V1dV39zVIkD/P4HOSxNhLt4cdhPXCg+ 1urP6r69zmrFsuV70uYhX6az+ySDM5+CyZDtkD1oc6Z4HuI14pAqPqAwTIwF+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704826971; 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=ZXkxKF84jE31J3t/1bjdfwLM3UY3eF+ScoVOz+JAKDU=; b=VPMtaTh8liNZFpZC4bamxGtGNyulblHZXYk2H6+FNf6mdWkHKWdu638paDDrjTJ2zfi93N 3BeGh+w+pw1efWdBF5dkGCrw7Okyhddy0LxNom/L/sWt6NVtf+TFgjJu1mb/gh1n4BMCnz 14XN00sPqW1aMTKxrCwMqGJpgDCYSlqcEDcyrGQDw3CX1GA63Uj56beOIIv/T4lx45vEAY oT7Udz/e8Wp+0texafhlf1OJAyl8goBoLmrvYzCQR7bPbDgikMUWNYyxiue+z7Dvbkh9Du 6pTB9HCkKI4GwqdbodSQn0G6gYWGtsLCen+k6znfHJV/hVzsyKY79cJmZq69XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704826971; a=rsa-sha256; cv=none; b=imZbR8bvW/QlIYjCFpcj25ResMBYjxKfKW3bcfmhKQ74EDSt3+6glEd7BMF6XzhmXzcbqE mCfyNcKy7iVPWetZc9d9IgSMeS8Gh6JBB0zhqspjI9+HqiaNNNyhngK2mIYe3Bke+Ww4K3 jhxK6KDqJRr1vL381AZw1wiM1YIMFvqWgrB1EafqUK7Yf4I60rRdFFp7/rFB3PHEO5wmyo KnZM5XbU93rX58/kDZQuwuhKoB/5SPWD/mc4kjW2Q4ltD263j//B+6srTdewsyBoc79XkN cT9DPRPwM6c4xHnRFZ0rJMD7PCa9FtvBGcKSAlNa6SAnO9hVMkS9d9K0U9VkzQ== 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 4T8gL35S2wz136n; Tue, 9 Jan 2024 19:02:51 +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 409J2phd098614; Tue, 9 Jan 2024 19:02:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409J2pkj098611; Tue, 9 Jan 2024 19:02:51 GMT (envelope-from git) Date: Tue, 9 Jan 2024 19:02:51 GMT Message-Id: <202401091902.409J2pkj098611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6977311633c7 - main - net80211 amdpu: Simplify a few loops that drain an mbufq List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 6977311633c73f594ff3dae150d6d1fe06105a8f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6977311633c73f594ff3dae150d6d1fe06105a8f commit 6977311633c73f594ff3dae150d6d1fe06105a8f Author: John Baldwin AuthorDate: 2024-01-09 18:59:48 +0000 Commit: John Baldwin CommitDate: 2024-01-09 18:59:48 +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 --- 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 ea59bb622dd8..5297b741d9b9 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -517,7 +517,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; @@ -812,7 +812,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;