Author: glebius
Date: Wed Jan 30 18:40:19 2013
New Revision: 246130
URL: http://svnweb.freebsd.org/changeset/base/246130
Log:
Utilize m_get2() to get mbuf of appropriate size.
Modified:
head/sys/netinet/libalias/alias.c
Modified: head/sys/netinet/libalias/alias.c
==============================================================================
--- head/sys/netinet/libalias/alias.c Wed Jan 30 18:24:29 2013
(r246129)
+++ head/sys/netinet/libalias/alias.c Wed Jan 30 18:40:19 2013
(r246130)
@@ -1760,21 +1760,7 @@ m_megapullup(struct mbuf *m, int len) {
if (m->m_next == NULL && M_WRITABLE(m) && M_TRAILINGSPACE(m) >= RESERVE)
return (m);
- if (len <= MCLBYTES - RESERVE) {
- mcl = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
- } else if (len < MJUM16BYTES) {
- int size;
- if (len <= MJUMPAGESIZE - RESERVE) {
- size = MJUMPAGESIZE;
- } else if (len <= MJUM9BYTES - RESERVE) {
- size = MJUM9BYTES;
- } else {
- size = MJUM16BYTES;
- };
- mcl = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, size);
- } else {
- goto bad;
- }
+ mcl = m_get2(M_NOWAIT, MT_DATA, M_PKTHDR, len + RESERVE);
if (mcl == NULL)
goto bad;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"