• 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: ENOBUFS calling ctl_enqueuembuf
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ENOBUFS calling ctl_enqueuembuf


  • Subject: Re: ENOBUFS calling ctl_enqueuembuf
  • From: Phil Jordan <email@hidden>
  • Date: Sun, 19 Jan 2014 16:50:55 -0800

I haven't had much joy with the kernel ctl sockets. There doesn't seem to be a sensible way to do reliable delivery. As far as I can tell there's no equivalent to other kernel sockets' sock_upcall callback for the case when there is space for a write in the socket's queue again. In other words, yes, ctl_enqueuembuf() will return ENOBUF once you fill up the queue, and it's not clear what you should do if you really do want to send that message as soon as there is space in the queue again.

One workaround is to call get/setsockopt in userspace when you run of data/messages to read, and on the kernel side of the sockopt callback, pump your internal message queue into the kctl socket until it's full again. (of course, if your message source is the network, you'll probably have to live with dropping some packets if userspace is slow to process them - you can't just queue an infinite amount of data)


FWIW, I would love to be proven wrong on this. Also annoying: we can't make our own custom socket protocol to replace kctl as the protocol registration API is private.

Phil

--
http://philjordan.eu/ - Phil Jordan, software development contractor
 _______________________________________________
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: 
 >ENOBUFS calling ctl_enqueuembuf (From: Adam Schepis <email@hidden>)
 >Re: ENOBUFS calling ctl_enqueuembuf (From: Vincent Lubet <email@hidden>)
 >Re: ENOBUFS calling ctl_enqueuembuf (From: Adam Schepis <email@hidden>)

  • Prev by Date: Re: Meaning of '->' in kernel panic log
  • Next by Date: Use own compiled XNU kernel
  • Previous by thread: Re: ENOBUFS calling ctl_enqueuembuf
  • Next by thread: Zone information for address
  • Index(es):
    • Date
    • Thread