From a325916ce64cb9bb29e5651fb77e344176fbe28c Mon Sep 17 00:00:00 2001 From: harti Date: Fri, 31 Oct 2003 13:35:22 +0000 Subject: Fix breakage on ia64: PAGE_SIZE on ia64 is large enough that more than 256 raw receive buffers (96 byte each) fit into one page. This breaks the limit imposed by the usage of an uint8_t for the buffer number. Restrict the allocation size for buffers to a maximum of 8192. --- sys/dev/hatm/if_hatmvar.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev/hatm') diff --git a/sys/dev/hatm/if_hatmvar.h b/sys/dev/hatm/if_hatmvar.h index 9d451a7..42ac900 100644 --- a/sys/dev/hatm/if_hatmvar.h +++ b/sys/dev/hatm/if_hatmvar.h @@ -235,7 +235,11 @@ SLIST_HEAD(tpd_list, tpd); #define MBUFL_OFFSET 16 /* two pointers for HARP */ -#define MBUF_ALLOC_SIZE (PAGE_SIZE) +#if PAGE_SIZE > 8192 +#define MBUF_ALLOC_SIZE (8192) +#else +#define MBUF_ALLOC_SIZE (PAGE_SIZE) +#endif /* each allocated page has one of these structures at its very end. */ struct mbuf_page_hdr { -- cgit v1.1