• 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: ctl_enqueuedata() woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ctl_enqueuedata() woes


  • Subject: Re: ctl_enqueuedata() woes
  • From: Adi Masputra <email@hidden>
  • Date: Wed, 3 Oct 2007 18:51:40 -0700

How are you calling ctl_enqueuedata() -- i.e. what are its parameters?

Adi

On Oct 3, 2007, at 9:26 AM, Karl Pickett wrote:

I have modified the tcplognke example and it was pleasant sailing until now. I am sending packets to userspace that are about 2020 bytes long. Userspace reads each packet and responds with a setsockopt() call with a 2k structure.

When a burst of packets gets sent, some packets will fail to be received by user space but no error was indicated from ctl_enqueuedata()

Calling ctl_getenqueuespace(), the packets end up disappearing when ever the queuespace is not the maximum. Bumping up the socket recvbuf from 8k to 60k did not help one bit!

An example where I bumped the rcv_buff up to 60000:

Oct 2 17:16:21 karls-power-mac-g4 kernel[0]: ctl_enqueuedata 35: ret 0, space=60000
Oct 2 17:16:21 karls-power-mac-g4 kernel[0]: ctl_enqueuedata 36: ret 0, space=57924
Oct 2 17:16:21 karls-power-mac-g4 kernel[0]: ctl_enqueuedata 37: ret 0, space=55848
Oct 2 17:16:21 karls-power-mac-g4 kernel[0]: ctl_enqueuedata 38: ret 0, space=53772
Oct 2 17:16:21 karls-power-mac-g4 kernel[0]: ctl_enqueuedata 39: ret 0, space=51696
Oct 2 17:16:21 karls-power-mac-g4 kernel[0]: ctl_enqueuedata 40: ret 0, space=49620
Oct 2 17:16:21 karls-power-mac-g4 kernel[0]: ctl_enqueuedata 41: ret 0, space=47544
Oct 2 17:16:21 karls-power-mac-g4 kernel[0]: ctl_enqueuedata 42: ret 0, space=60000


Only packets 35 and 42 were received by userspace! The rest went to a bit bucket somewhere, and as you can see the ret 0 indicates no error by ctl_enqueuedata. In some cases when the space was completely exhausted ctl_enqueuedata would return an error, but otherwise the packets would just disappear when ever the enqueuespace was not at max.




--
Karl Pickett
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin


_______________________________________________
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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >ctl_enqueuedata() woes (From: "Karl Pickett" <email@hidden>)

  • Prev by Date: Re: ctl_enqueuedata() woes
  • Next by Date: Re: ctl_enqueuedata() woes
  • Previous by thread: Re: ctl_enqueuedata() woes
  • Next by thread: Re: ctl_enqueuedata() woes - FIXED
  • Index(es):
    • Date
    • Thread