cvs commit: src/sys/dev/em if_em.c if_em.h
Robert Watson
rwatson at FreeBSD.org
Fri Nov 12 11:03:08 GMT 2004
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 <mike at sentex dot net>
Reported by: Iasen Kostov <tbyte at OTEL dot net>
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
More information about the cvs-src
mailing list