From owner-cvs-all Sat Sep 21 3:39: 4 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 26D7437B401; Sat, 21 Sep 2002 03:39:03 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBC2E43E4A; Sat, 21 Sep 2002 03:39:01 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g8LAct4v038167; Sat, 21 Sep 2002 12:38:55 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Darren Reed Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, John@reed.wattle.id.au, Baldwin Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c In-Reply-To: Your message of "Sat, 21 Sep 2002 19:54:43 +1000." <200209210954.TAA28569@avalon.reed.wattle.id.au> Date: Sat, 21 Sep 2002 12:38:55 +0200 Message-ID: <38166.1032604735@critter.freebsd.dk> From: Poul-Henning Kamp 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 In message <200209210954.TAA28569@avalon.reed.wattle.id.au>, Darren Reed writes : >In some email I received from Poul-Henning Kamp, sie wrote: >> Darren, >> >> You don't seem to understand that this function is (should only be) >> used in cases where m_pkthdr.len cannot be used and that the only >> possible way to find the length in those cases is to traverse the >> chain. > >So, explain to me why you've patched code to use m_length() in all >those places where m_pkthdr.len can be used and walking the chain >is a last-resort with no tail pointer is required. I patched only code which walked the mbuf chain locally, and I patched it only to use m_length() in order to not even have to deal with trying to unravel the specific pitt-falls of the local environment. If nothing else you should thank me for making it easier for you to grep out the future victims of your crusade. >> If you feel it is important to be able to use m_pkthdr.len in all >> cases, feel free to change the code which calls m_length() to be >> able to do this instead of calling m_length(). > >I think it should not use m_length() at all if you don't want to >rename m_length() or fix it so it works quicker for the most common >case. As I said, and you for got to quote: "Please keep me out of the loop". >That said, would anyone object to me adding the macro below to FreeBSD >in sys/mbuf.h ? It's a tad gross because of the local variables :/ Yes, I would very much object to that, it is butt-ugly, there is no performance need for this to be inlined, and your entire interest in this seems to be more about ego-restoration than about code readability or quality. Please Darren, go do something worthwhile rather than waste our time. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message