From: Sergei Shtylyov > Sent: 22 April 2015 22:39 > On 04/22/2015 11:42 PM, David Miller wrote: > > >> Hmm, I've been digging in the net core, and was unable to see where TX > >> skb's get their NET_IP_ALIGN bytes reserved. Have I missed something? > >> Probably need to print out skb's fields... > > > NET_IP_ALIGN is for receive, not transmit. > > But when I print 'skb->data' from the ndo_start_xmit() method (in the > 'sh_eth' driver), all addresses end with 2, so it looks like NET_IP_ALIGN gets > added somewhere... For a locally generated message: The TCP userdata is likely to be 4 byte aligned. The TCP and IP headers are multiples of 4 bytes. The MAC header is 14 bytes. So you end up with a buffer that starts on a 4n+2 boundary or an initial short fragment that is 4n+2 bytes long. If a message is being forwarded the alignment probably depends on where it came from. If you have ethernet hardware that requires tx or rx buffers to be on 4n boundaries you should send it back as 'not fit for purpose'. David -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html