Re: ENOBUFS calling ctl_enqueuembuf
Re: ENOBUFS calling ctl_enqueuembuf
- Subject: Re: ENOBUFS calling ctl_enqueuembuf
- From: Adam Schepis <email@hidden>
- Date: Tue, 14 Jan 2014 15:42:47 -0500
Thanks for the response Vincent. I think you got me moving in the right direction!
I used ctl_getenqueuespace primarily to determine the size i had available (it is printed in a debug statement). I doubled checked the size of my mbuf by adding a mbuf_len(send_buf) and verifying that it is smaller than 8192 (it is 24 bytes.)
Next i realized that i had chained that mbuf to an mbuf given to me by the networking stack. I decided that this may be a bad idea since i dont technically "own" that mbuf. Instead i called mbuf_dup on the data from the stack and chained my mbuf to that. After doing that the ctl_enqueuembuf calls started working again.
i'm still a bit concerned that i haven't fixed the real issue and that somehow the queue just got cleared (i crashed it once while testing hastily) but as of now its working correctly.
Thanks,
Adam
_______________________________________________
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