Type Of Memory To Create Device Specific SGL

Hi All,
I am writing a driver for a device which takes two things.

  1. Two Circular ring buffers. One for submitting the commands and other for completing them. The driver writes the commands with a tag to the submission ring buffer and then the hardware writes the completions to completion ring buffer.

  2. Each command can have a SGL list.

I am pretty sure that for the ring buffers itself, I should be able to allocate a Common buffer and assign it to the device.

For 2 (region where I create the SGL descriptors) , I believe that common buffer should do the trick as well but would like to be corrected if I am missing something.
Assuming My device can transfer data up to 256 MB.

Please advice.
Thanks

  • Aj

Yes. Both would be in a common buffer… often the same common buffer, in fact.

Peter