summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2019-05-07 00:08:34 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2019-05-07 00:08:34 +0000
commit90dba8b64dd4ed844a1ba08a961ce6c71a33d15d (patch)
tree1690337a849132293c876be246576b2fd18b005c /sys/dev/pci
parent3737ed70a602d6e9148f03c01fd80f335d08d36d (diff)
align the rx buffer to ETHER_ALIGN
this will probably change as the rx handling grows to cope with the hardware max mru. ok jmatthew@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_mcx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index 06c1e8e550f..e779b216b47 100644
--- a/sys/dev/pci/if_mcx.c
+++ b/sys/dev/pci/if_mcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mcx.c,v 1.2 2019/05/07 00:06:00 dlg Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.3 2019/05/07 00:08:33 dlg Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -4657,10 +4657,11 @@ mcx_rx_fill_slots(struct mcx_softc *sc, void *ring, struct mcx_slot *slots, uint
rqe = ring;
for (fills = 0; fills < nslots; fills++) {
ms = &slots[slot];
- m = MCLGETI(NULL, M_DONTWAIT, NULL, bufsize);
+ m = MCLGETI(NULL, M_DONTWAIT, NULL, bufsize + ETHER_ALIGN);
if (m == NULL)
break;
+ m->m_data += ETHER_ALIGN;
m->m_len = m->m_pkthdr.len = bufsize;
if (bus_dmamap_load_mbuf(sc->sc_dmat, ms->ms_map, m,
BUS_DMA_NOWAIT) != 0) {