svn commit: r229606 - head/sys/dev/e1000

Robert Watson rwatson at FreeBSD.org
Thu Jan 5 17:30:16 UTC 2012


Author: rwatson
Date: Thu Jan  5 17:30:15 2012
New Revision: 229606
URL: http://svn.freebsd.org/changeset/base/229606

Log:
  When extracting the VLAN tag from if_em and if_lem receive descriptor
  rings, copy the whole VLAN tag, not just the VLAN ID.  This fixes a
  problem in which VLAN priority information was dropped when using
  offloaded VLAN processing with these drivers.
  
  Discussed with:	jfv, rrs
  Sponsored by:	ADARA Networks, Inc.
  MFC after:	3 days

Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_lem.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Thu Jan  5 17:28:05 2012	(r229605)
+++ head/sys/dev/e1000/if_em.c	Thu Jan  5 17:30:15 2012	(r229606)
@@ -4480,8 +4480,7 @@ em_rxeof(struct rx_ring *rxr, int count,
 #endif
 			if (status & E1000_RXD_STAT_VP) {
 				sendmp->m_pkthdr.ether_vtag =
-				    (le16toh(cur->special) &
-				    E1000_RXD_SPC_VLAN_MASK);
+				    le16toh(cur->special);
 				sendmp->m_flags |= M_VLANTAG;
 			}
 #ifndef __NO_STRICT_ALIGNMENT

Modified: head/sys/dev/e1000/if_lem.c
==============================================================================
--- head/sys/dev/e1000/if_lem.c	Thu Jan  5 17:28:05 2012	(r229605)
+++ head/sys/dev/e1000/if_lem.c	Thu Jan  5 17:30:15 2012	(r229606)
@@ -3591,8 +3591,7 @@ lem_rxeof(struct adapter *adapter, int c
 #endif
 				if (status & E1000_RXD_STAT_VP) {
 					adapter->fmp->m_pkthdr.ether_vtag =
-					    (le16toh(current_desc->special) &
-					    E1000_RXD_SPC_VLAN_MASK);
+					    le16toh(current_desc->special);
 					adapter->fmp->m_flags |= M_VLANTAG;
 				}
 #ifndef __NO_STRICT_ALIGNMENT


More information about the svn-src-all mailing list