Date: Thu, 18 Jan 2024 22:39:41 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 2bc7fdc3a8d0 - stable/14 - net80211 amdpu: Simplify a few loops that drain an mbufq Message-ID: <202401182239.40IMdf6S008964@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2bc7fdc3a8d0d9b86c219714d93145eececfa622 commit 2bc7fdc3a8d0d9b86c219714d93145eececfa622 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-01-09 18:59:48 +0000 Commit: John Baldwin <jhb@FreeBSD.org> 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401182239.40IMdf6S008964>