Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CTL_DATA_NOWAKEUP not working as expected - SOLVED




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: http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden
References: 
 >CTL_DATA_NOWAKEUP not working as expected (From: Markus Hanauska <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.