Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Sep 2002 02:16:27 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Darren Reed <darrenr@reed.wattle.id.au>, John Baldwin <jhb@FreeBSD.org>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern uipc_mbuf.c 
Message-ID:  <Pine.BSF.4.21.0209210211420.23681-100000@InterJet.elischer.org>
In-Reply-To: <37234.1032598916@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sat, 21 Sep 2002, Poul-Henning Kamp wrote:

> In message <200209210851.SAA28535@avalon.reed.wattle.id.au>, Darren Reed writes
> :
> 
> >I don't dispute that there should be a m_length(), however, I do not
> >agree it should be implemented the way it currently is - also finding
> >the last mbuf.  There is a clear majority of cases which call m_length()
> >with last == NULL, all of which are penalised in having to do a loop
> >through all of the mbuf's rather than extracting m_pkthdr.len when able
> >to do so.
> 
> 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.

Probablyu this misunderstanding comes because under irix (and pfilter
supports irix) the m_length() function has the functionality
that Darren seems to be talking about. It's an unfortunate fact that 
this obvious name has been used before.. Personally I think
it ould be better named as m_tally or m_iterate or something..

I expect something called m_length to be more the irix definition
of "the cannonical way to get the length of the packet at all times".
So I think it's an unfortunate choice of name.


> 
> Once this fact registers with you, I pressume I can expect you to stop
> proposing and committing patches which are wrong in theory and wrong
> in practice.
> 
> And presumably: we can bury this silly thread.
> 
> 
> 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().
> 


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?Pine.BSF.4.21.0209210211420.23681-100000>