git: 8666fda1afb0 - main - aq(4): Fix VLAN tag test
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 30 Nov 2025 15:56:39 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=8666fda1afb03b3a88e57a20d76da8e7910b6407
commit 8666fda1afb03b3a88e57a20d76da8e7910b6407
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-11-13 14:15:38 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-11-30 15:56:13 +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
---
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);
}