From owner-svn-src-head@FreeBSD.ORG Thu Jan 5 17:30:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D1C91065691; Thu, 5 Jan 2012 17:30:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C1378FC18; Thu, 5 Jan 2012 17:30:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q05HUGgQ046595; Thu, 5 Jan 2012 17:30:16 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q05HUGDE046591; Thu, 5 Jan 2012 17:30:16 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201201051730.q05HUGDE046591@svn.freebsd.org> From: Robert Watson Date: Thu, 5 Jan 2012 17:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229606 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2012 17:30:16 -0000 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