summaryrefslogtreecommitdiffstats
path: root/sys/dev/fatm
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2015-01-05 09:58:32 +0000
committerrwatson <rwatson@FreeBSD.org>2015-01-05 09:58:32 +0000
commit1c44e71143e62b6854cec8430ea9305258c2f45f (patch)
tree6f98bf414ddd5e9772757ca1f6016f218ead95f8 /sys/dev/fatm
parent72a716f320b42b30286a42a1790aec6579efb3a5 (diff)
downloadFreeBSD-src-1c44e71143e62b6854cec8430ea9305258c2f45f.zip
FreeBSD-src-1c44e71143e62b6854cec8430ea9305258c2f45f.tar.gz
To ease changes to underlying mbuf structure and the mbuf allocator, reduce
the knowledge of mbuf layout, and in particular constants such as M_EXT, MLEN, MHLEN, and so on, in mbuf consumers by unifying various alignment utility functions (M_ALIGN(), MH_ALIGN(), MEXT_ALIGN() in a single M_ALIGN() macro, implemented by a now-inlined m_align() function: - Move m_align() from uipc_mbuf.c to mbuf.h; mark as __inline. - Reimplement M_ALIGN(), MH_ALIGN(), and MEXT_ALIGN() using m_align(). - Update consumers around the tree to simply use M_ALIGN(). This change eliminates a number of cases where mbuf consumers must be aware of whether or not mbufs returned by the allocator use external storage, but also assumptions about the size of the returned mbuf. This will make it easier to introduce changes in how we use external storage, as well as features such as variable-size mbufs. Differential Revision: https://reviews.freebsd.org/D1436 Reviewed by: glebius, trasz, gnn, bz Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/dev/fatm')
-rw-r--r--sys/dev/fatm/if_fatm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c
index b3281fe..ec85d31 100644
--- a/sys/dev/fatm/if_fatm.c
+++ b/sys/dev/fatm/if_fatm.c
@@ -1105,7 +1105,7 @@ fatm_supply_small_buffers(struct fatm_softc *sc)
LIST_INSERT_HEAD(&sc->rbuf_free, rb, link);
break;
}
- MH_ALIGN(m, SMALL_BUFFER_LEN);
+ M_ALIGN(m, SMALL_BUFFER_LEN);
error = bus_dmamap_load(sc->rbuf_tag, rb->map,
m->m_data, SMALL_BUFFER_LEN, dmaload_helper,
&phys, BUS_DMA_NOWAIT);
OpenPOWER on IntegriCloud