Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2002 10:46:00 -0800
From:      "Sam Leffler" <sam@errno.com>
To:        "Robert Watson" <rwatson@FreeBSD.ORG>
Cc:        "Andrew Gallatin" <gallatin@cs.duke.edu>, "Luigi Rizzo" <rizzo@icir.org>, <current@FreeBSD.ORG>
Subject:   Re: mbuf header bloat ?
Message-ID:  <235101c294b2$e66ce160$52557f42@errno.com>
References:  <Pine.NEB.3.96L.1021125133654.42342C-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> > I don't see this problem; looutput looks to do the right thing.  FWIW
I've
> > passed mbufs w/ mtags through the loopback interface.
>
> This refers specifically to the following code snippet:
>
>         if (m && m->m_next != NULL && m->m_pkthdr.len < MCLBYTES) {
>                 struct mbuf *n;
>
>                 MGETHDR(n, M_DONTWAIT, MT_HEADER);
>                 if (!n)
>                         goto contiguousfail;
>                 MCLGET(n, M_DONTWAIT);
>                 if (! (n->m_flags & M_EXT)) {
>                         m_freem(n);
>                         goto contiguousfail;
>                 }
>
>                 m_copydata(m, 0, m->m_pkthdr.len, mtod(n, caddr_t));
>                 n->m_pkthdr = m->m_pkthdr;
>                 n->m_len = m->m_pkthdr.len;
>                 n->m_pkthdr.aux = m->m_pkthdr.aux;
>                 m->m_pkthdr.aux = (struct mbuf *)NULL;
>                 m_freem(m);
>                 m = n;
>         }
>

Something is wrong with your tree:

ebb% grep aux ../sys/mbuf.h
ebb%

The above code is correct in the repo as is the m_getcl code.

    Sam


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?235101c294b2$e66ce160$52557f42>