RTL8139: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
Warthog (talk | contribs)
Warthog (talk | contribs)
Line 86: Line 86:
* '''AAP - Accept All Packets'''. Accept all packets (run in promiscuous mode).
* '''AAP - Accept All Packets'''. Accept all packets (run in promiscuous mode).


You can also enable a nice option in this register : the WRAP option. It enables the Rx buffer to act as a ring buffer: if a packet is being written near the end of the buffer and the RTL8139 knows you've already handled data before this (thanks to CAPR), the packet will continue at the beginning of the buffer.
Another bit, the WRAP bit, controls the handling of receive buffer wrap around. If WRAP is 0, the Rx buffer is treated as a traidtional ring buffer: if a packet is being written near the end of the buffer and the RTL8139 knows you've already handled data before this (thanks to CAPR), the packet will continue at the beginning of the buffer.
If WRAP is 1, the remainder of the packet will be written contiguously (overflowing the actual receive buffer) so that it can be handled more efficiently. This means the buffer must be an additional 1500 bytes (to hold the largest potentially overflowing packet).


You can also tell the size of your RX buffer here, however if you use a 8k + 16 buffer as described before, writing zeroes is enough.
You can also tell the size of your RX buffer here, however if you use a 8k + 16 buffer as described before, writing zeroes is enough. To use the WRAP=1 bit, an 8K buffer must in fact be 8k+16+1500 bytes.


Example:
Example: