cvs commit: src/sys/dev/em if_em.c if_em.h
Robert Watson
rwatson at FreeBSD.org
Tue Nov 23 14:28:41 PST 2004
rwatson 2004-11-23 22:28:40 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_5)
sys/dev/em if_em.c if_em.h
Log:
Merge if_em.c:1.53, if_em.c:1.54, if_em.h:1.29 from HEAD to RELENG_5:
date: 2004/11/14 20:20:28; author: rwatson; state: Exp; lines: +19 -4
Further refine the if_em vlan fix in if_em.c:1.53:
- Because em_encap() can now fail in a way that leaves us without an
mbuf chain, potentially set *m_headp to NULL if that happens, so that
the caller can do the right thing. This case can occur when we try
to prepend the vlan header mbuf but can't allocate additional memory.
- Modify the caller of em_encap() to detect a NULL m_head and not try
to queue the mbuf if that happens.
- When em_encap() fails, make sure to call bus_dmamap_destroy() to
clean up.
date: 2004/11/12 11:03:07; author: rwatson; state: Exp; lines: +1 -0
date: 2004/11/12 11:03:07; author: rwatson; state: Exp; lines: +43 -6
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>
MFC after: 1 week
Revision Changes Path
1.44.2.4 +59 -7 src/sys/dev/em/if_em.c
1.25.2.2 +1 -0 src/sys/dev/em/if_em.h
More information about the cvs-all
mailing list