em(4) VLAN + PROMISC still doesn't work with latest CVS version
Iasen Kostov
tbyte at OTEL.net
Wed Dec 8 02:58:06 PST 2004
Robert Watson wrote:
>On Tue, 7 Dec 2004, Iasen Kostov wrote:
>
>
>
>> Is there an update on this case or I should find a way to disable
>>all hw "things" in the driver ?:) (because things are getting hot here
>>:).
>>
>>
>
>Try the attached patch? The vlan header in promisc mode was getting
>inserted after the mbuf was mapped for dma, so under some circumstances
>the remainder of the packet but not the header would be sent. Given that
>the previous change tested fine before, I'm wondering if the recent busdma
>changes have triggered this bug.
>
>I'm beginning to think the right fix here is actually to always leave the
>hardware turned on and to re-insert the vlan header on receive, not insert
>on transmit, in order to avoid races for queued packets during state
>transitions. I'll have a chance to investigate that before going on
>travel Friday, I hope.
>
>
>
The patch generates .rej against this version:
/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.44.2.4 2004/11/23 22:28:40
rwatson Exp $*/
***************
*** 1273,1292 ****
m_head = m_pullup(m_head, sizeof(eh));
if (m_head == NULL) {
*m_headp = NULL;
- bus_dmamap_destroy(adapter->txtag, q.map);
return (ENOBUFS);
}
eh = *mtod(m_head, struct ether_header *);
M_PREPEND(m_head, sizeof(*evl), M_DONTWAIT);
if (m_head == NULL) {
*m_headp = NULL;
- bus_dmamap_destroy(adapter->txtag, q.map);
return (ENOBUFS);
}
m_head = m_pullup(m_head, sizeof(*evl));
if (m_head == NULL) {
*m_headp = NULL;
- bus_dmamap_destroy(adapter->txtag, q.map);
return (ENOBUFS);
}
evl = mtod(m_head, struct ether_vlan_header *);
--- 1243,1259 ----
m_head = m_pullup(m_head, sizeof(eh));
if (m_head == NULL) {
*m_headp = NULL;
return (ENOBUFS);
}
eh = *mtod(m_head, struct ether_header *);
M_PREPEND(m_head, sizeof(*evl), M_DONTWAIT);
if (m_head == NULL) {
*m_headp = NULL;
return (ENOBUFS);
}
m_head = m_pullup(m_head, sizeof(*evl));
if (m_head == NULL) {
*m_headp = NULL;
return (ENOBUFS);
}
evl = mtod(m_head, struct ether_vlan_header *);
should I use the version from -CURRENT or it is possible (adjusted
patch) to work with this one ?
More information about the freebsd-net
mailing list