On Sat, Jun 04, 2005 at 12:58:53PM +0100, Christoph Hellwig wrote:
>
> the usage of 16bit counters in bio_vec doesn't make sense, and if did
> all others would have to move to 32bit aswell (in case we started
> supporting page sizes that aren't addressable by 16bits)
You know what? The more I think about this the more I think that your
idea is brilliant. The reason is that the two main users of crypto API
happen to be in possession of bio_vec and skb_frag_t respectively.
Had we merged the three structures, they would not have to copy the
structures as they do now or even worse, process the buffers one-by-one
as dmcrypt is doing.
Back to the topic of 16-bit vs. 32-bit counters. Could we do something
like this?
#if (PAGE_SHIFT > 16) || (BITS_PER_LONG > 32)
typedef unsigned int page_offset_t
#else
typedef unsigned short page_offset_t
#endif
And then define
struct foovec {
struct page *page;
page_offset_t offset;
page_offset_t length;
};
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
|