Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Feb 2025 00:26:00 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ecbef369b33a - stable/14 - e1000: Fix vlan PCP/DEI on lem(4)
Message-ID:  <202502160026.51G0Q0an016285@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kbowling:

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

commit ecbef369b33af759995d9f3f49e38ddda823c7c6
Author:     Aurelien Cazuc <aurelien.cazuc.external@stormshield.eu>
AuthorDate: 2025-02-13 18:08:42 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2025-02-16 00:25:26 +0000

    e1000: Fix vlan PCP/DEI on lem(4)
    
    The vlan PCP and CFI/DEI were discarded when receiving vlan tagged
    packets on lem(4) interfaces with vlanhwtag.
    
    According to the 82540 SDM[1] (pg. 24), vlan tag is in the standard
    format, so there's no reason to discard PCP/DEI.
    
    [1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf
    
    Sponsored by:   Stormshield (author)
    Differential Revision:  https://reviews.freebsd.org/D48987
    
    (cherry picked from commit 4b29599fbbe33b75b7b58cfc5deea7a881e9a10e)
---
 sys/dev/e1000/e1000_defines.h | 1 -
 sys/dev/e1000/em_txrx.c       | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/dev/e1000/e1000_defines.h b/sys/dev/e1000/e1000_defines.h
index 92f676932636..f1b1008764a1 100644
--- a/sys/dev/e1000/e1000_defines.h
+++ b/sys/dev/e1000/e1000_defines.h
@@ -130,7 +130,6 @@
 #define E1000_RXD_ERR_TCPE	0x20    /* TCP/UDP Checksum Error */
 #define E1000_RXD_ERR_IPE	0x40    /* IP Checksum Error */
 #define E1000_RXD_ERR_RXE	0x80    /* Rx Data Error */
-#define E1000_RXD_SPC_VLAN_MASK	0x0FFF  /* VLAN ID is in lower 12 bits */
 
 #define E1000_RXDEXT_STATERR_TST	0x00000100 /* Time Stamp taken */
 #define E1000_RXDEXT_STATERR_LB		0x00040000
diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c
index edbe0f8ab546..ced8d0f41d14 100644
--- a/sys/dev/e1000/em_txrx.c
+++ b/sys/dev/e1000/em_txrx.c
@@ -710,8 +710,7 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
 
 	if (scctx->isc_capenable & IFCAP_VLAN_HWTAGGING &&
 	    status & E1000_RXD_STAT_VP) {
-		ri->iri_vtag =
-		    le16toh(rxd->special & E1000_RXD_SPC_VLAN_MASK);
+		ri->iri_vtag = le16toh(rxd->special);
 		ri->iri_flags |= M_VLANTAG;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502160026.51G0Q0an016285>