KEXT <-> user communication
KEXT <-> user communication
- Subject: KEXT <-> user communication
- From: Kieran Tyrrell <email@hidden>
- Date: Mon, 07 Nov 2011 12:36:13 +0100
Hi,
I have a IP filter kext (based on the enetlognke sample code) which receives network packets and forwards them to a user daemon process running in the mach realtime scheduling class.
Currently I have implemented this communication between the kext and the user process using a PF_SYSTEM / SYSPROTO_CONTROL socket, by calling ctl_enqueuedata from the kext (as illustrated in the tcplognke sample).
The problem I am having is that the arriving network packets are processed promptly by the filter, and the user daemon process (running at priority 97) has the capacity to process them as soon as they are received, but there are sometimes delays between the filter calling ctl_enqueuedata and the user process receiving the data. The delays can be up to 16ms.
So my question is, are there any options to improve the performance of PF_SYSTEM / SYSPROTO_CONTROL sockets and ctl_enqueuedata, and if not, as an alternative, how can I share a mach semaphore and shared memory region between the kext and the user process? (I have managed to create mach semaphores and shared memory regions in both the kext and the user process, but I can't figure out how to share them!)
Is there a better way to achieve this low latency kext<->user process communication?
Thanks,
Kieran. _______________________________________________
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