there was a thread a while ago (by Robert Keiser), about how a driver
is supposed to lock pages in RAM, with no definite solution. I have a
I am working on a network driver, which receives data buffers to be
transmitted (the buffers are in a struct sk_buff) by a DMA network
When a buffer arrives, I have to do two things which I don't know how
1. Before I tell the device what to DMA from, I have to lock the
buffer in RAM.
2. I have to keep it in RAM until the device reports it is done.
(Of course I could copy the buffer to a driver allocated resident
buffer, but for a Gigabit driver, this is a waste of time).
So, is there really no easy way to do this??
Other OS's I worked on have a driver-accessible system call to do this
kind of thing, and it seems it is indispensible.
Or, is it guaranteed that sk_buff data buffer will be resident in RAM
from the time it is given to the driver, to the time the driver
releases the sk_buff?
If you look at the current Intel Gigabit e1000 driver, present in
Linux source, this driver does not even care about that: it just
assumes the buffer is locked. Either it is faulty, it is really
guaranteed to be locked. Which is the case?