summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2008-07-07 00:42:35 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2008-07-07 00:42:35 +0000
commita7cb196aee24adfb6a4fe78e540bba0925bd26ee (patch)
tree038737c1a1ae94963a518faf81eca2dacc2013ea
parentd7d896842bac34b66c1d99aafc2c327cb2992bbf (diff)
tweak the alignment of the rx buffers so the headers in the frame are
better aligned for fast access. i didnt bench, so maybe this does nothing.
-rw-r--r--sys/dev/pci/if_vic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index f4024e7b884..8f440957a5c 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vic.c,v 1.52 2007/11/28 11:13:47 reyk Exp $ */
+/* $OpenBSD: if_vic.c,v 1.53 2008/07/07 00:42:34 dlg Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -1337,7 +1337,8 @@ vic_alloc_mbuf(struct vic_softc *sc, bus_dmamap_t map)
m_freem(m);
return (NULL);
}
- m->m_len = m->m_pkthdr.len = MCLBYTES;
+ m->m_data += ETHER_ALIGN;
+ m->m_len = m->m_pkthdr.len = MCLBYTES - ETHER_ALIGN;
if (bus_dmamap_load_mbuf(sc->sc_dmat, map, m, BUS_DMA_NOWAIT) != 0) {
printf("%s: could not load mbuf DMA map", DEVNAME(sc));