Re: [PATCH] dlm: sparse endian annotations

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Al Viro <viro@...>
Cc: David Teigland <teigland@...>, Andrew Morton <akpm@...>, LKML <linux-kernel@...>
Date: Thursday, July 17, 2008 - 4:00 pm

On Wed, 2008-07-16 at 23:12 +0100, Al Viro wrote:

I am curious though, in the general case of taking stuff off the wire
and doing work on it in-place.  Would you suggest two structs for things
like this, one in cpu-order and one with the endian annotations, then
the one place where you receive can do appropriate endian conversion
using a pointer to a wire-endian struct and the rest of the code just
uses the cpu-endian struct everywhere?

Just a general design question.

In the DLM case, these util functions are only used in 1-2 places each
so it wouldn't be too bad to fold them into the receive/send paths, but
you still need to byteswap somewhere, just curious what you are
suggesting.

Harvey

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] dlm: sparse endian annotations, Harvey Harrison, (Wed Jul 16, 4:16 pm)
Re: [PATCH] dlm: sparse endian annotations, Al Viro, (Wed Jul 16, 5:38 pm)
Re: [PATCH] dlm: sparse endian annotations, Harvey Harrison, (Wed Jul 16, 5:43 pm)
Re: [PATCH] dlm: sparse endian annotations, Al Viro, (Wed Jul 16, 6:12 pm)
Re: [PATCH] dlm: sparse endian annotations, Harvey Harrison, (Thu Jul 17, 4:00 pm)