Subject: Re: patch to align ip headers.. To: Darren Reed <>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU> List: tech-net
Date: 04/25/2000 19:13:30 In message <>Darren Reed writes >Is
there any reason to allocate a new mbuf by calling something
like >m_pullup() when we can just shift the data in the current
mbuf ? >Is there a case where the patch below won't work ?  Do
we still do structure-sharing on external mbufs/mbuf clusters?
If so, loopback or if_faith or some others could deliver packets
to ip_input() which are still shared. In which case you better
be darn careful not to clobber the contents.  I once implemented
a non-copying sendfile()/splice(). There were a surprising
number of corner cases cases where mbuf pages (whcih were really
UBC-ish pages wrapped in external mbufs) were being modified by
the networking stack.  Modify data to do a pullup or append on
an mbuf cluster, and ka-pow!, the same memory writes start
showing up in your file buffer cache.  *Not* fun.