From owner-cvs-src@FreeBSD.ORG Fri Nov 12 11:03:08 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0885216A4CE; Fri, 12 Nov 2004 11:03:08 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED02243D4C; Fri, 12 Nov 2004 11:03:07 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iACB37V7092604; Fri, 12 Nov 2004 11:03:07 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iACB37ov092603; Fri, 12 Nov 2004 11:03:07 GMT (envelope-from rwatson) Message-Id: <200411121103.iACB37ov092603@repoman.freebsd.org> From: Robert Watson Date: Fri, 12 Nov 2004 11:03:07 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/em if_em.c if_em.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 11:03:08 -0000 rwatson 2004-11-12 11:03:07 UTC FreeBSD src repository Modified files: sys/dev/em if_em.c if_em.h Log: Correct a bug in the if_em driver relating to the use of vlans with promiscuous mode introduced in 1.45, which programs the em card not to strip or prepend tags when in promiscuous mode without also modifying behavior to manually prepend a vlan header in the event that the card isn't doing it on transmit. Due to a feature of card operation, if the global VLAN prepend/strip register isn't set, setting the VLAN tag flag on individual packet descriptors will cause the packet to be transmitted using ISL encapsulation rather than 802.1Q VLAN encapsulation. This fix causes em_encap() to prepend the header by tracking whether the card is configured to temporarily disable prepending/stripping due to promiscuous mode. As a result, entering promiscuous mode on the parent em interface no longer causes vlans to appear to "wedge" or transmit ISL-encapsulated frames, which typically will not be configured/spoken by the other endpoints on the VLAN trunk. This bug may also exist in other drivers, and the additional vlan encapsulation logic should be abstracted and centralized in if_vlan.c if so. RELENG_5_3 candidate. MFC after: 1 week Tested by: pjd, rwatson Reported by: astesin at ukrtelecom dot net Reported by: Mike Tancsa Reported by: Iasen Kostov Revision Changes Path 1.53 +43 -6 src/sys/dev/em/if_em.c 1.29 +1 -0 src/sys/dev/em/if_em.h