Hi
Just started on KMDf . I have a requirement to do something like that is described in latest NT insider - Inverted call mode.
OSR sample = the default Q handles ICOTLs, fwd ICOTL1 to NotificationQ, when ICOTL2 comes retrieve/complete ICOTL1 as well.
But I do not see requests being forwarded to the (notification) queue.
The driver I got already has a default queue and IOCTL queue.
It forwards all ICOTLs from defaultQ to IOCTL queue.
I added 2 IOCTLs and fwded those as well to IOCTL queue (EvtIODeviceControl())
Rest of below is just based on the OSR sample
***
I fwd the ICOTL1 to NotificationQ.
For ICOTL2, I try to pull IOCTL1 from NotificationQ and complete these both.
what I am observing is the ICOTL1 never gets **re-fwded*** to the Notification-Q. Just before I fwd, I do below
–
queueStatus = WdfIoQueueGetState(Ext->NotificationQueue, NULL, NULL );
DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, “Q_Status = 0x%X\n”, queueStatus);
–
Above always (i.e. even after I send xple IOCTL1s’ from app) prints below, which means the queue is ready, but no requests are pending.
Q_Status = 0xF - WDF_IO_QUEUE_STATE
Also below call to fwd is also always success.
status = WdfRequestForwardToIoQueue(Request, Ext->NotificationQueue);
if(!NT_SUCCESS(status)) …
But it returns below
InvertedNotify: Failed to retrieve request. Status = 0x8000001a –>
#define STATUS_NO_MORE_ENTRIES ((NTSTATUS)0x8000001AL)
> I created Notification Q like below
WDF_IO_QUEUE_CONFIG_INIT(&queueConfig,
WdfIoQueueDispatchManual);
queueConfig.PowerManaged = WdfFalse;
status = WdfIoQueueCreate(Device,
&queueConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&Ext->NotificationQueue);
So The call to fwd the 2nd time (to a different Q) is successful, but neither
> WdfIoQueueGetState() nor WdfIoQueueRetrieveNextRequest(NotificationQ) return what I expect/need.
Let me know anyways to debug.
Thx