Hello all,
I am developing a KMDF loopback driver using high speed iso transfer (the data stream originates on hardware, gets read in my driver and is written back to hardware). I am experimenting with ways to achieve minimum latency.
My question: is there a way to modify the contents of PURB->UrbIsochronousTransfer.TransferBuffer in between the WdfRequestSend and the EvtRequestCompletionRoutine for a write operation? I’ve tried this, but modifying the write URB’s data buffer after submitting the request hasn’t seemed to have any effect.
I’ve been trying to get the following sequence:
-
Queue a bunch of read URB’s and a bunch of write URB’s, specifying some latency between each read/write pair.
-
On read URB completion routine, fill in corresponding, already-submitted write URB’s TransferBuffer contents, (a little more complicated than this, I use an overflow buffer since my driver must adapt to a hardware dictated transmission rate). Note that I am not trying to change anything in the write URB struct itself, e.g. the IsoPacket[N].Offsets or Lengths; rather, I just want to modify the contents of its TransferBuffer.
-
Is the above even possible?
-
Is this a bad idea for other reasons, e.g. is URB write request submission so fast that this avenue of optimization doesn’t even buy me anything?
(I am already using WdfRequestReuse, which certainly helps streamline things.)
Regards,
Andrew