Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version
From: Iasen Kostov (tbyte_at_OTEL.net)
Date: 12/08/04
- Previous message: Robert Watson: "Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version"
- In reply to: Robert Watson: "Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version"
- Next in thread: Robert Watson: "Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version"
- Reply: Robert Watson: "Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 08 Dec 2004 12:58:31 +0200 To: Robert Watson <rwatson@freebsd.org>
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 ?
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
- Previous message: Robert Watson: "Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version"
- In reply to: Robert Watson: "Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version"
- Next in thread: Robert Watson: "Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version"
- Reply: Robert Watson: "Re: em(4) VLAN + PROMISC still doesn't work with latest CVS version"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]