Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Mar 2005 21:23:14 +1100 (EST)
From:      lukem.freebsd@cse.unsw.edu.au
To:        Mike Silbersack <silby@silby.com>
Cc:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Subject:   Re: changes to make ethernet packets able to be unaligned...
Message-ID:  <Pine.LNX.4.61.0503202112020.5585@wagner.orchestra.cse.unsw.EDU.AU>
In-Reply-To: <20050318211424.I99115@odysseus.silby.com>
References:  <20050317221359.GN89312@funkthat.com> <20050318021907.H844@odysseus.silby.com> <20050318092429.GD37984@funkthat.com> <20050318211424.I99115@odysseus.silby.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Why not just fix the protocols which do unaligned accesses? Is speedup of 
doing non-byte-wide reads when manipulating packet headers really larger 
than the cost of aligning everything? I doubt it.

Your average tcp packet shoule only cause a few unaligned accesses anyway, 
so we are putting in a lot of effort to save re-writing a very small 
number of spots in the protocol stack.

Personally, I think it would be better to just remove the alignment 
constraints altogether, and re-write the protocols to avoid doing 
unaligned accesses.

An easy way to track them down would be to use an architecture which uses 
exceptions to handle unaligned accesses, and log all the exceptions in the 
protocol stack.

-- 
Luke



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.61.0503202112020.5585>