wrap copy in 8139too.c
I came across a function wrap_copy on http://lxr.free-electrons.com/source.../net/8139too.c
Can some one help to understand what it is doing. What I interpret it is that some how the person is tying to copy payload from DMA to sk buffer.Is this interpretation correct? What exactly are we trying to achieve via wrap_copy function call? |
The function is copying from a ring (circular) buffer into the skb buffer. Since the memcpy may go off the end of the ring buffer, the function sometimes has to break up the copy into two parts (wrapping back around to the beginning of the ring buffer for the rest of the data).
|
Hi, thanks for your reply
|
Also note - I don't see how that code will ever be called. The only valid _user_ configurable values are 0 and 2. RX_BUF_IDX of 3 is not defined anywhere.
|
Quote:
It makes some sense to leave the code there in case the 64k buffer option is ever reinstated. |
All times are GMT -5. The time now is 10:57 AM. |