Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2026 16:01:21 +0000
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1fecb10f9428 - stable/15 - aq(4): Fix VLAN tag test
Message-ID:  <6a638c51.3c696.5390c77f@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=1fecb10f94284b38702aafcc243d0c3dce5c286a

commit 1fecb10f94284b38702aafcc243d0c3dce5c286a
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-11-13 14:15:38 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-07-24 16:00:18 +0000

    aq(4): Fix VLAN tag test
    
    Previously emitted a compiler warning "warning: bitwise comparison
    always evaluates to false."
    
    Looking at the OpenBSD driver (which is based on this code) it looks
    like the VLAN flag should be set if either of these bits is.  In the
    OpenBSD driver these are AQ_RXDESC_TYPE_VLAN and AQ_RXDESC_TYPE_VLAN2
    rather than a magic number 0x60.
    
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D53836
    
    (cherry picked from commit 8666fda1afb03b3a88e57a20d76da8e7910b6407)
---
 sys/dev/aq/aq_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/aq/aq_ring.c b/sys/dev/aq/aq_ring.c
index e20527b8c7c2..ca0391a6d61b 100644
--- a/sys/dev/aq/aq_ring.c
+++ b/sys/dev/aq/aq_ring.c
@@ -361,7 +361,7 @@ static int aq_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
 		ri->iri_frags[i].irf_idx = cidx;
 		ri->iri_frags[i].irf_len = len;
 
-		if ((rx_desc->wb.pkt_type & 0x60) == 1) {
+		if ((rx_desc->wb.pkt_type & 0x60) != 0) {
 			ri->iri_flags |= M_VLANTAG;
 			ri->iri_vtag = le32toh(rx_desc->wb.vlan);
 		}


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a638c51.3c696.5390c77f>