From owner-cvs-all@FreeBSD.ORG Mon Feb 21 01:52:09 2005 Return-Path: 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 C62AE16A4CE for ; Mon, 21 Feb 2005 01:52:09 +0000 (GMT) Received: from mail-svr1.cs.utah.edu (mail-svr1.cs.utah.edu [155.98.64.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99F9D43D55 for ; Mon, 21 Feb 2005 01:52:09 +0000 (GMT) (envelope-from swami@cs.utah.edu) Received: from localhost (localhost [127.0.0.1]) by mail-svr1.cs.utah.edu (Postfix) with ESMTP id 65948346F2 for ; Sun, 20 Feb 2005 18:52:09 -0700 (MST) Received: from mail-svr1.cs.utah.edu ([127.0.0.1]) by localhost (mail-svr1.cs.utah.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04653-03 for ; Sun, 20 Feb 2005 18:52:09 -0700 (MST) Received: from gradofc8.cs.utah.edu (gradofc8.cs.utah.edu [155.98.66.68]) by mail-svr1.cs.utah.edu (Postfix) with ESMTP id 259DF346EC for ; Sun, 20 Feb 2005 18:52:09 -0700 (MST) Received: by gradofc8.cs.utah.edu (Postfix, from userid 4970) id D44CEAD9DA; Sun, 20 Feb 2005 18:52:08 -0700 (MST) Received: from localhost (localhost [127.0.0.1]) by gradofc8.cs.utah.edu (Postfix) with ESMTP id BF71FAD9D8 for ; Sun, 20 Feb 2005 18:52:08 -0700 (MST) Date: Sun, 20 Feb 2005 18:52:08 -0700 (MST) From: Swami Pichumani To: cvs-all@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at cs.utah.edu Subject: question on mbuf(m_copyback) code X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2005 01:52:09 -0000 Hi all, I had a question on the m_copyback code (I use pretty old version but feel this might still be same). Inside the while(len>0) loop, the first line kinda seems odd. It subtracts the off (which becomes after first iteration) from m_len(which is supposed to tell the amount of data in the particular mbuf) to find the free space i nthe mbuf. This obviously would not work without m_len getting initialized to MLEN (or MHLEN), which is not the right thing to do (since when an mbuf has 0 data when initialized and m_len would be zero). thanks in advance for any comments on this, -swami