Date: Sat, 21 Sep 2002 12:38:55 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Darren Reed <darrenr@reed.wattle.id.au> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, John@reed.wattle.id.au, Baldwin <jhb@FreeBSD.org> Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c Message-ID: <38166.1032604735@critter.freebsd.dk> In-Reply-To: Your message of "Sat, 21 Sep 2002 19:54:43 %2B1000." <200209210954.TAA28569@avalon.reed.wattle.id.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38166.1032604735>