Hi Luigi,

Luigi Rizzo wrote:
> 
> so i have a question for you -- the next step on this kind of
> optimizations is to avoid that m_pullup() allocates an mbuf
> when data is already contiguous and in a writable (non-shared)
> cluster.
> 
> Garret was suggesting a new interface for this, at the beginning
> i thought the same, but now i am a bit uncertain on whether
> it is really necessary to use a different interface,
> or whether this would cause compatibility
> problems with other BSD's.
> 
> Maybe you have already thought about this issue while developing
> the KAME code, and can say something on the topic ?

Though I am not a mbuf expert, I try to state my understanding.  (If some
other KAME guys read this thread, please response.)

As Bill already said, there are the code those rely on the side-effect
of m_pullup() which ensure that the data is not shared.  Our code also
has such dependency.  If we change the behaviour, probably we will
have invisible bugs.

The possible way is to introduce a new API that does as you are
proposing, that is to pullup the mbuf regardless of their
writability.  In this case, we can use the new API in a new code to
gain the performance.  Also, the old code works with no problem.

I think, if we want a new m_pullup, a new API is a better solution.

---
Keiichi SHIMA
IIJ Research Laboratory  <[EMAIL PROTECTED]>
KAME Project <[EMAIL PROTECTED]>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to