summaryrefslogtreecommitdiffstats
path: root/sys/dev/hatm
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-10-31 13:35:22 +0000
committerharti <harti@FreeBSD.org>2003-10-31 13:35:22 +0000
commita325916ce64cb9bb29e5651fb77e344176fbe28c (patch)
treedd33078c2089878bef63ae8000b3082a55bf54c1 /sys/dev/hatm
parent44278bfe73f956cea7b76d295f2ece178659f4f9 (diff)
downloadFreeBSD-src-a325916ce64cb9bb29e5651fb77e344176fbe28c.zip
FreeBSD-src-a325916ce64cb9bb29e5651fb77e344176fbe28c.tar.gz
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.
Diffstat (limited to 'sys/dev/hatm')
-rw-r--r--sys/dev/hatm/if_hatmvar.h6
1 files changed, 5 insertions, 1 deletions
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 {
OpenPOWER on IntegriCloud