summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
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/netinet/tcp_output.c
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/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 160fada..eb4cb47 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1007,7 +1007,7 @@ send:
#ifdef INET6
if (isipv6 && (MHLEN < hdrlen + max_linkhdr) &&
MHLEN >= hdrlen) {
- MH_ALIGN(m, hdrlen);
+ M_ALIGN(m, hdrlen);
} else
#endif
m->m_data += max_linkhdr;
OpenPOWER on IntegriCloud