aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bce
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2008-05-08 15:05:38 +0000
committerScott Long <scottl@FreeBSD.org>2008-05-08 15:05:38 +0000
commit9fc852229b754a2e84ed71e34c852d06d9a07e61 (patch)
tree83b682957de8bf14c63d3e91a9d3db035c744a3d /sys/dev/bce
parentc4ca06b9b37b1e9ef6c4d96ef26e131fe687077c (diff)
Notes
Diffstat (limited to 'sys/dev/bce')
-rw-r--r--sys/dev/bce/if_bce.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index 859d74fb7b8d..14bfcb992f4d 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -776,7 +776,11 @@ bce_attach(device_t dev)
ifp->if_capenable = ifp->if_capabilities;
/* Use standard mbuf sizes for buffer allocation. */
+#ifdef BCE_USE_SPLIT_HEADER
sc->rx_bd_mbuf_alloc_size = MHLEN;
+#else
+ sc->rx_bd_mbuf_alloc_size = MCLBYTES;;
+#endif
sc->pg_bd_mbuf_alloc_size = MCLBYTES;
ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD;
@@ -3804,7 +3808,11 @@ bce_get_rx_buf(struct bce_softc *sc, struct mbuf *m, u16 *prod,
goto bce_get_rx_buf_exit);
/* This is a new mbuf allocation. */
+#ifdef BCE_USE_SPLIT_HEADER
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+#else
+ m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+#endif
if (m_new == NULL) {
sc->mbuf_alloc_failed++;
rc = ENOBUFS;