From ed3f27c1e3bc80e9b8cd27a064844fd0ba1a4837 Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Mon, 29 Jun 2015 18:58:05 +0000 Subject: Hide ETHER_ALIGN mbuf adjustment under "#ifdef __STRICT_ALIGNMENT" for now to get jumbo frames working. oce(4) will need the same treatment as ix(4) when sparc64 support will be implemented. Tested by Pedro Caetano , thanks! --- sys/dev/pci/if_oce.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c index 2aa13db54a8..3da3b451c66 100644 --- a/sys/dev/pci/if_oce.c +++ b/sys/dev/pci/if_oce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_oce.c,v 1.84 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_oce.c,v 1.85 2015/06/29 18:58:04 mikeb Exp $ */ /* * Copyright (c) 2012 Mike Belopuhov @@ -1773,7 +1773,9 @@ oce_get_buf(struct oce_rq *rq) } pkt->mbuf->m_len = pkt->mbuf->m_pkthdr.len = MCLBYTES; +#ifdef __STRICT_ALIGNMENT m_adj(pkt->mbuf, ETHER_ALIGN); +#endif if (bus_dmamap_load_mbuf(sc->sc_dmat, pkt->map, pkt->mbuf, BUS_DMA_NOWAIT)) { -- cgit v1.2.3