• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re:mbuf data access (repost)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:mbuf data access (repost)


  • Subject: Re:mbuf data access (repost)
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 12 Jun 2006 10:46:06 +0200

On 7 juin 06, at 19:26, Josh Graessley wrote:



mbuf_len like mbuf_data works whether or not MBUF_EXT is set. MBUF_EXT just indicates that the actual implementation of the mbuf is storing the data in an external cluster and not in the mbuf data structure itself. The one reason this would be important to a client of the mbuf is the case where you may modify data. In some cases, the reference to the external cluster may be shared.



Is there a way to find out if those mbufs are shared ?



If this is the case, you will need to duplicate the data before modifying it.



Duplicate data means duplicate mbuf or the whole chain, or only the data returned with mbuf_datastart ?
What method should i use : mbuf_dup, mbuf_copym or mbuf_copydata ?
In my code (in sf_data_in and sf_data_out) , i check out if mbuf was tagged, in this case filter simply return,
otherwise i set a tag for the mbuf and push it in a queue for re- injection.
When timer is fired mbuf is retrieve from queue and the mbuf is processed.
So, do i need to duplicate mbuf before tag ? before push it in queue ? or before re-injection ?




Jean-Yves

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: mbuf data access (repost)
      • From: Peter Lovell <email@hidden>
  • Prev by Date: Re: manual network configuration problem
  • Next by Date: Boundary communication using IOMemory* and IOMemoryDescriptor*. Comments awaited.
  • Previous by thread: Re: manual network configuration problem
  • Next by thread: Re: mbuf data access (repost)
  • Index(es):
    • Date
    • Thread