Probable Bug in tcp.h

Bruce M. Simpson bms at FreeBSD.org
Mon Jun 9 10:16:31 UTC 2008


Marc Lörner wrote:
> off0 is 0x14 => no problem with that
> but address of ip is 0xe000000021c8706e => not correct aligned to 32-bits
>
> Can anyone tell me, where ip is allocated, so I can do a little bit more 
> research?
>   

It really depends on the context! That's a very wide ranging question.

It depends upon whether mbuf chains are flowing up or down the stack, 
whether or not the network driver supports checksum or header/segment 
offload, and whether or not it is using zero-copy.

Zero copy transmit normally only has mmu cost if the mbuf (from 
userland) can be mapped to a location where headers are easily 
prepended. Zero copy receive is more expensive and complex as it 
requires that the DMA engine on the network interface card supports 
header splitting.

The FreeBSD stack is known to have some issues with mbuf alignment and 
architectures other than those in its Tier 1.




More information about the freebsd-net mailing list