From owner-cvs-all Sun Aug 11 11: 0:55 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 979E137B400; Sun, 11 Aug 2002 11:00:49 -0700 (PDT) Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51A4E43E65; Sun, 11 Aug 2002 11:00:49 -0700 (PDT) (envelope-from rizzo@iguana.icir.org) Received: (from rizzo@localhost) by iguana.icir.org (8.11.6/8.11.3) id g7BI0d588274; Sun, 11 Aug 2002 11:00:39 -0700 (PDT) (envelope-from rizzo) Date: Sun, 11 Aug 2002 11:00:39 -0700 From: Luigi Rizzo To: Bosko Milekic Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c Message-ID: <20020811110039.A88059@iguana.icir.org> References: <200208111017.g7BAHvWK044438@freefall.freebsd.org> <20020811134830.A95732@unixdaemons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020811134830.A95732@unixdaemons.com>; from bmilekic@unixdaemons.com on Sun, Aug 11, 2002 at 01:48:30PM -0400 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Aug 11, 2002 at 01:48:30PM -0400, Bosko Milekic wrote: > > On Sun, Aug 11, 2002 at 03:17:57AM -0700, Luigi Rizzo wrote: > > luigi 2002/08/11 03:17:57 PDT > > > > Modified files: (Branch: RELENG_4) > > sys/kern uipc_mbuf.c > > Log: > > Bring back mcl_pool_max to 0 as default, while i investigate > > on some problems people were having with it (likely > > some missing initialization of mbuf header fields in the > > handling of the free list). > > Yes, you fail to properly initialize the mbuf when you allocate it from > the 'mcl_pool' thing. > > You need to initialize some of the pkthdr fields as well as the flags > field, as MGETHDR() does. so, apparently 3 fields were not initialized properly (compared to MGETHDR): m_flags (had extra bits set) rcvif (not zeroed) csum_flags not zeroed in practice only the first one seems to be the source of problems at least here, but of course all three need to be reset. The following patch to m_getcl() near line 580 should do the trick: splx(s); mp->m_nextpkt = NULL; mp->m_data = mp->m_ext.ext_buf; + mp->m_flags = (M_PKTHDR|M_EXT); + mp->m_pkthdr.rcvif = NULL; + mp->m_pkthdr.csum_flags = 0; return mp; } else MGETHDR(mp, how, type); cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message