Re: CTL_DATA_NOWAKEUP not working as expected - SOLVED
Re: CTL_DATA_NOWAKEUP not working as expected - SOLVED
- Subject: Re: CTL_DATA_NOWAKEUP not working as expected - SOLVED
- From: Markus Hanauska <email@hidden>
- Date: Wed, 20 Aug 2008 19:05:12 +0200
Ah, okay, after reading some more kernel source, I found the problem
myself. The problem is not with the wake-up flag itself, but with the
CTL_DATA_EOR flag. The rather minimal documentation you can find
online and in the H-file kinda implies that this flag is not even
used (the documentation for ctl_enqueuedata mentions that the no-wake-
up flag is the only useful flag, so I thought that wether I use
CTL_DATA_EOR or not makes no difference in the first place; not true.
This flag decides if the next enqueued mbufs belong to the same
packet or form a packet of their own.
On Wed, 2008-08-20, at 17:58, Markus Hanauska wrote:
for (i = 0; i <= max; i++) {
// ... some code left out ...
result = ctl_enqueuedata(
ctlref,
unit,
&packed,
sizeof(packed),
i < max ? CTL_DATA_NOWAKEUP : CTL_DATA_EOR
);
// ... some code left out ...
}
The code works as expected when always sending this flag:
result = ctl_enqueuedata(
ctlref,
unit,
&packed,
sizeof(packed),
i < max ? (CTL_DATA_NOWAKEUP | CTL_DATA_EOR) : CTL_DATA_EOR
);
That's it. 10.3.9 didn't even know such a flag, so I paid too little
attention to it.
--
Best Regards,
Markus Hanauska
_______________________________________________
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