I am working on a crypto driver on linux kernel 2.2.14.. Currently my app
provides data to the driver and the driver process the data (say encrypt)
and gives it back to the app... This is a synchronous transfer mode.. But i
want to do this in an asynchronous manner.... ie user app supplies data and
the function supplying the data returns.. say after processing the data..
the driver informs the user app by some mechanism that the data is processed
and now the user app may get back the result....
These are the possible ways i think i can proceed..
One way is to signal the app say from my bottom half that the packet
processing is over... and now u can take the data... for this i will have to
maintain a shared memory of some sort right...???..
After getting the signal in the signal handler the user app sends another
request to get the data from the driver.. right??.. now i can copy the
result back to the user memory using copy_to_user....
which one of the methods is best???... or is there any other way to do this
kind of async transfer.?????...
I think implemnting the shared memory and managing it will be more complex
than the later one....
And this driver i am working on needs high throughput for packet
processing... and thus i would like to avoid copying data to and fro from
user memory and all...
Or for avoiding copying should i use mmap and all.... pls guide me on
or is there any mechanism by which i can send data also while issuing
any pointers in this area is very much appreciated....
thank u all