On Apr 30, 2009, at 3:04 PM, Nikolay Denev wrote: [snip]
I think I got it.It seems that the mbuf fields m_pkthdr.len and m_len are not updated to the real packet size pkt_len. Well, actually they are updated, but only if we have ZERO_COPY_SOCKETS defined.After I added this : m0->m_pkthdr.len = m0->m_len = pkt_len;at about line 5930 in if_bce.c, the frame length reported by tcpdump seems correct.P.S.: I guess this could be the cause for the lagg(4) over bce(4) problems too?P.S.2: This fix will probably break the ZERO_COPY_SOCKETS case, but should be fairly easy to make it a "proper" fix.Regards, Niki DenevI can confirm that with this fix I was able to create lagg(4) interface in "failover" mode with only one member, a bce(4) interface, and it seems to work OK.
Here is the patch : --- sys/dev/bce/if_bce.c.orig 2009-04-30 14:06:54.000000000 +0200 +++ sys/dev/bce/if_bce.c 2009-04-30 14:11:32.000000000 +0200 @@ -5926,6 +5926,11 @@ goto bce_rx_int_next_rx; } +#ifndef ZERO_COPY_SOCKETS + /* Adjust the packet length to match the received data. */ + m0->m_pkthdr.len = m0->m_len = pkt_len; +#endif + /* Send the packet to the appropriate interface. */ m0->m_pkthdr.rcvif = ifp; Regards, Niki Denev
PGP.sig
Description: This is a digitally signed message part