Thread (20 messages) 20 messages, 11 authors, 2016-12-11

Re: Misalignment, MIPS, and ip_hdr(skb)->version

From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: 2016-12-08 22:20:11
Also in: linux-mips, lkml

Hi David,

On Thu, Dec 8, 2016 at 1:37 AM, David Miller [off-list ref] wrote:
You really have to land the IP header on a proper 4 byte boundary.

I would suggest pushing 3 dummy garbage bytes of padding at the front
or the end of your header.
Are you sure 3 bytes to get 4 byte alignment is really the best? I was
thinking that adding 1 byte to get 2 byte alignment might be better,
since it would then ensure that the subsequent TCP header winds up
being 4 byte aligned. Or is this in fact not the desired trade off,
and so I should stick with the 3 bytes you suggested?

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help